Skip to content

Instantly share code, notes, and snippets.

@bing0o
Last active March 21, 2020 13:48
Show Gist options
  • Select an option

  • Save bing0o/12a334bfe5b77790e37e2f0bbae559e2 to your computer and use it in GitHub Desktop.

Select an option

Save bing0o/12a334bfe5b77790e37e2f0bbae559e2 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
yellow = "\033[93m"
green = "\033[92m"
blue = "\033[94m"
red = "\033[91m"
bold = "\033[1m"
end = "\033[0m"
(blue+bold+"""
____ _ ____ _ _
/ ___| _ _| |__ / ___| |__ ___ ___| | _____ _ __
\___ \| | | | '_ \| | | '_ \ / _ \/ __| |/ / _ \ '__|
___) | |_| | |_) | |___| | | | __/ (__| < __/ |
|____/ \__,_|_.__/ \____|_| |_|\___|\___|_|\_\___|_|
Coded by: Bingo
---------------
"""+end)
from concurrent.futures import ThreadPoolExecutor as executor # sudo pip install futures
import sys, requests, argparse
def check(out, url):
for pro in ['http://', 'https://']:
link = pro+url
try:
req = requests.head(link, timeout=10)
print(link)
if out != 'None':
with open(out, 'a') as f:
f.write(url+"\n")
f.close()
except Exception:
pass
def main():
parser = argparse.ArgumentParser()
parser.add_argument("-w", "--wordlist", help="Domains List File", type=str, required=True)
parser.add_argument("-t", "--thread", help="Theads Number - (Default: 10)", type=int)
parser.add_argument("-o", "--output", help="Save Results In a File", type=str) #action='store_true'
args = parser.parse_args()
wlist = str(args.wordlist)
threads = str(args.thread)
out = str(args.output)
if threads == 'None':
threads = 10
else:
threads = threads
"""
lines = len(open(wlist).readlines())
print(blue +"["+red+"+"+blue+"] File: " + end + wlist)
print(blue +"["+red+"+"+blue+"] Length: " + end + str(lines))
print(blue +"["+red+"+"+blue+"] Threads: " + end + str(threads))
print(blue +"["+red+"+"+blue+"] Output: " + end + str(out))
print(red+bold+"\n[+] Results:\n"+end)
"""
urls = open(wlist, 'r')
try:
with executor(max_workers=int(threads)) as exe:
[exe.submit(check, out, url.strip('\n')) for url in urls]
except KeyboardInterrupt:
exit(1)
if __name__=='__main__':
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment