Class: Aikido::Zen::Attacks::PathTraversalAttack
Instance Attribute Summary collapse
#context, #operation, #sink
Instance Method Summary
collapse
#as_json, #blocked?, #will_be_blocked!
Constructor Details
#initialize(input:, filepath:, **opts) ⇒ PathTraversalAttack
65
66
67
68
69
|
# File 'lib/aikido/zen/attack.rb', line 65
def initialize(input:, filepath:, **opts)
super(**opts)
@input = input
@filepath = filepath
end
|
Instance Attribute Details
#filepath ⇒ Object
Returns the value of attribute filepath.
63
64
65
|
# File 'lib/aikido/zen/attack.rb', line 63
def filepath
@filepath
end
|
Returns the value of attribute input.
62
63
64
|
# File 'lib/aikido/zen/attack.rb', line 62
def input
@input
end
|
Instance Method Details
#exception ⇒ Object
85
86
87
|
# File 'lib/aikido/zen/attack.rb', line 85
def exception(*)
PathTraversalError.new(self)
end
|
#humanized_name ⇒ Object
77
78
79
|
# File 'lib/aikido/zen/attack.rb', line 77
def humanized_name
"path traversal attack"
end
|
#kind ⇒ Object
81
82
83
|
# File 'lib/aikido/zen/attack.rb', line 81
def kind
"path_traversal"
end
|
71
72
73
74
75
|
# File 'lib/aikido/zen/attack.rb', line 71
def metadata
{
"filename" => filepath
}
end
|