chiark
/
gitweb
/
~mdw
/
odin-cgi
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c24aba6
)
cgi/ip: New simple service to print client's IP address.
author
Mark Wooding
<mdw@distorted.org.uk>
Sat, 1 Apr 2017 10:11:49 +0000
(11:11 +0100)
committer
Mark Wooding
<mdw@distorted.org.uk>
Sat, 1 Apr 2017 10:11:49 +0000
(11:11 +0100)
Supports IPv6. ;-)
cgi/ip
[new file with mode: 0755]
patch
|
blob
diff --git a/cgi/ip
b/cgi/ip
new file mode 100755
(executable)
index 0000000..
026617b
--- /dev/null
+++ b/
cgi/ip
@@ -0,0
+1,7
@@
+#! /usr/bin/perl
+print <<EOF;
+Content-type: text/plain; charset=us-ascii
+
+$ENV{REMOTE_ADDR}
+EOF
+exit 0;