update comment

This commit is contained in:
AleaJactaEst 2019-05-30 19:37:42 +02:00
parent 255384335e
commit 1611385267

View file

@ -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():