mirror of
https://github.com/PowerShellMafia/PowerSploit
synced 2026-06-08 12:13:33 +00:00
Merge pull request #161 from joncave/batnewlines
PowerUp: Remove badly encoded new lines from .bat output
This commit is contained in:
+2
-2
@@ -2668,8 +2668,8 @@ function Write-HijackDll {
|
||||
# build the launcher .bat
|
||||
if (Test-Path $TargetBatPath) { Remove-Item -Force $TargetBatPath }
|
||||
|
||||
"@echo off\n" | Out-File -Encoding ASCII -Append $TargetBatPath
|
||||
"start /b $BatCommand\n" | Out-File -Encoding ASCII -Append $TargetBatPath
|
||||
"@echo off" | Out-File -Encoding ASCII -Append $TargetBatPath
|
||||
"start /b $BatCommand" | Out-File -Encoding ASCII -Append $TargetBatPath
|
||||
'start /b "" cmd /c del "%~f0"&exit /b' | Out-File -Encoding ASCII -Append $TargetBatPath
|
||||
|
||||
Write-Verbose ".bat launcher written to: $TargetBatPath"
|
||||
|
||||
Reference in New Issue
Block a user