Version 0.2.11
This commit is contained in:
parent
9d274de709
commit
992edab315
17 changed files with 551 additions and 84 deletions
34
pappyproxy/templates/macro_resubmit.py.template
Normal file
34
pappyproxy/templates/macro_resubmit.py.template
Normal file
|
@ -0,0 +1,34 @@
|
|||
import sys
|
||||
{% include 'macroheader.py.template' %}
|
||||
|
||||
def run_macro(args):
|
||||
# Get IDs of in-context requests
|
||||
reqids = main_context_ids()
|
||||
reqids.reverse() # Resubmit earliest first
|
||||
reqs = []
|
||||
|
||||
# Create session jar (uncomment jar functions to use)
|
||||
#jar = Session() # Create a cookie jar
|
||||
|
||||
# Iterate over each request and submit it
|
||||
for rid in reqids:
|
||||
print rid,
|
||||
sys.stdout.flush()
|
||||
r = request_by_id(rid)
|
||||
r = r.copy()
|
||||
|
||||
#jar.apply_req(r) # Apply headers/cookies from the cookie jar
|
||||
|
||||
#####################
|
||||
# Modify request here
|
||||
|
||||
r.submit()
|
||||
#jar.save_rsp(r.response, save_all=True) # Update the cookie jar from the response
|
||||
|
||||
#r.save() # Save the request to the data file
|
||||
reqs.append(r)
|
||||
|
||||
print ''
|
||||
|
||||
# Store the requests in memory
|
||||
set_tag('resubmit', reqs)
|
Loading…
Add table
Add a link
Reference in a new issue