From e0c355da0a88839991a1181bab2b88ecf5f23981 Mon Sep 17 00:00:00 2001 From: Eric Briese Date: Sat, 29 Dec 2018 22:51:23 +1000 Subject: [PATCH] Changed options to be in payload.txt per best practices --- payloads/library/prank/90sMode/config.txt | 2 -- payloads/library/prank/90sMode/payload.txt | 6 +++++- payloads/library/prank/90sMode/r.ps1 | 22 ++++++---------------- payloads/library/prank/90sMode/readme.md | 2 +- 4 files changed, 12 insertions(+), 20 deletions(-) delete mode 100644 payloads/library/prank/90sMode/config.txt diff --git a/payloads/library/prank/90sMode/config.txt b/payloads/library/prank/90sMode/config.txt deleted file mode 100644 index bbac3670..00000000 --- a/payloads/library/prank/90sMode/config.txt +++ /dev/null @@ -1,2 +0,0 @@ -Width=640 -Height=480 \ No newline at end of file diff --git a/payloads/library/prank/90sMode/payload.txt b/payloads/library/prank/90sMode/payload.txt index 5dcf9382..6545eb2b 100644 --- a/payloads/library/prank/90sMode/payload.txt +++ b/payloads/library/prank/90sMode/payload.txt @@ -9,9 +9,13 @@ # Turns back the clock to a k-rad ultra ereet 1990's VGA resolution # Executes p.ps1 from the selected switch folder of the Bash Bunny USB Disk partition, +# Options +Width=640 +Height=480 + LED SETUP GET SWITCH_POSITION ATTACKMODE HID STORAGE LED ATTACK -RUN WIN powershell \".((gwmi win32_volume -f 'label=''BashBunny''').Name+'payloads\\$SWITCH_POSITION\r.ps1')\" +RUN WIN powershell \".((gwmi win32_volume -f 'label=''BashBunny''').Name+'payloads\\$SWITCH_POSITION\r.ps1 -Width $Width -Height $Height')\" LED FINISH diff --git a/payloads/library/prank/90sMode/r.ps1 b/payloads/library/prank/90sMode/r.ps1 index d5cab971..ad89038a 100644 --- a/payloads/library/prank/90sMode/r.ps1 +++ b/payloads/library/prank/90sMode/r.ps1 @@ -1,3 +1,8 @@ + param ( + [string]$Width + [string]$Height + ) + Function Set-ScreenResolution { <# @@ -158,19 +163,4 @@ Add-Type $pinvokeCode -ErrorAction SilentlyContinue [Resolution.PrmaryScreenResolution]::ChangeResolution($width,$height) } -# Read dimensions from config file -Get-Content -Path "config.txt" | - foreach-object ` - -begin { - $config=@{} - } ` - -process { - $option = [regex]::split($_,'=') - if($option[0].CompareTo("") -ne 0) - { - # Add the Key, Value into the Hashtable - $config.Add($option[0], $option[1]) - } - } ` - -Set-ScreenResolution -Width $config.Width -Height $config.Height \ No newline at end of file +Set-ScreenResolution -Width $Width -Height $Height \ No newline at end of file diff --git a/payloads/library/prank/90sMode/readme.md b/payloads/library/prank/90sMode/readme.md index 10ba2ee9..ad2baf7c 100644 --- a/payloads/library/prank/90sMode/readme.md +++ b/payloads/library/prank/90sMode/readme.md @@ -23,7 +23,7 @@ So, one could say this payload *decreases* the disk space of the victim computer ## Configuration -By default the payload switches to the very cool 640x480 resoluiton, however this can be configured to other standards such as 800x600 or 1024x768 in config.txt) +By default the payload switches to the very cool 640x480 resoluiton, however this can be configured to other standards such as 800x600 or 1024x768 in the options within payload.txt) ## STATUS