-
Notifications
You must be signed in to change notification settings - Fork 120
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
Facedancer --suggest mode doesn't print suggestions, as Ctrl-C is no longer caught #118
Comments
I don't think this commit should be reverted : if Facedancer catches the exception without rethrowing it, it prevents Facedancer users from catching Ctrl-C. I personnaly needed to catch Ctrl-C in a script that was creating devices in a loop and Facedancer was catching the The emulation of the device (https://github.com/greatscottgadgets/facedancer/blob/cfb3d5899463b58b097ed6860099dd0320df8a20/facedancer/devices/__init__.py#L40C1-L44C43) could be wrapped like this to ensure suggestions will always be printed ( try:
# Run the relevant code, along with any added coroutines.
device.emulate(*coroutines)
finally:
if args.suggest:
device.print_suggested_additions() |
How about: #119 |
catching #119 PR works for me as well |
I'm reluctant to introduce a new keyboard shortcut if we don't need to, I like the suggestion of catching |
@antoinevg plans to rework #119 so that the interrupt is caught in |
PR updated, feedback appreciated plz! #119 |
When running facedancer examples with the
--suggest
argument, pressing Ctrl-C to end the script just prints a backtrace instead of printing the aggregated suggestions. It used to catch the exception, but that got removed in #92The text was updated successfully, but these errors were encountered: