Module: Ronin::Payloads::CLI::Printing Private

Included in:
Commands::Show
Defined in:
lib/ronin/payloads/cli/printing.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Common methods for printing payload metadata.

Constant Summary collapse

PAYLOAD_TYPES =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Known payload types and their printable names.

{
  payload: 'Custom',

  binary:    'Binary',
  asm:       'ASM',
  shellcode: 'Shellcode',

  c:    'C',
  go:   'Go',
  rust: 'Rust',

  java:   'Java',
  groovy: 'Groovy',

  command:    'Command',
  shell:      'Shell',
  powershell: 'PowerShell',

  coldfusion: 'ColdFusion',
  jsp:        'JSP',
  php:        'PHP',
  python:     'Python',
  ruby:       'Ruby',

  javascript: 'JavaScript',
  node_js:    'Node.js',
  nashorn:    'Nashorn',

  sql:  'SQL',
  html: 'HTML',
  xml:  'XML'
}

Instance Method Summary collapse

Instance Method Details

#payload_type(payload_class) ⇒ String

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns the printable payload type for the payload class.

Parameters:

  • payload_class (Class<Payload>)

    The payload class.

Returns:

  • (String)

    The printable payload type (ex: 'ASM' or 'shellcode').



72
73
74
# File 'lib/ronin/payloads/cli/printing.rb', line 72

def payload_type(payload_class)
  PAYLOAD_TYPES.fetch(payload_class.payload_type,'Unknown')
end