Skip to content

Commit 00b16ee

Browse files
committed
Land rapid7#4369, ruby style method names
2 parents 47c38ed + af9979d commit 00b16ee

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

modules/post/windows/gather/outlook.rb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,22 +57,22 @@ def execute_outlook_script(command)
5757
end
5858

5959
# This function prints a listing of available mailbox folders
60-
def listBoxes
60+
def list_boxes
6161
command = 'List-Folder'
6262
execute_outlook_script(command)
6363
end
6464

6565
# This functions reads Outlook using powershell scripts
66-
def readEmails(folder,keyword,atrans,acftrans)
66+
def read_emails(folder,keyword,atrans,acftrans)
6767
view = framework.threads.spawn("ButtonClicker", false) {
68-
clickButton(atrans,acftrans)
68+
click_button(atrans,acftrans)
6969
}
7070
command = "Get-Emails \"#{keyword}\" \"#{folder}\""
7171
execute_outlook_script(command)
7272
end
7373

74-
def clickButton(atrans,acftrans)
75-
# This functions clicks on the security notification generated by Outlook.
74+
# This functions clicks on the security notification generated by Outlook.
75+
def click_button(atrans,acftrans)
7676
sleep 1
7777
hwnd = client.railgun.user32.FindWindowW(nil, "Microsoft Outlook")
7878
if hwnd != 0
@@ -90,8 +90,8 @@ def clickButton(atrans,acftrans)
9090
end
9191
end
9292

93+
# Main method
9394
def run
94-
# Main method
9595
folder = datastore['FOLDER']
9696
keyword = datastore['KEYWORD'].to_s
9797
allow = datastore['A_TRANSLATION']
@@ -145,9 +145,9 @@ def run
145145
case action.name
146146
when 'LIST'
147147
print_good('Available folders in the mailbox: ')
148-
listBoxes
148+
list_boxes
149149
when 'SEARCH'
150-
readEmails(folder,keyword,atrans,acftrans)
150+
read_emails(folder,keyword,atrans,acftrans)
151151
else
152152
print_error("Unknown Action: #{action.name}")
153153
end

0 commit comments

Comments
 (0)