Remove contact

This commit is contained in:
HackerNCoder 2021-12-27 02:07:32 +00:00
parent 6d6e1330d1
commit 67a0d00bfe
No known key found for this signature in database
GPG key ID: 569FFF33FF802E16

View file

@ -19,17 +19,12 @@ for new_relay in relays:
if datetime.datetime.strptime(new_relay["first_seen"], "%Y-%m-%d %H:%M:%S") > (datetime.datetime.utcnow() - datetime.timedelta(hours=1)):
exit = "no"
eol = "no"
contact = ""
if "contact" in new_relay:
test = re.search("(([a-z0-9-._+\(\) ])+([\[\]\(\)\@]|at)+((?!example)[a-z0-9-. ])+(\.|dot *)[a-z0-9_.]+)", new_relay["contact"], re.IGNORECASE)
if test:
contact = ", contact: " + test.group(1)
if not re.search("0.3.5|0.4.5|0.4.6|0.4.7", new_relay["platform"], re.IGNORECASE):
eol = "yes"
if new_relay["exit_policy"][0] != "reject *:*":
exit = "yes"
exitStatus += "\"" + new_relay["nickname"] + "\", fingerprint: " + new_relay["fingerprint"] + ", EOL: " + eol + ", effective family: " + str(len(new_relay["effective_family"])-1) + "; https://metrics.torproject.org/rs.html#search/" + new_relay["fingerprint"] + "\n"
relayStatus += "\"" + new_relay["nickname"] + "\", fingerprint: " + new_relay["fingerprint"] + ", exit: " + exit + ", EOL: " + eol + contact + ", effective family: " + str(len(new_relay["effective_family"])-1) + "; https://metrics.torproject.org/rs.html#search/" + new_relay["fingerprint"] + "\n"
relayStatus += "\"" + new_relay["nickname"] + "\", fingerprint: " + new_relay["fingerprint"] + ", exit: " + exit + ", EOL: " + eol + ", effective family: " + str(len(new_relay["effective_family"])-1) + "; https://metrics.torproject.org/rs.html#search/" + new_relay["fingerprint"] + "\n"
if relayStatus:
relayWatchEmail += relayStatus