add unknown command override, see #2793

git-svn-id: file:///home/svn/framework3/trunk@10542 4d416f70-5f16-0410-b530-b9f4589650da
unstable
Joshua Drake 2010-10-04 08:05:09 +00:00
parent 3b99c58cb1
commit 8fe655fce7
1 changed files with 5 additions and 0 deletions

View File

@ -125,6 +125,11 @@ module Exploit::Remote::FtpServer
return return
else else
# Allow per-command overrides
if(self.respond_to?("on_client_unknown_command"))
return self.send("on_client_unknown_command", c, cmd.upcase, arg)
end
print_status("#{@state[c][:name]} UNKNOWN '#{cmd} #{arg}'") print_status("#{@state[c][:name]} UNKNOWN '#{cmd} #{arg}'")
c.put("500 '#{cmd} #{arg}': command not understood.\r\n") c.put("500 '#{cmd} #{arg}': command not understood.\r\n")
return return