summaryrefslogtreecommitdiffstats
path: root/retiolum/bin
diff options
context:
space:
mode:
authortv <tv@nomic.retiolum>2013-02-02 01:31:29 +0100
committertv <tv@nomic.retiolum>2013-02-02 01:31:29 +0100
commite929315a0b734aab77a68bcfa41f24faf28b8896 (patch)
treed966fdecc4dfeecbb07f8cf4efa82ccc52482f2c /retiolum/bin
parentc6f8c72d483fdcdf2ba4554ca7f578089df9f1c2 (diff)
//retiolum list-known-public-addresses: add online filter
Diffstat (limited to 'retiolum/bin')
-rwxr-xr-xretiolum/bin/list-known-public-addresses8
1 files changed, 7 insertions, 1 deletions
diff --git a/retiolum/bin/list-known-public-addresses b/retiolum/bin/list-known-public-addresses
index d8073791..00d8d4b9 100755
--- a/retiolum/bin/list-known-public-addresses
+++ b/retiolum/bin/list-known-public-addresses
@@ -28,5 +28,11 @@ _filter_public() {
# TODO drop private IPv6 addresses
'
}
+_filter_online() {
+ awk '
+ {print"nc -zw 2 "$2" 655 2>/dev/null && echo "$1" "$2" &"}
+ END {print"wait"}
+ ' | sh
+}
-_list_hostname_address | _lookup_address | _filter_public
+_list_hostname_address | _lookup_address | _filter_public | _filter_online