@@ -1458,7 +1458,7 @@ function Get-ServiceUnquoted {
1458
1458
$Out | Add-Member Noteproperty 'Path' $Service.pathname
1459
1459
$Out | Add-Member Noteproperty 'ModifiablePath' $_
1460
1460
$Out | Add-Member Noteproperty 'StartName' $Service.startname
1461
- $Out | Add-Member Noteproperty 'AbuseFunction' "Write-ServiceBinary -Name '$($Service.name)' -ServicePath <HijackPath>"
1461
+ $Out | Add-Member Noteproperty 'AbuseFunction' "Write-ServiceBinary -Name '$($Service.name)' -Path <HijackPath>"
1462
1462
$Out | Add-Member Noteproperty 'CanRestart' $CanRestart
1463
1463
$Out
1464
1464
}
@@ -1896,7 +1896,7 @@ function Write-ServiceBinary {
1896
1896
1897
1897
Custom command to execute instead of user creation.
1898
1898
1899
- .PARAMETER ServicePath
1899
+ .PARAMETER Path
1900
1900
1901
1901
Path to write the binary out to, defaults to 'service.exe' in the local directory.
1902
1902
@@ -1960,7 +1960,7 @@ function Write-ServiceBinary {
1960
1960
$Command,
1961
1961
1962
1962
[String]
1963
- $ServicePath = "$(Convert-Path .)\service.exe"
1963
+ $Path = "$(Convert-Path .)\service.exe"
1964
1964
)
1965
1965
1966
1966
BEGIN {
@@ -2011,11 +2011,11 @@ function Write-ServiceBinary {
2011
2011
$Binary[$i+2535] = $CommandBytes[$i]
2012
2012
}
2013
2013
2014
- Set-Content -Value $Binary -Encoding Byte -Path $ServicePath -Force -ErrorAction Stop
2014
+ Set-Content -Value $Binary -Encoding Byte -Path $Path -Force -ErrorAction Stop
2015
2015
2016
2016
$Out = New-Object PSObject
2017
2017
$Out | Add-Member Noteproperty 'ServiceName' $TargetService.Name
2018
- $Out | Add-Member Noteproperty 'ServicePath ' $ServicePath
2018
+ $Out | Add-Member Noteproperty 'Path ' $Path
2019
2019
$Out | Add-Member Noteproperty 'Command' $ServiceCommand
2020
2020
$Out
2021
2021
}
@@ -2176,7 +2176,7 @@ function Install-ServiceBinary {
2176
2176
Write-Warning "Error backing up '$ServicePath' : $_"
2177
2177
}
2178
2178
2179
- $Result = Write-ServiceBinary -Name $ServiceDetails.Name -Command $ServiceCommand -ServicePath $ServicePath
2179
+ $Result = Write-ServiceBinary -Name $ServiceDetails.Name -Command $ServiceCommand -Path $ServicePath
2180
2180
$Result | Add-Member Noteproperty 'BackupPath' $BackupPath
2181
2181
$Result
2182
2182
}
0 commit comments