Add a compatibility check, prevents errors caused by interaction with out of date engines

git-svn-id: file:///home/svn/framework3/trunk@12318 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
HD Moore 2011-04-14 21:45:42 +00:00
parent 96af5e2af6
commit bfef110932
1 changed files with 12 additions and 1 deletions

View File

@ -112,7 +112,7 @@ class Plugin::Nexpose < Msf::Plugin
# Wrap this so a duplicate session doesnt prevent a new login
begin
cmd_nexpose_disconnect
cmd_nexpose_disconnect
rescue ::Interrupt
raise $!
rescue ::Exception
@ -128,6 +128,8 @@ class Plugin::Nexpose < Msf::Plugin
end
@nsc = nsc
nexpose_compatibility_check
nsc
end
def cmd_nexpose_activity(*args)
@ -219,6 +221,15 @@ class Plugin::Nexpose < Msf::Plugin
end
end
def nexpose_compatibility_check
res = @nsc.console_command("ver")
if res !~ /^Console Version ID:\s*480\s*$/m
print_error("")
print_error("Warning: This version of NeXpose has not been tested with Metasploit!")
print_error("")
end
end
def cmd_nexpose_site_import(*args)
site_id = args.shift
if not site_id