~jmbr/halberd

cc942d87fec080a51c3a57a626222295745c8b3a — Juan M. Bello Rivas 13 years ago 004130c
Use the hashlib module (this change is based on the patch provided by Fabian Affolter).
2 files changed, 3 insertions(+), 6 deletions(-)

M Halberd/clues/Clue.py
M THANKS
M Halberd/clues/Clue.py => Halberd/clues/Clue.py +2 -6
@@ 28,11 28,7 @@ detect real servers behind HTTP load balancer devices.
import time
import types
import rfc822

try:
    from sha import new as hashfn
except ImportError:
    from md5 import new as hashfn
import hashlib

import Halberd.util



@@ 132,7 128,7 @@ class Clue:
        """Updates header fingerprint.
        """
        assert self.__tmphdrs != None
        fingerprint = hashfn(self.__tmphdrs)
        fingerprint = hashlib.sha1(self.__tmphdrs)
        self.__tmphdrs = None
        self.info['digest'] = fingerprint.hexdigest()


M THANKS => THANKS +1 -0
@@ 7,5 7,6 @@ suggesting various improvements, or submitting actual code. Here is
a list of these people. Help me keep it complete and exempt of errors.

Dethy
Fabian Affolter
Sindre Pedersen Bjørdal
Andrés Riancho