Land #2066, use Rex instead of Base64
commit
c37884c6c7
|
@ -9,7 +9,6 @@ require 'msf/core'
|
||||||
require 'rex'
|
require 'rex'
|
||||||
require 'msf/core/post/windows/priv'
|
require 'msf/core/post/windows/priv'
|
||||||
require 'msf/core/post/windows/registry'
|
require 'msf/core/post/windows/registry'
|
||||||
require 'base64'
|
|
||||||
require 'msf/core/auxiliary/report'
|
require 'msf/core/auxiliary/report'
|
||||||
|
|
||||||
class Metasploit3 < Msf::Post
|
class Metasploit3 < Msf::Post
|
||||||
|
@ -141,7 +140,7 @@ class Metasploit3 < Msf::Post
|
||||||
line.chomp
|
line.chomp
|
||||||
line_num += 1
|
line_num += 1
|
||||||
if line_num == 8
|
if line_num == 8
|
||||||
enc_password = Base64.decode64(line)
|
enc_password = Rex::Text.decode_base64(line)
|
||||||
password = decrypt_password(enc_password)
|
password = decrypt_password(enc_password)
|
||||||
elsif line_num == 12
|
elsif line_num == 12
|
||||||
if line.match(/<(.*)>.(.*)/)
|
if line.match(/<(.*)>.(.*)/)
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
require 'msf/core'
|
require 'msf/core'
|
||||||
require 'rex'
|
require 'rex'
|
||||||
require 'rex/parser/ini'
|
require 'rex/parser/ini'
|
||||||
require 'base64'
|
|
||||||
require 'msf/core/post/windows/user_profiles'
|
require 'msf/core/post/windows/user_profiles'
|
||||||
require 'msf/core/post/windows/registry'
|
require 'msf/core/post/windows/registry'
|
||||||
require 'msf/core/auxiliary/report'
|
require 'msf/core/auxiliary/report'
|
||||||
|
@ -103,7 +102,7 @@ class Metasploit3 < Msf::Post
|
||||||
114, 101, 115, 111, 108, 118, 101, 32, 72, 84, 84, 80, 32, 112, 114, 111,
|
114, 101, 115, 111, 108, 118, 101, 32, 72, 84, 84, 80, 32, 112, 114, 111,
|
||||||
120, 0]
|
120, 0]
|
||||||
|
|
||||||
decpass = Base64.decode64(epass)
|
decpass = Rex::Text.decode_base64(epass)
|
||||||
plaintext = [decpass].pack("H*").unpack("C*")
|
plaintext = [decpass].pack("H*").unpack("C*")
|
||||||
|
|
||||||
for i in 0 .. plaintext.length-2 do
|
for i in 0 .. plaintext.length-2 do
|
||||||
|
|
Loading…
Reference in New Issue