We don't use MessagePack anymore

bug/bundler_fix
wchen-r7 2015-07-12 14:45:46 -05:00
parent e638d85f30
commit 88a00b1ed8
1 changed files with 21 additions and 23 deletions

View File

@ -307,34 +307,32 @@ describe Msf::Exploit::Remote::BrowserAutopwnv2 do
}
end
# When unpacked, this gives us:
# {
# "BAP.1433806920.Client.blLGFIlwYrxfvcY" => {
# "source" => "script",
# "os_name" => "Windows 8.1",
# "os_vendor" => "undefined",
# "os_device" => "undefined",
# "ua_name" => "Firefox",
# "ua_ver" => "35.0",
# "arch" => "x86",
# "java" => "1.7",
# "silverlight" => "false",
# "flash" => "14.0",
# "vuln_test" => "true",
# "proxy" => false,
# "language" => "en-US,en;q=0.5",
# "tried" => true
# }}
let(:profile_packed_data) do
"\x81\xD9%BAP.1433806920.Client.blLGFIlwYrxfvcY\x8E\xA6source\xA6script\xA7os_name\xABWindows 8.1\xA9os_vendor\xA9undefined\xA9os_device\xA9undefined\xA7ua_name\xA7Firefox\xA6ua_ver\xA435.0\xA4arch\xA3x86\xA4java\xA31.7\xABsilverlight\xA5false\xA5flash\xA414.0\xA9vuln_test\xA4true\xA5proxy\xC2\xA8language\xC4\x0Een-US,en;q=0.5\xA5tried\xC3"
let(:default_profile_data) do
{
"BAP.1433806920.Client.blLGFIlwYrxfvcY" => {
"source" => "script",
"os_name" => "Windows 8.1",
"os_vendor" => "undefined",
"os_device" => "undefined",
"ua_name" => "Firefox",
"ua_ver" => "35.0",
"arch" => "x86",
"java" => "1.7",
"silverlight" => "false",
"flash" => "14.0",
"vuln_test" => "true",
"proxy" => false,
"language" => "en-US,en;q=0.5",
"tried" => true
}}
end
let(:profile_tag) do
MessagePack.unpack(profile_packed_data).keys.first.split('.')[3]
default_profile_data.keys.first.split('.')[3]
end
let(:note_type_prefix) do
MessagePack.unpack(profile_packed_data).keys.first.split('.')[0,3] * "."
default_profile_data.keys.first.split('.')[0,3] * "."
end
let(:cli) do
@ -353,7 +351,7 @@ describe Msf::Exploit::Remote::BrowserAutopwnv2 do
framework = double('Msf::Framework', datastore: {})
# Prepare fake notes
notes = [create_fake_note("#{note_type_prefix}.#{profile_tag}", profile_packed_data)]
notes = [create_fake_note("#{note_type_prefix}.#{profile_tag}", default_profile_data)]
# Prepare framework.db
w = double('workspace')