newsapps/beeswithmachineguns

AttributeError: 'module' object has no attribute '_create_unverified_context'

Closed this issue · 1 comments

vacri commented

In commit b12702 (2015-03-24) I can't attack at all with bees, due to a missing method.

The error is there whether I use ssl or not - in the example below, I'm using bee instances which have nothing listening on port 80 (ie: each bee localhost won't respond at all - ssl shouldn't matter). I get the same result regardless of where I attack, http, https, localhost-with-no-80...

this is with python 2.7.6, boto 2.36.0, paramiko 1.14.0

paul@edmund:~/s/beeswithmachineguns$ ./bees attack -n 1000 -c 100 -u localhost
Read 4 bees from the roster.
Connecting to the hive.
Assembling bees.
Each of 4 bees will fire 250 rounds, 25 at a time.
Stinging URL so it will be cached for the attack.
Traceback (most recent call last):
  File "./bees", line 6, in <module>
    main.main()
  File "/home/paul/s/beeswithmachineguns/beeswithmachineguns/main.py", line 174, in main
    parse_options()
  File "/home/paul/s/beeswithmachineguns/beeswithmachineguns/main.py", line 166, in parse_options
    bees.attack(options.url, options.number, options.concurrent, **additional_options)
  File "/home/paul/s/beeswithmachineguns/beeswithmachineguns/bees.py", line 595, in attack
    context = ssl._create_unverified_context()
AttributeError: 'module' object has no attribute '_create_unverified_context'

如果解决的?