bananacr1

Sub-data.php

Nov 6th, 2025
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.64 KB | None | 0 0
  1. <?php
  2. /*
  3. author : VXBRO
  4. title: backdoor scanner v 1.0.0
  5. */
  6. echo '<style>body {background-color:#000;color:green;} body,td,th { font: 9pt Courier New;margin:0;vertical-align:top; } span,h1,a { color:#00ff00} span { font-weight: bolder; } h1 { border:1px solid #00ff00;padding: 2px 5px;font: 14pt Courier New;margin:0px; } div.content { padding: 5px;margin-left:5px;} a { text-decoration:none; } a:hover { background:#ff0000; } .ml1 { border:1px solid #444;padding:5px;margin:0;overflow: auto; } .bigarea { width:100%;height:250px; } input, textarea, select { margin:0;color:#00ff00;background-color:#000;border:1px solid #00ff00; font: 9pt Monospace,"Courier New"; } form { margin:0px; } #toolsTbl { text-align:center; } .toolsInp { width: 80%; } .main th {text-align:left;} .main tr:hover{background-color:#5e5e5e;} .main td, th{vertical-align:middle;} pre {font-family:Courier,Monospace;} #cot_tl_fixed{position:fixed;bottom:0px;font-size:12px;left:0px;padding:4px 0;clip:_top:expression(document.documentElement.scrollTop document.documentElement.clientHeight-this.clientHeight);_left:expression(document.documentElement.scrollLeft document.documentElement.clientWidth - offsetWidth);} .style2 {color: #00FF00} .style3 {color: #009900} .style4 {color: #006600} .style5 {color: #00CC00} .style6 {color: #003300} .style8 {color: #33CC00} #footer { margin-bottom: 10px; color: #666; vertical-align: top; text-align: center; font-size: 11px; } #footer ul { margin: 0; padding: 0; list-style: none; } #footer li { display: inline-block; margin-right: 15px; border-right: 1px solid #666; vertical-align: middle; } #footer li a { margin-right: 15px; } #footer li:last-child { margin-right: 0; border-right: 0; } #footer li:last-child a { margin-right: 0; } #footer a { color: #666; } #footer a:hover { color: #858585; } #footer .footer-left { height: 20px; vertical-align: middle; line-height: 20px; } @media (min-width: 39rem) { #footer { display: flex; flex-flow: row wrap; justify-content: space-between; align-items: center; align-content: center; margin-bottom: 20px; } #footer .footer-left { align-self: flex-start; margin-right: 20px; } #footer .footer-right { align-self: flex-end; } }</style>';
  7. set_time_limit(0);
  8. error_reporting(0);
  9. @ini_set('zlib.output_compression', 0);
  10. @ini_set('implicit_flush', 1);
  11. for($i = 0; $i < ob_get_level(); $i++) { ob_end_flush(); }
  12. ob_implicit_flush(1);
  13. // if($argv[1]){
  14. // $dir = $argv[1];
  15. // scanBackdoor("$dir");
  16. // }else{
  17. // echo "Usage php scan.php /home or /public_html/.";
  18. // }
  19.  
  20.  
  21.  
  22.  
  23. $path = getcwd();
  24. if(isset($_GET['dir'])){
  25. $path =$_GET['dir'];
  26. }
  27.  
  28.  
  29. if(isset($_GET['kill'])){
  30. unlink(__FILE__);
  31. }
  32. echo "<a href='?kill'><font color='yellow'>[Self Delete]</font></a><br>";
  33. echo '<form action="" method="get"> <input type="text" name="dir" value='.$path.' style="width: 548px;"> <input type="submit" value="scan"></form><br>';
  34.  
  35. echo "CURRENT DIR: <font color='yellow'>$path</font><br>";
  36. if(isset($_GET['delete'])){
  37. unlink($_GET['delete']);
  38. $status = "<font color='red'>FAILED</font>";
  39. if(!file_exists($_GET['delete'])){
  40. $status = "<font color='yellow'>Success</font>";
  41.  
  42. }
  43. echo "TRY TO DELETE: ".$_GET['delete']." $status <br>";exit;
  44. }
  45.  
  46. scanBackdoor($path);
  47. function save($fname,$value){
  48. $file = fopen($fname, "a");
  49. fwrite($file, $value);
  50. fclose($file);//
  51. }
  52. // $domain = $_SERVER['REQUEST_SCHEME'].'//'.$_SERVER['SERVER_NAME'];
  53. function checkBackdoor($file_location){
  54. global $path;
  55. $patern = "#exec\(|gzinflate\(|file_put_contents\(|file_get_contents\(|system\(|passthru\(|shell_exec\(|move_uploaded_file\(|eval\(|base64#";
  56. $contents = file_get_contents($file_location);
  57. if(strlen($contents)> 0){
  58. if(preg_match($patern, strtolower($contents))){
  59. echo "[+] Susspect file -> <a href='?delete=$file_location&dir=$path'><font color='yellow'>[DELETE]</font></a> <font color='red'>$file_location</font> <br>";
  60. save("shell-found.txt","$file_location\n");
  61. echo '<textarea name="content" cols="80" rows="15">'.htmlspecialchars($contents).'</textarea><br>><br>';
  62. }
  63. }
  64. }
  65.  
  66. function scanBackdoor($current_dir){
  67. if(is_readable($current_dir)){
  68. $dir_location = scandir($current_dir);
  69. foreach ($dir_location as $file) {
  70. if($file === "." | $file === ".."){
  71. continue;
  72. }
  73. $file_location = str_replace("//", "/",$current_dir.'/'.$file);
  74. $nFile = substr($file, -4, 4);
  75. if($nFile == ".php"){
  76. checkBackdoor($file_location);
  77. }else if(is_dir($file_location)){
  78. scanBackdoor($file_location);
  79. }
  80. }
  81. }
  82. }
  83.  
  84. ?>
Add Comment
Please, Sign In to add comment