print("ERROR: failed SQL query:", blocker, blocked, reason, block_level, first_added, last_seen)
sys.exit(255)
-def add_instance(domain: str, origin: str):
- # NOISY-DEBUG: print("DEBUG: domain,origin:", domain, origin)
+def add_instance(domain: str, originator: str):
+ # NOISY-DEBUG: print("DEBUG: domain,originator:", domain, originator)
if domain.find("@") > 0:
print("WARNING: Bad domain name:", domain)
raise
- elif origin is not None and origin.find("@") > 0:
- print("WARNING: Bad origin name:", origin)
+ elif originator is not None and originator.find("@") > 0:
+ print("WARNING: Bad originator name:", originator)
raise
- print("--- Adding new instance:", domain, origin)
+ print("--- Adding new instance:", domain, originator)
try:
c.execute(
- "INSERT INTO instances (domain,origin,hash,software) VALUES (?, ?, ?, ?)",
+ "INSERT INTO instances (domain,originator,hash,software) VALUES (?, ?, ?, ?)",
(
domain,
- origin,
+ originator,
get_hash(domain),
determine_software(domain)
),
import time
import fba
-def fetch_instances(domain: str, origin: str):
- # NOISY-DEBUG: print("DEBUG: Fetching instances for domain:", domain, origin)
+def fetch_instances(domain: str, originator: str):
+ # NOISY-DEBUG: print("DEBUG: Fetching instances for domain:", domain, originator)
peerlist = fba.get_peers(domain)
if (peerlist is None):
)
if fba.c.fetchone() == None:
- # NOISY-DEBUG: print("DEBUG: Adding new domain:", domain, origin)
- fba.add_instance(domain, origin)
+ # NOISY-DEBUG: print("DEBUG: Adding new domain:", domain, originator)
+ fba.add_instance(domain, originator)
fba.conn.commit()
return