What
Used this script first to solve Flag 3 on Hacker101 CTF/Postbook by loading the list into Burp Suite as a payload to brute force id=
parameter.
Source
#!/usr/bin/python3
df=open('numbers.txt','w')
for i in range(0,1000):
df.write(str(i))
df.write('\n')
df.close()
Run
chmod +x wordlist.py && python3 wordlist.py
Misc
Another example to generate list of urls with regex and save as a text file.
#!/usr/bin/python3
import sre_yield
df=open('urls.txt','w')
for each in sre_yield.AllStrings(r'https://0x[a-z0-9][a-z0-9]\.a\.hackycorp\.com'):
df.write(str(each))
df.write('\n')
df.close()