Dont store files in /tmp with predictable names

This commit is contained in:
HD Moore 2012-07-16 09:53:19 -05:00
parent 8fef1479ed
commit 428a98c1d1
1 changed files with 7 additions and 1 deletions

View File

@ -63,6 +63,12 @@ class Plugin::PcapLog < Msf::Plugin
end end
def cmd_pcap_start(*args) def cmd_pcap_start(*args)
unless @pcaprub_loaded
print_error("Pcap module not available")
return false
end
if @capture_thread && @capture_thread.alive? if @capture_thread && @capture_thread.alive?
print_error "Capture already started." print_error "Capture already started."
return false return false
@ -154,7 +160,7 @@ class Plugin::PcapLog < Msf::Plugin
def initialize(*args) def initialize(*args)
super super
@dir = "/tmp" @dir = File.join(Msf::Config.config_directory, 'logs')
@prefix = "msf3-session" @prefix = "msf3-session"
@filter = nil @filter = nil
@pcaprub_loaded = false @pcaprub_loaded = false