Skip to content

Commit

Permalink
basic detection of rdp connection attempts
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed Jan 15, 2025
1 parent a80b4e5 commit 5f6b445
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions xpra/net/socket_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,8 @@ def guess_packet_type(buf: SizedBuffer) -> str:
return "ssl"
if data[:4] == b"RFB ":
return "vnc"
if len(data) >= 7 and data[:2] == b"\x03\x00":
return "rdp"
line1 = bytes(data).splitlines()[0]
if line1.find(b"HTTP/") > 0 or line1.split(b" ")[0] in (b"GET", b"POST"):
return "http"
Expand Down

0 comments on commit 5f6b445

Please sign in to comment.