Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @@ -67,6 +67,26 @@
- exit(0);
- }
- +# check if there is some kind of "alias" accepting any spelling of "phpmyadmin". If yes, stop after first detection.
- +check_dirs = make_list("/pHpmyADmiN","/PhPmyAdMin","/phPmYaDmiN","/phpMyadMiN");
- +
- +alias = TRUE;
- +ac = 0;
- +
- +foreach cd ( check_dirs )
- +{
- + rcvRes = http_get_cache(item: cd + "/index.php", port:phpPort);
- + if( rcvRes !~ "HTTP/1\.. 200" )
- + {
- + alias = FALSE;
- + ac = 0;
- + break;
- + }
- + ac++;
- +}
- +
- +if( ac != 4 ) alias = FALSE;
- +
- x = 0;
- foreach dir (make_list_unique("/","/phpmyadmin","/phpMyAdmin","/pma", "/PHPMyAdmin", cgi_dirs(port:phpPort)))
- {
- @@ -131,6 +151,7 @@
- set_kb_item(name:"www/"+ phpPort + "/phpMyAdmin", value:tmp_version);
- installations[x] = string(tmp_version + ":" + pw_protected + "");
- + if( alias ) break;
- x++;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment