Skip to content

Commit 5ae62da

Browse files
committed
Renamed CLI::PayloadType to CLI::Text.
1 parent 93e2f12 commit 5ae62da

File tree

4 files changed

+14
-15
lines changed

4 files changed

+14
-15
lines changed

lib/ronin/payloads/cli/commands/build.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
require_relative '../payload_command'
2323
require_relative '../format_option'
2424
require_relative '../encoder_methods'
25-
require_relative '../payload_type'
25+
require_relative '../text'
2626

2727
require 'ronin/core/cli/options/param'
2828

@@ -61,7 +61,7 @@ class Build < PayloadCommand
6161
include FormatOption
6262
include EncoderMethods
6363
include Core::CLI::Options::Param
64-
include PayloadType
64+
include Text
6565

6666
option :output, short: '-o',
6767
value: {

lib/ronin/payloads/cli/commands/show.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#
2121

2222
require_relative '../payload_command'
23-
require_relative '../payload_type'
23+
require_relative '../text'
2424
require_relative '../../metadata/arch'
2525
require_relative '../../metadata/os'
2626

@@ -59,7 +59,7 @@ class Show < PayloadCommand
5959
include Core::CLI::Printing::OS
6060
include Core::CLI::Printing::Params
6161
include CommandKit::Printing::Fields
62-
include PayloadType
62+
include Text
6363

6464
description 'Prints information about a payload'
6565

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,12 @@ module Ronin
2323
module Payloads
2424
class CLI
2525
#
26-
# Handles converting a payload's {Payload.payload_type payload_type} into
27-
# a printable display name.
26+
# Methods for generating display text.
2827
#
2928
# @since 0.3.0
3029
#
31-
module PayloadType
32-
# Known payload types and their printable names.
30+
module Text
31+
# Known payload types and their display names.
3332
PAYLOAD_TYPES = {
3433
payload: 'Custom',
3534

@@ -67,13 +66,13 @@ module PayloadType
6766
}
6867

6968
#
70-
# Returns the printable payload type for the payload class.
69+
# Returns the payload type display name for the payload class.
7170
#
7271
# @param [Class<Payload>] payload_class
7372
# The payload class.
7473
#
7574
# @return [String]
76-
# The printable payload type (ex: 'ASM' or 'shellcode').
75+
# The payload type display name (ex: 'ASM' or 'shellcode').
7776
#
7877
def payload_type(payload_class)
7978
PAYLOAD_TYPES.fetch(payload_class.payload_type,'Unknown')
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
require 'spec_helper'
2-
require 'ronin/payloads/cli/payload_type'
2+
require 'ronin/payloads/cli/text'
33
require 'ronin/payloads/cli/command'
44

55
require 'ronin/payloads/binary_payload'
@@ -25,14 +25,14 @@
2525
require 'ronin/payloads/xml_payload'
2626
require 'ronin/payloads/mixins/typescript'
2727

28-
describe Ronin::Payloads::CLI::PayloadType do
29-
module TestCLIPrinting
28+
describe Ronin::Payloads::CLI::Text do
29+
module TestCLIText
3030
class TestCommand < Ronin::Payloads::CLI::Command
31-
include Ronin::Payloads::CLI::PayloadType
31+
include Ronin::Payloads::CLI::Text
3232
end
3333
end
3434

35-
let(:command_class) { TestCLIPrinting::TestCommand }
35+
let(:command_class) { TestCLIText::TestCommand }
3636
subject { command_class.new }
3737

3838
describe "#payload_type" do

0 commit comments

Comments
 (0)