Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Unsupported Software
  • Search

Portage PHP Browser

This forum covers all Gentoo-related software not officially supported by Gentoo. Ebuilds/software posted here might harm the health and stability of your system(s), and are not supported by Gentoo developers. Bugs/errors caused by ebuilds from overlays.gentoo.org are covered by this forum, too.
Post Reply
Advanced search
5 posts • Page 1 of 1
Author
Message
Riklaunim
Apprentice
Apprentice
User avatar
Posts: 286
Joined: Thu Dec 16, 2004 5:59 pm
Location: Poland
Contact:
Contact Riklaunim
Website

Portage PHP Browser

  • Quote

Post by Riklaunim » Tue Jan 04, 2005 7:50 pm

I've made a simple PHP script that browses portage - files which usualy can be found in /usr/portage/ :)
- Download: HERE
It can:
- Brows through portage structure

Image
- When you roll over a folder in a /portage/subdir/ a tooltip will show up with description and URL from the ebuild file

Image
- All files in /portage/subdir/package/ can be displayed via highlight_string

Installation
- Unpack the script and send it to the server. The tooltip version (index.php) isn't PHP5 compatible. If you don't want the tooltip copy index_simple.php as index.php.
- Download a portage snapshot and extract it to the script folder, so you get:
./index.php
./portage/portage files
- Open index.php in the browser

Comments, suggestions? :)
Top
Crisis
l33t
l33t
User avatar
Posts: 613
Joined: Mon Feb 10, 2003 10:18 am
Location: Portland, OR

  • Quote

Post by Crisis » Tue Jan 04, 2005 9:06 pm

I assume this is meant to be ran locally, not accessible outside? Because there are a lot of security issues, but maybe it doesn't matter if it is ran locally.

But that begs the question, if you have local access, why do you need this?

I would be weary about putting this code as is on a publically available web server.
Top
Riklaunim
Apprentice
Apprentice
User avatar
Posts: 286
Joined: Thu Dec 16, 2004 5:59 pm
Location: Poland
Contact:
Contact Riklaunim
Website

  • Quote

Post by Riklaunim » Wed Jan 05, 2005 7:04 am

Portage files doesnt have any executable www etc. code... + application files are displayed via highlight_string... You can put it on a normal server and nothing will happen.
Top
Crisis
l33t
l33t
User avatar
Posts: 613
Joined: Mon Feb 10, 2003 10:18 am
Location: Portland, OR

  • Quote

Post by Crisis » Wed Jan 05, 2005 1:51 pm

What if someone passes in unexpected information to some of those variables?

You aren't even checking the input on some of those paths, what happens if they pass in something like portage/../../etc/passwd ?
Top
Riklaunim
Apprentice
Apprentice
User avatar
Posts: 286
Joined: Thu Dec 16, 2004 5:59 pm
Location: Poland
Contact:
Contact Riklaunim
Website

  • Quote

Post by Riklaunim » Wed Jan 05, 2005 4:47 pm

then waths this:

Code: Select all

// portage browser hardened
function kill($x)
	{
	$x = str_replace('../', '', $x);
	$x = str_replace('./', '', $x);
	return $x;
	}
$_GET = array_map("strip_tags", $_GET);
$_GET = array_map("kill", $_GET);
// checking finished
:P
Top
Post Reply

5 posts • Page 1 of 1

Return to “Unsupported Software”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy