Stein van Broekhoven - Cloud People
Other tools were:
git clone https://gitlab.com/cloud-people/cpload.git
cd cpload
mkvenv || pip install --user -r requirements.txt
They’re defined in a python file called filters.py
you need 2 steps to add a filter
Write a function that expands this basic one:
def uri_editor(http_pool, url):
send_request(http_pool, url)
Add the function to the filter list
filters = {
'/magic/': magic_edit,
'api/v1/date': future,
'web': to_upper,
'': send_request
}
Turn all urls containing api
in to ALL CAPS
# ALL CAPS FOR ADDED DRAMA
def to_upper(http_pool, url):
"""URI TO UPPER"""
send_request(http_pool, str(url).upper())
filters = {
'api': to_upper,
'': send_request
}
input='/api/v2/lalala/happy/url?data=test'
request='/API/V2/LALALA/HAPPY/URL?DATA=TEST'
optional arguments:
-h, --help show this help message and exit
--urlfile URLFILE the cleaned up http log
--fromuri FROMURI base uri/hostname as in the log file, this is used to edit it to the destination uri.
--touri TOURI the uri/hostname you want to send the traffic to
--ratemin RATEMIN minimum req/hour
--ratemax RATEMAX maximum req/hour
--ramptime RAMPTIME ramp up time in hours
--duration DURATION total test duration in hours
--verbose Output all request results
--filters FILTERS the uri filters and rewrites file