parent
3957b7a2dd
commit
a3eba05f82
|
@ -6,8 +6,7 @@ running `curl <url> | bash`
|
||||||
## Work in Progress
|
## Work in Progress
|
||||||
|
|
||||||
`netrun` is still experimental; don't rely on its working properly. In
|
`netrun` is still experimental; don't rely on its working properly. In
|
||||||
particular, HTTP response codes are ignored (see #1) and command line syntax is
|
particular, HTTP response codes are ignored (see #1).
|
||||||
not checked (see #2).
|
|
||||||
|
|
||||||
## Try it
|
## Try it
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import requests
|
import requests
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
|
import argparse
|
||||||
|
|
||||||
|
|
||||||
def launch(command, data):
|
def launch(command, data):
|
||||||
|
@ -26,8 +27,10 @@ def yn(question, options="yn"):
|
||||||
|
|
||||||
return response
|
return response
|
||||||
|
|
||||||
|
parser = argparse.ArgumentParser(description="Securely run a script from the Internet")
|
||||||
url = sys.argv[1]
|
parser.add_argument("url", help="URL of the script")
|
||||||
|
args = parser.parse_args()
|
||||||
|
url = args.url
|
||||||
|
|
||||||
content = requests.get(url).content
|
content = requests.get(url).content
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user