My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions

Issue 156 attachment: pyicq-t-0.8-seqnum.patch (1.2 KB)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
--- src/tlib/oscar.py 2008-01-19 16:35:31.000000000 +0500
+++ src/tlib/oscar.py 2009-01-23 01:01:57.000000000 +0500
@@ -595,10 +595,21 @@
return self.__str__()


+def GetInitialSeqNum():
+ #old value
+ #return 0
+
+ #said to work
+ #return 10000
+
+ #by persei from Miranda IM
+ #http://persei.miranda.im/files/icq+.patch
+ return random.choice([5695, 23595, 23620, 23049, 0x2886, 0x2493, 23620, 23049, 2853, 17372, 1255, 1796, 1657, 13606, 1930, 23918, 31234, 30120, 0x1BEA, 0x5342, 0x30CC, 0x2294, 0x5697, 0x25FA, 0x3C26, 0x3303, 0x078A, 0x0FC5, 0x25D6, 0x26EE,0x7570, 0x7F33, 0x4E94, 0x07C9, 0x7339, 0x42A8]) - 1
+
class OscarConnection(protocol.Protocol):
def connectionMade(self):
self.state=""
- self.seqnum=0
+ self.seqnum=GetInitialSeqNum()
self.buf=''
self.outRate=6000
self.outTime=time.time()
@@ -617,7 +628,7 @@

def sendFLAP(self,data,channel = 0x02):
if not hasattr(self, "seqnum"):
- self.seqnum = 0
+ self.seqnum = GetInitialSeqNum()
self.seqnum=(self.seqnum+1)%0xFFFF
seqnum=self.seqnum
head=struct.pack("!BBHH", 0x2a, channel,
Powered by Google Project Hosting