Skip to content

Commit 65b316c

Browse files
committed
2 parents e5e4030 + de88908 commit 65b316c

File tree

10 files changed

+69
-20
lines changed

10 files changed

+69
-20
lines changed

modules/auxiliary/scanner/oracle/isqlplus_login.rb

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,13 @@ def initialize
4646

4747
end
4848

49-
def verbose; datastore['VERBOSE']; end
50-
def uri; datastore['URI'].to_s; end
49+
def verbose
50+
datastore['VERBOSE']
51+
end
52+
53+
def uri
54+
datastore['URI'].to_s
55+
end
5156

5257
def timeout
5358
(datastore['TIMEOUT'] || 60).to_i

modules/exploits/linux/http/linksys_wrt110_cmd_exec.rb

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,13 @@ def execute_command(cmd, opts)
105105
end
106106

107107
# Helper methods
108-
def user; datastore['USERNAME']; end
109-
def pass; datastore['PASSWORD'] || ''; end
108+
def user
109+
datastore['USERNAME']
110+
end
111+
112+
def pass
113+
datastore['PASSWORD'] || ''
114+
end
110115

111116
def send_auth_request_cgi(opts={}, timeout=nil)
112117
timeout ||= datastore['TIMEOUT']

modules/exploits/osx/local/persistence.rb

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,9 @@ def check_for_duplicate_entry
115115
end
116116

117117
# @return [Boolean] user wants the persistence to be restarted constantly if it exits
118-
def keepalive?; datastore['KEEPALIVE']; end
118+
def keepalive?
119+
datastore['KEEPALIVE']
120+
end
119121

120122
# useful if you want to remove the persistence.
121123
# prints out a list of paths to remove and commands to run.
@@ -133,10 +135,14 @@ def plist_path
133135
end
134136

135137
# @return [Boolean] user wants to launch the LaunchAgent immediately
136-
def run_now?; datastore['RUN_NOW']; end
138+
def run_now?
139+
datastore['RUN_NOW']
140+
end
137141

138142
# @return [String] username of the session
139-
def user; @user ||= cmd_exec('whoami').strip; end
143+
def user
144+
@user ||= cmd_exec('whoami').strip
145+
end
140146

141147
# drops the file to disk, then makes it executable
142148
# @param [String] exe the executable to drop

modules/exploits/osx/local/sudo_password_bypass.rb

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,14 @@ def cmd_exec(cmd, args=nil, timeout=CMD_TIMEOUT)
227227
end
228228

229229
# helper methods for accessing datastore
230-
def using_native_target?; target.name =~ /native/i; end
231-
def using_cmd_target?; target.name =~ /cmd/i; end
230+
def using_native_target?
231+
target.name =~ /native/i
232+
end
233+
234+
def using_cmd_target?
235+
target.name =~ /cmd/i
236+
end
237+
232238
def drop_path
233239
@_drop_path ||= datastore['TMP_FILE'].gsub('<random>') { Rex::Text.rand_text_alpha(10) }
234240
end
@@ -239,7 +245,10 @@ def user_in_admin_group?
239245
end
240246

241247
# helper methods for dealing with sudo's vn num
242-
def parse_vn(vn_str); vn_str.split(/[\.p]/).map(&:to_i); end
248+
def parse_vn(vn_str)
249+
vn_str.split(/[\.p]/).map(&:to_i)
250+
end
251+
243252
def vn_bt(vn, ranges) # e.g. ('1.7.1', [['1.7.0', '1.7.6p44']])
244253
vn_parts = parse_vn(vn)
245254
ranges.any? do |range|

modules/exploits/windows/ftp/easyftp_mkd_fixret.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,9 @@ def check
7878
return Exploit::CheckCode::Safe
7979
end
8080

81-
def make_nops(num); "C" * num; end
81+
def make_nops(num)
82+
"C" * num
83+
end
8284

8385
def exploit
8486
connect_login

modules/post/multi/escalate/cups_root_file_read.rb

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,17 @@ def cleanup
137137

138138
private
139139

140-
def prev_error_log_path; datastore['ERROR_LOG']; end
141-
def ctl_path; @ctl_path ||= whereis("cupsctl"); end
142-
def strip_http_headers(http); http.gsub(/\A(^.*\r\n)*/, ''); end
140+
def prev_error_log_path
141+
datastore['ERROR_LOG']
142+
end
143+
144+
def ctl_path
145+
@ctl_path ||= whereis("cupsctl")
146+
end
147+
148+
def strip_http_headers(http)
149+
http.gsub(/\A(^.*\r\n)*/, '')
150+
end
143151

144152
def whereis(exe)
145153
line = cmd_exec("whereis #{exe}")

modules/post/osx/gather/hashdump.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,9 @@ def gt_lion?
126126
end
127127

128128
# @return [String] hostname
129-
def host; session.session_host; end
129+
def host
130+
session.session_host
131+
end
130132

131133
# @return [Bool] system version is 10.7
132134
def lion?

modules/post/osx/manage/mount_share.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,5 +217,7 @@ def print_uri(line)
217217
end
218218

219219
# path to osascript on the remote system
220-
def osascript_path; datastore['OSASCRIPT_PATH'].shellescape; end
220+
def osascript_path
221+
datastore['OSASCRIPT_PATH'].shellescape
222+
end
221223
end

modules/post/osx/manage/record_mic.rb

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,11 @@ def cleanup
123123

124124
private
125125

126-
def poll_timeout; POLL_TIMEOUT; end
127-
def fail_with(msg); raise msg; end
126+
def poll_timeout
127+
POLL_TIMEOUT
128+
end
129+
130+
def fail_with(msg)
131+
raise msg
132+
end
128133
end

modules/post/osx/manage/webcam.rb

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,11 @@ def cleanup
144144

145145
private
146146

147-
def poll_timeout; POLL_TIMEOUT; end
148-
def fail_with(msg); raise msg; end
147+
def poll_timeout
148+
POLL_TIMEOUT
149+
end
150+
151+
def fail_with(msg)
152+
raise msg
153+
end
149154
end

0 commit comments

Comments
 (0)