returns remote IP on call

This commit is contained in:
panki27 2020-01-15 19:36:02 +01:00
commit 59ea976be6

16
ip.py Normal file
View File

@ -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()