Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
matrix:
os: [ubuntu-22.04, ubuntu-20.04]
# Lets try to keep testing an LTS python and latest python
python-version: ['3.7', '3.12']
python-version: ['3.7', '3.12', '3.13']

runs-on: ${{ matrix.os }}
name: Ubuntu ${{ matrix.os }} with Python ${{ matrix.python-version }}
Expand Down Expand Up @@ -106,7 +106,7 @@ jobs:
strategy:
matrix:
# Lets try to keep testing an LTS python and latest python
python-version: ['3.7', '3.12']
python-version: ['3.7', '3.12', '3.13']

name: Windows with Python ${{ matrix.python-version }}
steps:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ jobs:
# env:
# CIBW_SOME_OPTION: value

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: pyrdp-wheel-${{ matrix.os }}
path: ./wheelhouse/*.whl
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Communications",
"Topic :: Security",
"Topic :: Software Development :: Libraries",
Expand All @@ -54,7 +55,7 @@ dependencies = [
[project.optional-dependencies]
full = [
'wheel>=0.34.2',
'av>=8,<12',
'av>=8,<15',
'PySide6>=6.3,<7',
'qimage2ndarray>=1.6,<2',
'py-notifier>=0.5.0',
Expand Down
2 changes: 1 addition & 1 deletion pyrdp/mitm/DeviceRedirectionMITM.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ def sendForgedFileRead(self, deviceID: int, path: str) -> int:
return completionID

def sendForgedDirectoryListing(self, deviceID: int, path: str) -> int:
"""
r"""
Send a forged directory listing request. Returns a request ID that can be used by the caller to keep track of which
file belongs to which directory. Results are sent by using the DeviceRedirectionMITMObserver interface.
:param deviceID: ID of the target device.
Expand Down
4 changes: 2 additions & 2 deletions pyrdp/mitm/FileMapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
import hashlib
import os
import tempfile
import typing
from logging import LoggerAdapter
from pathlib import Path
from typing import io


class FileMapping:
Expand All @@ -18,7 +18,7 @@ class FileMapping:
transferred over RDP.
"""

def __init__(self, file: io.BinaryIO, dataPath: Path, filesystemPath: Path, filesystemDir: Path, log: LoggerAdapter):
def __init__(self, file: typing.BinaryIO, dataPath: Path, filesystemPath: Path, filesystemDir: Path, log: LoggerAdapter):
"""
:param file: the file handle for dataPath
:param dataPath: path where the file is actually saved
Expand Down
10 changes: 5 additions & 5 deletions pyrdp/ui/qt.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,23 +49,23 @@ def RDPBitmapToQtImage(width: int, height: int, bitsPerPixel: int, isCompressed:
"""
image = None
buf = None

if bitsPerPixel == 15:
if isCompressed:
buf = rle.bitmap_decompress(data, width, height, 2)
image = QImage(buf, width, height, QImage.Format_RGB555)
else:
buf = data
image = QImage(buf, width, height, QImage.Format_RGB555).transformed(QTransform(1.0, 0.0, 0.0, -1.0, 0.0, 0.0))

elif bitsPerPixel == 16:
if isCompressed:
buf = rle.bitmap_decompress(data, width, height, 2)
image = QImage(buf, width, height, QImage.Format_RGB16)
else:
buf = data
image = QImage(buf, width, height, QImage.Format_RGB16).transformed(QTransform(1.0, 0.0, 0.0, -1.0, 0.0, 0.0))

elif bitsPerPixel == 24:
if isCompressed:
buf = rle.bitmap_decompress(data, width, height, 3)
Expand All @@ -83,7 +83,7 @@ def RDPBitmapToQtImage(width: int, height: int, bitsPerPixel: int, isCompressed:
else:
buf = data
image = QImage(buf, width, height, QImage.Format_RGB888).transformed(QTransform(1.0, 0.0, 0.0, -1.0, 0.0, 0.0))

elif bitsPerPixel == 32:
if isCompressed:
buf = rle.bitmap_decompress(data, width, height, 4)
Expand All @@ -106,7 +106,7 @@ def RDPBitmapToQtImage(width: int, height: int, bitsPerPixel: int, isCompressed:


def convert8bppTo16bpp(buf: bytes):
"""
r"""
WARNING: The actual 8bpp images work by using a color palette, which this method does not use.
This method instead tries to transform indices into colors. This results in a weird looking image,
but it can still be useful to see whats happening ¯\_(ツ)_/¯
Expand Down
Loading