Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot parse shodan-export.json.gz #55

Closed
syrius01 opened this issue Oct 22, 2017 · 1 comment
Closed

Cannot parse shodan-export.json.gz #55

syrius01 opened this issue Oct 22, 2017 · 1 comment

Comments

@syrius01
Copy link

Hi,

I can't parse the file I just downloaded via my browser (used 1 credit for it) via the following command:

shodan parse --fields ip_str,port,org --separator , shodan-export.json.gz

tor , shodan-export.json.gz
Traceback (most recent call last):
File "/usr/local/bin/shodan", line 1223, in
main()
File "/usr/local/lib/python3.4/dist-packages/click/core.py", line 722, in call
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.4/dist-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.4/dist-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.4/dist-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.4/dist-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/usr/local/bin/shodan", line 516, in parse
for banner in helpers.iterate_files(filenames):
File "/usr/local/lib/python3.4/dist-packages/shodan/helpers.py", line 107, in iterate_files
for line in fin:
File "/usr/lib/python3.4/gzip.py", line 594, in readline
c = self.read(readsize)
File "/usr/lib/python3.4/gzip.py", line 365, in read
if not self._read(readsize):
File "/usr/lib/python3.4/gzip.py", line 453, in _read
uncompress = self.decompress.decompress(buf)
zlib.error: Error -3 while decompressing data: invalid distance too far back

Thanks

@achillean
Copy link
Owner

Please open a ticket with support by emailing support@shodan.io. It looks like the file you downloaded is corrupted somehow which is why "shodan parse" errors out. It doesn't look like an issue with the CLI itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants