From 9f33a5a3cb241d2f971afe0aa38beccdd2a7a625 Mon Sep 17 00:00:00 2001 From: desaster Date: Wed, 3 Nov 2010 05:20:41 +0000 Subject: [PATCH] fix deprecated md5 calls (Tomasz Miklas) git-svn-id: https://kippo.googlecode.com/svn/trunk@183 951d7100-d841-11de-b865-b3884708a8e2 --- kippo/commands/ping.py | 4 ++-- kippo/commands/ssh.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/kippo/commands/ping.py b/kippo/commands/ping.py index 6aa1c27..2fed8c6 100644 --- a/kippo/commands/ping.py +++ b/kippo/commands/ping.py @@ -3,7 +3,7 @@ from kippo.core.honeypot import HoneyPotCommand from twisted.internet import reactor -import time, re, random, md5 +import time, re, random, hashlib commands = {} @@ -30,7 +30,7 @@ class command_ping(HoneyPotCommand): self.host): self.ip = self.host else: - s = md5.md5(self.host).hexdigest() + s = hashlib.md5(self.host).hexdigest() self.ip = '.'.join([str(int(x, 16)) for x in (s[0:2], s[2:4], s[4:6], s[6:8])]) diff --git a/kippo/commands/ssh.py b/kippo/commands/ssh.py index 9de3582..7206e8b 100644 --- a/kippo/commands/ssh.py +++ b/kippo/commands/ssh.py @@ -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