Announce and validation

This commit is contained in:
Mark Qvist
2018-03-19 18:11:50 +01:00
parent 3ea36ff9b3
commit 82744fb9ed
6 changed files with 125 additions and 35 deletions
+10
View File
@@ -58,3 +58,13 @@ def log(msg, level=3):
file = open(logfile, "a")
file.write(logstring+"\n")
file.close()
def hexprint(data):
print(hexrep(hexrep))
def hexrep(data, delimit=True):
delimiter = ":"
if not delimit:
delimiter = ""
hexrep = delimiter.join("{:02x}".format(ord(c)) for c in data)
return hexrep