fix: check for output directory
This commit is contained in:
parent
24d6880a81
commit
980eadf588
5
main.py
5
main.py
@ -4,6 +4,7 @@ Inspired by https://github.com/acidvegas/proxytools
|
||||
import time
|
||||
import concurrent.futures
|
||||
import logging
|
||||
import os
|
||||
from harvester.proxy import fetch_all, validate_socks
|
||||
|
||||
|
||||
@ -47,6 +48,10 @@ def main():
|
||||
valid.append(proxy)
|
||||
print(f'{proxy} -> {ip}')
|
||||
|
||||
# Create output directory if it does not exist
|
||||
if not os.path.exists('proxies'):
|
||||
os.makedirs('proxies')
|
||||
|
||||
# Write to file with timestamp
|
||||
write_file(
|
||||
path=f'proxies/valid-socks-{time.strftime("%Y%m%d%H%M%S")}.txt',
|
||||
|
Loading…
Reference in New Issue
Block a user