fix deprecated md5 calls (Tomasz Miklas)

git-svn-id: https://kippo.googlecode.com/svn/trunk@183 951d7100-d841-11de-b865-b3884708a8e2
This commit is contained in:
desaster
2010-11-03 05:20:41 +00:00
parent cc8aa24d88
commit 9f33a5a3cb
2 changed files with 4 additions and 4 deletions

View File

@@ -3,7 +3,7 @@
from kippo.core.honeypot import HoneyPotCommand
from twisted.internet import reactor
import time, re, md5, getopt
import time, re, hashlib, getopt
commands = {}
@@ -37,7 +37,7 @@ class command_ssh(HoneyPotCommand):
if re.match('^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$', host):
self.ip = host
else:
s = md5.md5(host).hexdigest()
s = hashlib.md5(host).hexdigest()
self.ip = '.'.join([str(int(x, 16)) for x in
(s[0:2], s[2:4], s[4:6], s[6:8])])
self.host = host