mirror of
https://github.com/hak5/bashbunny-payloads.git
synced 2025-10-29 16:58:25 +00:00
Ensure 'GET TARGET_OS' has access to TARGET_IP
This commit is contained in:
parent
763639b305
commit
e866ad438b
@ -18,6 +18,7 @@ function GET() {
|
||||
export SWITCH_POSITION="invalid"
|
||||
;;
|
||||
"TARGET_OS")
|
||||
TARGET_IP=$(cat /var/lib/dhcp/dhcpd.leases | grep ^lease | awk '{ print $2 }' | sort | uniq)
|
||||
ScanForOS=$(nmap -Pn -O $TARGET_IP -p1)
|
||||
[[ $ScanForOS == *"Too many fingerprints"* ]] && ScanForOS=$(nmap -Pn -O --osscan-guess $TARGET_IP)
|
||||
[[ $ScanForOS == *"Windows"* ]] && export TARGET_OS='WINDOWS' && return
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user