Skip to content

Commit

Permalink
fix api search
Browse files Browse the repository at this point in the history
  • Loading branch information
zeinlol committed Aug 5, 2022
1 parent 16985e3 commit e3b2712
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
11 changes: 8 additions & 3 deletions lib/aquatone/collectors/gtr.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,18 @@ def run

def request_page(token = nil)
if token.nil?
uri = "#{BASE_URI}?domain=#{url_escape(domain.name)}&include_expired=true&include_subdomains=true"
uri = "#{BASE_URI}"
else
uri = "#{BASE_URI}/page?domain=#{url_escape(domain.name)}&include_expired=true&include_subdomains=true&p=#{url_escape(token)}"
uri = "#{BASE_URI}/page?&p=#{url_escape(token)}"
end

get_request(uri,
{ :format => :plain, :headers => { "Referer" => "https://transparencyreport.google.com/https/certificates" } }
{
:format => :plain,
:params => {"include_expired": 'true',
'include_subdomains': 'true',
'domain': url_escape(domain.name)},
:headers => { "Referer" => "https://transparencyreport.google.com/https/certificates" } }
)
end

Expand Down
2 changes: 1 addition & 1 deletion lib/aquatone/collectors/ptrarchive.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class Ptrarchive < Aquatone::Collector
}

def run
response = get_request("http://ptrarchive.com/tools/search.htm?label=#{url_escape(domain.name)}&date=ALL")
response = get_request("http://ptrarchive.com/tools/search.htm?label=#{url_escape(domain.name)}&date=ALL&nonce=18000")
if response.code != 200
failure("PTRArchive returned unexpected response code: #{response.code}")
end
Expand Down
2 changes: 1 addition & 1 deletion lib/aquatone/collectors/riddler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def run
token = get_key("riddler_api")
if token.nil? do
auth_response = post_request("#{API_BASE_URI}/auth/login", {
:email => get_key("riddler_username"),
:email => get_key("riddler"),
:password => get_key("riddler_password")
}.to_json, {
:headers => { "Content-Type" => "application/json" }
Expand Down

0 comments on commit e3b2712

Please sign in to comment.