Class: ExploitableBackDoor
- Defined in:
- lib/puppet/vendor/safe_yaml/spec/support/exploitable_back_door.rb
Instance Method Summary collapse
- #[]=(command, arguments) ⇒ Object
- #exploited? ⇒ Boolean
- #exploited_through_init_with? ⇒ Boolean
- #exploited_through_ivars? ⇒ Boolean
- #exploited_through_setter? ⇒ Boolean
- #init_with(command) ⇒ Object
Instance Method Details
#[]=(command, arguments) ⇒ Object
24 25 26 27 28 |
# File 'lib/puppet/vendor/safe_yaml/spec/support/exploitable_back_door.rb', line 24 def []=(command, arguments) # Note: this is how bad this COULD be. # system("#{command} #{arguments}") @exploited_through_setter = true end |
#exploited? ⇒ Boolean
2 3 4 |
# File 'lib/puppet/vendor/safe_yaml/spec/support/exploitable_back_door.rb', line 2 def exploited? @exploited_through_setter || @exploited_through_init_with || @exploited_through_ivars end |
#exploited_through_init_with? ⇒ Boolean
10 11 12 |
# File 'lib/puppet/vendor/safe_yaml/spec/support/exploitable_back_door.rb', line 10 def exploited_through_init_with? @exploited_through_init_with end |
#exploited_through_ivars? ⇒ Boolean
14 15 16 |
# File 'lib/puppet/vendor/safe_yaml/spec/support/exploitable_back_door.rb', line 14 def exploited_through_ivars? self.instance_variables.any? end |
#exploited_through_setter? ⇒ Boolean
6 7 8 |
# File 'lib/puppet/vendor/safe_yaml/spec/support/exploitable_back_door.rb', line 6 def exploited_through_setter? @exploited_through_setter end |
#init_with(command) ⇒ Object
18 19 20 21 22 |
# File 'lib/puppet/vendor/safe_yaml/spec/support/exploitable_back_door.rb', line 18 def init_with(command) # Note: this is how bad this COULD be. # system("#{command}") @exploited_through_init_with = true end |