YuvrajRaghuvanshiS / WhatsApp-Key-Database-Extractor

The most advanced and complete solution for extracting WhatsApp key/DB from package directory (/data/data/com.whatsapp) without root access.
MIT License
447 stars 57 forks source link

`pause` unknown and unnecessary before `quit()` on Linux #59

Closed nathanael-naeri closed 3 years ago

nathanael-naeri commented 3 years ago

I noticed that the source code contains several instances of os.system('pause') before quit(). pause is a DOS command that is unknown on Linux. I ran into it after creating an encrypted archive of the extracted files.

Bash has a read builtin that can be used for that (read [-t <seconds>] [-p <message>]), GNU coreutils provides the sleep command (sleep <seconds>), and Python has time.sleep(). But it may not even be necessary to pause before quitting, as the terminal doesn't close.

YuvrajRaghuvanshiS commented 3 years ago

The reason to put those was to stop cmd/powershell form closing on exiting when this is run by double clicking on windows (#57 I believe ) I did not pay attention if that only DOS specific but now as you have mentioned it I realized it. Even python can use

input('Press \'Enter\' to continue.')

I will make those changes now. Thank you for bringing it to my notice