namtrac35 / pyrit

Automatically exported from code.google.com/p/pyrit
0 stars 0 forks source link

cpyrit.storage.DigestError: Digest check failed after database relocation #469

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. move password database from ~/.pyrit/blobspace/ to my USB external hard 
drive 
2. import_passwords went smoothly, create_essid ran through as well
3. pyrit batch then following error was shown "cpyrit.storage.DigestError: 
Digest check failed"

What is the expected output? What do you see instead?
:it should creating table as what is usually does. but instead it toss the 
error back to me

What version of the product are you using? On what operating system?
:Pyrit 0.4.0 on Linux kali 3.14-kali1-amd64 #1 SMP Debian 3.14.5-1kali1 
(2014-06-07) x86_64 GNU/Linux

Please provide any additional information below.

the reference mentioned on line 287

 273 class PAW2_Buffer(PasswordCollection):
 274 
 275     def pack(self):
 276         b = zlib.compress('\n'.join(self.collection), 1)
 277         md = hashlib.md5(b)
 278         self.key = md.hexdigest()
 279         return (md.hexdigest(), 'PAW2' + md.digest() + b)
 280 
 281     def unpack(self, buf):
 282         if buf[:4] != "PAW2":
 283             raise StorageError("Not a PAW2-buffer.")
 284         md = hashlib.md5()
 285         md.update(buf[4 + md.digest_size:])
 286         if md.digest() != buf[4:4 + md.digest_size]:
 287             raise DigestError("Digest check failed")
 288         inp = tuple(zlib.decompress(buf[4 + md.digest_size:]).split('\n'))
 289         self.collection = inp
 290         self.key = md.hexdigest()

Original issue reported on code.google.com by antigeni...@gmail.com on 16 Feb 2015 at 6:58