A fork of pappy proxy
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
799 B

9 years ago
import sys
{% include 'macroheader.py.template' %}
8 years ago
from pappyproxy.http import submit_requests
9 years ago
def run_macro(args):
# Get IDs of in-context requests
reqids = main_context_ids()
reqids.reverse() # Resubmit earliest first
# Iterate over each request and submit it
8 years ago
to_submit = []
9 years ago
for rid in reqids:
8 years ago
req = request_by_id(rid).copy()
9 years ago
8 years ago
###################
# Modify `req` here
9 years ago
8 years ago
req.tags.add('resubmit')
to_submit.append(req)
#############################
# Modify resubmit params here
submit_requests(to_submit,
mangle=False,
save=False,
save_in_mem=False,
unique_paths=False,
unique_paths_and_args=False,
)