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


Viewing file:     mass_delete.cgi (2.93 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl
# Delete a bunch of zones, after asking for confirmation

require './bind8-lib.pl';
&ReadParse();
$conf = &get_config();

$dparams = join("&", map { "d=".&urlize($_) } split(/\0/, $in{'d'}));
if ($in{'update'}) {
    # Redirect to mass update form
    &redirect("mass_update_form.cgi?".$dparams);
    exit;
    }
elsif ($in{'create'}) {
    # Redirect to mass create form
    &redirect("mass_rcreate_form.cgi?".$dparams);
    exit;
    }
elsif ($in{'rdelete'}) {
    # Redirect to mass record delete form
    &redirect("mass_rdelete_form.cgi?".$dparams);
    exit;
    }

# Get the zones
foreach $d (split(/\0/, $in{'d'})) {
    ($zonename, $viewidx) = split(/\s+/, $d);
    $zone = &get_zone_name_or_error($zonename, $viewidx);
    if ($zone->{'viewindex'} ne '') {
        $view = $conf->[$zone->{'viewindex'}];
        $zconf = $view->{'members'}->[$zone->{'index'}];
        }
    else {
        $zconf = $conf->[$zone->{'index'}];
        }
    &can_edit_zone($zconf, $view) ||
        &error($text{'master_edelete'});
    push(@zones, [ $zconf, $view ]);
    push(@znames, $zconf->{'value'});
    }
$access{'ro'} && &error($text{'master_ero'});
$access{'delete'} || &error($text{'master_edeletecannot'});

if (!$in{'confirm'}) {
    # Ask the user if he is sure
    &ui_print_header(undef, $text{'massdelete_title'}, "");

    @servers = &list_slave_servers();
    print &ui_confirmation_form("mass_delete.cgi",
        &text('massdelete_rusure', scalar(@zones),
              join(", ", @znames)),
        [ map { [ "d", $_ ] } split(/\0/, $in{'d'}) ],
        [ [ 'confirm', $text{'massdelete_ok'} ] ],
        @servers && $access{'remote'} ?
            $text{'delete_onslave'}." ".
            &ui_yesno_radio("onslave", 1) : "",
        );

    &ui_print_footer("", $text{'index_return'});
    }
else {
    # Do it!
    &ui_print_unbuffered_header(undef, $text{'massdelete_title'}, "");

    foreach $zi (@zones) {
        $zconf = $zi->[0];
        $view = $zi->[1];
        $type = &find_value("type", $zconf->{'members'});
        print &text('massdelete_zone', $zconf->{'value'}),"<br>\n";

        # delete the records file
        $f = &find("file", $zconf->{'members'});
        if ($f && $type ne 'hint') {
            &delete_records_file($f->{'value'});
            }

        # delete any keys
        &delete_dnssec_key($zconf);

        # remove the zone directive
        &lock_file(&make_chroot($zconf->{'file'}));
        &save_directive($view || &get_config_parent($zconf->{'file'}),
                [ $zconf ], [ ]);
        print $text{'massdelete_done'},"<p>\n";

        # Also delete from slave servers
        if ($in{'onslave'} && $access{'remote'}) {
            $viewname = $view ? $view->{'values'}->[0] : undef;
            print &text('massdelete_slaves',
                    $zconf->{'value'}),"<br>\n";
            @slaveerrs = &delete_on_slaves(
                $zconf->{'value'}, undef, $viewname);
            if (@slaveerrs) {
                print $text{'massdelete_failed'},"<br>\n";
                foreach $s (@slaveerrs) {
                    print "$s->[0]->{'host'} : $s->[1]<br>\n";
                    }
                print "<p>\n";
                }
            else {
                print $text{'massdelete_done'},"<p>\n";
                }
            }
        }
    &flush_file_lines();
    &unlock_all_files();
    &webmin_log("delete", "zones", scalar(@zones));

    &ui_print_footer("", $text{'index_return'});
    }


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