Fix if/end
parent
4694ef6723
commit
43bc159022
|
@ -38,17 +38,17 @@ class MetasploitModule < Msf::Post
|
|||
output = cmd_exec("sleep 1; echo #{test_string}")
|
||||
output == test_string
|
||||
end
|
||||
end
|
||||
|
||||
it "should return the full response after sleeping" do
|
||||
test_string = Rex::Text.rand_text_alpha(4)
|
||||
test_string2 = Rex::Text.rand_text_alpha(4)
|
||||
if session.platform.eql? 'windows'
|
||||
output = cmd_exec('cmd.exe', "/c echo #{test_string} & timeout 1 > null & echo #{test_string2}")
|
||||
else
|
||||
output = cmd_exec("echo #{test_string}; sleep 1; echo #{test_string2}")
|
||||
it "should return the full response after sleeping" do
|
||||
test_string = Rex::Text.rand_text_alpha(4)
|
||||
test_string2 = Rex::Text.rand_text_alpha(4)
|
||||
if session.platform.eql? 'windows'
|
||||
output = cmd_exec('cmd.exe', "/c echo #{test_string} & timeout 1 > null & echo #{test_string2}")
|
||||
else
|
||||
output = cmd_exec("echo #{test_string}; sleep 1; echo #{test_string2}")
|
||||
end
|
||||
output.delete("\r") == "#{test_string}\n#{test_string2}"
|
||||
end
|
||||
output.delete("\r") == "#{test_string}\n#{test_string2}"
|
||||
end
|
||||
|
||||
it "should return the result of echo 10 times" do
|
||||
|
|
Loading…
Reference in New Issue