Type error returned when starting attack
See original GitHub issueI have built a Docker container using Ubuntu and am seeing the following error when I direct my bees to attack.
root@005e10755623:/data# bees attack -n 10000 -c 250 -u https://host.redacted.com/api
Read 5 bees from the roster: us-east-1a
Connecting to the hive.
Assembling bees.
Each of 5 bees will fire 2000 rounds, 50 at a time.
Stinging URL sequentially so it will be cached for the attack.
Organizing the swarm.
Bee 0 is joining the swarm.
Bee 1 is joining the swarm.
Bee 2 is joining the swarm.
Bee 3 is joining the swarm.
Bee 4 is joining the swarm.
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)
File "/usr/local/lib/python2.7/dist-packages/beeswithmachineguns/bees.py", line 801, in attack
summarized_results = _summarize_results(results, params, csv_filename)
File "/usr/local/lib/python2.7/dist-packages/beeswithmachineguns/bees.py", line 543, in _summarize_results
complete_results = [r['complete_requests'] for r in summarized_results['complete_bees']]
TypeError: sequence index must be integer, not 'str'
I have tried this on my Mac, Centos, and Ubuntu. I have used several versions of Python - from 2.7.10 to 3.6.5 an each has given the same error.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:11
Top Results From Across the Web
How do handle Error return types in Typescript? - Stack Overflow
I have a function that can return either an object of type Person or an Error. I want to conditionally read the values...
Read more >Improper Error Handling - OWASP Foundation
One common security problem caused by improper error handling is the fail-open security check. All security mechanisms should deny access until specifically ...
Read more >Handling Notification Responses from APNs - Apple Developer
Check for errors returned by APNs. When failures occur, APNs reports an appropriate error back to your provider server. Use the error code...
Read more >CWE-209: Generation of Error Message Containing Sensitive ...
The sensitive information may be valuable information on its own (such as a password), or it may be useful for launching other, more...
Read more >Error occurs when you send or receive an email message in ...
Lists various error messages that you may receive when you send or receive email messages in Outlook ... Method 8: Start Outlook in...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Exception in thread Thread-1: Traceback (most recent call last): File “/usr/local/Cellar/python/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/threading.py”, line 916, in _bootstrap_inner self.run() File “/usr/local/Cellar/python/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/threading.py”, line 864, in run self._target(*self._args, **self._kwargs) File “/usr/local/lib/python3.6/site-packages/beeswithmachineguns/bees.py”, line 801, in attack summarized_results = _summarize_results(results, params, csv_filename) File “/usr/local/lib/python3.6/site-packages/beeswithmachineguns/bees.py”, line 543, in _summarize_results complete_results = [r[‘complete_requests’] for r in summarized_results[‘complete_bees’]] File “/usr/local/lib/python3.6/site-packages/beeswithmachineguns/bees.py”, line 543, in <listcomp> complete_results = [r[‘complete_requests’] for r in summarized_results[‘complete_bees’]] TypeError: ‘gaierror’ object is not subscriptable
A couple years late.
https://github.com/newsapps/beeswithmachineguns/blob/4b8783dc36d327ad95b711db39054d64bd718344/beeswithmachineguns/bees.py#L416
https://github.com/newsapps/beeswithmachineguns/blob/4b8783dc36d327ad95b711db39054d64bd718344/beeswithmachineguns/bees.py#L766
Paramiko tries to connect using eg.
ip-10-10-120-230.ec2.internal
. That doesn’t resolve to anything for me locally, my workaround is editing:to: