Created
October 14, 2022 20:04
-
-
Save VBPROGER/9c06a83bfb359ea2e3bc7fa457bb9141 to your computer and use it in GitHub Desktop.
Fastly execute shell codes without quitting!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
# -*- coding: utf-8 -*- | |
# sysexec.py: Fastly execute shell codes without quitting! | |
import subprocess, traceback, os | |
while True: | |
try: | |
x = str(input('~> ') or '') | |
if x: subprocess.run(x.split()) | |
except (KeyboardInterrupt, EOFError): | |
print() | |
os._exit(1) | |
except BaseException: | |
exception = traceback.format_exc() | |
print(exception) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment