diff --git a/proxytools/floodbl.py b/proxytools/floodbl.py
index 80c57d8..a7aa1e2 100644
--- a/proxytools/floodbl.py
+++ b/proxytools/floodbl.py
@@ -7,33 +7,26 @@ Test proxies against a set of Domain Name System-based Blackhole Lists (DNSBL) o
'''
-import asyncio
import argparse
+import concurrent.futures
import os
import re
import socket
blackholes = ('dnsbl.dronebl.org','rbl.efnetrbl.org','torexit.dan.me.uk')
-async def check(sema, proxy):
- async with sema:
- ip = proxy.split(':')[0]
- formatted_ip = '.'.join(ip.split('.')[::-1])
- for dnsbl in blackholes:
- try:
- socket.gethostbyname(f'{formatted_ip}.{dnsbl}')
- print('\033[1;32mGOOD\033[0m \033[30m|\033[0m ' + ip)
- good.append(proxy)
- except socket.gaierror:
- print('\033[1;31mBAD\033[0m \033[30m|\033[0m ' + ip.ljust(22) + f'\033[30m({dnsbl})\033[0m')
- break
-
-async def main(proxies, threads):
- sema = asyncio.BoundedSemaphore(threads) # B O U N D E D S E M A P H O R E G A N G
- jobs = list()
- for proxy in proxies:
- jobs.append(asyncio.ensure_future(check(sema, proxy)))
- await asyncio.gather(*jobs)
+def check(proxy):
+ ip = proxy.split(':')[0]
+ formatted_ip = '.'.join(ip.split('.')[::-1])
+ for dnsbl in blackholes:
+ try:
+ socket.gethostbyname(f'{formatted_ip}.{dnsbl}')
+ except socket.gaierror:
+ print('\033[1;31mBAD\033[0m \033[30m|\033[0m ' + ip.ljust(22) + f'\033[30m({dnsbl})\033[0m')
+ break
+ else:
+ print('\033[1;32mGOOD\033[0m \033[30m|\033[0m ' + ip)
+ good.append(proxy)
# Main
parser = argparse.ArgumentParser(usage='%(prog)s