repo: uritools
action: commit
revision: 
path_from: 
revision_from: 2f2907b275162376f6e667fc818471ab328dabbe:
path_to: 
revision_to: 
git.thebackupbox.net
uritools
git clone git://git.thebackupbox.net/uritools
commit 2f2907b275162376f6e667fc818471ab328dabbe
Author: epoch 
Date:   Fri Jan 26 03:48:45 2024 +0000

    tcp: uri support

diff --git a/urititle b/urititle
index 56254ee3680594b015301f17c2f41c4cf2578b07..
index ..f64ddbafcbdd252aa159a893c4a2b3e25f7fe1de 100755
--- a/urititle
+++ b/urititle
@@ -65,7 +65,7 @@ http*)
         printf "title: %s\n" "$title" | html_entities_decode
       fi
     else
-      p rintf "%s\n" "${a_header}"
+      printf "header: %s\n" "${a_header}"
     fi
   fi
   ;;
@@ -186,6 +186,14 @@ man)
     apropos -we "${command}" | grep "^${command}"
   fi
   ;;
+tcp)
+  ncat -z "$domain" "$port" && echo "tcp://$domain:$port/ is open" || echo "tcp://$domain:$port/ is closed"
+  ;;
+ident)
+  domain="${domain:-localhost}"
+  port="${port:-113}"
+  printf '%s\r\n' "$path" | nc "$domain" "$port" || echo 'ident lookup failed. port closed.'
+  ;;
 *)
   printf "DONT KNOW HOW TO GET TITLE FOR THIS URL: %s\n" "$uri"
 esac

-----END OF PAGE-----