Class: NatasLevel3

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

Overview

Level 3

Constant Summary collapse

LEVEL =
3
USERS_FILE =
'/s3cr3t/users.txt'

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



173
174
175
176
177
178
179
# File 'lib/natas.rb', line 173

def exec
  log("Parsing secret users file: #{USERS_FILE}")
  data = get(USERS_FILE).body
  match = /natas4:(\w{32})/.match(data)
  not_found unless match
  found(match[1])
end