Changeset 131 for trunk/bin


Ignore:
Timestamp:
09/18/17 18:53:24 (7 years ago)
Author:
tim
Message:

minor annoyances

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bin/bletchley-http2py

    r118 r131  
    1919
    2020Copyright (C) 2011-2013 Virtual Security Research, LLC
    21 Copyright (C) 2014-2016 Blindspot Security LLC
     21Copyright (C) 2014-2017 Blindspot Security LLC
    2222Author: Timothy D. Morgan
    2323
     
    149149from bletchley import chosenct
    150150from bletchley.CBC import *
     151import urllib3
     152urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
    151153
    152154# TODO: ensure the host, port, and protocol settings are correct.
     
    217219    # These are useful for debugging, but once your response processing is working,
    218220    # remove them so it isn't so verbose.
    219     print(response.status_code)
    220     print(response.headers)
    221     print(repr(response.content))
    222 
     221    print(response.status_code, file=sys.stderr)
     222    print(response.headers, file=sys.stderr)
     223    print(repr(response.content), file=sys.stderr)
     224
     225    # You may need to return either true/false or a string/bytes object here
     226    # (which is derived from the response) depending on your test
    223227    return ret_val
    224228''')
     
    274278    # These are useful for debugging, but once your response processing is working,
    275279    # remove them so it isn't so verbose.
    276     print(response.status)
    277     print(response.getheaders())
    278     print(repr(response.read()))
     280    print(response.status, file=sys.stderr)
     281    print(response.getheaders(), file=sys.stderr)
     282    print(repr(response.read()), file=sys.stderr)
    279283
    280284    connection.close()
     285    # You may need to return either true/false or a string/bytes object here
     286    # (which is derived from the response) depending on your test
    281287    return ret_val
    282288''')
     
    289295# TODO: Use this to verify you get the response you expect. 
    290296#       Once everything is working, use the commented code below to conduct specific attacks.
    291 processResponse(ciphertext)
     297print(processResponse(ciphertext), file=sys.stderr)
    292298
    293299
Note: See TracChangeset for help on using the changeset viewer.