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

Software: Apache/2.0.54 (Fedora). PHP/5.0.4 

uname -a: Linux mina-info.me 2.6.17-1.2142_FC4smp #1 SMP Tue Jul 11 22:57:02 EDT 2006 i686 

uid=48(apache) gid=48(apache) groups=48(apache)
context=system_u:system_r:httpd_sys_script_t
 

Safe-mode: OFF (not secure)

/usr/libexec/webmin/dhcpd/   drwxr-xr-x
Free 3.83 GB of 27.03 GB (14.17%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     lookup_host.cgi (2.1 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl
# lookup_host.cgi
# Find a host with a certain name and re-direct to its editing form
# or present a list of matching hosts if multiple hosts are found

require './dhcpd-lib.pl';
&ReadParse();
$in{'host'} || &error($text{'lookup_ehostname'});

# Recursively find hosts
$conf = &get_config();
@hosts = &find_recursive("host", $conf);

# Check to see if the host contains 6 hex bytes for a Mac address
if ($in{'host'} =~ /:|\-|\./) {
    (my $justbytes = $in{'host'}) =~ s/[^A-Fa-f0-9]//g;
    if ($justbytes =~ /^[0-9a-f]{12}$/i) {
        # Treat this host as a mac address with arbitrary formatting
        $in{'host'} = join(':', unpack("(A2)*", $justbytes) );
        }
    }

# Look for a match
%access = &get_module_acl();
foreach $h (@hosts) {
    local $can_view = &can('r', \%access, $h);
    next if !$can_view && $access{'hide'};
    local $fixed = &find("fixed-address", $h->{'members'});
    local $hard = &find("hardware", $h->{'members'});
    if (&search_re($h->{'values'}->[0], $in{'host'}) ||
        $fixed && &search_re($fixed->{'values'}->[0], $in{'host'}) ||
        $hard && &search_re($hard->{'values'}->[1], $in{'host'})) {
        push(@foundhosts, $h);
        }
    }

# Go to the host if only 1 match found
if(scalar(@foundhosts)==1) {
    $host=@foundhosts[0];
        ($gidx, $uidx, $sidx) = &find_parents($host);
        &redirect("edit_host.cgi?idx=$host->{'index'}".
                  (defined($gidx) ? "&gidx=$gidx" : "").
                  (defined($uidx) ? "&uidx=$uidx" : "").
                  (defined($sidx) ? "&sidx=$sidx" : ""));
        }
# List multiple matching hosts
elsif(scalar(@foundhosts) > 1) {
    $desc = &text('ehost_hostlist', $in{'host'} );
    &ui_print_header($desc, "Matches", "" );
    foreach $h (@foundhosts) {
        ($gidx, $uidx, $sidx) = &find_parents($h);
        local $params="idx=$h->{'index'}".
                  (defined($gidx) ? "&gidx=$gidx" : "").
                  (defined($uidx) ? "&uidx=$uidx" : "").
                  (defined($sidx) ? "&sidx=$sidx" : "");
        printf("<a href=\"edit_host.cgi?%s\">%s</a><br/>\n",
            $params, $h->{'values'}->[0] );
        }
    }
# Show an error if no matches
else {
    &error(&text('lookup_ehost', $in{'host'}));
    }

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

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

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

--[ c99shell v. 1.0 pre-release build #16 powered by Captain Crunch Security Team | http://ccteam.ru | Generation time: 0.0033 ]--