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

Errors when testing with httprint #103

Closed
mzfr opened this issue Feb 10, 2018 · 3 comments
Closed

Errors when testing with httprint #103

mzfr opened this issue Feb 10, 2018 · 3 comments

Comments

@mzfr
Copy link
Collaborator

mzfr commented Feb 10, 2018

I was testing httprint on Snare for issue #7.

$ sudo python3 snare.py --port 8080 --page-dir example.com

privileges dropped, running as "nobody:nogroup"
serving on ('127.0.0.1', 8080) with uuid a7a529b8-8579-4b1d-827c-6e3f544d9823
Request path: /
Dorks timeout
snare.py:281: RuntimeWarning: coroutine 'HttpRequestHandler.submit_data' was never awaited
  self.submit_data(data)
Task exception was never retrieved
future: <Task finished coro=<ServerHttpProtocol.start() done, defined at /usr/local/lib/python3.5/dist-packages/aiohttp/server.py:225> exception=TypeError("'NoneType' object is not iterable",)>
Traceback (most recent call last):
  File "snare.py", line 67, in get_dorks
    'http://{0}:8090/dorks'.format(self.run_args.tanner)
  File "/usr/local/lib/python3.5/dist-packages/aiohttp/client.py", line 590, in __await__
    resp = yield from self._coro
  File "/usr/local/lib/python3.5/dist-packages/aiohttp/client.py", line 222, in _request
    yield from resp.start(conn, read_until_eof)
  File "/usr/local/lib/python3.5/dist-packages/aiohttp/client_reqrep.py", line 615, in start
    message = yield from httpstream.read()
  File "/usr/local/lib/python3.5/dist-packages/aiohttp/streams.py", line 625, in read
    result = yield from super().read()
  File "/usr/local/lib/python3.5/dist-packages/aiohttp/streams.py", line 456, in read
    yield from self._waiter
  File "/usr/lib/python3.5/asyncio/futures.py", line 361, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.5/asyncio/tasks.py", line 296, in _wakeup
    future.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 266, in result
    raise CancelledError
concurrent.futures._base.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/aiohttp/server.py", line 275, in start
    yield from self.handle_request(message, payload)
  File "snare.py", line 184, in handle_request
    content, content_type, headers, status_code = await self.parse_tanner_response(request.path, event_result['response']['message']['detection'])
  File "snare.py", line 236, in parse_tanner_response
    content = await self.handle_html_content(content)
  File "snare.py", line 153, in handle_html_content
    href=self.dorks.pop(),
IndexError: pop from empty list

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.5/asyncio/tasks.py", line 241, in _step
    result = coro.throw(exc)
  File "/usr/local/lib/python3.5/dist-packages/aiohttp/server.py", line 325, in start
    yield from self.handle_error(500, message, None, exc)
TypeError: 'NoneType' object is not iterable

This occurred when I ran this command on httprint: httprint -h 127.0.0.1:8080 -s signatures.txt -P0

@mzfr
Copy link
Collaborator Author

mzfr commented Feb 10, 2018

The dorks.pop issue is occurring here because the dorks list is empty.

Even though there is a check to deal with the empty case, it won't work if the request times out as it did in this case.

@afeena
Copy link
Collaborator

afeena commented Feb 10, 2018

Thanks for the issue. Would you like to fix it?

@mzfr
Copy link
Collaborator Author

mzfr commented Feb 13, 2018

This is actually tanner's issue

@mzfr mzfr closed this as completed Feb 13, 2018
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