Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions beeswithmachineguns/bees.py
Original file line number Diff line number Diff line change
Expand Up @@ -977,7 +977,7 @@ def _hurl_attack(params):
options += ' -H "%s"' % h.strip()

if params['contenttype'] is not '':
options += ' -H \"Content-Type : %s\"' % params['contenttype']
options += ' -H \"Content-Type: %s\"' % params['contenttype']

stdin, stdout, stderr = client.exec_command('mktemp')
# paramiko's read() returns bytes which need to be converted back to a str
Expand All @@ -992,13 +992,13 @@ def _hurl_attack(params):
pem_file_path=_get_pem_path(params['key_name'])
scpCommand = "scp -q -o 'StrictHostKeyChecking=no' -i %s %s %s@%s:~/" % (pem_file_path, params['post_file'], params['username'], params['instance_name'])
os.system(scpCommand)
options += ' -p ~/%s' % params['post_file']
options += ' -d @/home/%s/%s' % (params['username'], params['post_file'])

if params['cookies'] is not '':
options += ' -H \"Cookie: %s;\"' % params['cookies']

if params['basic_auth'] is not '':
options += ' -H \"Authorization : Basic %s\"' % params['basic_auth']
options += ' -H \"Authorization: Basic %s\"' % params['basic_auth']

if params['seconds']:
options += ' -l %d' % params['seconds']
Expand Down