Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import requests,bs4,threading,sys
- gq=0
- found=[]
- print """
- _____
- | __ \
- | |__) | __ _____ ___ _
- | ___/ '__/ _ \ \/ / | | | Grabber
- | | | | | (_) > <| |_| |
- |_| |_| \___/_/\_\\__, |
- By Deray __/ |
- |___/
- """
- open("grabbed.txt","w").close()
- def searchproxy(*args):
- global gq,found
- b=bs4.BeautifulSoup(
- requests.get(
- "https://www.proxynova.com/proxy-server-list/country-%s/"%(args[0])
- ).text,
- features="html.parser")
- for x in b.find_all("abbr"):
- for z in b.find_all("a",href=True):
- k=z["href"]
- if "8080" in k or "80" in k:
- pr="%s:%s"%(
- x["title"],z["href"].replace(
- "/proxy-server-list/port-","").replace("/",""))
- try:
- if requests.get(
- "http://dorayy.joomla.com",proxies={
- "http":pr,"https":pr},
- timeout=2).status_code == 200:
- found.append(pr)
- open("grabbed.txt","a").write(pr+"\n")
- except:
- gq+=1
- print "\r[Grabbing-\033[1;32m%s\033[0m: %s] - [found: %s -> grabbed.txt]"%(args[0],
- gq,len(found)),;sys.stdout.flush()
- pass
- break
- pq=[]
- lang=['ar', 'bd', 'br', 'cl', 'cn', 'co', 'fr', 'de', 'hk', 'in', 'id', 'jp', 'ke', 'nl', 'pl', 'ru', 'rs', 'kr', 'tw', 'th', 'ua', 'gb', 'us', 've']
- for p in lang:
- t=threading.Thread(target=searchproxy,args=(p,))
- pq.append(t)
- for t in pq:
- t.start()
- for t in pq:
- t.join()
Advertisement
Add Comment
Please, Sign In to add comment