Created
November 10, 2019 12:21
-
-
Save kecs/06ab57ac6421a3026fb72767fecca247 to your computer and use it in GitHub Desktop.
Download list of scripts loaded by site, greppable.
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
# pip install jsbeautifier requests | |
import os | |
import requests | |
from jsbeautifier import beautify | |
try: | |
os.mkdir('js') | |
except OSError: | |
pass | |
print('[*] Saving files in /js/\n[*]Paste list of urls:') | |
inp = '.' | |
urls = [] | |
while inp.strip(): | |
inp = input() | |
urls.append(inp) | |
for url in urls[:-1]: | |
resp = requests.get(url) | |
path = url.split('/')[-1] | |
with open(f'js/{path}.js', 'w') as f: | |
f.write(f'// {url}\n') | |
f.write(beautify(resp.text)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment