Guest User

Untitled

a guest
Apr 5th, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. @@ -67,6 +67,26 @@
  2. exit(0);
  3. }
  4.  
  5. +# check if there is some kind of "alias" accepting any spelling of "phpmyadmin". If yes, stop after first detection.
  6. +check_dirs = make_list("/pHpmyADmiN","/PhPmyAdMin","/phPmYaDmiN","/phpMyadMiN");
  7. +
  8. +alias = TRUE;
  9. +ac = 0;
  10. +
  11. +foreach cd ( check_dirs )
  12. +{
  13. + rcvRes = http_get_cache(item: cd + "/index.php", port:phpPort);
  14. + if( rcvRes !~ "HTTP/1\.. 200" )
  15. + {
  16. + alias = FALSE;
  17. + ac = 0;
  18. + break;
  19. + }
  20. + ac++;
  21. +}
  22. +
  23. +if( ac != 4 ) alias = FALSE;
  24. +
  25. x = 0;
  26. foreach dir (make_list_unique("/","/phpmyadmin","/phpMyAdmin","/pma", "/PHPMyAdmin", cgi_dirs(port:phpPort)))
  27. {
  28. @@ -131,6 +151,7 @@
  29. set_kb_item(name:"www/"+ phpPort + "/phpMyAdmin", value:tmp_version);
  30.  
  31. installations[x] = string(tmp_version + ":" + pw_protected + "");
  32. + if( alias ) break;
  33. x++;
  34. }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment