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.
|
|
|
import sys
|
|
|
|
{% include 'macroheader.py.template' %}
|
|
|
|
from pappyproxy.http import submit_requests
|
|
|
|
|
|
|
|
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
|
|
|
|
to_submit = []
|
|
|
|
for rid in reqids:
|
|
|
|
req = request_by_id(rid).copy()
|
|
|
|
|
|
|
|
###################
|
|
|
|
# Modify `req` here
|
|
|
|
|
|
|
|
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,
|
|
|
|
)
|