Skip to content

Commit 740cacb

Browse files
committed
Check nil
1 parent 44948a2 commit 740cacb

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

modules/auxiliary/scanner/ftp/konica_ftp_traversal.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,11 @@ def run_host(target_host)
7272
# read the file data from the socket that we opened
7373
response_data = sock.read(1024)
7474

75+
unless response_data
76+
print_error("#{file_path} not found")
77+
return
78+
end
79+
7580
if response_data.length == 0 or ! (res =~ /^150/ )
7681
print_status("File (#{file_path})from #{peer} is empty...")
7782
return

0 commit comments

Comments
 (0)