Skip to content

Commit

Permalink
Update ECODFF to 2.0.24
Browse files Browse the repository at this point in the history
* Check status code for "online" domains also
FiltersHeroes/KADhosts#78
  • Loading branch information
hawkeye116477 committed Sep 17, 2024
1 parent 7aefe8b commit 46449e1
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions scripts/ECODFF.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
import git

# Version number
SCRIPT_VERSION = "2.0.23"
SCRIPT_VERSION = "2.0.24"

# Parse arguments
parser = argparse.ArgumentParser()
Expand Down Expand Up @@ -129,6 +129,8 @@

parked_domains = []
offline_pages = []
online_pages = []

sem_value = args.connections

custom_resolver = dns.asyncresolver.Resolver()
Expand All @@ -144,7 +146,7 @@ async def domain_dns_check(domain, limit):
status = "offline"
except (NoAnswer, NoNameservers):
try:
print(f"Checking the status of {domain}...")
print(f"Checking the status of {domain} again...")
await custom_resolver.resolve(domain)
except (NXDOMAIN, Timeout, NoAnswer, NoNameservers):
status = "offline"
Expand All @@ -166,6 +168,8 @@ async def bulk_domain_dns_check(limit_value):
offline_pages.append(splitted_result[0])
elif splitted_result[1] == "parked":
parked_domains.append(splitted_result[0])
else:
online_pages.append(splitted_result[0])

asyncio.run(bulk_domain_dns_check(sem_value))

Expand Down Expand Up @@ -355,9 +359,13 @@ async def save_status_code(timeout_time, limit_value):
for status in statuses:
print(status)
if len(status.split()) > 1:
if status.split()[1] != "200":
status_code = status.split()[1]
if status_code != "200":
u_f.write(f"{status}\n")

if online_pages:
for online_page in online_pages:
unknown_pages.append(online_page)
if unknown_pages:
asyncio.run(save_status_code(10, sem_value))

Expand Down

0 comments on commit 46449e1

Please sign in to comment.