returns remote IP on call

master
panki27 5 years ago
commit 59ea976be6

16
ip.py

@ -0,0 +1,16 @@
#!/usr/bin/env python3
import cgi
import os
import html
def header():
print("Content-type: text/plain")
print()
def main():
params = cgi.FieldStorage()
header()
print(str(len(params)))
print(html.escape(os.environ["REMOTE_ADDR"]))
if __name__ == "__main__":
main()
Loading…
Cancel
Save