question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Parsing error after X responsive pages

See original GitHub issue

domain-scan’s gather feature queries the Censys API to collect .gov subdomains. The query parsed.subject.common_name:".gov" or parsed.extensions.subject_alt_name.dns_names:".gov" works on API pages 1-100, but errors out on any page ≥ 101:

$ ./gather censys --suffix=.gov --start=101 --end=101 --force --delay=5 --debug --parents=current-federal.csv --censys_id=<id> --censys_key=<key>

Starting new HTTPS connection (1): www.censys.io
"GET /api/v1/account HTTP/1.1" 200 245
Censys query:
parsed.subject.common_name:".gov" or parsed.extensions.subject_alt_name.dns_names:".gov"

Fetching up to 100 records, starting at page 101.
Fetching page 101.
"POST /api/v1/search/certificates HTTP/1.1" 400 116
Traceback (most recent call last):

  File "/home/hmft/Desktop/domain-scan-master/gatherers/censys.py", line 100, in gather
    certs = list(certificate_api.search(query, fields=fields, page=current_page, max_records=page_size))

  File "/usr/local/lib/python3.5/dist-packages/censys/base.py", line 151, in search
    payload = self._post(self.search_path, data=data)

  File "/usr/local/lib/python3.5/dist-packages/censys/base.py", line 98, in _post
    return self._make_call(self._session.post, endpoint, args, data)

  File "/usr/local/lib/python3.5/dist-packages/censys/base.py", line 92, in _make_call
    const=const)

censys.base.CensysException: 400 (es_transport_error): Your search was invalid and could not be parsed.

This same query on the web indicates 7,661 responsive pages:

image

…but any page ≥ 401 produces an error:

image

cc: @konklone

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
zakirdcommented, Nov 3, 2016

I just wanted to note that this error message should now describe the problem and paths forward. Example at https://censys.io/certificates?q=*&page=401.

0reactions
konklonecommented, Nov 6, 2016

Thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Parse Error - PageLines Documentation
Parse Error. The reason why this error shows up is because you have one or more errors in your custom CSS/LESS CSS. The...
Read more >
HTML image tag leading to the error 'Failed parsing 'srcset ...
I'm trying to build a simple HTML page to implement responsive images for practice. This is my whole code:
Read more >
Parsing the Error Response Code - Apple Developer
Overview. When your API request results in an error, you receive an ErrorResponse that contains an array of errors. The code property of...
Read more >
Suggestions for debugging a dojo parse error? - Esri Community
I'm not quite ready for AMD dojo so I was updating the API version to 3.4 but now I get a dojo parse...
Read more >
PHx parse error | MODX Community Forums
It seems that the original line works on some servers but not all. It might be a modx bug. Maybe some of the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found