Skip to content

Commit 9dbf163

Browse files
committed
Do minor style fixes
1 parent 8f09e0c commit 9dbf163

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

modules/exploits/windows/mysql/mysql_start_up.rb

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,15 +71,15 @@ def query(q)
7171

7272
begin
7373
res = mysql_query(q)
74-
return rows if not res
74+
return rows unless res
7575
res.each_hash do |row|
7676
rows << row
7777
end
7878
rescue RbMysql::ParseError
7979
return rows
8080
end
8181

82-
return rows
82+
rows
8383
end
8484

8585
def is_windows?
@@ -90,7 +90,8 @@ def is_windows?
9090
def get_drive_letter
9191
r = query("SELECT @@tmpdir;")
9292
drive = r[0]['@@tmpdir'].scan(/^(\w):/).flatten[0] || ''
93-
return drive
93+
94+
drive
9495
end
9596

9697
def upload_file(bin, dest)
@@ -108,14 +109,14 @@ def exploit
108109
return
109110
end
110111

111-
if not is_windows?
112+
unless is_windows?
112113
print_error("#{peer} - Remote host isn't Windows.")
113114
return
114115
end
115116

116117
begin
117118
drive = get_drive_letter
118-
return if not drive
119+
return unless drive
119120
rescue RbMysql::ParseError
120121
print_error("Could not determine drive name")
121122
return

0 commit comments

Comments
 (0)