Class: Ronin::Exploits::Exploit

Included Modules

Parameters, Cacheable, Model::HasName, Model::HasDescription, Model::HasVersion, Model::HasLicense, Ronin::Payloads::HasPayload, Ronin::Controls::Behaviors, UI::Output::Helpers, Ronin::Exploits::Verifiers

Attributes

Instance Attributes

encoded_payload [R] public

The encoded payload.

encoders [R] public

Encoders to run on the payload.

raw_payload [R] public

The raw unencoded payload.

restricted_chars [R] public

Characters to restrict.

target [W] public

Exploit target.

Constructor Summary

public initialize(attributes = {}, &block)

Creates a new Exploit object.

Meta Tags

Parameters:

[Hash] attributes

Additional attributes used to initialize the exploit’s model attributes and parameters.

Yields:

[Object]
If a block is given, it will be evaluated in the newly created Exploit object.
[View source]


129
130
131
132
133
134
135
136
137
138
139
140
141
142
# File 'lib/ronin/exploits/exploit.rb', line 129

def initialize(attributes={},&block)
  super(attributes)

  initialize_params(attributes)

  @target = nil
  @built = false
  @deployed = false

  @restricted_chars = Chars::CharSet.new
  @encoders = []

  instance_eval(&block) if block
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

protected method_missing(name, *arguments, &block)

Relays method calls to the payload, if the payload is a kind of Ronin::Payloads::Payload.

Meta Tags

Since:

0.3.0

[View source]


781
782
783
784
785
786
787
# File 'lib/ronin/exploits/exploit.rb', line 781

def method_missing(name,*arguments,&block)
  if @payload.kind_of?(Ronin::Payloads::Payload)
    return @payload.send(name,*arguments,&block)
  end

  super(name,*arguments,&block)
end

Public Visibility

Public Class Method Summary

authors(repository = nil)

Author(s) of the exploit.

controls(repository = nil)

Behaviors that the exploit allows.

disclosure(repository = nil)

The disclosure status of the exploit (any of, :private, :vendor_aware, :in_wild and :public).

id(repository = nil)

Primary key of the exploit.

status(repository = nil)

The status of the exploit (either, :potential, :proven or :weaponized).

targeting_arch(name)

Finds all exploits which target a given architecture.

Returns: Array<Exploit>

targeting_os(name)

Finds all exploits which target a given OS.

Returns: Array<Exploit>

targeting_product(name)

Finds all exploits which target a given product.

Returns: Array<Exploit>

targets(repository = nil)

Targets for the exploit.

written_by(name)

Finds all exploits written by a specific author.

Returns: Array<Exploit>

written_for(name)

Finds all exploits written for a specific organization.

Returns: Array<Exploit>

Public Instance Method Summary

#arch

Returns: Arch

#author(attributes = {}, &block) {|author| ... }

Adds a new author to the exploit.

#authors

Author(s) of the exploit.

#behaviors

Lists the behaviors controlled by the exploit and the payload, if.

Returns: Array<Symbol>

#build!(options = {}, &block)

Builds the exploit and checks for restricted characters or patterns.

#build_payload!(options = {})

Builds the current payload, saving the result to the @raw_payload.

Returns: String

#built?

Returns: Boolean

#controls

Behaviors that the exploit allows.

#deploy!(&block) {|exploit| ... }

Verifies then deploys the exploit.

Returns: Exploit

#deployed?

Returns: Boolean

#disclosure

The disclosure status of the exploit (any of, :private, :vendor_aware, :in_wild and :public).

#disclosure=(value)

The disclosure status of the exploit (any of, :private, :vendor_aware, :in_wild and :public).

#encode_payload(encoder = nil, &block) {|payload| ... }

Adds a new encoder to the list of encoders to use for encoding the.

Returns: Array

#encode_payload!

Encodes the current payload and saves the result in the.

Returns: String

#exploit!(options = {}, &block) {|exploit| ... }

Builds, verified and then deploys the exploit.

Returns: Exploit

#id

Primary key of the exploit.

#id=(value)

Primary key of the exploit.

#inspect

Inspects the contents of the exploit.

Returns: String

#os

Returns: OS

#payload=(new_payload)

Associates a payload with the exploit, and the exploit with the.

Returns: Payload

#product

Returns: Product

#raw_payload=(new_raw_payload)

Sets the raw payload to use with the exploit.

Returns: String

#restrict(*chars)

Adds new characters to the list of restricted characters.

Returns: Array<String>

#status

The status of the exploit (either, :potential, :proven or :weaponized).

#status=(value)

The status of the exploit (either, :potential, :proven or :weaponized).

#target

Returns: Target

#targeted_archs

Returns: Array<Arch>

#targeted_oses

Returns: Array<OS>

#targeted_products

Returns: Array<Product>

#targeting(attributes = {}, &block) {|target| ... }

Adds a new target to the exploit.

#targets

Targets for the exploit.

#to_s

Converts the exploit to a String.

Returns: String

#use_target!(index_or_query = 0, &block) {|target| ... }

Selects a target to use in exploitation.

#verify!

Verifies the exploit is built, properly configured, built and.

Returns: true

Public Class Method Details

authors

public authors(repository = nil)

Author(s) of the exploit

[View source]


91
# File 'lib/ronin/exploits/exploit.rb', line 91

has n, :authors, :model => 'Ronin::Exploits::ExploitAuthor'

controls

public controls(repository = nil)

Behaviors that the exploit allows

[View source]


94
# File 'lib/ronin/exploits/exploit.rb', line 94

has n, :controls, :model => 'Ronin::Exploits::Control'

disclosure

public disclosure(repository = nil)

The disclosure status of the exploit (any of, :private, :vendor_aware, :in_wild and :public)

[View source]


83
84
85
86
87
88
# File 'lib/ronin/exploits/exploit.rb', line 83

property :disclosure, Flag[
  :private,
  :in_wild,
  :vendor_aware,
  :public
]

id

public id(repository = nil)

Primary key of the exploit

[View source]


71
# File 'lib/ronin/exploits/exploit.rb', line 71

property :id, Serial

status

public status(repository = nil)

The status of the exploit (either, :potential, :proven or :weaponized)

[View source]


75
76
77
78
79
# File 'lib/ronin/exploits/exploit.rb', line 75

property :status, Enum[
  :potential,
  :proven,
  :weaponized
], :default => :potential

targeting_arch

public Array<Exploit> targeting_arch(name)

Finds all exploits which target a given architecture.

Meta Tags

Parameters:

[String, Symbol] name

The name of the architecture.

Returns:

[Array<Exploit>]

The exploits targeting the architecture.

[View source]


179
180
181
# File 'lib/ronin/exploits/exploit.rb', line 179

def self.targeting_arch(name)
  all(self.targets.arch.name => name.to_s)
end

targeting_os

public Array<Exploit> targeting_os(name)

Finds all exploits which target a given OS.

Meta Tags

Parameters:

[String, Symbol] name

The name of the OS.

Returns:

[Array<Exploit>]

The exploits targeting the OS.

[View source]


192
193
194
# File 'lib/ronin/exploits/exploit.rb', line 192

def self.targeting_os(name)
  all(self.targets.os.name => name.to_s)
end

targeting_product

public Array<Exploit> targeting_product(name)

Finds all exploits which target a given product.

Meta Tags

Parameters:

[String, Symbol] name

The name of the product.

Returns:

[Array<Exploit>]

The exploits targeting the product.

[View source]


205
206
207
# File 'lib/ronin/exploits/exploit.rb', line 205

def self.targeting_product(name)
  all(self.targets.product.name => "%#{name}%")
end

targets

public targets(repository = nil)

Targets for the exploit

[View source]


97
# File 'lib/ronin/exploits/exploit.rb', line 97

has n, :targets

written_by

public Array<Exploit> written_by(name)

Finds all exploits written by a specific author.

Meta Tags

Parameters:

[String] name

The name of the author.

Returns:

[Array<Exploit>]

The exploits written by the author.

[View source]


153
154
155
# File 'lib/ronin/exploits/exploit.rb', line 153

def self.written_by(name)
  all(self.authors.name. => "%#{name}%")
end

written_for

public Array<Exploit> written_for(name)

Finds all exploits written for a specific organization.

Meta Tags

Parameters:

[String] name

The name of the organization.

Returns:

[Array<Exploit>]

The exploits written for the organization.

[View source]


166
167
168
# File 'lib/ronin/exploits/exploit.rb', line 166

def self.written_for(name)
  all(self.authors.organization. => "%#{name}%")
end

Public Instance Method Details

arch

public Arch arch

Meta Tags

Returns:

[Arch]

The current targeted architecture.

[View source]


403
404
405
# File 'lib/ronin/exploits/exploit.rb', line 403

def arch
  target.arch if target
end

author

public author(attributes = {}, &block) {|author| ... }

Adds a new author to the exploit.

Meta Tags

Example:

  author :name => 'Anonymous',
         :email => 'anon@example.com',
         :organization => 'Anonymous LLC'

Parameters:

[Hash] attributes

Additional attributes to create the ExploitAuthor object with.

Yields:

[author]

If a block is given, it will be passed the newly created author object.

Yield Parameters:

[ExploitAuthor] author

The author object tied to the exploit.

[View source]


227
228
229
# File 'lib/ronin/exploits/exploit.rb', line 227

def author(attributes={},&block)
  self.authors << ExploitAuthor.new(attributes,&block)
end

authors

public authors

Author(s) of the exploit

[View source]


91
# File 'lib/ronin/exploits/exploit.rb', line 91

has n, :authors, :model => 'Ronin::Exploits::ExploitAuthor'

behaviors

public Array<Symbol> behaviors

Lists the behaviors controlled by the exploit and the payload, if one is being used.

Meta Tags

Returns:

[Array<Symbol>]

The combined behaviors controlled by the exploit.

[View source]


323
324
325
326
327
328
329
330
331
# File 'lib/ronin/exploits/exploit.rb', line 323

def behaviors
  total_behaviors = super

  if @payload
    total_behaviors = (total_behaviors + @payload.behaviors).uniq
  end

  return total_behaviors
end

build!

public build!(options = {}, &block)

Builds the exploit and checks for restricted characters or patterns.

Meta Tags

Parameters:

[Hash] options

Additional options to also use as parameters.

[View source]


533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
# File 'lib/ronin/exploits/exploit.rb', line 533

def build!(options={},&block)
  self.params = options

  print_debug "Exploit parameters: #{self.params.inspect}"

  @built = false

  build_payload!(options)
  encode_payload!

  print_info "Building exploit ..."

  build
  
  print_info "Exploit built!"

  @built = true

  if block
    if block.arity == 1
      block.call(self)
    else
      block.call()
    end
  end

  return self
end

build_payload!

public String build_payload!(options = {})

Builds the current payload, saving the result to the @raw_payload instance variable.

Meta Tags

Parameters:

[Hash] options

Additional options to build the paylod with.

Returns:

[String]

The built payload.

Since:

0.3.0

See Also:

Payload#build!
[View source]


481
482
483
484
485
486
487
488
489
490
491
492
# File 'lib/ronin/exploits/exploit.rb', line 481

def build_payload!(options={})
  if @payload
    @raw_payload = ''

    @payload.build!(options)
    @raw_payload = @payload.raw_payload
  else
    @raw_payload ||= ''
  end

  return @raw_payload
end

built?

public Boolean built?

Meta Tags

Returns:

[Boolean]

Specifies whether the exploit is built.

[View source]


523
524
525
# File 'lib/ronin/exploits/exploit.rb', line 523

def built?
  @built == true
end

controls

public controls

Behaviors that the exploit allows

[View source]


94
# File 'lib/ronin/exploits/exploit.rb', line 94

has n, :controls, :model => 'Ronin::Exploits::Control'

deploy!

public Exploit deploy!(&block) {|exploit| ... }

Verifies then deploys the exploit. If a payload has been set, the payload will also be deployed.

Meta Tags

Yields:

[exploit]

If a block is given, it will be passed the deployed exploit.

Yield Parameters:

[Exploit] exploit

The deployed exploit.

Returns:

[Exploit]

The deployed exploit.

Raises:

[ExploitNotBuilt]

The exploit has not been built, and cannot be deployed.

[View source]


609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
# File 'lib/ronin/exploits/exploit.rb', line 609

def deploy!(&block)
  verify!

  print_info "Deploying exploit ..."
  @deployed = false

  deploy()

  print_info "Exploit deployed!"
  @deployed = true

  @payload.deploy!() if @payload

  if block
    if block.arity == 1
      block.call(self)
    else
      block.call()
    end
  end

  return self
end

deployed?

public Boolean deployed?

Meta Tags

Returns:

[Boolean]

Specifies whether the exploit has previously been deployed.

[View source]


589
590
591
# File 'lib/ronin/exploits/exploit.rb', line 589

def deployed?
  @deployed == true
end

disclosure

public disclosure

The disclosure status of the exploit (any of, :private, :vendor_aware, :in_wild and :public)

[View source]


83
84
85
86
87
88
# File 'lib/ronin/exploits/exploit.rb', line 83

property :disclosure, Flag[
  :private,
  :in_wild,
  :vendor_aware,
  :public
]

disclosure=

public disclosure=(value)

The disclosure status of the exploit (any of, :private, :vendor_aware, :in_wild and :public)

[View source]


83
84
85
86
87
88
# File 'lib/ronin/exploits/exploit.rb', line 83

property :disclosure, Flag[
  :private,
  :in_wild,
  :vendor_aware,
  :public
]

encode_payload

public Array encode_payload(encoder = nil, &block) {|payload| ... }

Adds a new encoder to the list of encoders to use for encoding the payload.

Meta Tags

Examples

  exploit.encode_payload(some_encoder)
  exploit.encode_payload do |payload|
    # ...
  end

Parameters:

[#encode] encoder

The payload encoder object to use. Must provide an encode method.

Yields:

[payload]

If a block is given, and an encoder object is not, the block will be used to encode the payload.

Yield Parameters:

[String] payload

The payload to be encoded.

Returns:

[Array]

The new list of encoders to use to encode the payload.

Raises:

[RuntimeError]

The payload encoder object does not provide an encode method.

[ArgumentError]

Either a payload encoder object or a block can be given.

[View source]


302
303
304
305
306
307
308
309
310
311
312
313
314
# File 'lib/ronin/exploits/exploit.rb', line 302

def encode_payload(encoder=nil,&block)
  if encoder
    unless encoder.respond_to?(:encode)
      raise(RuntimeError,"The payload encoder must provide an encode method",caller)
    end

    @encoders << encoder
  elsif (encoder.nil? && block)
    @encoders << block
  else
    raise(ArgumentError,"either a payload encoder or a block can be given",caller)
  end
end

encode_payload!

public String encode_payload!

Encodes the current payload and saves the result in the @encoded_payload instance variable.

Meta Tags

Returns:

[String]

The encoded payload.

[View source]


501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
# File 'lib/ronin/exploits/exploit.rb', line 501

def encode_payload!
  @encoded_payload = @raw_payload.to_s

  @encoders.each do |encoder|
    print_debug "Encoding payload: #{@encoded_payload.dump}"

    new_payload = if encoder.respond_to?(:encode)
                    encoder.encode(@encoded_payload)
                  elsif encoder.respond_to?(:call)
                    encoder.call(@encoded_payload)
                  end

    @encoded_payload = (new_payload || @encoded_payload).to_s
  end

  return @encoded_payload
end

exploit!

public Exploit exploit!(options = {}, &block) {|exploit| ... }

Builds, verified and then deploys the exploit.

Meta Tags

Parameters:

Options Hash options
Key Name Default Value Accepted Types Description
:dry_run false [Boolean]

Specifies whether to do a dry-run of the exploit, where the exploit will be built, verified but not deployed.

Yield Parameters:

[Exploit] exploit

The deployed exploit.

Returns:

[Exploit]

The deployed exploit.

[Exploit]

The deployed exploit.

Since:

0.3.0

[View source]


654
655
656
657
658
659
660
661
662
# File 'lib/ronin/exploits/exploit.rb', line 654

def exploit!(options={},&block)
  build!(options)

  unless options[:dry_run]
    deploy!(&block)
  end

  return self
end

id

public id

Primary key of the exploit

[View source]


71
# File 'lib/ronin/exploits/exploit.rb', line 71

property :id, Serial

id=

public id=(value)

Primary key of the exploit

[View source]


71
# File 'lib/ronin/exploits/exploit.rb', line 71

property :id, Serial

inspect

public String inspect

Inspects the contents of the exploit.

Meta Tags

Returns:

[String]

The inspected exploit.

[View source]


686
687
688
689
690
691
# File 'lib/ronin/exploits/exploit.rb', line 686

def inspect
  str = "#{self.class}: #{self}"
  str << " #{self.params.inspect}" unless self.params.empty?

  return "#<#{str}>"
end

os

public OS os

Meta Tags

Returns:

[OS]

The current targeted OS.

[View source]


411
412
413
# File 'lib/ronin/exploits/exploit.rb', line 411

def os
  target.os if target
end

payload=

public Payload payload=(new_payload)

Associates a payload with the exploit, and the exploit with the payload.

Meta Tags

Parameters:

[Payload] new_payload

The new payload to associate with the exploit.

Returns:

[Payload]

The new payload.

Since:

0.3.0

[View source]


435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
# File 'lib/ronin/exploits/exploit.rb', line 435

def payload=(new_payload)
  if (@payload && new_payload.nil?)
    @payload.exploit = nil
  end

  super(new_payload)

  if @payload
    print_info "Using payload: #{new_payload}"

    @payload.exploit = self
  end

  return @payload
end

product

public Product product

Meta Tags

Returns:

[Product]

The current targeted product.

[View source]


419
420
421
# File 'lib/ronin/exploits/exploit.rb', line 419

def product
  target.product if target
end

raw_payload=

public String raw_payload=(new_raw_payload)

Sets the raw payload to use with the exploit.

Meta Tags

Parameters:

[String, #to_s] new_raw_payload

The new raw payload to use with the exploit.

Returns:

[String]

The new raw payload of the exploit.

[View source]


460
461
462
463
464
465
466
# File 'lib/ronin/exploits/exploit.rb', line 460

def raw_payload=(new_raw_payload)
  new_raw_payload = new_raw_payload.to_s

  print_debug "Using raw payload: #{new_raw_payload.dump}"

  @raw_payload = new_raw_payload
end

restrict

public Array<String> restrict(*chars)

Adds new characters to the list of restricted characters.

Meta Tags

Example:

  restrict 0x00, "\n"
  # => #<Chars::CharSet: {"\0", "\n"}>

Parameters:

[Array<String>] chars

The character to restrict.

Returns:

[Array<String>]

The new list of restricted characters.

[View source]


266
267
268
# File 'lib/ronin/exploits/exploit.rb', line 266

def restrict(*chars)
  @restricted_chars += chars
end

status

public status

The status of the exploit (either, :potential, :proven or :weaponized)

[View source]


75
76
77
78
79
# File 'lib/ronin/exploits/exploit.rb', line 75

property :status, Enum[
  :potential,
  :proven,
  :weaponized
], :default => :potential

status=

public status=(value)

The status of the exploit (either, :potential, :proven or :weaponized)

[View source]


75
76
77
78
79
# File 'lib/ronin/exploits/exploit.rb', line 75

property :status, Enum[
  :potential,
  :proven,
  :weaponized
], :default => :potential

target

public Target target

Meta Tags

Returns:

[Target]

The current target to use in exploitation.

[View source]


395
396
397
# File 'lib/ronin/exploits/exploit.rb', line 395

def target
  @target ||= self.targets.first
end

targeted_archs

public Array<Arch> targeted_archs

Meta Tags

Returns:

[Array<Arch>]

The targeted architectures.

[View source]


337
338
339
# File 'lib/ronin/exploits/exploit.rb', line 337

def targeted_archs
  self.targets.map { |target| target.arch }.compact
end

targeted_oses

public Array<OS> targeted_oses

Meta Tags

Returns:

[Array<OS>]

The targeted OSes.

[View source]


345
346
347
# File 'lib/ronin/exploits/exploit.rb', line 345

def targeted_oses
  self.targets.map { |target| target.os }.compact
end

targeted_products

public Array<Product> targeted_products

Meta Tags

Returns:

[Array<Product>]

The targeted Products.

[View source]


353
354
355
# File 'lib/ronin/exploits/exploit.rb', line 353

def targeted_products
  self.targets.map { |target| target.product }.compact
end

targeting

public targeting(attributes = {}, &block) {|target| ... }

Adds a new target to the exploit.

Meta Tags

Example:

  targeting do |target|
    target.arch :i686
    target.os :name => 'Linux'
  end

Parameters:

[Hash] attributes

Additional attributes to create the target with.

Yields:

[target]

If a block is given, it will be passed the newly created target.

Yield Parameters:

[Target] target

The newly created target.

[View source]


249
250
251
# File 'lib/ronin/exploits/exploit.rb', line 249

def targeting(attributes={},&block)
  self.targets << Target.new(attributes,&block)
end

targets

public targets

Targets for the exploit

[View source]


97
# File 'lib/ronin/exploits/exploit.rb', line 97

has n, :targets

to_s

public String to_s

Converts the exploit to a String.

Meta Tags

Returns:

[String]

The name and version of the exploit.

[View source]


670
671
672
673
674
675
676
677
678
# File 'lib/ronin/exploits/exploit.rb', line 670

def to_s
  if (self.name && self.version)
    "#{self.name} #{self.version}"
  elsif self.name
    self.name
  elsif self.version
    self.version
  end
end

use_target!

public use_target!(index_or_query = 0, &block) {|target| ... }

Selects a target to use in exploitation.

Meta Tags

Examples

  use_target!(2)
  use_target!(Target.arch.name => 'i686')
  use_target! { |target| target.arch == Arch.i686 }

Parameters:

[Integer, Hash] index_or_query

The index within #targets or a query to select the target.

Yields:

[target]

If a block is given, it will be used to select the desired target from #targets.

Yield Parameters:

[Target] target

The potential target to review.

Since:

0.3.0

[View source]


381
382
383
384
385
386
387
388
389
# File 'lib/ronin/exploits/exploit.rb', line 381

def use_target!(index_or_query=0,&block)
  @target = if block
              self.targets.find(&block)
            elsif index_or_query.kind_of?(Hash)
              self.targets.first(index_or_query)
            elsif index_or_query.kind_of?(Integer)
              self.targets[index_or_query]
            end
end

verify!

public true verify!

Verifies the exploit is built, properly configured, built and ready deployment.

Meta Tags

Returns:

[true]

The exploit is built and ready for deployment.

Raises:

[ExploitNotBuilt]

The exploit has not been built, and cannot be deployed.

[View source]


572
573
574
575
576
577
578
579
580
581
582
583
# File 'lib/ronin/exploits/exploit.rb', line 572

def verify!
  unless built?
    raise(ExploitNotBuilt,"cannot deploy an unbuilt exploit",caller)
  end

  print_info "Verifying exploit ..."

  verify

  print_info "Exploit verified!"
  return true
end

Protected Visibility

Protected Instance Method Summary

#build

Default build method.

#deploy(&block)

Default exploit deploy method.

#helper(name)

Extends the exploit with the helper module defined in.

Returns: true

#is_restricted?(text)

Reviews the text for restricted characters.

Returns: Boolean

#verify

Default exploit verify method.

Protected Instance Method Details

build

protected build

Default build method.

[View source]


759
760
# File 'lib/ronin/exploits/exploit.rb', line 759

def build
end

deploy

protected deploy(&block)

Default exploit deploy method.

[View source]


771
772
773
# File 'lib/ronin/exploits/exploit.rb', line 771

def deploy(&block)
  block.call(self) if block
end

helper

protected true helper(name)

Extends the exploit with the helper module defined in Ronin::Exploits::Helpers that has the similar name.

Meta Tags

Example:

  helper :buffer_overflow

Parameters:

[Symbol, String] name

The snake-case name of the exploit helper to load and extend the exploit with.

Returns:

[true]

The exploit helper was successfully loaded.

Raises:

[UnknownHelper]

No valid helper module could be found or loaded with the similar name.

[View source]


713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
# File 'lib/ronin/exploits/exploit.rb', line 713

def helper(name)
  name = name.to_s
  module_name = name.to_const_string

  begin
    require_within File.join('ronin','exploits','helpers'), name
  rescue Gem::LoadError => e
    raise(e)
  rescue ::LoadError
    raise(UnknownHelper,"unknown helper #{name.dump}",caller)
  end

  unless Ronin::Exploits::Helpers.const_defined?(module_name)
    raise(UnknownHelper,"unknown helper #{name.dump}",caller)
  end

  helper_module = Ronin::Exploits::Helpers.const_get(module_name)

  unless helper_module.kind_of?(Module)
    raise(UnknownHelper,"unknown helper #{name.dump}",caller)
  end

  extend helper_module
  return true
end

is_restricted?

protected Boolean is_restricted?(text)

Reviews the text for restricted characters.

Meta Tags

Parameters:

[String] text

The text to check for restricted characters within.

Returns:

[Boolean]

Specifies whether the text contains any restricted characters.

[View source]


748
749
750
751
752
753
754
# File 'lib/ronin/exploits/exploit.rb', line 748

def is_restricted?(text)
  text.each_byte do |b|
    return true if @restricted_chars.include?(b)
  end

  return false
end

verify

protected verify

Default exploit verify method.

[View source]


765
766
# File 'lib/ronin/exploits/exploit.rb', line 765

def verify
end
Generated on Thursday, October 01 2009 at 02:15:08 AM by YARD 0.2.3.5 (ruby-1.8.6).