Class: Pastenum::Target
- Inherits:
-
Object
- Object
- Pastenum::Target
- Defined in:
- lib/pastenum/target.rb
Instance Attribute Summary collapse
-
#dork ⇒ Object
readonly
Returns the value of attribute dork.
-
#max_pages ⇒ Object
Returns the value of attribute max_pages.
-
#raw ⇒ Object
Returns the value of attribute raw.
-
#raw_url ⇒ Object
readonly
Returns the value of attribute raw_url.
-
#results ⇒ Object
readonly
Returns the value of attribute results.
-
#vendor ⇒ Object
readonly
Returns the value of attribute vendor.
-
#verbose ⇒ Object
Returns the value of attribute verbose.
Instance Method Summary collapse
-
#initialize(search_string) ⇒ Target
constructor
A new instance of Target.
- #search ⇒ Object
- #summary ⇒ Object
- #verify_ssl_mode ⇒ Object
- #verify_ssl_mode=(mode) ⇒ Object
Constructor Details
#initialize(search_string) ⇒ Target
Returns a new instance of Target.
7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/pastenum/target.rb', line 7 def initialize(search_string) @dork ||= search_string @vendor ||= "TargetTemplate" @raw_url ||= "TargetRawTemplate" @results ||= Array.new @agent ||= Mechanize.new @raw ||= Pastenum::Defaults::Raw @verbose ||= Pastenum::Defaults::Verbose @max_pages ||= Pastenum::Defaults::MaxPages end |
Instance Attribute Details
#dork ⇒ Object (readonly)
Returns the value of attribute dork.
5 6 7 |
# File 'lib/pastenum/target.rb', line 5 def dork @dork end |
#max_pages ⇒ Object
Returns the value of attribute max_pages.
4 5 6 |
# File 'lib/pastenum/target.rb', line 4 def max_pages @max_pages end |
#raw ⇒ Object
Returns the value of attribute raw.
4 5 6 |
# File 'lib/pastenum/target.rb', line 4 def raw @raw end |
#raw_url ⇒ Object (readonly)
Returns the value of attribute raw_url.
5 6 7 |
# File 'lib/pastenum/target.rb', line 5 def raw_url @raw_url end |
#results ⇒ Object (readonly)
Returns the value of attribute results.
5 6 7 |
# File 'lib/pastenum/target.rb', line 5 def results @results end |
#vendor ⇒ Object (readonly)
Returns the value of attribute vendor.
5 6 7 |
# File 'lib/pastenum/target.rb', line 5 def vendor @vendor end |
#verbose ⇒ Object
Returns the value of attribute verbose.
4 5 6 |
# File 'lib/pastenum/target.rb', line 4 def verbose @verbose end |
Instance Method Details
#search ⇒ Object
30 31 32 |
# File 'lib/pastenum/target.rb', line 30 def search raise TargetTemplateErrorDirectCall end |
#summary ⇒ Object
34 35 36 37 38 39 40 |
# File 'lib/pastenum/target.rb', line 34 def summary if results.count == 0 puts "[!] No Items Found on #{@vendor}, Try Harder".red if @verbose else puts "[*] Total Items found on #{@vendor}: #{@results.count}".green if @verbose end end |
#verify_ssl_mode ⇒ Object
22 23 24 |
# File 'lib/pastenum/target.rb', line 22 def verify_ssl_mode @agent.verify_mode end |
#verify_ssl_mode=(mode) ⇒ Object
26 27 28 |
# File 'lib/pastenum/target.rb', line 26 def verify_ssl_mode=(mode) @agent.verify_mode = mode end |