From e7bc25f1dcf7ae405e56318b39ca8fdf8185fa02 Mon Sep 17 00:00:00 2001 From: Daniel Carrillo Date: Thu, 24 Aug 2023 19:53:08 +0200 Subject: [PATCH] [.zshrc] Add siteinfo function --- .zshrc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.zshrc b/.zshrc index 37ab699..4653e18 100644 --- a/.zshrc +++ b/.zshrc @@ -79,6 +79,15 @@ kexec () { [ -n "$cid" ] && kubectl exec -ti "$cid" -- "${cmd[@]}" } +siteinfo () { + local url="$1" + local ip="$(dig +short "$url" | tail -1)" + + whois "$ip" + echo "Technology detected for $url with IP $ip" + httpx -silent -json -follow-redirects -ip -tech-detect -target "$url" | jq -rc '.tech' +} + ##### tilix ##### if [ $TILIX_ID ] || [ $VTE_VERSION ] ; then