mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-23 00:01:36 +00:00
Make mitmproxy handle invalid flow data gracefully.
This commit is contained in:
parent
40e9067b83
commit
9927ebad3e
@ -16,7 +16,7 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import sys, os.path
|
||||
from libmproxy import proxy, controller, console, utils
|
||||
from libmproxy import proxy, controller, console, utils, flow
|
||||
from libmproxy.version import VERSION
|
||||
from optparse import OptionParser, OptionGroup
|
||||
|
||||
@ -79,7 +79,12 @@ if __name__ == '__main__':
|
||||
m = console.ConsoleMaster(server, options)
|
||||
|
||||
for i in args:
|
||||
try:
|
||||
m.load_flows(i)
|
||||
except flow.FlowReadError, v:
|
||||
print >> sys.stderr, "mitmproxy:", v.args[0]
|
||||
sys.exit(1)
|
||||
|
||||
m.run()
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user