我嘗試使用 mitmdump 和 python 腳本捕獲 Android 應用程式上的請求,但是 mitmdump 似乎很容易被阻止并拋出以下錯誤:
Traceback (most recent call last):
File "D:\Python\Python39\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "D:\Python\Python39\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "D:\Python\Python39\Scripts\mitmdump.exe\__main__.py", line 7, in <module>
File "D:\Python\Python39\lib\site-packages\mitmproxy\tools\main.py", line 147, in mitmdump
m = run(dump.DumpMaster, cmdline.mitmdump, args, extra)
File "D:\Python\Python39\lib\site-packages\mitmproxy\tools\main.py", line 114, in run
master.run()
File "D:\Python\Python39\lib\site-packages\mitmproxy\master.py", line 81, in run
self.run_loop(loop.run_forever)
File "D:\Python\Python39\lib\site-packages\mitmproxy\master.py", line 64, in run_loop
self.shutdown()
File "D:\Python\Python39\lib\site-packages\mitmproxy\master.py", line 100, in shutdown
self.event_loop.run_until_complete(asyncio.wrap_future(ret))
File "D:\Python\Python39\lib\asyncio\base_events.py", line 629, in run_until_complete
self.run_forever()
File "D:\Python\Python39\lib\asyncio\base_events.py", line 596, in run_forever
self._run_once()
File "D:\Python\Python39\lib\asyncio\base_events.py", line 1854, in _run_once
event_list = self._selector.select(timeout)
File "D:\Python\Python39\lib\selectors.py", line 324, in select
r, w, _ = self._select(self._readers, self._writers, [], timeout)
File "D:\Python\Python39\lib\selectors.py", line 315, in _select
r, w, x = select.select(r, w, w, timeout)
ValueError: too many file descriptors in select()
mitmdump 服務器在 Windows 中運行。好像限制了mitmdump的并發,但是不知道怎么修改原始碼,有沒有大神可以分享一下?
uj5u.com熱心網友回復:
最新的開發版本(最終將是 8.0)在 Windows 上使用 ProactorEventLoop,它解決了這個問題。
現在,您可以擁有更少的并發連接,也可以升級到開發快照。
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/349264.html
