From: Ian Kelling Date: Tue, 25 Apr 2017 07:59:40 +0000 (-0700) Subject: add get public ip script X-Git-Url: https://iankelling.org/git/?a=commitdiff_plain;h=f32d5784d1a672764705737bb1f25d7f1fcf6038;p=iankelling.org add get public ip script --- diff --git a/_site/cgi/pubip b/_site/cgi/pubip new file mode 100755 index 0000000..06e649f --- /dev/null +++ b/_site/cgi/pubip @@ -0,0 +1,25 @@ +#!/usr/bin/env ruby +# encoding: utf-8 +# Copyright (C) 2016 Ian Kelling + +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +Encoding.default_external = Encoding::UTF_8 + +require 'cgi' + +puts "Content-type: text/plain\n\n" +cgi = CGI.new +puts cgi.remote_addr +exit 0