bats3c / shad0w

A post exploitation framework designed to operate covertly on heavily monitored environments
https://blog.dylan.codes/shad0w/
MIT License
2.03k stars 323 forks source link

Response error in mirror #46

Closed HashtagMarkus closed 4 years ago

HashtagMarkus commented 4 years ago

While testing mirror mode I found an issue when using get_base_page with htmlonly set to False. The response tuple is in the wrong order return req.content, headers, req.status

which leads to

File "/usr/lib/python2/dist-packages/flask/app.py", line
1952, in full_dispatch_request return self.finalize_request(rv)
File "/usr/lib/python2/dist-packages/flask/app.py", line
1967, in finalize_request response = self.make_response(rv)
File "/usr/lib/python2/dist-packages/flask/app.py", line
2108, in make_response rv = self.response_class(rv, status=status, headers=headers)
File "/usr/lib/python2/dist-packages/werkzeug/wrappers/base_response.py", line
186, in __init__ self.headers = Headers(headers)
File "/usr/lib/python2/dist-packages/werkzeug/datastructures.py", line
957, in __init__ self.extend(defaults)
File "/usr/lib/python2/dist-packages/werkzeug/datastructures.py", line
1100, in extend for key, value in iter_multi_items(args[-1]):
    File "/usr/lib/python2/dist-packages/werkzeug/datastructures.py", line
53, in iter_multi_items for item in mapping:
    TypeError: 'int' object is not iterable

This is not a severe issue since it is not used on master. Already working on the fix

bats3c commented 4 years ago

Should be fixed now