Module Expr Str ImportFrom alias TryExcept body ImportFrom alias handlers ExceptHandler type NameLoad body ImportFrom alias ImportFrom alias alias FunctionDef arguments args defaults body Expr Str Assign NameStore Call NameLoad keyword Str Assign NameStore Call NameLoad NameLoad Str Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Num keyword Str keyword Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Num keyword Str keyword Str keyword Str keyword Num keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Num keyword Str keyword Str keyword Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Num keyword Str keyword Str keyword Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Num keyword Str keyword Str keyword Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Num keyword Str keyword Str keyword Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Num keyword Str keyword Str keyword Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Num keyword Str keyword Str keyword Str keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Num keyword Str keyword Str keyword Str keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad Str Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Num keyword Str keyword Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Num keyword Str keyword Str keyword Str keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Num keyword Str keyword Str keyword Str keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Num keyword Str keyword Str keyword Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Num keyword Str keyword Str keyword Str keyword Num keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Num keyword Str keyword Str keyword Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Num keyword Str keyword Str keyword Str keyword Num keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Num keyword Str keyword Str keyword Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Num keyword Str keyword Str keyword Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Num keyword Str keyword Str keyword Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Num keyword Str keyword Str keyword NameLoad keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Num keyword Str keyword Str keyword NameLoad keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Num keyword Str keyword Str keyword Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr NameLoad Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr If CompareLtE Call NameLoad NameLoad Num body Expr Call AttributeLoad NameLoad attr Str Assign NameStore SubscriptLoad NameLoad Index Num If CompareEq NameLoad Str body If UnaryOpNot AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Str If CompareEq AttributeLoad NameLoad attr Str body Print Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse If CompareEq NameLoad Str body If UnaryOpNot AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Str Assign NameStore IfExp CompareIn Str AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Call NameLoad BinOpAdd Str AttributeLoad NameLoad attr If CompareEq AttributeLoad NameLoad attr Str body AugAssignAdd AttributeStore NameLoad attr Str Assign NameStore Call NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad orelse If CompareEq NameLoad Str body Expr Call AttributeLoad NameLoad attr orelse If CompareEq NameLoad Str body Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults body Expr Call NameLoad decorator_list
N/A N/A 
The MIT License

Copyright (c) 2010 The Chicago Tribune & Contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
 N/A bees N/A N/A urllib.parse urlparse N/A N/A N/A ImportError N/A urlparse urlparse optparse OptionParser OptionGroup parse_options N/A N/A N/A N/A N/A 
    Handle the command line arguments for spinning up bees
     N/A parser N/A OptionParser usage 
bees COMMAND [options]

Bees with Machine Guns

A utility for arming (creating) many bees (small EC2 instances) to attack
(load test) targets (web applications).

commands:
  up      Start a batch of load testing servers.
  attack  Begin the attack on a specific url.
  down    Shutdown and deactivate the load testing servers.
  report  Report the status of the load testing servers.
     N/A up_group N/A OptionGroup parser up In order to spin up new servers you will need to specify at least the -k command, which is the name of the EC2 keypair to use for creating and connecting to the new servers. The bees will expect to find a .pem file with this name in ~/.ssh/. Alternatively, bees can use SSH Agent for the key. N/A N/A N/A up_group add_option -k --key metavar KEY nargs 1 action store dest key type string help The ssh key pair name to use to connect to the new servers. N/A N/A N/A up_group add_option -s --servers metavar SERVERS nargs 1 action store dest servers type int default 5 help The number of servers to start (default: 5). N/A N/A N/A up_group add_option -g --group metavar GROUP nargs 1 action store dest group type string default default help The security group(s) to run the instances under (default: default). N/A N/A N/A up_group add_option -z --zone metavar ZONE nargs 1 action store dest zone type string default us-east-1d help The availability zone to start the instances in (default: us-east-1d). N/A N/A N/A up_group add_option -i --instance metavar INSTANCE nargs 1 action store dest instance type string default ami-ff17fb96 help The instance-id to use for each server from (default: ami-ff17fb96). N/A N/A N/A up_group add_option -t --type metavar TYPE nargs 1 action store dest type type string default t1.micro help The instance-type to use for each server (default: t1.micro). N/A N/A N/A up_group add_option -l --login metavar LOGIN nargs 1 action store dest login type string default newsapps help The ssh username name to use to connect to the new servers (default: newsapps). N/A N/A N/A up_group add_option -v --subnet metavar SUBNET nargs 1 action store dest subnet type string default None help The vpc subnet id in which the instances should be launched. (default: None). N/A N/A N/A up_group add_option -b --bid metavar BID nargs 1 action store dest bid type float default None help The maximum bid price per spot instance (default: None). N/A N/A N/A parser add_option_group up_group N/A attack_group N/A OptionGroup parser attack Beginning an attack requires only that you specify the -u option with the URL you wish to target. N/A N/A N/A attack_group add_option -u --url metavar URL nargs 1 action store dest url type string help URL of the target to attack. N/A N/A N/A attack_group add_option -K --keepalive metavar KEEP_ALIVE nargs 0 action store dest keep_alive type string default False help Keep-Alive connection. N/A N/A N/A attack_group add_option -p --post-file metavar POST_FILE nargs 1 action store dest post_file type string default False help The POST file to deliver with the bee's payload. N/A N/A N/A attack_group add_option -m --mime-type metavar MIME_TYPE nargs 1 action store dest mime_type type string default text/plain help The MIME type to send with the request. N/A N/A N/A attack_group add_option -n --number metavar NUMBER nargs 1 action store dest number type int default 1000 help The number of total connections to make to the target (default: 1000). N/A N/A N/A attack_group add_option -C --cookies metavar COOKIES nargs 1 action store dest cookies type string default help Cookies to send during http requests. The cookies should be passed using standard cookie formatting, separated by semi-colons and assigned with equals signs. N/A N/A N/A attack_group add_option -c --concurrent metavar CONCURRENT nargs 1 action store dest concurrent type int default 100 help The number of concurrent connections to make to the target (default: 100). N/A N/A N/A 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 N/A N/A N/A 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: ''). N/A N/A N/A attack_group add_option -P --contenttype metavar CONTENTTYPE nargs 1 action store dest contenttype type string default text/plain help ContentType header to send to the target of the attack. N/A N/A N/A attack_group add_option -T --tpr metavar TPR nargs 1 action store dest tpr default None type float help The upper bounds for time per request. If this option is passed and the target is below the value a 1 will be returned with the report details (default: None). N/A N/A N/A attack_group add_option -R --rps metavar RPS nargs 1 action store dest rps default None type float help The lower bounds for request per second. If this option is passed and the target is above the value a 1 will be returned with the report details (default: None). N/A N/A N/A attack_group add_option -A --basic_auth metavar basic_auth nargs 1 action store dest basic_auth default type string help BASIC authentication credentials, format auth-username:password (default: None). N/A N/A N/A parser add_option_group attack_group N/A N/A options args N/A N/A parser parse_args N/A N/A N/A len args 0 N/A N/A N/A N/A parser error Please enter a command. N/A command N/A args N/A 0 N/A N/A command up N/A N/A N/A N/A options key N/A N/A N/A N/A parser error To spin up new instances you need to specify a key-pair name with -k N/A N/A N/A options group default N/A N/A New bees will use the "default" EC2 security group. Please note that port 22 (SSH) is not normally open on this group. You will need to use to the EC2 tools to open it before you will be able to attack. N/A N/A N/A bees up N/A options servers N/A options group N/A options zone N/A options instance N/A options type N/A options login N/A options key N/A options subnet N/A options bid N/A N/A N/A command attack N/A N/A N/A N/A options url N/A N/A N/A N/A parser error To run an attack you need to specify a url with -u N/A parsed N/A N/A :// N/A options url N/A urlparse N/A options url N/A urlparse N/A http:// N/A options url N/A N/A N/A parsed path N/A N/A N/A options url / N/A additional_options N/A dict cookies N/A options cookies headers N/A options headers post_file N/A options post_file keep_alive N/A options keep_alive mime_type N/A options mime_type csv_filename N/A options csv_filename tpr N/A options tpr rps N/A options rps basic_auth N/A options basic_auth contenttype N/A options contenttype N/A N/A N/A bees attack N/A options url N/A options number N/A options concurrent additional_options N/A N/A N/A command down N/A N/A N/A N/A bees down N/A N/A N/A command report N/A N/A N/A N/A bees report N/A main N/A N/A N/A N/A N/A N/A parse_options N/A