Class: Rex::Post::Meterpreter::Extensions::Lanattacks::Tftp::Tftp
- Inherits:
-
Object
- Object
- Rex::Post::Meterpreter::Extensions::Lanattacks::Tftp::Tftp
- Defined in:
- lib/rex/post/meterpreter/extensions/lanattacks/tftp/tftp.rb
Overview
TFTP Server functionality
Instance Attribute Summary collapse
-
#client ⇒ Object
Returns the value of attribute client.
Instance Method Summary collapse
- #add_file(filename, data) ⇒ Object
-
#initialize(client) ⇒ Tftp
constructor
A new instance of Tftp.
- #reset ⇒ Object
- #start ⇒ Object
- #stop ⇒ Object
Constructor Details
#initialize(client) ⇒ Tftp
Returns a new instance of Tftp.
19 20 21 |
# File 'lib/rex/post/meterpreter/extensions/lanattacks/tftp/tftp.rb', line 19 def initialize(client) @client = client end |
Instance Attribute Details
#client ⇒ Object
Returns the value of attribute client.
46 47 48 |
# File 'lib/rex/post/meterpreter/extensions/lanattacks/tftp/tftp.rb', line 46 def client @client end |
Instance Method Details
#add_file(filename, data) ⇒ Object
33 34 35 36 37 38 39 |
# File 'lib/rex/post/meterpreter/extensions/lanattacks/tftp/tftp.rb', line 33 def add_file(filename, data) request = Packet.create_request(COMMAND_ID_LANATTACKS_ADD_TFTP_FILE) request.add_tlv(TLV_TYPE_LANATTACKS_OPTION_NAME, filename) request.add_tlv(TLV_TYPE_LANATTACKS_RAW, data, false, true) #compress it client.send_request(request) true end |
#reset ⇒ Object
28 29 30 31 |
# File 'lib/rex/post/meterpreter/extensions/lanattacks/tftp/tftp.rb', line 28 def reset client.send_request(Packet.create_request(COMMAND_ID_LANATTACKS_RESET_TFTP)) true end |
#start ⇒ Object
23 24 25 26 |
# File 'lib/rex/post/meterpreter/extensions/lanattacks/tftp/tftp.rb', line 23 def start client.send_request(Packet.create_request(COMMAND_ID_LANATTACKS_START_TFTP)) true end |
#stop ⇒ Object
41 42 43 44 |
# File 'lib/rex/post/meterpreter/extensions/lanattacks/tftp/tftp.rb', line 41 def stop client.send_request(Packet.create_request(COMMAND_ID_LANATTACKS_STOP_TFTP)) true end |