updated patch
This commit is contained in:
parent
f59af3bf88
commit
6c28bf9b0d
2 changed files with 32 additions and 1 deletions
|
@ -21,6 +21,37 @@ diff -ru pymsnt-0.11.3-vanilla/src/avatar.py pymsnt-0.11.3/src/avatar.py
|
|||
self.__avatarCache = avatarCache
|
||||
|
||||
def getImageHash(self):
|
||||
diff -ru pymsnt-0.11.3-vanilla/src/legacy/msn/msn.py pymsnt-0.11.3/src/legacy/msn/msn.py
|
||||
--- pymsnt-0.11.3-vanilla/src/legacy/msn/msn.py 2008-02-08 14:55:07.000000000 +0100
|
||||
+++ pymsnt-0.11.3/src/legacy/msn/msn.py 2010-08-15 22:22:18.000000000 +0200
|
||||
@@ -106,7 +106,8 @@
|
||||
|
||||
|
||||
# System imports
|
||||
-import types, operator, os, sys, base64, random, struct, random, sha, base64, StringIO, array, codecs, binascii
|
||||
+import types, operator, os, sys, base64, random, struct, random, base64, StringIO, array, codecs, binascii
|
||||
+from hashlib import sha1
|
||||
from urllib import quote, unquote
|
||||
|
||||
|
||||
@@ -490,7 +491,7 @@
|
||||
self.type = 3
|
||||
self.location = "TMP" + str(random.randint(1000,9999))
|
||||
self.friendly = "AAA="
|
||||
- self.sha1d = b64enc(sha.sha(imageData).digest())
|
||||
+ self.sha1d = b64enc(sha1(imageData).digest())
|
||||
self.makeText()
|
||||
|
||||
def setNull(self):
|
||||
@@ -518,7 +519,7 @@
|
||||
h.append(self.friendly)
|
||||
h.append("SHA1D")
|
||||
h.append(self.sha1d)
|
||||
- sha1c = b64enc(sha.sha("".join(h)).digest())
|
||||
+ sha1c = b64enc(sha1("".join(h)).digest())
|
||||
self.text = '<msnobj Creator="%s" Size="%s" Type="%s" Location="%s" Friendly="%s" SHA1D="%s" SHA1C="%s"/>' % (self.creator, str(self.size), str(self.type), self.location, self.friendly, self.sha1d, sha1c)
|
||||
|
||||
def parse(self, s):
|
||||
diff -ru pymsnt-0.11.3-vanilla/src/legacy/msn/msnp11chl.py pymsnt-0.11.3/src/legacy/msn/msnp11chl.py
|
||||
--- pymsnt-0.11.3-vanilla/src/legacy/msn/msnp11chl.py 2008-02-08 14:55:07.000000000 +0100
|
||||
+++ pymsnt-0.11.3/src/legacy/msn/msnp11chl.py 2010-08-15 22:17:56.000000000 +0200
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue