Sha256: 7f240c09e1db942463395cb70e5ed1de3d3d72166426bc638e3b62415133c837

Contents?: true

Size: 657 Bytes

Versions: 224

Compression:

Stored size: 657 Bytes

Contents

class ExploitableBackDoor
  def exploited?
    @exploited_through_setter || @exploited_through_init_with || @exploited_through_ivars
  end

  def exploited_through_setter?
    @exploited_through_setter
  end

  def exploited_through_init_with?
    @exploited_through_init_with
  end

  def exploited_through_ivars?
    self.instance_variables.any?
  end

  def init_with(command)
    # Note: this is how bad this COULD be.
    # system("#{command}")
    @exploited_through_init_with = true
  end

  def []=(command, arguments)
    # Note: this is how bad this COULD be.
    # system("#{command} #{arguments}")
    @exploited_through_setter = true
  end
end

Version data entries

224 entries across 216 versions & 17 rubygems

Version Path
cloudsmith-api-0.53.3 vendor/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/spec/support/exploitable_back_door.rb
vagrant-unbundled-2.2.10.0 vendor/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/spec/support/exploitable_back_door.rb
cloudsmith-api-0.53.1 vendor/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/spec/support/exploitable_back_door.rb
cloudsmith-api-0.52.121 vendor/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/spec/support/exploitable_back_door.rb
cloudsmith-api-0.52.92 vendor/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/spec/support/exploitable_back_door.rb
cloudsmith-api-0.52.79 vendor/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/spec/support/exploitable_back_door.rb
cloudsmith-api-0.52.5 vendor/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/spec/support/exploitable_back_door.rb
cloudsmith-api-0.52.0 vendor/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/spec/support/exploitable_back_door.rb
cloudsmith-api-0.51.93 vendor/bundle/ruby/2.3.0/gems/safe_yaml-1.0.5/spec/support/exploitable_back_door.rb
cloudsmith-api-0.51.38 vendor/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/spec/support/exploitable_back_door.rb
cloudsmith-api-0.51.37 vendor/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/spec/support/exploitable_back_door.rb
cloudsmith-api-0.51.34 vendor/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/spec/support/exploitable_back_door.rb
cloudsmith-api-0.51.22 vendor/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/spec/support/exploitable_back_door.rb
vagrant-unbundled-2.2.9.0 vendor/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/spec/support/exploitable_back_door.rb
vagrant-unbundled-2.2.8.0 vendor/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/spec/support/exploitable_back_door.rb
cloudsmith-api-0.49.118 vendor/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/spec/support/exploitable_back_door.rb
cloudsmith-api-0.49.98 vendor/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/spec/support/exploitable_back_door.rb
cloudsmith-api-0.49.94 vendor/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/spec/support/exploitable_back_door.rb
cloudsmith-api-0.49.21 vendor/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/spec/support/exploitable_back_door.rb
cloudsmith-api-0.49.15 vendor/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/spec/support/exploitable_back_door.rb