Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pyrdp-convert: Printing the stacktrace in the exception handler #361

Merged
merged 2 commits into from
Sep 14, 2021
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
1 change: 1 addition & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ For a detailed view of what has changed, refer to the {uri-repo}/commits/master[

* `pyrdp-convert` video conversion is now 6x faster! (See {uri-issue}349[#349])
* `pyrdp-convert` video format can be viewed during encoding and will play even if the conversion process crashes or is halted ({uri-issue}352[#352], {uri-issue}353[#353])
* Better error reporting for `pyrdp-convert` ({uri-issue}361[#361])
* Minor CLI improvements
* Improved type hints
* Updated instructions to extract the RDP certificate and private key ({uri-issue}345[#345])
Expand Down
6 changes: 5 additions & 1 deletion pyrdp/convert/PCAPConverter.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# Copyright (C) 2021 GoSecure Inc.
# Licensed under the GPLv3 or later.
#
import traceback
from pathlib import Path
from typing import Dict, List, Tuple

Expand Down Expand Up @@ -45,7 +46,10 @@ def process(self):
try:
self.processStream(startTimeStamp, stream)
except Exception as e:
print(f"\n[-] Failed: {e}")
trace = traceback.format_exc()
print() # newline
print(trace)
print(f"[-] Failed: {e}")

def listSessions(self) -> List[Tuple[int, PCAPStream]]:
print(f"[*] Analyzing PCAP '{self.inputFile}' ...")
Expand Down