Skip to content

Commit 0718c27

Browse files
committed
Use 'unless' instead of 'if not'
1 parent fe66d24 commit 0718c27

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/auxiliary/admin/http/synology_dsm_sliceupload_exec_noauth.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def run
123123
'data' => post_body
124124
})
125125

126-
if !res or res.code != 200 or !res.body.include?('error_noprivilege')
126+
unless res and res.code == 200 and res.body.include?('error_noprivilege')
127127
print_error("#{peer} - Unexpected response, probably the exploit failed")
128128
return
129129
end
@@ -134,7 +134,7 @@ def run
134134
'uri' => '/redirect.cgi'
135135
})
136136

137-
if !res or res.code != 200
137+
unless res and res.code == 200
138138
print_error("#{peer} - Unexpected response, probably the exploit failed")
139139
return
140140
end

0 commit comments

Comments
 (0)