if blocked == "":
logger.debug("line[]='%s' returned empty blocked domain - SKIPPED!", type(line))
continue
+ elif not domain_helper.is_wanted(blocked):
+ logger.debug("blocked='%s' is not wanted - SKIPPED!", blocked)
+ continue
logger.debug("Appending blocked='%s',reason='%s'", blocked, reason)
blocklist.append({
if blocked == "":
logger.warning("blocked='%s' is empty after tidyup.domain() - SKIPPED!", tag.contents[0])
continue
+ elif not domain_helper.is_wanted(blocked):
+ logger.debug("blocked='%s' is not wanted - SKIPPED!", blocked)
+ continue
logger.debug("Appending blocker='%s',blocked='%s',block_level='reject' ...", domain, blocked)
blocklist.append({
if peer == "":
logger.debug("peer is empty - SKIPPED!")
continue
+ elif not domain_helper.is_wanted(peer):
+ logger.debug("peer='%s' is not wanted - SKIPPED!", peer)
+ continue
elif peer in peers:
logger.debug("peer='%s' already added - SKIPPED!", peer)
continue
if peer == "":
logger.debug("peer is empty - SKIPPED!")
continue
+ elif not domain_helper.is_wanted(peer):
+ logger.debug("peer='%s' is not wanted - SKIPPED!", peer)
elif peer in peers:
logger.debug("peer='%s' already added - SKIPPED!", peer)
continue
elif "domain" not in block:
logger.warning("block()=%d does not contain element 'domain' - SKIPPED!", len(block))
continue
+ elif not domain_helper.is_wanted(block["domain"]):
+ logger.debug("block[domain]='%s' is not wanted - SKIPPED!", block["domain"])
+ continue
elif "severity" not in block:
logger.warning("block()=%d does not contain element 'severity' - SKIPPED!", len(block))
continue
elif row["host"] in peers:
logger.debug("Not adding row[host]='%s', already found - SKIPPED!", row['host'])
continue
+ elif not domain_helper.is_wanted(row["host"]):
+ logger.debug("row[host]='%s' is not wanted - SKIPPED!", row["host"])
+ continue
logger.debug("Adding peer: row[host]='%s'", row['host'])
added = added + 1
# Is it there?
logger.debug("instance[]='%s'", type(instance))
blocked = tidyup.domain(instance["host"])
- if "isSuspended" in instance and instance["isSuspended"] and not dict_helper.has_key(blocklist, "blocked", blocked):
+
+ logger.debug("blocked='%s'", blocked)
+ if not domain_helper.is_wanted(blocked):
+ logger.debug("blocked='%s' is not wanted - SKIPPED!", blocked)
+ continue
+ elif "isSuspended" in instance and instance["isSuspended"] and not dict_helper.has_key(blocklist, "blocked", blocked):
count = count + 1
logger.debug("Appending blocker='%s',blocked='%s',block_level='suspended'", domain, blocked)
blocklist.append({
# Is it there?
logger.debug("instance[]='%s'", type(instance))
blocked = tidyup.domain(instance["host"])
- if "isBlocked" in instance and instance["isBlocked"] and not dict_helper.has_key(blocklist, "blocked", blocked):
+
+ logger.debug("blocked='%s'", blocked)
+ if not domain_helper.is_wanted(blocked):
+ logger.debug("blocked='%s' is not wanted - SKIPPED!", blocked)
+ continue
+ elif "isBlocked" in instance and instance["isBlocked"] and not dict_helper.has_key(blocklist, "blocked", blocked):
count = count + 1
logger.debug("Appending blocker='%s',blocked='%s',block_level='reject'", domain, blocked)
blocklist.append({
logger.debug("data[]='%s'", type(data))
if "error_message" not in data:
- logger.debug("Success, data[json]()=%d", len(data['json']))
+ logger.debug("Success, data[json]()=%d", len(data["json"]))
instances.set_success(domain)
if "data" in data["json"]:
for mode2 in ["follower", "following"]:
logger.debug("mode=%s,mode2='%s'", mode, mode2)
if mode2 in record and "host" in record[mode2] and record[mode2]["host"] != domain:
- logger.debug("Found mode2='%s',host='%s', adding ...", mode2, record[mode2]['host'])
+ logger.debug("record[%s][host]='%s'", mode2, record[mode2]["host"])
+ if not domain_helper.is_wanted(record[mode2]["host"]):
+ logger.debug("record[%s][host]='%s' is not wanted - SKIPPED!", mode2, record[mode2]["host"])
+ continue
+
+ logger.debug("Found mode2='%s',host='%s', adding ...", mode2, record[mode2]["host"])
peers.append(record[mode2]["host"])
if len(rows) < 100:
blocked = utils.deobfuscate(blocked, domain)
logger.debug("blocked='%s' - DEOBFUSCATED!", blocked)
+ if not domain_helper.is_wanted(blocked):
+ logger.debug("blocked='%s' is not wanted - SKIPPED!", blocked)
+ continue
logger.debug("Appending blocker='%s',blocked='%s',block_level='%s' ...", domain, blocked, block_level)
blockdict.append({
if blocked == "":
logger.warning("blocked is empty after tidyup.domain(): domain='%s',block_level='%s'", domain, block_level)
continue
+ elif not domain_helper.is_wanted(blocked):
+ logger.debug("blocked='%s' is not wanted - SKIPPED!", blocked)
+ continue
logger.debug("Appending blocker='%s',blocked='%s',block_level='%s' ...", domain, blocked, block_level)
blockdict.append({
if blocked is None or blocked == "":
logger.debug("domain='%s',block_level='%s': blocked is empty - SKIPPED!", domain, block_level)
continue
+ elif not domain_helper.is_wanted(blocked):
+ logger.debug("blocked='%s' is not wanted - SKIPPED!", blocked)
+ continue
logger.debug("Appending block_level='%s',blocked='%s',reason='%s' ...", block_level, blocked, reason)
blocklist[block_level].append({