From e527ab16a538eb444f781062d4ead39116ce0d45 Mon Sep 17 00:00:00 2001 From: Eric Date: Sat, 29 Dec 2018 22:27:19 +1000 Subject: [PATCH] Moved screen height and width to config file. --- payloads/library/prank/90sMode/config.txt | 2 ++ payloads/library/prank/90sMode/r.ps1 | 18 +++++++++++++++++- payloads/library/prank/90sMode/readme.md | 2 +- 3 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 payloads/library/prank/90sMode/config.txt diff --git a/payloads/library/prank/90sMode/config.txt b/payloads/library/prank/90sMode/config.txt new file mode 100644 index 00000000..bbac3670 --- /dev/null +++ b/payloads/library/prank/90sMode/config.txt @@ -0,0 +1,2 @@ +Width=640 +Height=480 \ No newline at end of file diff --git a/payloads/library/prank/90sMode/r.ps1 b/payloads/library/prank/90sMode/r.ps1 index 2fdef1ad..d5cab971 100644 --- a/payloads/library/prank/90sMode/r.ps1 +++ b/payloads/library/prank/90sMode/r.ps1 @@ -157,4 +157,20 @@ namespace Resolution Add-Type $pinvokeCode -ErrorAction SilentlyContinue [Resolution.PrmaryScreenResolution]::ChangeResolution($width,$height) } -Set-ScreenResolution -Width 640 -Height 480 \ No newline at end of file + +# 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 diff --git a/payloads/library/prank/90sMode/readme.md b/payloads/library/prank/90sMode/readme.md index 3f14615b..10ba2ee9 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 the last line of r.ps1 (this should eventually become a config line in payload.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 config.txt) ## STATUS