2017-10-18 14:01:26 +08:00
|
|
|
"""
|
|
|
|
Unobfuscates an encrypted string/password into a plaintext string/password.
|
|
|
|
|
|
|
|
Usage:
|
|
|
|
python unobfuscate.py
|
|
|
|
Then enter the encrypted string/password.
|
|
|
|
The result is a plaintext string/password.
|
|
|
|
Works the same as obfuscate.py, but doesn't mask the input.
|
|
|
|
"""
|
|
|
|
|
|
|
|
from seleniumbase.common import encryption
|
2019-07-30 14:57:55 +08:00
|
|
|
import sys
|
2017-10-18 14:01:26 +08:00
|
|
|
import time
|
|
|
|
|
|
|
|
|
|
|
|
def main():
|
2019-07-30 14:57:55 +08:00
|
|
|
if sys.version_info[0] >= 3:
|
|
|
|
input_method = input # Using Python 3 (or higher)
|
|
|
|
else:
|
2017-10-18 14:01:26 +08:00
|
|
|
# Python 2 has the raw_input() method. Python 3 does not.
|
|
|
|
input_method = raw_input # noqa: ignore=F821
|
|
|
|
try:
|
|
|
|
while(1):
|
|
|
|
code = input_method(
|
2021-02-19 12:40:55 +08:00
|
|
|
'\nEnter obfuscated/encrypted string: (CTRL+C to exit):\n')
|
2017-10-18 14:01:26 +08:00
|
|
|
print("\nHere is the unobfuscated string/password:")
|
|
|
|
time.sleep(0.07)
|
|
|
|
print(encryption.decrypt(code))
|
|
|
|
time.sleep(0.21)
|
2018-02-09 07:00:25 +08:00
|
|
|
except KeyboardInterrupt:
|
2017-10-18 14:01:26 +08:00
|
|
|
print("\nExiting...\n")
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
main()
|