Skip to content

Commit 550a8cb

Browse files
authored
Merge pull request rapid7#21425 from g0tmi1k/ftp_stat
ftp: Fix STAT due to unexpected response
2 parents 963eaef + 89b10aa commit 550a8cb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • lib/msf/core/exploit/remote

lib/msf/core/exploit/remote/ftp.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ def recv_ftp_resp(nsock = self.sock)
356356
if not found_end
357357
resp << ln
358358
resp << "\r\n"
359-
if ln.length > 3 and ln[3,1] == ' '
359+
if ln.length > 3 and ln[3,1] == ' ' and ln[0,3] =~ /\A\d{3}\z/
360360
found_end = true
361361
end
362362
else

0 commit comments

Comments
 (0)