From d8d47a473653aefe5af47e7a4fe019437449a4e3 Mon Sep 17 00:00:00 2001 From: six2dez Date: Sat, 12 Jun 2021 00:48:23 +0200 Subject: [PATCH] Simplified reverse DNS --- install.sh | 8 +++----- reconftw.sh | 10 +++------- reconftw_axiom.sh | 10 +++------- 3 files changed, 9 insertions(+), 19 deletions(-) diff --git a/install.sh b/install.sh index b82a600b..360e7da9 100755 --- a/install.sh +++ b/install.sh @@ -29,8 +29,6 @@ gotools["crobat"]="go get -v github.com/cgboal/sonarsearch/crobat" gotools["crlfuzz"]="GO111MODULE=on go get -v github.com/dwisiswant0/crlfuzz/cmd/crlfuzz" gotools["dalfox"]="GO111MODULE=on go get -v github.com/hahwul/dalfox/v2" gotools["puredns"]="GO111MODULE=on go get github.com/d3mondev/puredns/v2" -gotools["hakrevdns"]="go get github.com/hakluke/hakrevdns" -gotools["gdn"]="GO111MODULE=on go get -v github.com/kmskrishna/gdn" gotools["resolveDomains"]="go get -v github.com/Josue87/resolveDomains" gotools["interactsh-client"]="GO111MODULE=on go get -v github.com/projectdiscovery/interactsh/cmd/interactsh-client" @@ -92,17 +90,17 @@ install_apt(){ eval $SUDO apt update -y $DEBUG_STD eval $SUDO DEBIAN_FRONTEND="noninteractive" apt install chromium-browser -y $DEBUG_STD eval $SUDO DEBIAN_FRONTEND="noninteractive" apt install chromium -y $DEBUG_STD - eval $SUDO DEBIAN_FRONTEND="noninteractive" apt install python3 python3-pip build-essential gcc cmake ruby git curl libpcap-dev wget zip python3-dev pv dnsutils libssl-dev libffi-dev libxml2-dev libxslt1-dev zlib1g-dev nmap jq apt-transport-https lynx tor medusa xvfb -y $DEBUG_STD + eval $SUDO DEBIAN_FRONTEND="noninteractive" apt install python3 python3-pip build-essential gcc cmake ruby git curl libpcap-dev wget zip python3-dev pv dnsutils libssl-dev libffi-dev libxml2-dev libxslt1-dev zlib1g-dev nmap jq apt-transport-https lynx tor medusa xvfb prips -y $DEBUG_STD eval $SUDO systemctl enable tor $DEBUG_STD } install_yum(){ eval $SUDO yum groupinstall "Development Tools" -y $DEBUG_STD - eval $SUDO yum install python3 python3-pip gcc cmake ruby git curl libpcap-dev wget zip python3-devel pv bind-utils libopenssl-devel libffi-devel libxml2-devel libxslt-devel zlib-devel nmap jq lynx tor medusa xorg-x11-server-xvfb -y $DEBUG_STD + eval $SUDO yum install python3 python3-pip gcc cmake ruby git curl libpcap-dev wget zip python3-devel pv bind-utils libopenssl-devel libffi-devel libxml2-devel libxslt-devel zlib-devel nmap jq lynx tor medusa xorg-x11-server-xvfb prips -y $DEBUG_STD } install_pacman(){ - eval $SUDO pacman -Sy install python python-pip base-devel gcc cmake ruby git curl libpcap wget zip pv bind openssl libffi libxml2 libxslt zlib nmap jq lynx tor medusa xorg-server-xvfb -y $DEBUG_STD + eval $SUDO pacman -Sy install python python-pip base-devel gcc cmake ruby git curl libpcap wget zip pv bind openssl libffi libxml2 libxslt zlib nmap jq lynx tor medusa xorg-server-xvfb prips -y $DEBUG_STD eval $SUDO systemctl enable --now tor.service $DEBUG_STD } diff --git a/reconftw.sh b/reconftw.sh index 878f7b18..209a500d 100755 --- a/reconftw.sh +++ b/reconftw.sh @@ -96,8 +96,6 @@ function tools_installed(){ type -P dalfox &>/dev/null || { printf "${bred} [*] dalfox [NO]${reset}\n${reset}"; allinstalled=false;} type -P puredns &>/dev/null || { printf "${bred} [*] puredns [NO]${reset}\n${reset}"; allinstalled=false;} type -P unimap &>/dev/null || { printf "${bred} [*] unimap [NO]${reset}\n${reset}"; allinstalled=false;} - type -P hakrevdns &>/dev/null || { printf "${bred} [*] hakrevdns [NO]${reset}\n${reset}"; allinstalled=false;} - type -P gdn &>/dev/null || { printf "${bred} [*] gdn [NO]${reset}\n"; allinstalled=false;} type -P resolveDomains &>/dev/null || { printf "${bred} [*] resolveDomains [NO]${reset}\n"; allinstalled=false;} type -P emailfinder &>/dev/null || { printf "${bred} [*] emailfinder [NO]${reset}\n"; allinstalled=false;} type -P urldedupe &>/dev/null || { printf "${bred} [*] urldedupe [NO]${reset}\n"; allinstalled=false;} @@ -1435,17 +1433,15 @@ function resolvers_update(){ function ipcidr_detection(){ if [[ $1 =~ /[0-9]+$ ]]; then - prips $1 | hakrevdns - prips $1 | gdn + prips $1 | dnsx -ptr -resp-only -silent else - echo $1 | hakrevdns - echo $1 | gdn + echo $1 | dnsx -ptr -resp-only -silent fi } function ipcidr_target(){ if [[ $1 =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9] ]]; then - ipcidr_detection $1 | cut -d' ' -f3 | unfurl -u domains 2>/dev/null | sed 's/\.$//' | sort -u > ./target_reconftw_ipcidr.txt + ipcidr_detection $1 | unfurl -u domains 2>/dev/null | sed 's/\.$//' | sort -u > ./target_reconftw_ipcidr.txt if [[ $(cat ./target_reconftw_ipcidr.txt | wc -l) -eq 1 ]]; then domain=$(cat ./target_reconftw_ipcidr.txt) elif [[ $(cat ./target_reconftw_ipcidr.txt | wc -l) -gt 1 ]]; then diff --git a/reconftw_axiom.sh b/reconftw_axiom.sh index c6ef017b..e8741370 100755 --- a/reconftw_axiom.sh +++ b/reconftw_axiom.sh @@ -96,8 +96,6 @@ function tools_installed(){ type -P dalfox &>/dev/null || { printf "${bred} [*] dalfox [NO]${reset}\n${reset}"; allinstalled=false;} type -P puredns &>/dev/null || { printf "${bred} [*] puredns [NO]${reset}\n${reset}"; allinstalled=false;} type -P unimap &>/dev/null || { printf "${bred} [*] unimap [NO]${reset}\n${reset}"; allinstalled=false;} - type -P hakrevdns &>/dev/null || { printf "${bred} [*] hakrevdns [NO]${reset}\n${reset}"; allinstalled=false;} - type -P gdn &>/dev/null || { printf "${bred} [*] gdn [NO]${reset}\n"; allinstalled=false;} type -P resolveDomains &>/dev/null || { printf "${bred} [*] resolveDomains [NO]${reset}\n"; allinstalled=false;} type -P emailfinder &>/dev/null || { printf "${bred} [*] emailfinder [NO]${reset}\n"; allinstalled=false;} type -P urldedupe &>/dev/null || { printf "${bred} [*] urldedupe [NO]${reset}\n"; allinstalled=false;} @@ -1467,17 +1465,15 @@ function resolvers_update(){ function ipcidr_detection(){ if [[ $1 =~ /[0-9]+$ ]]; then - prips $1 | hakrevdns - prips $1 | gdn + prips $1 | dnsx -ptr -resp-only -silent else - echo $1 | hakrevdns - echo $1 | gdn + echo $1 | dnsx -ptr -resp-only -silent fi } function ipcidr_target(){ if [[ $1 =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9] ]]; then - ipcidr_detection $1 | cut -d' ' -f3 | unfurl -u domains 2>/dev/null | sed 's/\.$//' | sort -u > ./target_reconftw_ipcidr.txt + ipcidr_detection $1 | unfurl -u domains 2>/dev/null | sed 's/\.$//' | sort -u > ./target_reconftw_ipcidr.txt if [[ $(cat ./target_reconftw_ipcidr.txt | wc -l) -eq 1 ]]; then domain=$(cat ./target_reconftw_ipcidr.txt) elif [[ $(cat ./target_reconftw_ipcidr.txt | wc -l) -gt 1 ]]; then