lib/tasks/search_c99_subdomainfinder.rb
## Default method, subclasses must override this
Default method, subclasses must override this
Default method subclasses must override this
def run
      super
      entity_name = _get_entity_name
      api_key = _get_task_config("c99_subdomainfinder_api_key")
      begin 
        url = "https://api.c99.nl/subdomainfinder?key=#{api_key}&domain=#{entity_name}&json"
        response = http_get_body(url)
        result = JSON.parse(response)
      rescue JSON::ParserError => e
        _log_error "Unable to parse, not JSON!"
        return  
      end
      if result["success"]
        result["subdomains"].each do |s|
          _log "Working on #{s}"
          _create_entity "DnsRecord", "name" => s["subdomain"]
        end
      else
        _log_error "No success message"
      end
    end
def run super entity_name = _get_entity_name api_key = _get_task_config ( "c99_subdomainfinder_api_key" ) begin url = "https://api.c99.nl/subdomainfinder?key=#{api_key}&domain=#{entity_name}&json" response = http_get_body ( url ) result = JSON . parse ( response ) rescue JSON :: ParserError => e _log_error "Unable to parse, not JSON!" return end if result [ "success" ] result [ "subdomains" ] . each do | s | _log "Working on #{s}" _create_entity "DnsRecord" , "name" => s [ "subdomain" ] end else _log_error "No success message" end end
Default method, subclasses must override this
Default method subclasses must override this
#limit = _get_option("limit") ### parse it up 