abhisharma404 / vault

swiss army knife for hackers
https://abhisharma404.github.io/vault
MIT License
512 stars 94 forks source link

Handle CTRL+C properly #94

Open mzfr opened 5 years ago

mzfr commented 5 years ago

Currently pressing ctrl+c while scans are going on we get a big traceback. It would be nice if we can handle that traceback and print something nice like Canceled by the user or something similar.

Read this to understand how to do it properly.

4lovi4 commented 5 years ago

Tried to implement here https://github.com/abhisharma404/vault/pull/98. But the solution is not so obvious. Can't find the way to gracefully stop running scanning thread. So need to press Ctrl-C two times in a row.

RC-Rajat commented 4 years ago

Tried to solve #94 by putting the entire body of code within a try...except block.On keyboard interrupt, The except block displays 'Process Stopped by user'. However,it also gives an Exception and a traceback.To stop that, I redirected stderr to a file 'err.txt'. This makes it such that the user gets a clean response on pressing Ctrl + C.My implementation is Here #99.

darkLucifer321 commented 4 years ago

I would like to work on this issue