Last active
September 5, 2022 05:44
-
-
Save m4ll0k/2df369418798717d12bef7f42138fb78 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
# github.com/m4ll0k (@m4ll0k2) | |
''' | |
Steps: | |
0. Make dir like chaos 'mkdir chaos' | |
1. Download this script in choas dir 'wget https://..' | |
2. Now: 'python3 choas.py |sort -u > dns_wordlist.txt' | |
''' | |
import json | |
import io | |
import requests | |
import zipfile | |
def readfile(path): | |
return [x.strip() for x in open(path,'r')] | |
r = requests.get('https://chaos-data.projectdiscovery.io/index.json') | |
all_zip = [] | |
j = json.loads(r.content.decode('utf-8')) | |
for i in range(len(j)): | |
kk = j[i].get('URL') | |
all_zip.append(kk) | |
for i in all_zip: | |
r = requests.get(i,stream=True) | |
zipped = zipfile.ZipFile(io.BytesIO(r.content)) | |
name = zipped.namelist() | |
zipped.extractall() | |
for n in name: | |
read = readfile(n) | |
for ll in read: | |
ll = '.'.join(ll.split('.')[:-2]) | |
if '.' in ll: | |
print('\n'.join(ll.split('.'))) | |
print(ll) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for that, there are spelling mistakes line 7& 8 "choas"