Skip to content

Commit aa64f5c

Browse files
committed
Fixup psh datastore
1 parent 234e49d commit aa64f5c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/msf/core/exploit/powershell.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,15 +131,15 @@ def run_hidden_psh(ps_code,ps_bin='powershell.exe')
131131
#
132132
# Creates cmd script to execute psh payload
133133
#
134-
def cmd_psh_payload(pay, old_psh=datastore['PSH_OLD_METHOD'], wow64=datastore['RUN_WOW64'])
134+
def cmd_psh_payload(pay, old_psh=datastore['PSH::OLD_METHOD'], wow64=datastore['PSH::RUN_WOW64'])
135135
# Allow powershell 1.0 format
136136
if old_psh
137137
psh_payload = Msf::Util::EXE.to_win32pe_psh(framework, pay)
138138
else
139139
psh_payload = Msf::Util::EXE.to_win32pe_psh_net(framework, pay)
140140
end
141141
# Run our payload in a while loop
142-
if datastore['PERSIST']
142+
if datastore['PSH::PERSIST']
143143
fun_name = Rex::Text.rand_text_alpha(rand(2)+2)
144144
sleep_time = rand(5)+5
145145
psh_payload = "function #{fun_name}{#{psh_payload}};"

0 commit comments

Comments
 (0)