returns remote IP on call
This commit is contained in:
commit
59ea976be6
16
ip.py
Normal file
16
ip.py
Normal 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()
|
Loading…
Reference in New Issue
Block a user