Skip to content

Commit 9e71708

Browse files
committed
Fix server/pxexploit datastore
1 parent 1ced9a2 commit 9e71708

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

modules/auxiliary/server/pxexploit.rb

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,17 @@ def initialize
3838
[
3939
'Service'
4040
],
41-
'DefaultAction' => 'Service'
41+
'DefaultAction' => 'Service',
42+
'DefaultOptions' => {
43+
'FILENAME' => 'update1',
44+
'SERVEONCE' => true # once they reboot; don't infect again - you'll kill them!
45+
}
4246
)
4347

4448
register_advanced_options(
4549
[
46-
OptString.new('TFTPROOT', [ false, 'The TFTP root directory to serve files from' ]),
50+
OptString.new('TFTPROOT', [ false, 'The TFTP root directory to serve files from',
51+
File.join(Msf::Config.data_directory, 'exploits', 'pxexploit')]),
4752
OptString.new('SRVHOST', [ false, 'The IP of the DHCP server' ]),
4853
OptString.new('NETMASK', [ false, 'The netmask of the local subnet', '255.255.255.0' ]),
4954
OptString.new('DHCPIPSTART', [ false, 'The first IP to give out' ]),
@@ -52,12 +57,6 @@ def initialize
5257
end
5358

5459
def run
55-
if not datastore['TFTPROOT']
56-
datastore['TFTPROOT'] = File.join(Msf::Config.data_directory, 'exploits', 'pxexploit')
57-
end
58-
datastore['FILENAME'] = "update1"
59-
datastore['SERVEONCE'] = true # once they reboot; don't infect again - you'll kill them!
60-
6160
print_status("Starting TFTP server...")
6261
@tftp = Rex::Proto::TFTP::Server.new
6362
@tftp.set_tftproot(datastore['TFTPROOT'])

0 commit comments

Comments
 (0)