Skip to content

Instantly share code, notes, and snippets.

@m4ll0k
Last active September 5, 2022 05:44
Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save m4ll0k/2df369418798717d12bef7f42138fb78 to your computer and use it in GitHub Desktop.
Save m4ll0k/2df369418798717d12bef7f42138fb78 to your computer and use it in GitHub Desktop.
# 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)
@natgriffiths
Copy link

natgriffiths commented Sep 7, 2020

Thanks for that, there are spelling mistakes line 7& 8 "choas"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment