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


Viewing file:     save_host.cgi (2.35 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl
# save_host.cgi
# Save, create or delete a host table record

require './mysql-lib.pl';
&ReadParse();
$access{'perms'} || &error($text{'perms_ecannot'});

if ($in{'delete'}) {
    # Delete some host
    $access{'perms'} == 1 || &can_edit_db($in{'olddb'}) ||
        &error($text{'perms_edb'});
    &execute_sql_logged($master_db,
             "delete from host where host = '$in{'oldhost'}' ".
             "and db = '$in{'olddb'}'");
    }
else {
    # Validate inputs
    &error_setup($text{'host_err'});
    $in{'host_def'} || $in{'host'} =~ /^\S+$/ ||
        &error($text{'host_ehost'});
    if ($access{'perms'} == 2 && $access{'dbs'} ne '*') {
        $db = $in{'dbs'};
        }
    else {
        $db = $in{'db_def'} == 1 ? "" :
              $in{'db_def'} == 2 ? $in{'dbs'} : $in{'db'};
        $db =~ /^\S*$/ || &error($text{'host_edb'});
        }
    if ($access{'perms'} == 2) {
        $in{'new'} || &can_edit_db($in{'olddb'}) ||
            &error($text{'perms_edb'});
        &can_edit_db($db) || &error($text{'perms_edb'});
        }

        %perms = map { $_, 1 } split(/\0/, $in{'perms'});
    @desc = &table_structure($master_db, 'host');
        @pfields = map { $_->[0] } &priv_fields('host');
    $host = $in{'host_def'} ? '%' : $in{'host'};
    if ($in{'new'}) {
        # Create a new host
        $sql = "insert into host (host, db, ".
                       join(", ", @pfields).
                       ") values (?, ?, ".
                       join(", ", map { "?" } @pfields).")";
                &execute_sql_logged($master_db, $sql,
                        $host, $db,
                        (map { $perms{$_} ? 'Y' : 'N' } @pfields));
        }
    else {
        # Update existing host
        $sql = "update host set host = ?, db = ?, ".
               join(", ",map { "$_ = ?" } @pfields).
               " where host = ? and db = ?";
        &execute_sql_logged($master_db, $sql,
            $host, $db,
            (map { $perms{$_} ? 'Y' : 'N' } @pfields),
            $in{'oldhost'}, $in{'olddb'});
        }
    }
&execute_sql_logged($master_db, 'flush privileges');
if ($in{'delete'}) {
    &webmin_log("delete", "host", $in{'oldhost'},
            { 'db' => $in{'olddb'},
              'host' => $in{'oldhost'} } );
    }
elsif ($in{'new'}) {
    &webmin_log("create", "host", $in{'host_def'} ? '' : $in{'host'},
            { 'db' => $db,
              'host' => $in{'host_def'} ? '' : $in{'host'} } );
    }
else {
    &webmin_log("modify", "host", $in{'host_def'} ? '' : $in{'host'},
            { 'db' => $db,
              'host' => $in{'host_def'} ? '' : $in{'host'} } );
    }
&redirect("list_hosts.cgi");


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