pcaprub: add a respond_to? in the capture mixin to ensure latest version
git-svn-id: file:///home/svn/framework3/trunk@12565 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
09a2bceec5
commit
cb72073cd8
|
@ -373,9 +373,13 @@ module Exploit::Capture
|
|||
end
|
||||
|
||||
def check_pcaprub_loaded
|
||||
unless @pcaprub_loaded
|
||||
if not @pcaprub_loaded
|
||||
print_status("The Pcaprub module is not available: #{@pcaprub_error}")
|
||||
raise RuntimeError, "Pcaprub not available"
|
||||
#Those methods have been added later
|
||||
elsif (not Pcap.respond_to? "lookupaddrs")
|
||||
print_status("The Pcaprub module is not up-to-date")
|
||||
raise RuntimeError, "The Pcaprub module is missing some functions"
|
||||
else
|
||||
true
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue