Add timestamps to logs
This commit is contained in:
parent
ee7a55e9e1
commit
0b63f049b3
|
@ -32,6 +32,7 @@ import socket
|
||||||
import stat
|
import stat
|
||||||
import subprocess
|
import subprocess
|
||||||
import threading
|
import threading
|
||||||
|
import time
|
||||||
|
|
||||||
# Config
|
# Config
|
||||||
port = 7070
|
port = 7070
|
||||||
|
@ -309,5 +310,5 @@ while True:
|
||||||
if not any(map(lambda x: matchaddr(toint(ip), x), blacklist)):
|
if not any(map(lambda x: matchaddr(toint(ip), x), blacklist)):
|
||||||
Serve(conn).start()
|
Serve(conn).start()
|
||||||
else:
|
else:
|
||||||
print 'Blacklisted IP %s' % ip
|
print '%s: Blacklisted IP %s' % (time.strftime('%Y-%m-%d %H:%M'), ip)
|
||||||
conn.close()
|
conn.close()
|
||||||
|
|
Loading…
Reference in New Issue