dardan:cyberacademy:python:email_grep-from_list_py
import sys, multiprocessing
from multiprocessing.dummy import Pool as ThreadPool
EmailList = []
def work(i):
email, password = i.split('|')
EmailList.append(email)
def threading():
buffer = []
for lines in open(sys.argv[1], 'r'):
buffer.append(lines.rstrip())
pool = ThreadPool(8)
pool.map(work, buffer)
pool.close()
pool.join()
if __name__ == '__main__':
threading()
f = open('Emails.txt', 'w+')
for line in EmailList:
f.write(line+'\n')
f.close()
##python pythonfilename.py worldlist.txt
python email_extractor.py ac.txt
######################
import sys, requests
import multiprocessing
from multiprocessing.dummy import Pool as ThreadPool
def bruteforce(directory):
try:
domain = sys.argv[1]
r = requests.get('http://{}/{}'.format(domain, directory))
if r.status_code == 200:
print 'http://{}/{}'.format(domain, directory)
except:
pass
def threading():
wordlist = []
for lines in open(sys.argv[2], 'r'):
wordlist.append(lines.rstrip())
pool = ThreadPool(multiprocessing.cpu_count())
pool.map(bruteforce, wordlist)
pool.close()
pool.join()
if __name__ == "__main__":
threading()
python dirsearch.py domain.com wordlist.txt
dardan/cyberacademy/python/email_grep-from_list_py.txt · Last modified: 2018/09/26 18:00 by dardan
