Files
general-scripts-and-system-…/customscripts/FIND_THE_DAMN_PI
T
2025-08-09 13:10:24 -06:00

19 lines
747 B
Bash

#!/bin/zsh
# runs in appx 5 Minutes
file_name="nmap-$(date +%Y%m%d%H%M%S)-$(echo $RANDOM | md5sum | awk '{print $1}').xml"
out_file="/tmp/$file_name"
web_file="https://h.acker.is/nmaprincesspi_manual_scans/$file_name"
echo "Logging to $out_file and $web_file"
# da nmap command with my custom xsl stylesheet
nmap -A --reason 10.0.0.0/24 -oX $out_file --stylesheet https://h.acker.is/nmaprincesspi/xsl/princesspi-nmap.xsl
scp $out_file inter:/var/www/h.acker.is/nmaprincesspi_manual_scans/$file_name
# ssh inter "sudo bash /usr/share/customscripts/fix_permissions" # fix perms remote
# ssh inter "rm -f /var/www/h.acker.is/nmaprincesspi_manual_scans/*" # clear scans
webhook "FINISHED $web_file <@&1369280290203373670>"
echo "live: $web_file"