Class: Aikido::Zen::Attacks::PathTraversalAttack
- Inherits:
-
Aikido::Zen::Attack
- Object
- Aikido::Zen::Attack
- Aikido::Zen::Attacks::PathTraversalAttack
- Defined in:
- lib/aikido/zen/attack.rb
Instance Attribute Summary collapse
-
#filepath ⇒ Object
readonly
Returns the value of attribute filepath.
-
#input ⇒ Object
readonly
Returns the value of attribute input.
Attributes inherited from Aikido::Zen::Attack
Instance Method Summary collapse
- #exception ⇒ Object
- #humanized_name ⇒ Object
-
#initialize(input:, filepath:, **opts) ⇒ PathTraversalAttack
constructor
A new instance of PathTraversalAttack.
- #kind ⇒ Object
- #metadata ⇒ Object
Methods inherited from Aikido::Zen::Attack
#as_json, #blocked?, #will_be_blocked!
Constructor Details
#initialize(input:, filepath:, **opts) ⇒ PathTraversalAttack
Returns a new instance of PathTraversalAttack.
63 64 65 66 67 |
# File 'lib/aikido/zen/attack.rb', line 63 def initialize(input:, filepath:, **opts) super(**opts) @input = input @filepath = filepath end |
Instance Attribute Details
#filepath ⇒ Object (readonly)
Returns the value of attribute filepath.
61 62 63 |
# File 'lib/aikido/zen/attack.rb', line 61 def filepath @filepath end |
#input ⇒ Object (readonly)
Returns the value of attribute input.
60 61 62 |
# File 'lib/aikido/zen/attack.rb', line 60 def input @input end |
Instance Method Details
#exception ⇒ Object
81 82 83 |
# File 'lib/aikido/zen/attack.rb', line 81 def exception(*) PathTraversalError.new(self) end |
#humanized_name ⇒ Object
73 74 75 |
# File 'lib/aikido/zen/attack.rb', line 73 def humanized_name "path traversal attack" end |
#kind ⇒ Object
77 78 79 |
# File 'lib/aikido/zen/attack.rb', line 77 def kind "path_traversal" end |
#metadata ⇒ Object
69 70 71 |
# File 'lib/aikido/zen/attack.rb', line 69 def {filename: filepath} end |