1
0
mirror of https://github.com/dcarrillo/dotfiles.git synced 2024-12-22 06:58:01 +00:00

[.zshrc] Add siteinfo function

This commit is contained in:
Daniel Carrillo 2023-08-24 19:53:08 +02:00
parent a3fdef2a7e
commit e7bc25f1dc
Signed by: dcarrillo
GPG Key ID: E4CD5C09DAED6E16

9
.zshrc
View File

@ -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