Class: NatasLevel0
- Inherits:
-
NatasLevelBase
- Object
- NatasLevelBase
- NatasLevel0
- Defined in:
- lib/natas.rb
Overview
Level 0
Constant Summary collapse
- LEVEL =
0
- PASSWORD =
'natas0'
- PAGE =
'/'
Constants inherited from NatasLevelBase
NatasLevelBase::HOST, NatasLevelBase::LOGIN, NatasLevelBase::PASSWORD_LENGTH, NatasLevelBase::PORT, NatasLevelBase::WEBPASS
Instance Attribute Summary
Attributes inherited from NatasLevelBase
Instance Method Summary collapse
- #exec ⇒ Object
-
#initialize ⇒ NatasLevel0
constructor
A new instance of NatasLevel0.
Methods inherited from NatasLevelBase
Constructor Details
#initialize ⇒ NatasLevel0
Returns a new instance of NatasLevel0.
123 124 125 126 |
# File 'lib/natas.rb', line 123 def initialize(*) super @password = PASSWORD end |
Instance Method Details
#exec ⇒ Object
128 129 130 131 132 133 134 |
# File 'lib/natas.rb', line 128 def exec log("Parsing the page: #{PAGE}") data = get('/').body match = /<!--The password for natas1 is (\w{32}) -->/.match(data) not_found unless match found(match[1]) end |