codekingpro/portable-devtools
115k
1from collections.abc import Sequence2 3from mitmproxy import command4from mitmproxy import ctx5from mitmproxy import flow6from mitmproxy.hooks import UpdateHook7 8 9class Comment:10 @command.command("flow.comment")11 def comment(self, flow: Sequence[flow.Flow], comment: str) -> None:12 "Add a comment to a flow"13 14 updated = []15 for f in flow:16 f.comment = comment17 updated.append(f)18 19 ctx.master.addons.trigger(UpdateHook(updated))20 