File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
modules/exploits/windows/mysql Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -71,15 +71,15 @@ def query(q)
71
71
72
72
begin
73
73
res = mysql_query ( q )
74
- return rows if not res
74
+ return rows unless res
75
75
res . each_hash do |row |
76
76
rows << row
77
77
end
78
78
rescue RbMysql ::ParseError
79
79
return rows
80
80
end
81
81
82
- return rows
82
+ rows
83
83
end
84
84
85
85
def is_windows?
@@ -90,7 +90,8 @@ def is_windows?
90
90
def get_drive_letter
91
91
r = query ( "SELECT @@tmpdir;" )
92
92
drive = r [ 0 ] [ '@@tmpdir' ] . scan ( /^(\w ):/ ) . flatten [ 0 ] || ''
93
- return drive
93
+
94
+ drive
94
95
end
95
96
96
97
def upload_file ( bin , dest )
@@ -108,14 +109,14 @@ def exploit
108
109
return
109
110
end
110
111
111
- if not is_windows?
112
+ unless is_windows?
112
113
print_error ( "#{ peer } - Remote host isn't Windows." )
113
114
return
114
115
end
115
116
116
117
begin
117
118
drive = get_drive_letter
118
- return if not drive
119
+ return unless drive
119
120
rescue RbMysql ::ParseError
120
121
print_error ( "Could not determine drive name" )
121
122
return
You can’t perform that action at this time.
0 commit comments