2010-08-15 22:18:49 +02:00
|
|
|
diff -ru pymsnt-0.11.3-vanilla/src/avatar.py pymsnt-0.11.3/src/avatar.py
|
|
|
|
--- pymsnt-0.11.3-vanilla/src/avatar.py 2008-02-08 14:55:07.000000000 +0100
|
|
|
|
+++ pymsnt-0.11.3/src/avatar.py 2010-08-15 22:17:32.000000000 +0200
|
|
|
|
@@ -5,8 +5,8 @@
|
|
|
|
|
|
|
|
from twisted.internet import reactor
|
|
|
|
from twisted.words.xish.domish import Element
|
|
|
|
-
|
|
|
|
-import sha, base64, os, os.path
|
|
|
|
+from hashlib import sha1
|
|
|
|
+import base64, os, os.path
|
|
|
|
|
|
|
|
import utils
|
|
|
|
import config
|
|
|
|
@@ -34,7 +34,7 @@
|
|
|
|
class Avatar:
|
|
|
|
""" Represents an Avatar. Does not store the image in memory. """
|
|
|
|
def __init__(self, imageData, avatarCache):
|
|
|
|
- self.__imageHash = sha.sha(imageData).hexdigest()
|
|
|
|
+ self.__imageHash = sha1(imageData).hexdigest()
|
|
|
|
self.__avatarCache = avatarCache
|
|
|
|
|
|
|
|
def getImageHash(self):
|
2010-08-15 22:22:46 +02:00
|
|
|
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):
|
2010-08-15 22:18:49 +02:00
|
|
|
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
|
|
|
|
@@ -1,7 +1,7 @@
|
|
|
|
# Copyright 2005 James Bunton <james@delx.cjb.net>
|
|
|
|
# Licensed for distribution under the GPL version 2, check COPYING for details
|
|
|
|
|
|
|
|
-import md5
|
|
|
|
+from hashlib import md5
|
|
|
|
import struct
|
|
|
|
|
|
|
|
MSNP11_PRODUCT_ID = "PROD0090YUAUV{2B"
|
2010-01-20 18:36:43 +01:00
|
|
|
diff -ru pymsnt-0.11.3-vanilla/src/utils.py pymsnt-0.11.3/src/utils.py
|
2010-08-15 21:51:09 +02:00
|
|
|
--- pymsnt-0.11.3-vanilla/src/utils.py 2008-02-08 14:55:07.000000000 +0100
|
2010-08-15 22:13:58 +02:00
|
|
|
+++ pymsnt-0.11.3/src/utils.py 2010-08-15 22:12:36.000000000 +0200
|
|
|
|
@@ -7,9 +7,9 @@
|
2010-01-20 18:36:43 +01:00
|
|
|
return el.getAttribute((u'http://www.w3.org/XML/1998/namespace', u'lang'))
|
|
|
|
|
|
|
|
|
|
|
|
-import sha
|
2010-08-15 22:13:58 +02:00
|
|
|
+from hashlib import sha1
|
2010-01-20 18:36:43 +01:00
|
|
|
def socks5Hash(sid, initiator, target):
|
2010-08-15 22:13:58 +02:00
|
|
|
- return sha.new("%s%s%s" % (sid, initiator, target)).hexdigest()
|
|
|
|
+ return sha1.new("%s%s%s" % (sid, initiator, target)).hexdigest()
|
2010-01-20 18:36:43 +01:00
|
|
|
|
2010-08-15 22:13:58 +02:00
|
|
|
|
|
|
|
import urllib
|
2010-01-20 18:36:43 +01:00
|
|
|
diff -ru pymsnt-0.11.3-vanilla/src/xdb.py pymsnt-0.11.3/src/xdb.py
|
2010-08-15 21:51:09 +02:00
|
|
|
--- pymsnt-0.11.3-vanilla/src/xdb.py 2008-02-08 14:55:07.000000000 +0100
|
|
|
|
+++ pymsnt-0.11.3/src/xdb.py 2010-08-15 21:46:57.000000000 +0200
|
2010-01-20 18:36:43 +01:00
|
|
|
@@ -6,7 +6,7 @@
|
|
|
|
import os
|
|
|
|
import os.path
|
|
|
|
import shutil
|
|
|
|
-import md5
|
2010-08-15 21:51:09 +02:00
|
|
|
+from hashlib import md5
|
2010-01-20 18:36:43 +01:00
|
|
|
import config
|
|
|
|
|
|
|
|
X = os.path.sep
|