connection status fcheck fix. increasing unicrypto version req

This commit is contained in:
SkelSec
2025-08-19 05:47:28 -07:00
parent d229cb56f6
commit 6bc86e9437
4 changed files with 14 additions and 5 deletions
+2 -2
View File
@@ -12,8 +12,8 @@ publish: clean package
package: clean
python3 setup.py sdist
sudo docker pull quay.io/pypa/manylinux2014_x86_64
sudo docker run --rm -v `pwd`:/io quay.io/pypa/manylinux2014_x86_64 /io/builder/manylinux/build.sh
# sudo docker pull quay.io/pypa/manylinux2014_x86_64
# sudo docker run --rm -v `pwd`:/io quay.io/pypa/manylinux2014_x86_64 /io/builder/manylinux/build.sh
rebuild: clean
python3 setup.py install
+7 -1
View File
@@ -570,7 +570,9 @@ class RDPConnection:
conf_create_req = self.__t125_ber_codec.encode('ConnectMCSPDU',('connect-initial', initialconnect))
await self._x224net.write(bytes(conf_create_req))
response_raw = await self._x224net.read()
response_raw = await self._x224net.read()
if response_raw is None:
raise Exception('Connection closed!')
server_res_raw = response_raw.data
server_res_t125 = self.__t125_ber_codec.decode('ConnectMCSPDU', server_res_raw)
if server_res_t125[0] != 'connect-response':
@@ -627,6 +629,8 @@ class RDPConnection:
request = self._t125_per_codec.encode('DomainMCSPDU', ('attachUserRequest', {}))
await self._x224net.write(request)
response = await self._x224net.read()
if response is None:
raise Exception('Connection closed!')
response_parsed = self._t125_per_codec.decode('DomainMCSPDU', response.data)
if response_parsed[0] != 'attachUserConfirm':
raise Exception('Unexpected response! %s' % response_parsed[0])
@@ -644,6 +648,8 @@ class RDPConnection:
joindata = self._t125_per_codec.encode('DomainMCSPDU', ('channelJoinRequest', {'initiator': self._initiator, 'channelId': self.__joined_channels[name].channel_id}))
await self._x224net.write(bytes(joindata))
response = await self._x224net.read()
if response is None:
raise Exception('Connection closed!')
x = self._t125_per_codec.decode('DomainMCSPDU', response.data)
if x[0] != 'channelJoinConfirm':
+4 -1
View File
@@ -46,7 +46,10 @@ class X224Network:
return reply, e
async def read(self):
is_fastpath, tpktdata = await self.connection.read_one()
res = await self.connection.read_one()
if res is None:
return None
is_fastpath, tpktdata = res
if is_fastpath is True:
raise Exception('Fastpath packet should never be here!')
return X224Packet.from_bytes(tpktdata)
+1 -1
View File
@@ -44,7 +44,7 @@ setup(
install_requires=[
'unicrypto>=0.0.10',
'unicrypto>=0.0.11',
'asyauth>=0.0.16',
'asysocks>=0.2.9',
'tqdm',