move echo to python3

This commit is contained in:
David Koes
2020-02-21 12:31:08 -05:00
parent beddb541e6
commit 68677e0d06

View File

@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python3
#fetchs a file - workaround for cross site scripting prevention
import cgi,requests,sys
@@ -7,8 +7,6 @@ form = cgi.FieldStorage()
url = form["url"].value
response = requests.get(url)
print "Content-Type: text/text"
print ""
sys.stdout.write("Content-Type: text/text\n\n")
sys.stdout.write(response.text)