fix: adding json library to script
This commit is contained in:
parent
96f01541e2
commit
006b9d2c03
1 changed files with 5 additions and 3 deletions
|
|
@ -9,6 +9,7 @@ import argparse
|
|||
from time import sleep
|
||||
from dotenv import load_dotenv
|
||||
import requests
|
||||
import json
|
||||
|
||||
load_dotenv()
|
||||
|
||||
|
|
@ -51,9 +52,10 @@ def filterRecords():
|
|||
ignoredSubdomains.append(subdomain)
|
||||
|
||||
for rrset in getSubDomains():
|
||||
IS_NOT_IGNORED = rrset["name"] not in ignoredSubdomains
|
||||
CONTAINS_A_RECORD = rrset["type"] == "A"
|
||||
NOT_CURRENT_IP = rrset["records"][0] != requestIP
|
||||
rrset_loaded = json.loads(rrset)
|
||||
IS_NOT_IGNORED = rrset_loaded["name"] not in ignoredSubdomains
|
||||
CONTAINS_A_RECORD = rrset_loaded["type"] == "A"
|
||||
NOT_CURRENT_IP = rrset_loaded["records"][0] != requestIP
|
||||
|
||||
if IS_NOT_IGNORED and CONTAINS_A_RECORD and NOT_CURRENT_IP:
|
||||
filteredSubdomains.append(rrset["subname"])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue