19 lines
396 B
Python
19 lines
396 B
Python
|
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
|