mirror of
https://github.com/hak5/bashbunny-payloads.git
synced 2025-10-29 16:58:25 +00:00
Ensure TARGET_OS is exported (#280)
This commit is contained in:
parent
5a77792c1d
commit
b894aa5842
@ -20,9 +20,9 @@ function GET() {
|
||||
"TARGET_OS")
|
||||
ScanForOS=$(nmap -Pn -O $TARGET_IP -p1)
|
||||
[[ $ScanForOS == *"Too many fingerprints"* ]] && ScanForOS=$(nmap -Pn -O --osscan-guess $TARGET_IP)
|
||||
[[ $ScanForOS == *"Windows"* ]] && OSfound='WINDOWS' && return
|
||||
[[ $ScanForOS == *"Linux"* ]] && OSfound='LINUX' && return
|
||||
[[ $ScanForOS == *"Apple"* ]] && OSfound='MACOS' && return
|
||||
[[ $ScanForOS == *"Windows"* ]] && export TARGET_OS='WINDOWS' && return
|
||||
[[ $ScanForOS == *"Linux"* ]] && export TARGET_OS='LINUX' && return
|
||||
[[ $ScanForOS == *"Apple"* ]] && export TARGET_OS='MACOS' && return
|
||||
export TARGET_OS='UNKNOWN'
|
||||
;;
|
||||
esac
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user