Moved screen height and width to config file.

This commit is contained in:
Eric 2018-12-29 22:27:19 +10:00 committed by GitHub
parent ee48a74dc6
commit e527ab16a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 2 deletions

View File

@ -0,0 +1,2 @@
Width=640
Height=480

View File

@ -157,4 +157,20 @@ namespace Resolution
Add-Type $pinvokeCode -ErrorAction SilentlyContinue
[Resolution.PrmaryScreenResolution]::ChangeResolution($width,$height)
}
Set-ScreenResolution -Width 640 -Height 480
# 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

View File

@ -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