From 612926651db0c13fa9f45f58764b56ab132b211c Mon Sep 17 00:00:00 2001 From: Epoch Qwert Date: Tue, 9 Dec 2014 03:27:26 -0600 Subject: ident.sh to make ident queries easier to use in scripts. gopherd.sh changed to use new output of peerip. peerip changes to output peer's port on second line. httpd changed... I dunno what. AOEU and aoeu to help with playing with dvorak. --- nocompile/bin/AOEU | 5 +++++ nocompile/bin/aoeu | 5 +++++ nocompile/bin/ident.sh | 2 ++ nocompile/libexec/gopherd.sh | 3 ++- 4 files changed, 14 insertions(+), 1 deletion(-) create mode 100755 nocompile/bin/AOEU create mode 100755 nocompile/bin/aoeu create mode 100755 nocompile/bin/ident.sh (limited to 'nocompile') diff --git a/nocompile/bin/AOEU b/nocompile/bin/AOEU new file mode 100755 index 0000000..dec1983 --- /dev/null +++ b/nocompile/bin/AOEU @@ -0,0 +1,5 @@ +#!/usr/bin/tail -n4 +~ ! @ # $ % ^ & * ( ) { } + " < > P Y F G C R L ? + | + A O E U I D H T N S _ + : Q J K X B M W V Z diff --git a/nocompile/bin/aoeu b/nocompile/bin/aoeu new file mode 100755 index 0000000..e426faf --- /dev/null +++ b/nocompile/bin/aoeu @@ -0,0 +1,5 @@ +#!/usr/bin/tail -n4 +` 1 2 3 4 5 6 7 8 9 0 [ ] + ' , . p y f g c r l / = \ + a o e u i d h t n s - + ; q j k x b m w v z diff --git a/nocompile/bin/ident.sh b/nocompile/bin/ident.sh new file mode 100755 index 0000000..5a44253 --- /dev/null +++ b/nocompile/bin/ident.sh @@ -0,0 +1,2 @@ +#!/bin/sh +printf "$2 , $3\r\n" | nc $1 113 | tr -d '\r' diff --git a/nocompile/libexec/gopherd.sh b/nocompile/libexec/gopherd.sh index 0b87223..9d3ba5c 100755 --- a/nocompile/libexec/gopherd.sh +++ b/nocompile/libexec/gopherd.sh @@ -1,4 +1,5 @@ #!/bin/bash +export PATH=$PATH:/usr/local/bin #set these two variables if you have your server behind DMZ read -t 10 req base="$1" @@ -9,7 +10,7 @@ if grep -v "^${base}" <<< "${realpath}" > /dev/null;then echo ${realpath} exit 1 fi -myIP=$(/usr/local/bin/hop0 $(/usr/local/libexec/peerip)) +myIP=$(hop0 $(/usr/local/libexec/peerip | head -n1)) hostname=$(rdns ${myIP}) if [ ! "${hostname}" ]; then hostname=${myIP} -- cgit v1.2.3