Skip to content

Commit

Permalink
Merge pull request #192 from FliesLikeABrick/feature/bwmg-issue-191-a…
Browse files Browse the repository at this point in the history
…dd-ab-z-cipher-suite-option

Adds cipher suite option for newsapps/beeswithmachineguns #191, allow…
  • Loading branch information
cosmin committed Nov 16, 2017
2 parents 888489d + badf70d commit b59de1b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.textile
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,9 @@ Options:
should be passed using standard cookie formatting,
separated by semi-colons and assigned with equals
signs.
-Z CIPHERS, --ciphers=CIPHERS
Openssl SSL/TLS cipher name(s) to use for negotiation. Passed
directly to ab's -Z option. ab-only.
-c CONCURRENT, --concurrent=CONCURRENT
The number of concurrent connections to make to the
target (default: 100).
Expand Down
5 changes: 5 additions & 0 deletions beeswithmachineguns/bees.py
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,9 @@ def _attack(params):
else:
options += ' -C \"sessionid=NotARealSessionID\"'

if params['ciphers'] is not '':
options += ' -Z %s' % params['ciphers']

if params['basic_auth'] is not '':
options += ' -A %s' % params['basic_auth']

Expand Down Expand Up @@ -684,6 +687,7 @@ def attack(url, n, c, **options):
contenttype = options.get('contenttype', '')
csv_filename = options.get("csv_filename", '')
cookies = options.get('cookies', '')
ciphers = options.get('ciphers', '')
post_file = options.get('post_file', '')
keep_alive = options.get('keep_alive', False)
basic_auth = options.get('basic_auth', '')
Expand Down Expand Up @@ -750,6 +754,7 @@ def attack(url, n, c, **options):
'headers': headers,
'contenttype': contenttype,
'cookies': cookies,
'ciphers': ciphers,
'post_file': options.get('post_file'),
'keep_alive': options.get('keep_alive'),
'mime_type': options.get('mime_type', ''),
Expand Down
4 changes: 4 additions & 0 deletions beeswithmachineguns/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ def parse_options():
attack_group.add_option('-H', '--headers', metavar="HEADERS", nargs=1,
action='store', dest='headers', type='string', default='',
help="HTTP headers to send to the target to attack. Multiple headers should be separated by semi-colons, e.g header1:value1;header2:value2")
attack_group.add_option('-Z', '--ciphers', metavar="CIPHERS", nargs=1,
action='store', dest='ciphers', type='string', default='',
help="Openssl SSL/TLS cipher name(s) to use for negotiation. Passed directly to ab's -Z option. ab-only.")
attack_group.add_option('-e', '--csv', metavar="FILENAME", nargs=1,
action='store', dest='csv_filename', type='string', default='',
help="Store the distribution of results in a csv file for all completed bees (default: '').")
Expand Down Expand Up @@ -224,6 +227,7 @@ def parse_options():
options.url += '/'
additional_options = dict(
cookies=options.cookies,
ciphers=options.ciphers,
headers=options.headers,
post_file=options.post_file,
keep_alive=options.keep_alive,
Expand Down

0 comments on commit b59de1b

Please sign in to comment.