Skip to content

Commit

Permalink
Merge pull request #365 from sttlr/patch-1
Browse files Browse the repository at this point in the history
Fix Timeout parameter in Peass Metasploit module
  • Loading branch information
carlospolop authored Jun 29, 2023
2 parents cdd342f + 36523f5 commit b9a44ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions metasploit/peass.rb
Original file line number Diff line number Diff line change
Expand Up @@ -191,14 +191,14 @@ def run
cmd_utf16le = cmd.encode("utf-16le")
cmd_utf16le_b64 = Base64.encode64(cmd_utf16le).gsub(/\r?\n/, "")

tmpout << cmd_exec("powershell.exe", args="-ep bypass -WindowStyle hidden -nop -enc #{cmd_utf16le_b64}", time_out=datastore["TIMEOUT"])
tmpout << cmd_exec("powershell.exe", args="-ep bypass -WindowStyle hidden -nop -enc #{cmd_utf16le_b64}", time_out=datastore["TIMEOUT"].to_i)

# If unix, then, suppose linpeas was loaded
else
cmd += "| #{decode_linpeass_cmd}"
cmd += "| sh -s -- #{datastore['PARAMETERS']}"
cmd += last_cmd
tmpout << cmd_exec(cmd, args=nil, time_out=datastore["TIMEOUT"])
tmpout << cmd_exec(cmd, args=nil, time_out=datastore["TIMEOUT"].to_i)
end

print "\n#{tmpout}\n\n"
Expand Down

0 comments on commit b9a44ff

Please sign in to comment.