Skip to content

Commit

Permalink
Simplified reverse DNS
Browse files Browse the repository at this point in the history
  • Loading branch information
six2dez committed Jun 11, 2021
1 parent 99efd0a commit d8d47a4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 19 deletions.
8 changes: 3 additions & 5 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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
}

Expand Down
10 changes: 3 additions & 7 deletions reconftw.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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;}
Expand Down Expand Up @@ -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
Expand Down
10 changes: 3 additions & 7 deletions reconftw_axiom.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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;}
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit d8d47a4

Please sign in to comment.