mirror of
https://port.numenaute.org/aleajactaest/clientbot.git
synced 2024-11-25 00:26:33 +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)
|
||||
#y = ord(x)
|
||||
#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):
|
||||
|
@ -272,6 +276,10 @@ class BitStream():
|
|||
self._read = readBefore
|
||||
return ret
|
||||
|
||||
def getTextMD5(dataRawXml):
|
||||
for data in dataRawXml:
|
||||
pass
|
||||
|
||||
def Test():
|
||||
a = BitStream()
|
||||
a.pushBool(True)
|
||||
|
@ -1478,6 +1486,8 @@ class ClientNetworkConnection:
|
|||
self._LatestProbe = 0
|
||||
self._LastReceivedNumber = 0
|
||||
self._LastAckInLongAck = 0
|
||||
self._MsgXmlMD5 = None
|
||||
self._DatabaseXmlMD5 = None
|
||||
|
||||
def cookiesInit(self, UserAddr, UserKey, UserId):
|
||||
self.UserAddr = UserAddr
|
||||
|
@ -1581,7 +1591,15 @@ class ClientNetworkConnection:
|
|||
def disconnect(self):
|
||||
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.sendSystemLogin()
|
||||
|
||||
|
@ -1901,13 +1919,9 @@ class ClientKhanat:
|
|||
self.DownloadMinimum()
|
||||
self.cFileContainer = CFileContainer()
|
||||
self.cFileContainer.addSearchPath(self.tempdir.name)
|
||||
data = self.cFileContainer.getdata("msg.xml").decode()
|
||||
msgXml = ET.fromstring(data)
|
||||
ET.dump(msgXml)
|
||||
data = self.cFileContainer.getdata("database.xml").decode()
|
||||
databaseXml = ET.fromstring(data)
|
||||
ET.dump(databaseXml)
|
||||
self.clientNetworkConnection.EmulateFirst()
|
||||
msgRawXml = self.cFileContainer.getdata("msg.xml").decode()
|
||||
databaseRawXml = self.cFileContainer.getdata("database.xml").decode()
|
||||
self.clientNetworkConnection.EmulateFirst(msgRawXml, databaseRawXml)
|
||||
|
||||
|
||||
def main():
|
||||
|
|
Loading…
Reference in a new issue