jborean93 / pypsrp

PowerShell Remoting Protocol for Python
MIT License
324 stars 49 forks source link

Fix Exchange Connection Problems #165

Closed jborean93 closed 1 year ago

jborean93 commented 1 year ago

Fixes a few problems when connecting to Exchange based PSRemoting endpoints.

Fix connection uri builder when targeting port 80 or 443 for an Exchange based endpoint.

Reuse cookies returned by an Exchange Online endpoint. This fixes an invalid selector message.

Fixes a deadlock when the first receive task for a WSMan connection fails with invalid selectors. The error will now be properly reported to the caller rather than hanging indefinitely.

Fixes: https://github.com/jborean93/pypsrp/issues/157

codecov[bot] commented 1 year ago

Codecov Report

Merging #165 (0a4820e) into master (2767d14) will decrease coverage by 0.11%. The diff coverage is 83.33%.

@@            Coverage Diff             @@
##           master     #165      +/-   ##
==========================================
- Coverage   99.97%   99.85%   -0.12%     
==========================================
  Files          17       17              
  Lines        3497     3511      +14     
==========================================
+ Hits         3496     3506      +10     
- Misses          1        5       +4     
Flag Coverage Δ
99.85% <83.33%> (-0.12%) :arrow_down:
py3.10 99.85% <83.33%> (-0.12%) :arrow_down:
py3.11 72.79% <4.16%> (-0.27%) :arrow_down:
py3.7 99.85% <83.33%> (-0.12%) :arrow_down:
py3.8 99.85% <83.33%> (-0.12%) :arrow_down:
py3.9 99.85% <83.33%> (-0.12%) :arrow_down:
x64 99.85% <83.33%> (-0.12%) :arrow_down:
x86 99.43% <83.33%> (-0.12%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/psrp/_io/wsman.py 99.61% <77.77%> (-0.39%) :arrow_down:
src/psrp/_connection/wsman.py 99.56% <86.66%> (-0.44%) :arrow_down:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.