From f32d5784d1a672764705737bb1f25d7f1fcf6038 Mon Sep 17 00:00:00 2001 From: Ian Kelling Date: Tue, 25 Apr 2017 00:59:40 -0700 Subject: [PATCH] add get public ip script --- _site/cgi/pubip | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 _site/cgi/pubip 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 -- 2.30.2