Adds a default context for the TFTP Client lib.

For use with nonstandard routing.
unstable
Tod Beardsley 2012-01-23 16:00:54 -06:00 committed by James Lee
parent 89279b680a
commit 3522a608c5
1 changed files with 1 additions and 1 deletions

View File

@ -52,7 +52,7 @@ class Client
self.local_port = params["LocalPort"] || (1025 + rand(0xffff-1025))
self.peer_host = params["PeerHost"] || (raise ArgumentError, "Need a peer host.")
self.peer_port = params["PeerPort"] || 69
self.context = params["Context"] || {}
self.context = params["Context"] || {'Msf' => framework, 'MsfExploit' => self}
self.local_file = params["LocalFile"]
self.remote_file = params["RemoteFile"] || (::File.split(self.local_file).last if self.local_file)
self.mode = params["Mode"] || "octet"