From 37fa4a73a1a924cff7b77c1cfc59f8d7b6140c63 Mon Sep 17 00:00:00 2001 From: Tod Beardsley Date: Fri, 7 Mar 2014 10:41:18 -0600 Subject: [PATCH] Make the path options required and use /tmp Otherwise it's impossible to run this module without setting the options which were not otherwise validated anyway. --- modules/auxiliary/server/tftp.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/auxiliary/server/tftp.rb b/modules/auxiliary/server/tftp.rb index 24e5e5d7e8..07cfa372f2 100644 --- a/modules/auxiliary/server/tftp.rb +++ b/modules/auxiliary/server/tftp.rb @@ -5,6 +5,7 @@ require 'msf/core' require 'rex/proto/tftp' +require 'tmpdir' class Metasploit3 < Msf::Auxiliary @@ -17,7 +18,7 @@ class Metasploit3 < Msf::Auxiliary 'Description' => %q{ This module provides a TFTP service }, - 'Author' => [ 'jduck' ], + 'Author' => [ 'jduck', 'todb' ], 'License' => MSF_LICENSE, 'Actions' => [ @@ -34,8 +35,8 @@ class Metasploit3 < Msf::Auxiliary [ OptAddress.new('SRVHOST', [ true, "The local host to listen on.", '0.0.0.0' ]), OptPort.new('SRVPORT', [ true, "The local port to listen on.", 69 ]), - OptString.new('TFTPROOT', [ false, "The TFTP root directory to serve files from" ]), - OptString.new('OUTPUTPATH', [ false, "The directory in which uploaded files will be written." ]) + OptString.new('TFTPROOT', [ true, "The TFTP root directory to serve files from", Dir.tmpdir ]), + OptString.new('OUTPUTPATH', [ true, "The directory in which uploaded files will be written.", Dir.tmpdir ]) ], self.class) end