Skip to content

Instantly share code, notes, and snippets.

@VBPROGER
Created October 14, 2022 20:04
Show Gist options
  • Save VBPROGER/9c06a83bfb359ea2e3bc7fa457bb9141 to your computer and use it in GitHub Desktop.
Save VBPROGER/9c06a83bfb359ea2e3bc7fa457bb9141 to your computer and use it in GitHub Desktop.
Fastly execute shell codes without quitting!
#!/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