PEASS-ng/linPEAS/builder/linpeas_parts/functions/check_dns.sh
2024-08-27 23:56:21 +02:00

18 lines
643 B
Bash

# Title: LinPeasBase - check_dns
# ID: check_dns
# Author: Carlos Polop
# Last Update: 22-08-2023
# Description: Check if the DNS is available
# License: GNU GPL
# Version: 1.0
# Functions Used:
# Global Variables:
# Initial Functions:
# Generated Global Variables:
# Fat linpeas: 0
# Small linpeas: 1
check_dns(){
(timeout 20 /bin/bash -c '(( echo cfc9 0100 0001 0000 0000 0000 0a64 7563 6b64 7563 6b67 6f03 636f 6d00 0001 0001 | xxd -p -r >&3; dd bs=9000 count=1 <&3 2>/dev/null | xxd ) 3>/dev/udp/1.1.1.1/53 && echo "DNS available" || echo "DNS not available") 2>/dev/null | grep "available"' ) 2>/dev/null || echo "DNS not available"
}