@@ -38,12 +38,17 @@ def initialize
38
38
[
39
39
'Service'
40
40
] ,
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
+ }
42
46
)
43
47
44
48
register_advanced_options (
45
49
[
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' ) ] ) ,
47
52
OptString . new ( 'SRVHOST' , [ false , 'The IP of the DHCP server' ] ) ,
48
53
OptString . new ( 'NETMASK' , [ false , 'The netmask of the local subnet' , '255.255.255.0' ] ) ,
49
54
OptString . new ( 'DHCPIPSTART' , [ false , 'The first IP to give out' ] ) ,
@@ -52,12 +57,6 @@ def initialize
52
57
end
53
58
54
59
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
-
61
60
print_status ( "Starting TFTP server..." )
62
61
@tftp = Rex ::Proto ::TFTP ::Server . new
63
62
@tftp . set_tftproot ( datastore [ 'TFTPROOT' ] )
0 commit comments