From ee3e738a480683c61d2818c9821da640cf5af08e Mon Sep 17 00:00:00 2001 From: acidvegas Date: Wed, 31 Jan 2024 13:52:01 -0500 Subject: [PATCH] Added httpxify for HTTPX gotify alerts --- cigpush | 3 ++- httpxify | 38 ++++++++++++++++++++++++++++++++++++++ mkrecon | 15 --------------- 3 files changed, 40 insertions(+), 16 deletions(-) create mode 100755 httpxify delete mode 100755 mkrecon diff --git a/cigpush b/cigpush index 932fc10..2718875 100755 --- a/cigpush +++ b/cigpush @@ -1,2 +1,3 @@ +#!/bin/sh git commit -S -m "8,7\-:.\`-,:.\`-:08,08 15,0 4,14▄▀8,01▄▀14--:\`,--:\`" -git push \ No newline at end of file +git push diff --git a/httpxify b/httpxify new file mode 100755 index 0000000..606b859 --- /dev/null +++ b/httpxify @@ -0,0 +1,38 @@ +#!/bin/sh +# httpx gotify alert - developed by acidvegas (https://git.acid.vegas) + +GOTIFY_URL="https://push.change.me:5000" +GOTIFY_TOKEN="cHaNgEmE" + +send_notification() { + result=$1 + title=$2 + data=$3 + + HOST=$(cat /etc/hostname) + + if [ $result -eq 0 ]; then + status="completed" + elif [ $result -eq 69 ]; then + status="initiated" + elif [ $result -gt 128 ]; then + status="killed" + else + status="error" + fi + + message="$title scan on $HOST for $data has changed to $status" + + curl -X POST "$GOTIFY_URL/message?token=$GOTIFY_TOKEN" -F "title=$title" -F "message=$message" -F "priority=1" +} + +for zone in $(find /mnt/slab/zones -name "*.txt" | shuf); do + tld=$(basename "$zone" .txt) + if [ ! -f "/mnt/slab/json/zone.$tld.txt" ]; then + echo "$tld" > $SCAN_DIR/.last-zone # For debugging purposes + send_notification 69 "httpx" $tld + httpx -l "$zone" -t 300 -rl 300 -sc -location -favicon -title -bp -td -ip -cname -mc 200,201,301,302,303,307,308 -fr -stream -sd -j -o "/mnt/slab/json/zone.$tld.txt" -v + result=$? + handle_result $result "httpx" $tld + fi +done diff --git a/mkrecon b/mkrecon deleted file mode 100755 index 591253d..0000000 --- a/mkrecon +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -sudo apt-get update && sudo apt-get upgrade -y -sudo apt-get install -y git wget curl dnsutils nmap masscan -export PATH=$PATH:/usr/local/go/bin && printf "\nexport PATH=$PATH:/usr/local/go/bin\n" >> ~/.bashrc -export PATH=$PATH:/home/acidvegas/.pdtm/go/bin && printf "\nexport PATH=$PATH:/home/acidvegas/.pdtm/go/bin\n" >> ~/.bashrc -source $HOME/.bashrc -wget -O gosource.tar.gz https://go.dev/dl/go1.21.4.linux-amd64.tar.gz && sudo tar -C /usr/local -xzf gosource.tar.gz && rm gosource.tar.gz -mkdir -p $HOME/git -git clone https://github.com/blechschmidt/massdns.git $HOME/git/massdns && cd git/massdns && make && sudo make install && cd -git clone https://github.com/projectdiscovery/nuclei-templates.git $HOMEgit/nuclei-templates -go install -v github.com/projectdiscovery/pdtm/cmd/pdtm@latest -pdtm -ia - - -