spaces, not tabs
This commit is contained in:
parent
c0a318566a
commit
ba149d90ad
|
@ -4,6 +4,7 @@ change_upstream_proxy.py Dynamically change the upstream proxy
|
|||
dns_spoofing.py Use mitmproxy in a DNS spoofing scenario.
|
||||
dup_and_replay.py Duplicates each request, changes it, and then replays the modified request.
|
||||
filt.py Use mitmproxy's filter expressions in your script.
|
||||
flowwriter.py Only write selected flows into a mitmproxy dumpfile.
|
||||
iframe_injector.py Inject configurable iframe into pages.
|
||||
modify_form.py Modify all form submissions to add a parameter.
|
||||
modify_querystring.py Modify all query strings to add a parameters.
|
||||
|
|
|
@ -1,17 +1,20 @@
|
|||
from libmproxy.flow import FlowWriter
|
||||
import random
|
||||
import sys
|
||||
|
||||
from libmproxy.flow import FlowWriter
|
||||
|
||||
|
||||
def start(context, argv):
|
||||
if len(argv) != 2:
|
||||
raise ValueError('Usage: -s "flowriter.py filename"')
|
||||
|
||||
if argv[1] == "-":
|
||||
f = sys.stdout
|
||||
f = sys.stdout
|
||||
else:
|
||||
f = open(argv[1], "wb")
|
||||
f = open(argv[1], "wb")
|
||||
context.flow_writer = FlowWriter(f)
|
||||
|
||||
|
||||
def response(context, flow):
|
||||
if random.choice([True, False]):
|
||||
context.flow_writer.add(flow)
|
||||
if random.choice([True, False]):
|
||||
context.flow_writer.add(flow)
|
Loading…
Reference in New Issue