From 9638f0ca9d8eb9ff0be66a336ea11ea697e71905 Mon Sep 17 00:00:00 2001 From: Calvin Chan Date: Thu, 11 May 2017 15:50:17 -0400 Subject: [PATCH] Fixed Headers for hurl - Removed space between Header name and colon for Content-Type and Authorization - Fixed data file specifier for post file data --- beeswithmachineguns/bees.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/beeswithmachineguns/bees.py b/beeswithmachineguns/bees.py index 470c736..6a2fbae 100644 --- a/beeswithmachineguns/bees.py +++ b/beeswithmachineguns/bees.py @@ -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 @@ -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']