ShellBanner
System:Linux MiraNet 3.0.0-14-generic-pae #23-Ubuntu SMP Mon Nov 21 22:07:10 UTC 2011 i686
Software:Apache. PHP/5.3.6-13ubuntu3.10
ID:uid=65534(nobody) gid=65534(nogroup) groups=65534(nogroup)
Safe Mode:OFF
Open_Basedir:OFF
Freespace:33.82 GB of 70.42 GB (48.02%)
MySQL: ON MSSQL: OFF Oracle: OFF PostgreSQL: OFF Curl: OFF Sockets: ON Fetch: OFF Wget: ON Perl: ON
Disabled Functions: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,

/ home/ mar/ bak/ cgi-bin/ old/ - drwxr-xr-x

Directory:
Viewing file:     inbox.cgi (4.97 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl

use DBI();
use CGI qw(:standard);
use IO::Socket;
use MIME::Base64();
use MIME::QuotedPrint();
use Encode;
use Encode qw/from_to/;
use CGI::Cookie;

$user = param("name");
$pass = param("pass");
$page = param("page");
$par1 = $ARGV[0];

if ($page eq "all") {$page = "0"; $page1 = "all";}

if ($user ne "")
    {
###    $pass = MIME::Base64::encode($pass);
    $auth=sprintf("%s %s", $user, $pass);
    my $cook = cookie(
    -name => 'mn.mail.auth',
    -value => $auth,
    -expires => '0',
    -domain => 'miranet.lan',
    -path => '/',
    );
    $cook = sprintf header(-cookie=>$cook);
    ($cook) = split("charset=", $cook);
    $cook = sprintf ("%s charset=KOI8-R\n\n", $cook);
    print "$cook";
    } else {
    if ($par1 ne "quit") {print "Content-type: text/html\n\n";}
    my $auth = cookie('mn.mail.auth');
    ($user, $pass) = split (" ", $auth);
###    $pass = MIME::Base64::decode($pass);
    }
if ($par1 ne "quit") {
open(patt,"<./patt_n1.html")||die "Pattern file 1 not found";
while(<patt>)
    {
    print;
    }
close(patt);
}

$serv = IO::Socket::INET->new(
Proto    => "tcp",
PeerAddr => "localhost",
#PeerAddr => "pop.mail.ru",
PeerPort => "110",
);


$cnt = 0;
$stat1 = "";
$stat2 = "";
$c = 0;
$zv = "?";
$clr = "0060a0";
$clr = "005090";
$start = "0";
$mpp = "30";
$crnt = "0";
if ($page ne "") {$start = $page;}
if ($par1 eq "quit") {print $serv "QUIT\n";}

while ( <$serv> ) { 
($q, $p) = split (" ");
($nl, $dt1) = split ("From:");
($nl, $dt2) = split ("Subject:");
($nl, $dt3) = split ("Return-Path:");


if ( $q eq "+OK" and $stat1 eq "" ) {$cnt=$cnt+1;}
if ( $cnt eq "1" ) { print $serv "USER $user\n";}
if ( $cnt eq "2" ) { print $serv "PASS $pass\n"; }

if ( $stat1 eq "list" ) 
    {
    $msg = $p;
    $fs = $start * $mpp + 1;
    $ls = $start * $mpp + $mpp;
    if ($ls > $msg) {$ls=$msg;}
    if ($page1 eq "all") {$ls = $msg;}
    print "<center><h3><font color=#ffffff>Сообщений: $msg ( $fs - $ls )</font></h3></center><hr>\n"; $stat1="headq"; $stat2=$msg-($start*$mpp);
    if ($page1 eq "all") {$stat2 = $msg;}
    }

if ( $cnt eq "3" ) { $stat1 = "list"; print $serv "STAT\n"; $cnt="4"; print "<table border=0 cellspacing=0 width=100%>";}

if ( $stat1 eq "headw" ) 
    { 
      if ( $q eq "From:" ) 
        {
    if (index ($dt1,"\=\?")<0) {from_to($dt1, "cp1251", "koi8-r") foreach $dt1; $from = $dt1;}
    else {$from = autodec($dt1);}
    }

      if ( $q eq "Subject:" ) 
        {
    if (index ($dt2,"\=\?")<0) {from_to($dt2, "cp1251", "koi8-r") foreach $dt2; $subj = $dt2;}
    else {$subj = autodec($dt2);}
    }

      if ( $q eq "Return-Path:" ) 
        {
    $ret = $dt3;
    ($nl, $ret) = split("<", $ret);
    ($ret) = split(">", $ret);
    }


      if ( $q eq "." ) { 
#      $cid=$start*$mpp+$crnt;
      $cid=$stat2;
      if ($subj eq "") {$subj = "[Нет темы]";}
      print "<tr bgcolor=\#$clr><td width=30%><b><font size=2 face=\"arial\" color=#ffffff>$from ($ret)</font></td><td></td><td><b><a href=\"view.cgi?id=$cid\"><font size=2 face=\"arial\" color=#00ffff>$subj</font></a></b></td></tr>\n"; 
      $stat2 = $stat2 - 1; $stat1 = "headq"; $subj = ""; $from = ""; $ret = ""; $crnt = $crnt + 1;
      if ( $clr eq "0060a0" ) {$clr="005090"; $clr1="004080";} else {$clr="0060a0"; $clr1="005090";}
      }

      
    }

if ( $stat2 eq "0"or $crnt eq $mpp and $page1 ne "all") 
    { 
    $pgs = ($msg / $mpp);
    if (int($pgs) ne $pgs) {$pgs = $pgs + 1;}
    $pgs = int($pgs);
    $pg = 0;
    $pgstr = "<font face=\"arial\"><b>Страницы</b></font>";
    while ( $pg ne $pgs )
    {
    if ($pg eq $start) {$clr = "#ffff00";} else {$clr = "#ffffff";}
    $pg = $pg + 1;
    $pgstr = sprintf ("%s<b> <font face=\"arial\"><a href=\"inbox.cgi?page=%s\">%s</a></font></b>", $pgstr, $pg-1, $pg);
    }
    
    $pgstr = sprintf ("%s<b> <font face=\"arial\"><a href=\"inbox.cgi?page=all\">Все</a></font></b>",$pgstr);
    $stat1 = "end"; 
    }
if ( $stat1 eq "headq" ) { $stat1 = "headw"; print $serv "TOP $stat2 0\n"; }


if ( $stat1 eq "end" ) 
    {
    print "</table><hr>\n";
    print "<b>$pgstr</b><br>\n";
    print "<b><a href=\"inbox.cgi?quit\">Выход</a><br>";
    
    print $serv "QUIT\n";
    exit 0;
    }
if ( $par1 eq "quit" ) 
    { 
        my $cook = cookie(
    -name => 'mn.mail.auth',
    -value => 'null',
    -expires => '0',
    -domain => 'miranet.lan',
    -path => '/',
    );
    #print "Content-type: text/html\n\n";
    print header(-cookie=>$cook);
    print "<META HTTP-EQUIV=\"refresh\" content=\"0; URL=./login.cgi\">";
    }
}








sub autodec {
my $dt2 = shift;
($edt1, $edt2) = split("=", $dt2);
    ($is, $cp, $t, $dat, $ie) = split (/\?/, $edt2);
    if ( $t eq "B" or $t eq "b")
        {
        $t = "B";
        $dt2 = MIME::Base64::decode($dat);
        if ($cp ne "" ) {from_to($dt2, $cp, "koi8-r") foreach ($dt2);}
        }
    if ( $t eq "Q" or $t eq "q")
        {
        $t = "Q";
        ($nl, $nl, $nl, $dat, $nl) = split (/\?/, $dt2);
        $dt2 = MIME::QuotedPrint::decode($dat);
        if ($cp ne "") {from_to($dt2, $cp, "koi8-r") foreach ($dt2);}
        }
    if ( $t ne "B" and $t ne "Q" and $cp ne "") {from_to($dt2, $cp, "koi8-r") foreach ($dt2);}
    return $dt2; 

}
Command:
Quick Commands:
Upload:
[Read-Only] Max size: 100MB
PHP Filesystem: <@ з
Search File:
regexp
Create File:
Overwrite [Read-Only]
View File:
Mass Defacement:
[+] Main Directory: [+] Defacement Url:
LmfaoX Shell - Private Build [BETA] - v0.1 -; Generated: 0.3155 seconds