Class: WpUser
- Inherits:
-
WpItem
- Object
- WpItem
- WpUser
- Includes:
- BruteForcable, Existable
- Defined in:
- lib/common/models/wp_user.rb,
lib/common/models/wp_user/existable.rb,
lib/common/models/wp_user/brute_forcable.rb
Defined Under Namespace
Modules: BruteForcable, Existable
Instance Attribute Summary (collapse)
-
- (Object) display_name
Returns the value of attribute display_name.
-
- (Object) id
Returns the value of attribute id.
-
- (Object) login
Returns the value of attribute login.
-
- (Object) password
Returns the value of attribute password.
Attributes inherited from WpItem
#found_from, #name, #path, #version, #wp_content_dir, #wp_plugins_dir
Attributes included from WpItem::Vulnerable
Instance Method Summary (collapse)
- - (Object) <=>(other)
- - (Boolean) ==(other)
- - (Boolean) ===(other)
- - (Array<Symbol>) allowed_options
- - (String) login_url
- - (String) to_s
-
- (URI) uri
The uri to the auhor page.
Methods included from BruteForcable
#brute_force, #login_request, passwords_from_wordlist, #progress_bar, #valid_password?
Methods included from Existable
display_name_from_body, #exists_from_response?, #load_from_response, login_from_author_pattern, login_from_body
Methods inherited from WpItem
#forge_uri, #initialize, #set_options, #url
Methods included from WpItem::Output
Methods included from WpItem::Infos
#changelog_url, #error_log_url, #has_changelog?, #has_directory_listing?, #has_error_log?, #has_readme?, #readme_url, #url_is_200?
Methods included from WpItem::Existable
#exists?, #exists_from_response?
Methods included from WpItem::Vulnerable
Methods included from WpItem::Versionable
Constructor Details
This class inherits a constructor from WpItem
Instance Attribute Details
- (Object) display_name
Returns the value of attribute display_name
10 11 12 |
# File 'lib/common/models/wp_user.rb', line 10 def display_name @display_name end |
- (Object) id
Returns the value of attribute id
10 11 12 |
# File 'lib/common/models/wp_user.rb', line 10 def id @id end |
- (Object) login
Returns the value of attribute login
10 11 12 |
# File 'lib/common/models/wp_user.rb', line 10 def login @login end |
- (Object) password
Returns the value of attribute password
10 11 12 |
# File 'lib/common/models/wp_user.rb', line 10 def password @password end |
Instance Method Details
- (Object) <=>(other)
38 39 40 |
# File 'lib/common/models/wp_user.rb', line 38 def <=>(other) id <=> other.id end |
- (Boolean) ==(other)
45 46 47 |
# File 'lib/common/models/wp_user.rb', line 45 def ==(other) self === other end |
- (Boolean) ===(other)
52 53 54 |
# File 'lib/common/models/wp_user.rb', line 52 def ===(other) id === other.id && login === other.login end |
- (Array<Symbol>) allowed_options
13 |
# File 'lib/common/models/wp_user.rb', line 13 def ; [:id, :login, :display_name, :password] end |
- (String) login_url
25 26 27 |
# File 'lib/common/models/wp_user.rb', line 25 def login_url @uri.merge('wp-login.php').to_s end |
- (String) to_s
30 31 32 33 34 35 |
# File 'lib/common/models/wp_user.rb', line 30 def to_s s = "#{id}" s += " | #{login}" if login s += " | #{display_name}" if display_name s end |
- (URI) uri
The uri to the auhor page
16 17 18 19 20 21 22 |
# File 'lib/common/models/wp_user.rb', line 16 def uri if id return @uri.merge("?author=#{id}") else raise 'The id is nil' end end |