From 740cacb4c084a3a37918093abcd55b5ff50c85bc Mon Sep 17 00:00:00 2001 From: wchen-r7 Date: Mon, 16 Nov 2015 13:54:36 -0600 Subject: [PATCH] Check nil --- modules/auxiliary/scanner/ftp/konica_ftp_traversal.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/auxiliary/scanner/ftp/konica_ftp_traversal.rb b/modules/auxiliary/scanner/ftp/konica_ftp_traversal.rb index 04711da9f7..deceef291b 100644 --- a/modules/auxiliary/scanner/ftp/konica_ftp_traversal.rb +++ b/modules/auxiliary/scanner/ftp/konica_ftp_traversal.rb @@ -72,6 +72,11 @@ class Metasploit3 < Msf::Auxiliary # read the file data from the socket that we opened response_data = sock.read(1024) + unless response_data + print_error("#{file_path} not found") + return + end + if response_data.length == 0 or ! (res =~ /^150/ ) print_status("File (#{file_path})from #{peer} is empty...") return