Module: Intrigue::Ident
- Defined in:
- lib/cpe.rb,
lib/checks/f5.rb,
lib/checks/hp.rb,
lib/checks/ibm.rb,
lib/checks/php.rb,
lib/checks/sap.rb,
lib/checks/axis.rb,
lib/checks/banu.rb,
lib/checks/base.rb,
lib/checks/chef.rb,
lib/checks/jamf.rb,
lib/checks/jive.rb,
lib/checks/okta.rb,
lib/checks/yaws.rb,
lib/checks/zeit.rb,
lib/checks/adobe.rb,
lib/checks/aruba.rb,
lib/checks/cisco.rb,
lib/checks/craft.rb,
lib/checks/lotus.rb,
lib/checks/nginx.rb,
lib/checks/ookla.rb,
lib/checks/plesk.rb,
lib/checks/typo3.rb,
lib/check_factory.rb,
lib/checks/acquia.rb,
lib/checks/akamai.rb,
lib/checks/amazon.rb,
lib/checks/apache.rb,
lib/checks/citrix.rb,
lib/checks/cpanel.rb,
lib/checks/django.rb,
lib/checks/drupal.rb,
lib/checks/fastly.rb,
lib/checks/gitlab.rb,
lib/checks/google.rb,
lib/checks/groovy.rb,
lib/checks/heroku.rb,
lib/checks/ivanti.rb,
lib/checks/jekyll.rb,
lib/checks/joomla.rb,
lib/checks/mcafee.rb,
lib/checks/nagios.rb,
lib/checks/oracle.rb,
lib/checks/pardot.rb,
lib/checks/vmware.rb,
lib/checks/webmin.rb,
lib/checks/zimbra.rb,
lib/checks/allegro.rb,
lib/checks/blueimp.rb,
lib/checks/brocade.rb,
lib/checks/generic.rb,
lib/checks/grafana.rb,
lib/checks/jenkins.rb,
lib/checks/jobvite.rb,
lib/checks/jupyter.rb,
lib/checks/lithium.rb,
lib/checks/magento.rb,
lib/checks/pfsense.rb,
lib/checks/pivotal.rb,
lib/checks/restlet.rb,
lib/checks/tableau.rb,
lib/checks/telerik.rb,
lib/checks/varnish.rb,
lib/checks/zendesk.rb,
lib/checks/zscaler.rb,
lib/intrigue-ident.rb,
lib/checks/docuwiki.rb,
lib/checks/lighttpd.rb,
lib/checks/mikrotik.rb,
lib/checks/pantheon.rb,
lib/checks/rabbitmq.rb,
lib/checks/atlassian.rb,
lib/checks/limesuvey.rb,
lib/checks/mailchimp.rb,
lib/checks/mediawiki.rb,
lib/checks/microsoft.rb,
lib/checks/new_relic.rb,
lib/checks/openresty.rb,
lib/checks/palo_alto.rb,
lib/checks/sailpoint.rb,
lib/checks/team_city.rb,
lib/checks/wp_engine.rb,
lib/checks/automattic.rb,
lib/checks/checkpoint.rb,
lib/checks/cloudflare.rb,
lib/checks/phpmyadmin.rb,
lib/checks/perfectsense.rb,
lib/checks/pulse_secure.rb,
lib/traverse_exceptions.rb,
lib/checks/ping_identity.rb,
lib/checks/ruckus_wireless.rb
Defined Under Namespace
Modules: Check, TraverseExceptions Classes: CheckFactory, Cpe
Constant Summary collapse
- VERSION =
0.73
Instance Method Summary collapse
- #check_intrigue_uri_hash(intrigue_uri_data, options = {}) ⇒ Object
- #generate_requests_and_check(url, options) ⇒ Object
-
#remove_bad_ident_matches(matches) ⇒ Object
remove bad checks we need to roll back.
Instance Method Details
#check_intrigue_uri_hash(intrigue_uri_data, options = {}) ⇒ Object
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/intrigue-ident.rb', line 58 def check_intrigue_uri_hash(intrigue_uri_data, ={}) results = [] # gather all fingeprints for each product # this will look like an array of checks, each with a uri and a SET of checks generated_checks = Intrigue::Ident::CheckFactory.all.map{|x| x.new.generate_checks("x") }.flatten # group by the uris, with the associated checks # TODO - this only currently supports the first path of the group!!!! grouped_generated_checks = generated_checks.group_by{|x| x[:paths].first } # call the check on each uri grouped_generated_checks.each do |ggc| target_url = ggc.first # call each check, collecting the product if it's a match ggc.last.each do |check| results << _match_uri_hash(check, intrigue_uri_data, ) end end # Return all matches, minus the nils (non-matches) results.compact end |
#generate_requests_and_check(url, options) ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/intrigue-ident.rb', line 20 def generate_requests_and_check(url, ) results = [] # gather all fingeprints for each product # this will look like an array of checks, each with a uri and a SET of checks generated_checks = Intrigue::Ident::CheckFactory.all.map{|x| x.new.generate_checks(url) }.flatten # group by the uris, with the associated checks # TODO - this only currently supports the first path of the group!!!! grouped_generated_checks = generated_checks.group_by{|x| x[:paths].first } # call the check on each uri grouped_generated_checks.each do |ggc| target_url = ggc.first # get the response response = _http_request :get, "#{target_url}" unless response puts "Unable to get a response at: #{target_url}, failing" return nil end # Go ahead and match it up if we got a response! if response # call each check, collecting the product if it's a match ggc.last.each do |check| results << _match_http_response(check, response, ) end end end # Return all matches, minus the nils (non-matches) results.compact end |
#remove_bad_ident_matches(matches) ⇒ Object
remove bad checks we need to roll back
86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/intrigue-ident.rb', line 86 def remove_bad_ident_matches(matches) passed_matches = [] matches.each do |m| next if (m["match_type"] == "content_body" && m["matched_content"] == "(?-mix:Drupal)") next if (m["match_type"] == "content_cookies" && m["matched_content"] == "(?i-mx:ADRUM_BTa)" && m["product"] == "Jobvite") passed_matches << m end passed_matches end |