Software: Apache/2.2.3 (CentOS). PHP/5.1.6 uname -a: Linux mx-ll-110-164-51-230.static.3bb.co.th 2.6.18-194.el5PAE #1 SMP Fri Apr 2 15:37:44 uid=48(apache) gid=48(apache) groups=48(apache) Safe-mode: OFF (not secure) /usr/bin/ drwxr-xr-x |
Viewing file: Select action/file-type: #!/usr/bin/perl -w use strict; use English; #use File::stat; use Errno; use Fcntl ':mode'; use Getopt::Long; my $FALSE = 0; my $TRUE = !$FALSE; our $debug; sub giveHelp() { print("Manweb is a replacement for Man. It gets reference \n"); print("documentation from the Worldwide Web or a private web. \n"); print("Manweb is distributed with the Netpbm package \n"); print("(http://netpbm.sourceforge.net).\n"); print("\n"); print("Documentation of Manweb is at \n"); print("\n"); print(" http://netpbm.sourceforge.net/doc/manweb.html\n"); print("\n"); print("Or if you have it properly installed, just use the command \n"); print("\n"); print(" manweb manweb \n"); } sub debug(@) { if ($debug) { print(STDERR @_, "\n"); } } sub findUrl($@); # findUrl() is recursive. sub findUrl($@) { my ($webdir, @topicList) = @_; #----------------------------------------------------------------------------- # Starting in the directory $webdir, find the URL for the documentation # of the topic identified by @topicList. @topicList is a main topic # followed by a subtopic of that topic, and so on. # # If @topicList is an empty list, return the url that refers to the # directory $webdir itself. #----------------------------------------------------------------------------- my $url; if (@topicList == 0) { # He's not specifying a topic; that means he just wants the index # of the specified directory -- but only if it exists. if (-d($webdir)) { $url = directoryUrl($webdir); } } else { my $topic0 = shift(@topicList); # First look for a .url file $url = doturl($webdir, $topic0, @topicList); if (!defined($url)) { # No .url file. Look for directory. my $subwebdir = "$webdir/$topic0"; if (-d($subwebdir)) { $url = findUrl($subwebdir, @topicList); } else { # No directory. Look for html file. my $htmlfilename = "$webdir/$topic0.html"; if (-f($htmlfilename)) { if (@topicList > 0) { print(STDERR "Ignoring subtopic chain '@topicList' because " . "There is an html file named " . "'$htmlfilename'.\n"); } $url = "file://$htmlfilename"; } } } } return($url); } sub findUrlInPath($@) { my ($webdirR, @topicList) = @_; my @webdirLeft = @$webdirR; my $url; for (my $webdir = shift(@webdirLeft); defined($webdir) && !defined($url); $webdir = shift(@webdirLeft)) { $url = findUrl($webdir, @topicList); } return $url; } sub directoryUrl($$) { # If this directory has an index file, that's the URL. Otherwise # it's just the directory itself. Too bad the browser doesn't do # this for us, like it does for HTTP URLs. my ($webdir) = @_; my ($dev, $ino, $mode, $rest) = stat("$webdir/index.html"); my $url; if (defined($mode) && S_ISREG($mode)) { $url = "file://$webdir/index.html"; } else { my ($dev, $ino, $mode, $rest) = stat("$webdir/index.htm"); if (defined($mode) && S_ISREG($mode)) { $url = "file://$webdir/index.htm"; } else { $url = "file://$webdir"; } } return($url); } sub doturl($$) { my ($webdir, $topic0, @topicList) = @_; #----------------------------------------------------------------------------- # Handle a .url file. # # If there is a file named "$topic0.url" in the directory $webdir, # return the URL that gets to the proper web page for subtopic list # @topiclist with respect to the URL in that .url file. # # If there's no such .url file, though, return an undefined value. #----------------------------------------------------------------------------- my $url; my $urlfilename = "$webdir/$topic0.url"; my $openworked = open(URLFILE, "<$urlfilename"); if ($openworked) { my @url = |
:: Command execute :: | |
:: Shadow's tricks :D :: | |
Useful Commands
|
:: Preddy's tricks :D :: | |
Php Safe-Mode Bypass (Read Files)
|
--[ c999shell v. 1.0 pre-release build #16 Modded by Shadow & Preddy | RootShell Security Group | r57 c99 shell | Generation time: 0.0059 ]-- |