Could you please apply the following patch to scripts/ftp-syst.nse and test again?
--- a/scripts/ftp-syst.nse+++ b/scripts/ftp-syst.nse@@ -81,7 +81,7 @@
local auth_done = false
- local syst+ local syst = nil
if not socket:send("SYST\r\n") then
@@ -110,6 +110,9 @@
if status then
auth_done = true
+ else+ stdnse.debug1("SYST error: %d %s", code, message)+ break
until not auth_done
If you ran the scan with at least one -d then at some point it should have produced the message from the patch:
SYST error: 500 Command unrecognized
but there is no need to go out of your way to look for it. The stack trace you have provided isolated the issue pretty well. I am confident that this patch is what we should go with. Unless you still see some misbehavior then I am going to commit it.