mirror of
https://port.numenaute.org/aleajactaest/clientbot.git
synced 2024-11-09 08:49:05 +00:00
update comment
This commit is contained in:
parent
255384335e
commit
1611385267
1 changed files with 22 additions and 8 deletions
30
client.py
30
client.py
|
@ -144,6 +144,10 @@ class BitStream():
|
||||||
self.pushChar(x)
|
self.pushChar(x)
|
||||||
#y = ord(x)
|
#y = ord(x)
|
||||||
#self.internalSerial(y, 8)
|
#self.internalSerial(y, 8)
|
||||||
|
def pushArrayChar(self, valeur, size):
|
||||||
|
' ex.: pushArrayChar([0,1,3,4]) '
|
||||||
|
for i in valeur:
|
||||||
|
self.pushChar(i)
|
||||||
|
|
||||||
# ------------------------------------
|
# ------------------------------------
|
||||||
def readSerial(self, nbits):
|
def readSerial(self, nbits):
|
||||||
|
@ -272,6 +276,10 @@ class BitStream():
|
||||||
self._read = readBefore
|
self._read = readBefore
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
|
def getTextMD5(dataRawXml):
|
||||||
|
for data in dataRawXml:
|
||||||
|
pass
|
||||||
|
|
||||||
def Test():
|
def Test():
|
||||||
a = BitStream()
|
a = BitStream()
|
||||||
a.pushBool(True)
|
a.pushBool(True)
|
||||||
|
@ -1478,6 +1486,8 @@ class ClientNetworkConnection:
|
||||||
self._LatestProbe = 0
|
self._LatestProbe = 0
|
||||||
self._LastReceivedNumber = 0
|
self._LastReceivedNumber = 0
|
||||||
self._LastAckInLongAck = 0
|
self._LastAckInLongAck = 0
|
||||||
|
self._MsgXmlMD5 = None
|
||||||
|
self._DatabaseXmlMD5 = None
|
||||||
|
|
||||||
def cookiesInit(self, UserAddr, UserKey, UserId):
|
def cookiesInit(self, UserAddr, UserKey, UserId):
|
||||||
self.UserAddr = UserAddr
|
self.UserAddr = UserAddr
|
||||||
|
@ -1581,7 +1591,15 @@ class ClientNetworkConnection:
|
||||||
def disconnect(self):
|
def disconnect(self):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def EmulateFirst(self):
|
def EmulateFirst(self, msgRawXml, databaseRawXml):
|
||||||
|
msgXml = ET.fromstring(msgRawXml)
|
||||||
|
ET.dump(msgXml)
|
||||||
|
databaseXml = ET.fromstring(databaseRawXml)
|
||||||
|
ET.dump(databaseXml)
|
||||||
|
|
||||||
|
self._MsgXmlMD5 = getTextMD5(msgRawXml)
|
||||||
|
self._DatabaseXmlMD5 = getTextMD5(databaseRawXml)
|
||||||
|
|
||||||
self.log.info("Client Login")
|
self.log.info("Client Login")
|
||||||
self.sendSystemLogin()
|
self.sendSystemLogin()
|
||||||
|
|
||||||
|
@ -1901,13 +1919,9 @@ class ClientKhanat:
|
||||||
self.DownloadMinimum()
|
self.DownloadMinimum()
|
||||||
self.cFileContainer = CFileContainer()
|
self.cFileContainer = CFileContainer()
|
||||||
self.cFileContainer.addSearchPath(self.tempdir.name)
|
self.cFileContainer.addSearchPath(self.tempdir.name)
|
||||||
data = self.cFileContainer.getdata("msg.xml").decode()
|
msgRawXml = self.cFileContainer.getdata("msg.xml").decode()
|
||||||
msgXml = ET.fromstring(data)
|
databaseRawXml = self.cFileContainer.getdata("database.xml").decode()
|
||||||
ET.dump(msgXml)
|
self.clientNetworkConnection.EmulateFirst(msgRawXml, databaseRawXml)
|
||||||
data = self.cFileContainer.getdata("database.xml").decode()
|
|
||||||
databaseXml = ET.fromstring(data)
|
|
||||||
ET.dump(databaseXml)
|
|
||||||
self.clientNetworkConnection.EmulateFirst()
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
Loading…
Reference in a new issue