!c99Shell v. 1.0 pre-release build #16!

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
EDT 2010 i686
 

uid=48(apache) gid=48(apache) groups=48(apache) 

Safe-mode: OFF (not secure)

/usr/sbin/   drwxr-xr-x
Free 52.3 GB of 127.8 GB (40.92%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     foomatic-ppdload (3.47 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl use Getopt::Std; getopts("hdR:"); help() if $opt_h; use Foomatic::PPD; use Foomatic::Defaults; my $file; my $printer; if ($opt_R) { # Remove entry $printer = $opt_R; } else { # Add entry $file = $ARGV[0]; $printer = $ARGV[1]; } if (!$opt_R) { # Add entry if (! -f "$libdir/db/source/printer/$printer.xml") { die "Printer $printer does not seem to exist in the database!\n"; } if (! -f $file) { die "The PPD file you specified, $file, does not seem to exist!\n"; } # Load the PPD my $p = new Foomatic::PPD $file, $printer; if ($opt_d) { # Parser PPD structure dump use Data::Dumper; local $Data::Dumper::Purity=1; local $Data::Dumper::Indent=1; print Dumper($p); } else { # Normal behavior, save as various option files by ID my @opts = $p->foo_options(); for (@opts) { my ($id, $xml) = ($_->{'id'}, $_->{'xml'}); my $ofile = "$libdir/db/source/opt/$id.xml"; open TMP, ">$ofile" or die "Cannot write $ofile!\n"; print STDERR "Writing $ofile\n"; print TMP join('',@{$xml}); close TMP; } # Add this printer to the ppd driver # Read the driver entry file open PPDENTRY, "< $libdir/db/source/driver/ppd.xml" or die "Cannot read $libdir/db/source/driver/ppd.xml!\n"; print STDERR "Reading $libdir/db/source/driver/ppd.xml\n"; $ppdentry = join('', ); close PPDENTRY; # Either we've got it already my $found = ($ppdentry =~ m![\s\n]*printer/$printer[\s\n]*!s); # Or we need to append a new item and write the file if (! $found) { $ppdentry =~ s!^(\s*)!$1 \n$1 printer/$printer\n$1 \n$1!m; open PPDENTRY, "> $libdir/db/source/driver/ppd.xml" or die "Cannot write $libdir/db/source/driver/ppd.xml!\n"; print STDERR "Writing $libdir/db/source/driver/ppd.xml\n"; print PPDENTRY $ppdentry; close PPDENTRY; } else { print STDERR "Printer $printer already registered as supported by the \"ppd\" driver!\n"; } } } else { # Remove entry # Read the driver entry file open PPDENTRY, "< $libdir/db/source/driver/ppd.xml" or die "Cannot read $libdir/db/source/driver/ppd.xml!\n"; print STDERR "Reading $libdir/db/source/driver/ppd.xml\n"; $ppdentry = join('', ); close PPDENTRY; # Do we have the requested entry? my $found = ($ppdentry =~ m![\s\n]*printer/$printer[\s\n]*!s); # Then we have to remove it and to write the file if ($found) { $ppdentry =~ s!\n+\s*[\s\n]*printer/$printer[\s\n]*\s*\n+!\n!sg; open PPDENTRY, "> $libdir/db/source/driver/ppd.xml" or die "Cannot write $libdir/db/source/driver/ppd.xml!\n"; print STDERR "Writing $libdir/db/source/driver/ppd.xml\n"; print PPDENTRY $ppdentry; close PPDENTRY; } else { print STDERR "Printer $printer not registered as supported by the \"ppd\" driver!\n"; } # Remove the option entries system("rm -f $libdir/db/source/opt/ppd-${printer}-*.xml"); } exit(0); sub help { select STDERR; print "\n"; print "Usage: foomatic-ppdload filename.ppd printer-id\n"; print " foomatic-ppdload -R printer-id\n"; print "\n"; print " The first form adds the printer with the ID printer-id\n"; print " and the PPD file filename.ppd to the \"ppd\" driver,\n"; print " the second form removes the printer with the ID\n"; print " printer-id from the \"ppd\" driver.\n"; print "\n"; exit(1); }

:: Command execute ::

Enter:
 
Select:
 

:: Shadow's tricks :D ::

Useful Commands
 
Warning. Kernel may be alerted using higher levels
Kernel Info:

:: Preddy's tricks :D ::

Php Safe-Mode Bypass (Read Files)

File:

eg: /etc/passwd

Php Safe-Mode Bypass (List Directories):

Dir:

eg: /etc/

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c999shell v. 1.0 pre-release build #16 Modded by Shadow & Preddy | RootShell Security Group | r57 c99 shell | Generation time: 0.0055 ]--