Initial version
This commit is contained in:
parent
0e5f23d1c5
commit
82bba3540c
3
demo_script.sh
Normal file
3
demo_script.sh
Normal file
|
@ -0,0 +1,3 @@
|
|||
whoami
|
||||
ls -l
|
||||
touch testfile
|
18
netrun.py
Normal file
18
netrun.py
Normal file
|
@ -0,0 +1,18 @@
|
|||
import requests
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
url = sys.argv[1]
|
||||
|
||||
content = requests.get(url).content
|
||||
|
||||
subprocess.run(['less'], input=content)
|
||||
|
||||
while True:
|
||||
response = input('Do you want to run this script? [y/n] ').lower().strip()[0]
|
||||
if response == 'y':
|
||||
subprocess.run(['bash'], input=content)
|
||||
break
|
||||
elif response == 'n':
|
||||
print('Script not run.')
|
||||
break
|
Loading…
Reference in New Issue
Block a user