├── LICENSE ├── README.md ├── waf-bad-bot-blocking ├── .gitignore ├── Gruntfile.js ├── LICENSE.txt ├── README.md ├── dist │ └── aws-waf-bad-bot-blocking_0-1-0_latest.zip ├── function.js ├── package.json ├── templates │ ├── cloudformation │ │ └── cloudformation-deployment.json │ └── swagger │ │ └── swagger-api-gateway-integrations.json └── testing │ └── event.json ├── waf-block-bad-behaving ├── LICENSE ├── NOTICE.txt ├── README.md ├── block-bad-behaving-ips_template_createS3.json ├── block-bad-behaving-ips_template_optionalS3.json ├── parser.py └── parser.zip ├── waf-example-rules ├── LICENSE ├── NOTICE.txt ├── README.md └── us-east-1 │ ├── cfn_waf--master_1_v1.json │ ├── cfn_waf-byteheader_1_v1.json │ ├── cfn_waf-byteheader_2_v1.json │ ├── cfn_waf-byteuri_1_v1.json │ ├── cfn_waf-byteuri_2_v1.json │ ├── cfn_waf-ip_1_v1.json │ ├── cfn_waf-sample.zip │ ├── cfn_waf-size_1_v1.json │ ├── cfn_waf-sqli_1_v1.json │ ├── cfn_waf-webacl_1_v1.json │ └── cfn_waf-xss_1_v1.json ├── waf-owasp-top-10 ├── LICENSE ├── NOTICE.txt ├── README.md └── owasp_10_base.yml ├── waf-reactive-blacklist ├── README.md ├── access_log_sample.gz ├── parser.py ├── parser.zip └── waf_template.json ├── waf-reputation-lists ├── .gitignore ├── .vscode │ └── launch.json ├── LICENSE.txt ├── README.md ├── cloudformation.json └── lambda │ ├── LICENSE.txt │ ├── index.js │ ├── node_modules │ ├── async │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── dist │ │ │ ├── async.js │ │ │ └── async.min.js │ │ ├── lib │ │ │ └── async.js │ │ └── package.json │ ├── aws-sdk │ │ ├── .jshintrc │ │ ├── .npmignore │ │ ├── CONTRIBUTING.md │ │ ├── LICENSE.txt │ │ ├── NOTICE.txt │ │ ├── README.md │ │ ├── UPGRADING.md │ │ ├── apis │ │ │ ├── acm-2015-12-08.min.json │ │ │ ├── acm-2015-12-08.paginators.json │ │ │ ├── apigateway-2015-07-09.min.json │ │ │ ├── apigateway-2015-07-09.paginators.json │ │ │ ├── autoscaling-2011-01-01.min.json │ │ │ ├── autoscaling-2011-01-01.paginators.json │ │ │ ├── cloudformation-2010-05-15.min.json │ │ │ ├── cloudformation-2010-05-15.paginators.json │ │ │ ├── cloudfront-2016-01-28.min.json │ │ │ ├── cloudfront-2016-01-28.paginators.json │ │ │ ├── cloudfront-2016-01-28.waiters.json │ │ │ ├── cloudhsm-2014-05-30.min.json │ │ │ ├── cloudsearch-2011-02-01.min.json │ │ │ ├── cloudsearch-2011-02-01.paginators.json │ │ │ ├── cloudsearch-2013-01-01.min.json │ │ │ ├── cloudsearch-2013-01-01.paginators.json │ │ │ ├── cloudsearchdomain-2013-01-01.min.json │ │ │ ├── cloudtrail-2013-11-01.min.json │ │ │ ├── cloudtrail-2013-11-01.paginators.json │ │ │ ├── codecommit-2015-04-13.min.json │ │ │ ├── codecommit-2015-04-13.paginators.json │ │ │ ├── codedeploy-2014-10-06.min.json │ │ │ ├── codepipeline-2015-07-09.min.json │ │ │ ├── cognito-identity-2014-06-30.min.json │ │ │ ├── cognito-sync-2014-06-30.min.json │ │ │ ├── config-2014-11-12.min.json │ │ │ ├── config-2014-11-12.paginators.json │ │ │ ├── datapipeline-2012-10-29.min.json │ │ │ ├── datapipeline-2012-10-29.paginators.json │ │ │ ├── devicefarm-2015-06-23.min.json │ │ │ ├── devicefarm-2015-06-23.paginators.json │ │ │ ├── directconnect-2012-10-25.min.json │ │ │ ├── directconnect-2012-10-25.paginators.json │ │ │ ├── ds-2015-04-16.min.json │ │ │ ├── dynamodb-2011-12-05.min.json │ │ │ ├── dynamodb-2011-12-05.paginators.json │ │ │ ├── dynamodb-2011-12-05.waiters.json │ │ │ ├── dynamodb-2012-08-10.min.json │ │ │ ├── dynamodb-2012-08-10.paginators.json │ │ │ ├── dynamodb-2012-08-10.waiters.json │ │ │ ├── ec2-2015-10-01.min.json │ │ │ ├── ec2-2015-10-01.paginators.json │ │ │ ├── ec2-2015-10-01.waiters.json │ │ │ ├── ecr-2015-09-21.min.json │ │ │ ├── ecs-2014-11-13.min.json │ │ │ ├── ecs-2014-11-13.paginators.json │ │ │ ├── elasticache-2015-02-02.min.json │ │ │ ├── elasticache-2015-02-02.paginators.json │ │ │ ├── elasticbeanstalk-2010-12-01.min.json │ │ │ ├── elasticbeanstalk-2010-12-01.paginators.json │ │ │ ├── elasticfilesystem-2015-02-01.min.json │ │ │ ├── elasticloadbalancing-2012-06-01.min.json │ │ │ ├── elasticloadbalancing-2012-06-01.paginators.json │ │ │ ├── elasticmapreduce-2009-03-31.min.json │ │ │ ├── elasticmapreduce-2009-03-31.paginators.json │ │ │ ├── elastictranscoder-2012-09-25.min.json │ │ │ ├── elastictranscoder-2012-09-25.paginators.json │ │ │ ├── elastictranscoder-2012-09-25.waiters.json │ │ │ ├── email-2010-12-01.min.json │ │ │ ├── email-2010-12-01.paginators.json │ │ │ ├── email-2010-12-01.waiters.json │ │ │ ├── es-2015-01-01.min.json │ │ │ ├── events-2014-02-03.min.json │ │ │ ├── firehose-2015-08-04.min.json │ │ │ ├── glacier-2012-06-01.min.json │ │ │ ├── glacier-2012-06-01.paginators.json │ │ │ ├── glacier-2012-06-01.waiters.json │ │ │ ├── iam-2010-05-08.min.json │ │ │ ├── iam-2010-05-08.paginators.json │ │ │ ├── importexport-2010-06-01.min.json │ │ │ ├── importexport-2010-06-01.paginators.json │ │ │ ├── inspector-2015-08-18.min.json │ │ │ ├── iot-2015-05-28.min.json │ │ │ ├── iot-data-2015-05-28.min.json │ │ │ ├── kinesis-2013-12-02.min.json │ │ │ ├── kinesis-2013-12-02.paginators.json │ │ │ ├── kms-2014-11-01.min.json │ │ │ ├── kms-2014-11-01.paginators.json │ │ │ ├── lambda-2014-11-11.min.json │ │ │ ├── lambda-2014-11-11.paginators.json │ │ │ ├── lambda-2015-03-31.min.json │ │ │ ├── lambda-2015-03-31.paginators.json │ │ │ ├── logs-2014-03-28.min.json │ │ │ ├── logs-2014-03-28.paginators.json │ │ │ ├── machinelearning-2014-12-12.min.json │ │ │ ├── machinelearning-2014-12-12.paginators.json │ │ │ ├── marketplacecommerceanalytics-2015-07-01.min.json │ │ │ ├── metadata.json │ │ │ ├── mobileanalytics-2014-06-05.min.json │ │ │ ├── monitoring-2010-08-01.min.json │ │ │ ├── monitoring-2010-08-01.paginators.json │ │ │ ├── opsworks-2013-02-18.min.json │ │ │ ├── opsworks-2013-02-18.paginators.json │ │ │ ├── rds-2013-01-10.min.json │ │ │ ├── rds-2013-01-10.paginators.json │ │ │ ├── rds-2013-02-12.min.json │ │ │ ├── rds-2013-02-12.paginators.json │ │ │ ├── rds-2013-09-09.min.json │ │ │ ├── rds-2013-09-09.paginators.json │ │ │ ├── rds-2013-09-09.waiters.json │ │ │ ├── rds-2014-10-31.min.json │ │ │ ├── rds-2014-10-31.paginators.json │ │ │ ├── rds-2014-10-31.waiters.json │ │ │ ├── redshift-2012-12-01.min.json │ │ │ ├── redshift-2012-12-01.paginators.json │ │ │ ├── redshift-2012-12-01.waiters.json │ │ │ ├── route53-2013-04-01.min.json │ │ │ ├── route53-2013-04-01.paginators.json │ │ │ ├── route53domains-2014-05-15.min.json │ │ │ ├── route53domains-2014-05-15.paginators.json │ │ │ ├── s3-2006-03-01.min.json │ │ │ ├── s3-2006-03-01.paginators.json │ │ │ ├── s3-2006-03-01.waiters.json │ │ │ ├── sdb-2009-04-15.min.json │ │ │ ├── sdb-2009-04-15.paginators.json │ │ │ ├── sns-2010-03-31.min.json │ │ │ ├── sns-2010-03-31.paginators.json │ │ │ ├── sqs-2012-11-05.examples.json │ │ │ ├── sqs-2012-11-05.min.json │ │ │ ├── sqs-2012-11-05.paginators.json │ │ │ ├── ssm-2014-11-06.min.json │ │ │ ├── ssm-2014-11-06.paginators.json │ │ │ ├── storagegateway-2013-06-30.min.json │ │ │ ├── storagegateway-2013-06-30.paginators.json │ │ │ ├── streams.dynamodb-2012-08-10.min.json │ │ │ ├── sts-2011-06-15.min.json │ │ │ ├── support-2013-04-15.min.json │ │ │ ├── support-2013-04-15.paginators.json │ │ │ ├── swf-2012-01-25.min.json │ │ │ ├── swf-2012-01-25.paginators.json │ │ │ ├── waf-2015-08-24.min.json │ │ │ ├── workspaces-2015-04-08.min.json │ │ │ └── workspaces-2015-04-08.paginators.json │ │ ├── bower.json │ │ ├── dist-tools │ │ │ ├── browser-builder.js │ │ │ ├── service-collector.js │ │ │ └── transform.js │ │ ├── dist │ │ │ ├── BUNDLE_LICENSE.txt │ │ │ ├── aws-sdk.js │ │ │ └── aws-sdk.min.js │ │ ├── index.js │ │ ├── lib │ │ │ ├── api_loader.js │ │ │ ├── aws.js │ │ │ ├── browser.js │ │ │ ├── cloudfront │ │ │ │ └── signer.js │ │ │ ├── config.js │ │ │ ├── core.js │ │ │ ├── credentials.js │ │ │ ├── credentials │ │ │ │ ├── cognito_identity_credentials.js │ │ │ │ ├── credential_provider_chain.js │ │ │ │ ├── ec2_metadata_credentials.js │ │ │ │ ├── environment_credentials.js │ │ │ │ ├── file_system_credentials.js │ │ │ │ ├── saml_credentials.js │ │ │ │ ├── shared_ini_file_credentials.js │ │ │ │ ├── temporary_credentials.js │ │ │ │ └── web_identity_credentials.js │ │ │ ├── dynamodb │ │ │ │ ├── converter.js │ │ │ │ ├── document_client.js │ │ │ │ ├── set.js │ │ │ │ ├── translator.js │ │ │ │ └── types.js │ │ │ ├── event_listeners.js │ │ │ ├── http.js │ │ │ ├── http │ │ │ │ ├── node.js │ │ │ │ └── xhr.js │ │ │ ├── json │ │ │ │ ├── builder.js │ │ │ │ └── parser.js │ │ │ ├── metadata_service.js │ │ │ ├── model │ │ │ │ ├── api.js │ │ │ │ ├── collection.js │ │ │ │ ├── operation.js │ │ │ │ ├── paginator.js │ │ │ │ ├── resource_waiter.js │ │ │ │ └── shape.js │ │ │ ├── param_validator.js │ │ │ ├── protocol │ │ │ │ ├── json.js │ │ │ │ ├── query.js │ │ │ │ ├── rest.js │ │ │ │ ├── rest_json.js │ │ │ │ └── rest_xml.js │ │ │ ├── query │ │ │ │ └── query_param_serializer.js │ │ │ ├── region_config.js │ │ │ ├── region_config.json │ │ │ ├── request.js │ │ │ ├── resource_waiter.js │ │ │ ├── response.js │ │ │ ├── s3 │ │ │ │ └── managed_upload.js │ │ │ ├── sequential_executor.js │ │ │ ├── service.js │ │ │ ├── services.js │ │ │ ├── services │ │ │ │ ├── apigateway.js │ │ │ │ ├── cloudfront.js │ │ │ │ ├── cloudsearchdomain.js │ │ │ │ ├── cognitoidentity.js │ │ │ │ ├── dynamodb.js │ │ │ │ ├── ec2.js │ │ │ │ ├── glacier.js │ │ │ │ ├── iotdata.js │ │ │ │ ├── machinelearning.js │ │ │ │ ├── route53.js │ │ │ │ ├── s3.js │ │ │ │ ├── sqs.js │ │ │ │ ├── sts.js │ │ │ │ └── swf.js │ │ │ ├── signers │ │ │ │ ├── presign.js │ │ │ │ ├── request_signer.js │ │ │ │ ├── s3.js │ │ │ │ ├── v2.js │ │ │ │ ├── v3.js │ │ │ │ ├── v3https.js │ │ │ │ └── v4.js │ │ │ ├── state_machine.js │ │ │ ├── util.js │ │ │ └── xml │ │ │ │ ├── browser_parser.js │ │ │ │ ├── builder.js │ │ │ │ └── node_parser.js │ │ ├── package.json │ │ ├── scripts │ │ │ ├── console │ │ │ ├── lib │ │ │ │ └── translator.js │ │ │ └── translate-api │ │ └── testem.json │ ├── sax │ │ ├── AUTHORS │ │ ├── LICENSE │ │ ├── LICENSE-W3C.html │ │ ├── README.md │ │ ├── component.json │ │ ├── examples │ │ │ ├── big-not-pretty.xml │ │ │ ├── example.js │ │ │ ├── get-products.js │ │ │ ├── hello-world.js │ │ │ ├── not-pretty.xml │ │ │ ├── pretty-print.js │ │ │ ├── shopping.xml │ │ │ ├── strict.dtd │ │ │ ├── test.html │ │ │ └── test.xml │ │ ├── lib │ │ │ └── sax.js │ │ ├── package.json │ │ └── test │ │ │ ├── attribute-name.js │ │ │ ├── buffer-overrun.js │ │ │ ├── case.js │ │ │ ├── cdata-chunked.js │ │ │ ├── cdata-end-split.js │ │ │ ├── cdata-fake-end.js │ │ │ ├── cdata-multiple.js │ │ │ ├── cdata.js │ │ │ ├── cyrillic.js │ │ │ ├── duplicate-attribute.js │ │ │ ├── entities.js │ │ │ ├── entity-mega.js │ │ │ ├── index.js │ │ │ ├── issue-23.js │ │ │ ├── issue-30.js │ │ │ ├── issue-35.js │ │ │ ├── issue-47.js │ │ │ ├── issue-49.js │ │ │ ├── issue-84.js │ │ │ ├── parser-position.js │ │ │ ├── script-close-better.js │ │ │ ├── script.js │ │ │ ├── self-closing-child-strict.js │ │ │ ├── self-closing-child.js │ │ │ ├── self-closing-tag.js │ │ │ ├── stray-ending.js │ │ │ ├── trailing-attribute-no-value.js │ │ │ ├── trailing-non-whitespace.js │ │ │ ├── unclosed-root.js │ │ │ ├── unquoted.js │ │ │ ├── xmlns-issue-41.js │ │ │ ├── xmlns-rebinding.js │ │ │ ├── xmlns-strict.js │ │ │ ├── xmlns-unbound.js │ │ │ ├── xmlns-xml-default-ns.js │ │ │ ├── xmlns-xml-default-prefix-attribute.js │ │ │ ├── xmlns-xml-default-prefix.js │ │ │ └── xmlns-xml-default-redefine.js │ ├── xml2js │ │ ├── .npmignore │ │ ├── .travis.yml │ │ ├── 83.coffee │ │ ├── LICENSE │ │ ├── README.md │ │ ├── canon.xml │ │ ├── lib │ │ │ └── xml2js.js │ │ ├── package.json │ │ ├── text.coffee │ │ └── text.xml │ └── xmlbuilder │ │ ├── .npmignore │ │ ├── README.md │ │ ├── lib │ │ ├── XMLBuilder.js │ │ ├── XMLFragment.js │ │ └── index.js │ │ └── package.json │ └── package.json └── waf-tor-blocking ├── .gitignore ├── README.md ├── cloudformation.json └── lambda ├── .gitignore ├── LICENSE.txt ├── index.js └── package.json /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software is furnished to do so. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 10 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 11 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 12 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 13 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 14 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 15 | -------------------------------------------------------------------------------- /waf-bad-bot-blocking/.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules/ 2 | **/node_modules/ 3 | /bin/ 4 | /tmp/ 5 | *.lock 6 | -------------------------------------------------------------------------------- /waf-bad-bot-blocking/Gruntfile.js: -------------------------------------------------------------------------------- 1 | /* 2 | // Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | // SPDX-License-Identifier: MIT-0. 4 | */ 5 | 6 | /*jslint node: true */ 7 | "use strict"; 8 | 9 | // init Grunt 10 | var grunt = require('grunt'); 11 | 12 | // load modules 13 | grunt.loadNpmTasks('grunt-aws-lambda'); 14 | 15 | // define configuration 16 | grunt.initConfig({ 17 | pkg: grunt.file.readJSON('package.json'), 18 | lambda_invoke: { 19 | default: { 20 | options: { 21 | file_name: 'function.js', 22 | handler: 'handler', 23 | event: 'testing/event.json' 24 | } 25 | } 26 | }, 27 | lambda_package: { 28 | default: { 29 | options: { 30 | include_files: [], 31 | include_time: false, 32 | package_folder: './', 33 | dist_folder: 'dist', 34 | } 35 | } 36 | } 37 | }); 38 | -------------------------------------------------------------------------------- /waf-bad-bot-blocking/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software is furnished to do so. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 10 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 11 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 12 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 13 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 14 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 15 | -------------------------------------------------------------------------------- /waf-bad-bot-blocking/README.md: -------------------------------------------------------------------------------- 1 | # waf-bad-bot-blocking 2 | > **NOTE**: This solution has been integrated into the [AWS WAF Security Automations](https://aws.amazon.com/answers/security/aws-waf-security-automations/), and is now maintained in that repository: [https://github.com/awslabs/aws-waf-security-automations](https://github.com/awslabs/aws-waf-security-automations). 3 | > Please refer suggestions for improvement to that repository. 4 | 5 | A solution for detecting bad bots and content scrapers and blocking their access. The detector relies on a honeypot URL. This is usually a piece of content that good actors know their not supposed to access, either because it's disallowed by the robots.txt file, or the link to it is hidden from human viewers. An Amazon API Gateway endpoint maps to the honeypot URL and triggers a AWS Lambda function once a request is received. The Lambda function then adds the source IP address of the request to a blacklist implemented using AWS WAF (a web application firewall that protects any application deployed on Amazon CloudFront content delivery service). The AWS Lambda function also issues an Amazon SNS notification on a topic you can subscribe to, and receive notifications anytime IPs are added to the blacklist. 6 | 7 | *** 8 | 9 | Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 10 | SPDX-License-Identifier: MIT-0 11 | -------------------------------------------------------------------------------- /waf-bad-bot-blocking/dist/aws-waf-bad-bot-blocking_0-1-0_latest.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amazon-archives/aws-waf-sample/815ebf014da7593002382a1f73b41efe1e5172ab/waf-bad-bot-blocking/dist/aws-waf-bad-bot-blocking_0-1-0_latest.zip -------------------------------------------------------------------------------- /waf-bad-bot-blocking/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "aws-waf-bad-bot-blocking", 3 | "version": "0.1.0", 4 | "description": "Blacklist an IP address hitting a honeypot URL using the AWS WAF service", 5 | "main": "function.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "repository": {}, 10 | "dependencies": { 11 | "async": "^1.5.2", 12 | "validator": "^4.5.2" 13 | }, 14 | "devDependencies": { 15 | "aws-sdk": "latest", 16 | "grunt": "latest", 17 | "grunt-pack": "latest", 18 | "grunt-aws-lambda": "latest", 19 | "npm": "latest" 20 | }, 21 | "bundledDependencies": [ 22 | "async", 23 | "validator" 24 | ], 25 | "author": "Vlad Vlasceanu", 26 | "license": "SEE LICENSE IN LICENSE.txt" 27 | } 28 | -------------------------------------------------------------------------------- /waf-bad-bot-blocking/testing/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "forwardedIps": "127.0.0.1, 172.91.235.252, 54.19.34.96", 3 | "viewerCountry": "US", 4 | "isDesktop": "true" 5 | } -------------------------------------------------------------------------------- /waf-block-bad-behaving/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software is furnished to do so. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 10 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 11 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 12 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 13 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 14 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 15 | -------------------------------------------------------------------------------- /waf-block-bad-behaving/NOTICE.txt: -------------------------------------------------------------------------------- 1 | AWS WAF Sample 2 | Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | 4 | This product includes software developed by 5 | Amazon Technologies, Inc (http://www.amazon.com/). 6 | -------------------------------------------------------------------------------- /waf-block-bad-behaving/README.md: -------------------------------------------------------------------------------- 1 | # waf-block-bad-behaving 2 | > **NOTE**: This solution has been integrated into the [AWS WAF Security Automations](https://aws.amazon.com/answers/security/aws-waf-security-automations/), and is now maintained in that repository: [https://github.com/awslabs/aws-waf-security-automations](https://github.com/awslabs/aws-waf-security-automations). 3 | > Please refer suggestions for improvement to that repository. 4 | 5 | A solution that automatically parses CloudFront access logs as they are delivered to Amazon S3 by using Lambda, counts the number of bad requests from unique sources (IP addresses), and updates AWS WAF to block further requests from those IP addresses. A CloudFormation template is included that creates the web access control list (ACL), rule sets, Lambda function, and logging S3 bucket. 6 | Full blog post: http://blogs.aws.amazon.com/security/post/Tx223ZW25YRPRKV/How-to-Use-AWS-WAF-to-Block-IP-Addresses-That-Generate-Bad-Requests 7 | 8 | *** 9 | 10 | Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 11 | SPDX-License-Identifier: MIT-0 12 | -------------------------------------------------------------------------------- /waf-block-bad-behaving/parser.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amazon-archives/aws-waf-sample/815ebf014da7593002382a1f73b41efe1e5172ab/waf-block-bad-behaving/parser.zip -------------------------------------------------------------------------------- /waf-example-rules/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software is furnished to do so. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 10 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 11 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 12 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 13 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 14 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 15 | -------------------------------------------------------------------------------- /waf-example-rules/NOTICE.txt: -------------------------------------------------------------------------------- 1 | AWS WAF Sample 2 | Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | 4 | This product includes software developed by 5 | Amazon Technologies, Inc (http://www.amazon.com/). 6 | -------------------------------------------------------------------------------- /waf-example-rules/README.md: -------------------------------------------------------------------------------- 1 | # waf-example-rules 2 | > **NOTE**: This solution has been integrated into the [AWS WAF Security Automations](https://aws.amazon.com/answers/security/aws-waf-security-automations/), and is now maintained in that repository: [https://github.com/awslabs/aws-waf-security-automations](https://github.com/awslabs/aws-waf-security-automations). 3 | > Please refer suggestions for improvement to that repository. 4 | 5 | Full blog post: http://blogs.aws.amazon.com/security/ 6 | 7 | *** 8 | 9 | Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 10 | SPDX-License-Identifier: MIT-0 11 | -------------------------------------------------------------------------------- /waf-example-rules/us-east-1/cfn_waf-sample.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amazon-archives/aws-waf-sample/815ebf014da7593002382a1f73b41efe1e5172ab/waf-example-rules/us-east-1/cfn_waf-sample.zip -------------------------------------------------------------------------------- /waf-example-rules/us-east-1/cfn_waf-size_1_v1.json: -------------------------------------------------------------------------------- 1 | { 2 | "AWSTemplateFormatVersion": "2010-09-09", 3 | "Description": "AWS WAF Sample - Size Example Conditions and Rules 1", 4 | "Parameters": { 5 | "SizeRule1": { 6 | "Type": "String", 7 | "Default": "SizeRule1", 8 | "Description": "Enter the name of the size rule. Note names cannot be modified after creation and must be alphanumeric without spaces." 9 | }, 10 | "SizeCondition1": { 11 | "Type": "String", 12 | "Default": "SizeCondition1", 13 | "Description": "Enter the name of the size condition. Note names cannot be modified after creation and must be alphanumeric without spaces." 14 | }, 15 | "SizeURI1": { 16 | "Type": "String", 17 | "Default": "8192", 18 | "Description": "Enter the size limit of the URI." 19 | }, 20 | "SizeQuery1": { 21 | "Type": "String", 22 | "Default": "8192", 23 | "Description": "Enter the size limit of the query string." 24 | }, 25 | "WhiteListIPCondition1": { 26 | "Type": "String", 27 | "Description": "Enter the ID of the WhiteList IP condition 1." 28 | } 29 | }, 30 | "Resources": { 31 | "WAFSizeCondition1": { 32 | "Type": "AWS::WAF::SizeConstraintSet", 33 | "Properties": { 34 | "Name": { 35 | "Ref": "SizeCondition1" 36 | }, 37 | "SizeConstraints": [ 38 | { 39 | "FieldToMatch": { 40 | "Type": "QUERY_STRING" 41 | }, 42 | "ComparisonOperator": "GT", 43 | "Size": { 44 | "Ref": "SizeQuery1" 45 | }, 46 | "TextTransformation": "NONE" 47 | }, 48 | { 49 | "FieldToMatch": { 50 | "Type": "URI" 51 | }, 52 | "ComparisonOperator": "GT", 53 | "Size": { 54 | "Ref": "SizeURI1" 55 | }, 56 | "TextTransformation": "NONE" 57 | } 58 | ] 59 | } 60 | }, 61 | "WAFSizeRule1": { 62 | "Type": "AWS::WAF::Rule", 63 | "Properties": { 64 | "Name": { 65 | "Ref": "SizeRule1" 66 | }, 67 | "MetricName": { 68 | "Ref": "SizeRule1" 69 | }, 70 | "Predicates": [ 71 | { 72 | "DataId": { 73 | "Ref": "WAFSizeCondition1" 74 | }, 75 | "Negated": false, 76 | "Type": "SizeConstraint" 77 | }, 78 | { 79 | "DataId": { 80 | "Ref": "WhiteListIPCondition1" 81 | }, 82 | "Negated": true, 83 | "Type": "IPMatch" 84 | } 85 | ] 86 | } 87 | } 88 | }, 89 | "Outputs": { 90 | "WAFSizeCondition1ID": { 91 | "Description": "Size Condition ID 1", 92 | "Value": { 93 | "Ref": "WAFSizeCondition1" 94 | } 95 | }, 96 | "WAFSizeRule1ID": { 97 | "Description": "Size Rule ID 1", 98 | "Value": { 99 | "Ref": "WAFSizeRule1" 100 | } 101 | } 102 | } 103 | } -------------------------------------------------------------------------------- /waf-owasp-top-10/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software is furnished to do so. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 10 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 11 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 12 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 13 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 14 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 15 | -------------------------------------------------------------------------------- /waf-owasp-top-10/NOTICE.txt: -------------------------------------------------------------------------------- 1 | AWS WAF Sample 2 | Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | 4 | This product includes software developed by 5 | Amazon Technologies, Inc (http://www.amazon.com/). 6 | -------------------------------------------------------------------------------- /waf-owasp-top-10/README.md: -------------------------------------------------------------------------------- 1 | # waf-owasp-top-10 2 | This example AWS CloudFormation template contains an AWS WAF web access control list (ACL) and condition types and rules that illustrate various mitigations against application flaws described in the OWASP Top 10. However, note that this template is designed only as a starting point and may not provide sufficient protection to every workload. You should customize the template’s rules for each workload. For more information, please review the [Use AWS WAF to Mitigate OWASP's Top 10 Web Application Vulnerabilities](https://d0.awsstatic.com/whitepapers/Security/aws-waf-owasp.pdf) whitepaper. 3 | 4 | *** 5 | 6 | Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 7 | SPDX-License-Identifier: MIT-0 8 | -------------------------------------------------------------------------------- /waf-reactive-blacklist/README.md: -------------------------------------------------------------------------------- 1 | # waf-reactive-blacklist 2 | > **NOTE**: This solution has been integrated into the [AWS WAF Security Automations](https://aws.amazon.com/answers/security/aws-waf-security-automations/), and is now maintained in that repository: [https://github.com/awslabs/aws-waf-security-automations](https://github.com/awslabs/aws-waf-security-automations). 3 | > Please refer suggestions for improvement to that repository. 4 | 5 | A solution that automatically detects unwanted requests based on request rate, and then updates configurations of AWS WAF (a web application firewall that protects any application deployed on Amazon CloudFront content delivery service) to block subsequent requests from those users. This process is executed by a lambda function that processes application’s access log files in order to identify bad requesters. This function also exposes execution metrics in CloudWatch so you can monitor how many request entries were processed and the number of origins blocked. Finally, the solution also support that you manually add IP ranges that you want to block in advance like well know bot networks. 6 | 7 | *** 8 | 9 | Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 10 | SPDX-License-Identifier: MIT-0 11 | -------------------------------------------------------------------------------- /waf-reactive-blacklist/access_log_sample.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amazon-archives/aws-waf-sample/815ebf014da7593002382a1f73b41efe1e5172ab/waf-reactive-blacklist/access_log_sample.gz -------------------------------------------------------------------------------- /waf-reactive-blacklist/parser.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amazon-archives/aws-waf-sample/815ebf014da7593002382a1f73b41efe1e5172ab/waf-reactive-blacklist/parser.zip -------------------------------------------------------------------------------- /waf-reputation-lists/.gitignore: -------------------------------------------------------------------------------- 1 | deploy/* 2 | -------------------------------------------------------------------------------- /waf-reputation-lists/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2.0", 3 | "configurations": [ 4 | { 5 | "name": "Launch", 6 | "type": "node", 7 | "request": "launch", 8 | "program": "./test.js", 9 | "stopOnEntry": false, 10 | "args": [], 11 | "cwd": ".", 12 | "runtimeExecutable": null, 13 | "runtimeArgs": [ 14 | "--nolazy" 15 | ], 16 | "env": { 17 | "NODE_ENV": "development" 18 | }, 19 | "externalConsole": false, 20 | "sourceMaps": false, 21 | "outDir": null 22 | }, 23 | { 24 | "name": "Attach", 25 | "type": "node", 26 | "request": "attach", 27 | "port": 5858 28 | } 29 | ] 30 | } -------------------------------------------------------------------------------- /waf-reputation-lists/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software is furnished to do so. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 10 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 11 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 12 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 13 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 14 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 15 | -------------------------------------------------------------------------------- /waf-reputation-lists/README.md: -------------------------------------------------------------------------------- 1 | # waf-reputation-lists 2 | > **NOTE**: This solution has been integrated into the [AWS WAF Security Automations](https://aws.amazon.com/answers/security/aws-waf-security-automations/), and is now maintained in that repository: [https://github.com/awslabs/aws-waf-security-automations](https://github.com/awslabs/aws-waf-security-automations). 3 | > Please refer suggestions for improvement to that repository. 4 | 5 | An AWS CloudFormation template that creates an AWS WAF Web ACL, Rules, and IP Sets, an AWS Lambda function and CloudWatch Scheduled Event. The Lambda function imports multiple IP reputation lists and updates AWS WAF IP Sets in order to deny access from the IP ranges defined in those lists. 6 | Amazon CloudWatch Scheduled Events is utilised to execute the function regularly in order to automate the update of the IP Sets as the lists are updated. 7 | 8 | Full blog post: https://aws.amazon.com/blogs/security/how-to-import-ip-address-reputation-lists-to-automatically-update-aws-waf-ip-blacklists/ 9 | 10 | The templates expects a "ReputationLists" parameter providing a JSON object defining the URLs to the lists 11 | 12 | ```json 13 | [ 14 | { 15 | "url": "https://www.spamhaus.org/drop/drop.txt" 16 | }, 17 | { 18 | "url": "https://check.torproject.org/exit-addresses", 19 | "prefix": "ExitAddress " 20 | }, 21 | { 22 | "url": "https://rules.emergingthreats.net/fwrules/emerging-Block-IPs.txt" 23 | } 24 | ] 25 | ``` 26 | 27 | *** 28 | 29 | Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 30 | SPDX-License-Identifier: MIT-0 31 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software is furnished to do so. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 10 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 11 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 12 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 13 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 14 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 15 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/async/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2010-2014 Caolan McMahon 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/.npmignore: -------------------------------------------------------------------------------- 1 | .yard* 2 | .eslintrc 3 | .travis.yml 4 | .gitignore 5 | apis/*.normal.json 6 | configuration 7 | configuration.sample 8 | coverage 9 | doc 10 | doc-src 11 | eslint-rules 12 | Gemfile 13 | Gemfile.lock 14 | features 15 | Rakefile 16 | test 17 | tasks 18 | vendor 19 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/NOTICE.txt: -------------------------------------------------------------------------------- 1 | AWS SDK for JavaScript 2 | Copyright 2012-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | 4 | This product includes software developed at 5 | Amazon Web Services, Inc. (http://aws.amazon.com/). 6 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/apis/acm-2015-12-08.paginators.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "ListCertificates": { 4 | "limit_key": "MaxItems", 5 | "input_token": "NextToken", 6 | "output_token": "NextToken", 7 | "result_key": "CertificateSummaryList" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/apis/apigateway-2015-07-09.paginators.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "GetApiKeys": { 4 | "input_token": "position", 5 | "output_token": "position", 6 | "limit_key": "limit", 7 | "result_key": "items" 8 | }, 9 | "GetBasePathMappings": { 10 | "input_token": "position", 11 | "output_token": "position", 12 | "limit_key": "limit", 13 | "result_key": "items" 14 | }, 15 | "GetClientCertificates": { 16 | "input_token": "position", 17 | "output_token": "position", 18 | "limit_key": "limit", 19 | "result_key": "items" 20 | }, 21 | "GetDeployments": { 22 | "input_token": "position", 23 | "output_token": "position", 24 | "limit_key": "limit", 25 | "result_key": "items" 26 | }, 27 | "GetDomainNames": { 28 | "input_token": "position", 29 | "output_token": "position", 30 | "limit_key": "limit", 31 | "result_key": "items" 32 | }, 33 | "GetModels": { 34 | "input_token": "position", 35 | "output_token": "position", 36 | "limit_key": "limit", 37 | "result_key": "items" 38 | }, 39 | "GetResources": { 40 | "input_token": "position", 41 | "output_token": "position", 42 | "limit_key": "limit", 43 | "result_key": "items" 44 | }, 45 | "GetRestApis": { 46 | "input_token": "position", 47 | "output_token": "position", 48 | "limit_key": "limit", 49 | "result_key": "items" 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/apis/autoscaling-2011-01-01.paginators.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "DescribeAutoScalingGroups": { 4 | "input_token": "NextToken", 5 | "output_token": "NextToken", 6 | "limit_key": "MaxRecords", 7 | "result_key": "AutoScalingGroups" 8 | }, 9 | "DescribeAutoScalingInstances": { 10 | "input_token": "NextToken", 11 | "output_token": "NextToken", 12 | "limit_key": "MaxRecords", 13 | "result_key": "AutoScalingInstances" 14 | }, 15 | "DescribeLaunchConfigurations": { 16 | "input_token": "NextToken", 17 | "output_token": "NextToken", 18 | "limit_key": "MaxRecords", 19 | "result_key": "LaunchConfigurations" 20 | }, 21 | "DescribeNotificationConfigurations": { 22 | "input_token": "NextToken", 23 | "output_token": "NextToken", 24 | "limit_key": "MaxRecords", 25 | "result_key": "NotificationConfigurations" 26 | }, 27 | "DescribePolicies": { 28 | "input_token": "NextToken", 29 | "output_token": "NextToken", 30 | "limit_key": "MaxRecords", 31 | "result_key": "ScalingPolicies" 32 | }, 33 | "DescribeScalingActivities": { 34 | "input_token": "NextToken", 35 | "output_token": "NextToken", 36 | "limit_key": "MaxRecords", 37 | "result_key": "Activities" 38 | }, 39 | "DescribeScheduledActions": { 40 | "input_token": "NextToken", 41 | "output_token": "NextToken", 42 | "limit_key": "MaxRecords", 43 | "result_key": "ScheduledUpdateGroupActions" 44 | }, 45 | "DescribeTags": { 46 | "input_token": "NextToken", 47 | "output_token": "NextToken", 48 | "limit_key": "MaxRecords", 49 | "result_key": "Tags" 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/apis/cloudformation-2010-05-15.paginators.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "DescribeStackEvents": { 4 | "input_token": "NextToken", 5 | "output_token": "NextToken", 6 | "result_key": "StackEvents" 7 | }, 8 | "DescribeStackResources": { 9 | "result_key": "StackResources" 10 | }, 11 | "DescribeStacks": { 12 | "input_token": "NextToken", 13 | "output_token": "NextToken", 14 | "result_key": "Stacks" 15 | }, 16 | "ListStackResources": { 17 | "input_token": "NextToken", 18 | "output_token": "NextToken", 19 | "result_key": "StackResourceSummaries" 20 | }, 21 | "ListStacks": { 22 | "input_token": "NextToken", 23 | "output_token": "NextToken", 24 | "result_key": "StackSummaries" 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/apis/cloudfront-2016-01-28.paginators.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "ListCloudFrontOriginAccessIdentities": { 4 | "input_token": "Marker", 5 | "output_token": "CloudFrontOriginAccessIdentityList.NextMarker", 6 | "limit_key": "MaxItems", 7 | "more_results": "CloudFrontOriginAccessIdentityList.IsTruncated", 8 | "result_key": "CloudFrontOriginAccessIdentityList.Items" 9 | }, 10 | "ListDistributions": { 11 | "input_token": "Marker", 12 | "output_token": "DistributionList.NextMarker", 13 | "limit_key": "MaxItems", 14 | "more_results": "DistributionList.IsTruncated", 15 | "result_key": "DistributionList.Items" 16 | }, 17 | "ListInvalidations": { 18 | "input_token": "Marker", 19 | "output_token": "InvalidationList.NextMarker", 20 | "limit_key": "MaxItems", 21 | "more_results": "InvalidationList.IsTruncated", 22 | "result_key": "InvalidationList.Items" 23 | }, 24 | "ListStreamingDistributions": { 25 | "input_token": "Marker", 26 | "output_token": "StreamingDistributionList.NextMarker", 27 | "limit_key": "MaxItems", 28 | "more_results": "StreamingDistributionList.IsTruncated", 29 | "result_key": "StreamingDistributionList.Items" 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/apis/cloudfront-2016-01-28.waiters.json: -------------------------------------------------------------------------------- 1 | { 2 | "waiters": { 3 | "__default__": { 4 | "success_type": "output", 5 | "success_path": "Status" 6 | }, 7 | "StreamingDistributionDeployed": { 8 | "operation": "GetStreamingDistribution", 9 | "description": "Wait until a streaming distribution is deployed.", 10 | "interval": 60, 11 | "max_attempts": 25, 12 | "success_value": "Deployed" 13 | }, 14 | "DistributionDeployed": { 15 | "operation": "GetDistribution", 16 | "description": "Wait until a distribution is deployed.", 17 | "interval": 60, 18 | "max_attempts": 25, 19 | "success_value": "Deployed" 20 | }, 21 | "InvalidationCompleted": { 22 | "operation": "GetInvalidation", 23 | "description": "Wait until an invalidation has completed.", 24 | "interval": 20, 25 | "max_attempts": 30, 26 | "success_value": "Completed" 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/apis/cloudsearch-2011-02-01.paginators.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "DescribeDomains": { 4 | "result_key": "DomainStatusList" 5 | }, 6 | "DescribeIndexFields": { 7 | "result_key": "IndexFields" 8 | }, 9 | "DescribeRankExpressions": { 10 | "result_key": "RankExpressions" 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/apis/cloudsearch-2013-01-01.paginators.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "DescribeAnalysisSchemes": { 4 | "result_key": "AnalysisSchemes" 5 | }, 6 | "DescribeDomains": { 7 | "result_key": "DomainStatusList" 8 | }, 9 | "DescribeExpressions": { 10 | "result_key": "Expressions" 11 | }, 12 | "DescribeIndexFields": { 13 | "result_key": "IndexFields" 14 | }, 15 | "DescribeSuggesters": { 16 | "result_key": "Suggesters" 17 | } 18 | } 19 | } 20 | 21 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/apis/cloudtrail-2013-11-01.paginators.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "DescribeTrails": { 4 | "result_key": "trailList" 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/apis/codecommit-2015-04-13.paginators.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "ListBranches": { 4 | "input_token": "nextToken", 5 | "output_token": "nextToken", 6 | "result_key": "branches" 7 | }, 8 | "ListRepositories": { 9 | "input_token": "nextToken", 10 | "output_token": "nextToken", 11 | "result_key": "repositories" 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/apis/config-2014-11-12.paginators.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "GetResourceConfigHistory": { 4 | "input_token": "nextToken", 5 | "output_token": "nextToken", 6 | "limit_key": "limit", 7 | "result_key": "configurationItems" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/apis/datapipeline-2012-10-29.paginators.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "ListPipelines": { 4 | "input_token": "marker", 5 | "output_token": "marker", 6 | "more_results": "hasMoreResults", 7 | "result_key": "pipelineIdList" 8 | }, 9 | "DescribeObjects": { 10 | "input_token": "marker", 11 | "output_token": "marker", 12 | "more_results": "hasMoreResults", 13 | "result_key": "pipelineObjects" 14 | }, 15 | "DescribePipelines": { 16 | "result_key": "pipelineDescriptionList" 17 | }, 18 | "QueryObjects": { 19 | "input_token": "marker", 20 | "output_token": "marker", 21 | "more_results": "hasMoreResults", 22 | "limit_key": "limit", 23 | "result_key": "ids" 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/apis/devicefarm-2015-06-23.paginators.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "ListArtifacts": { 4 | "input_token": "nextToken", 5 | "output_token": "nextToken", 6 | "result_key": "artifacts" 7 | }, 8 | "ListDevicePools": { 9 | "input_token": "nextToken", 10 | "output_token": "nextToken", 11 | "result_key": "devicePools" 12 | }, 13 | "ListDevices": { 14 | "input_token": "nextToken", 15 | "output_token": "nextToken", 16 | "result_key": "devices" 17 | }, 18 | "ListJobs": { 19 | "input_token": "nextToken", 20 | "output_token": "nextToken", 21 | "result_key": "jobs" 22 | }, 23 | "ListProjects": { 24 | "input_token": "nextToken", 25 | "output_token": "nextToken", 26 | "result_key": "projects" 27 | }, 28 | "ListRuns": { 29 | "input_token": "nextToken", 30 | "output_token": "nextToken", 31 | "result_key": "runs" 32 | }, 33 | "ListSamples": { 34 | "input_token": "nextToken", 35 | "output_token": "nextToken", 36 | "result_key": "samples" 37 | }, 38 | "ListSuites": { 39 | "input_token": "nextToken", 40 | "output_token": "nextToken", 41 | "result_key": "suites" 42 | }, 43 | "ListTests": { 44 | "input_token": "nextToken", 45 | "output_token": "nextToken", 46 | "result_key": "tests" 47 | }, 48 | "ListUniqueProblems": { 49 | "input_token": "nextToken", 50 | "output_token": "nextToken", 51 | "result_key": "uniqueProblems" 52 | }, 53 | "ListUploads": { 54 | "input_token": "nextToken", 55 | "output_token": "nextToken", 56 | "result_key": "uploads" 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/apis/directconnect-2012-10-25.paginators.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "DescribeConnections": { 4 | "result_key": "connections" 5 | }, 6 | "DescribeConnectionsOnInterconnect": { 7 | "result_key": "connections" 8 | }, 9 | "DescribeInterconnects": { 10 | "result_key": "interconnects" 11 | }, 12 | "DescribeLocations": { 13 | "result_key": "locations" 14 | }, 15 | "DescribeVirtualGateways": { 16 | "result_key": "virtualGateways" 17 | }, 18 | "DescribeVirtualInterfaces": { 19 | "result_key": "virtualInterfaces" 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/apis/dynamodb-2011-12-05.paginators.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "BatchGetItem": { 4 | "input_token": "RequestItems", 5 | "output_token": "UnprocessedKeys" 6 | }, 7 | "ListTables": { 8 | "input_token": "ExclusiveStartTableName", 9 | "output_token": "LastEvaluatedTableName", 10 | "limit_key": "Limit", 11 | "result_key": "TableNames" 12 | }, 13 | "Query": { 14 | "input_token": "ExclusiveStartKey", 15 | "output_token": "LastEvaluatedKey", 16 | "limit_key": "Limit", 17 | "result_key": "Items" 18 | }, 19 | "Scan": { 20 | "input_token": "ExclusiveStartKey", 21 | "output_token": "LastEvaluatedKey", 22 | "limit_key": "Limit", 23 | "result_key": "Items" 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/apis/dynamodb-2011-12-05.waiters.json: -------------------------------------------------------------------------------- 1 | { 2 | "waiters": { 3 | "__default__": { 4 | "interval": 20, 5 | "max_attempts": 25 6 | }, 7 | "__TableState": { 8 | "operation": "DescribeTable" 9 | }, 10 | "TableExists": { 11 | "extends": "__TableState", 12 | "description": "Wait until a table exists and can be accessed", 13 | "ignore_errors": [ 14 | "ResourceNotFoundException" 15 | ], 16 | "success_type": "output", 17 | "success_path": "Table.TableStatus", 18 | "success_value": "ACTIVE" 19 | }, 20 | "TableNotExists": { 21 | "extends": "__TableState", 22 | "description": "Wait until a table is deleted", 23 | "success_type": "error", 24 | "success_value": "ResourceNotFoundException" 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/apis/dynamodb-2012-08-10.paginators.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "BatchGetItem": { 4 | "input_token": "RequestItems", 5 | "output_token": "UnprocessedKeys" 6 | }, 7 | "ListTables": { 8 | "input_token": "ExclusiveStartTableName", 9 | "output_token": "LastEvaluatedTableName", 10 | "limit_key": "Limit", 11 | "result_key": "TableNames" 12 | }, 13 | "Query": { 14 | "input_token": "ExclusiveStartKey", 15 | "output_token": "LastEvaluatedKey", 16 | "limit_key": "Limit", 17 | "result_key": "Items" 18 | }, 19 | "Scan": { 20 | "input_token": "ExclusiveStartKey", 21 | "output_token": "LastEvaluatedKey", 22 | "limit_key": "Limit", 23 | "result_key": "Items" 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/apis/dynamodb-2012-08-10.waiters.json: -------------------------------------------------------------------------------- 1 | { 2 | "waiters": { 3 | "__default__": { 4 | "interval": 20, 5 | "max_attempts": 25 6 | }, 7 | "__TableState": { 8 | "operation": "DescribeTable" 9 | }, 10 | "TableExists": { 11 | "extends": "__TableState", 12 | "ignore_errors": [ 13 | "ResourceNotFoundException" 14 | ], 15 | "success_type": "output", 16 | "success_path": "Table.TableStatus", 17 | "success_value": "ACTIVE" 18 | }, 19 | "TableNotExists": { 20 | "extends": "__TableState", 21 | "success_type": "error", 22 | "success_value": "ResourceNotFoundException" 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/apis/ecs-2014-11-13.paginators.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "ListClusters": { 4 | "input_token": "nextToken", 5 | "output_token": "nextToken", 6 | "limit_key": "maxResults", 7 | "result_key": "clusterArns" 8 | }, 9 | "ListContainerInstances": { 10 | "input_token": "nextToken", 11 | "output_token": "nextToken", 12 | "limit_key": "maxResults", 13 | "result_key": "containerInstanceArns" 14 | }, 15 | "ListTaskDefinitions": { 16 | "input_token": "nextToken", 17 | "output_token": "nextToken", 18 | "limit_key": "maxResults", 19 | "result_key": "taskDefinitionArns" 20 | }, 21 | "ListTaskDefinitionFamilies": { 22 | "input_token": "nextToken", 23 | "output_token": "nextToken", 24 | "limit_key": "maxResults", 25 | "result_key": "families" 26 | }, 27 | "ListTasks": { 28 | "input_token": "nextToken", 29 | "output_token": "nextToken", 30 | "limit_key": "maxResults", 31 | "result_key": "taskArns" 32 | }, 33 | "ListServices": { 34 | "input_token": "nextToken", 35 | "output_token": "nextToken", 36 | "limit_key": "maxResults", 37 | "result_key": "serviceArns" 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/apis/elasticache-2015-02-02.paginators.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "DescribeCacheClusters": { 4 | "input_token": "Marker", 5 | "output_token": "Marker", 6 | "limit_key": "MaxRecords", 7 | "result_key": "CacheClusters" 8 | }, 9 | "DescribeCacheEngineVersions": { 10 | "input_token": "Marker", 11 | "output_token": "Marker", 12 | "limit_key": "MaxRecords", 13 | "result_key": "CacheEngineVersions" 14 | }, 15 | "DescribeCacheParameterGroups": { 16 | "input_token": "Marker", 17 | "output_token": "Marker", 18 | "limit_key": "MaxRecords", 19 | "result_key": "CacheParameterGroups" 20 | }, 21 | "DescribeCacheParameters": { 22 | "input_token": "Marker", 23 | "output_token": "Marker", 24 | "limit_key": "MaxRecords", 25 | "result_key": "Parameters" 26 | }, 27 | "DescribeCacheSecurityGroups": { 28 | "input_token": "Marker", 29 | "output_token": "Marker", 30 | "limit_key": "MaxRecords", 31 | "result_key": "CacheSecurityGroups" 32 | }, 33 | "DescribeCacheSubnetGroups": { 34 | "input_token": "Marker", 35 | "output_token": "Marker", 36 | "limit_key": "MaxRecords", 37 | "result_key": "CacheSubnetGroups" 38 | }, 39 | "DescribeEngineDefaultParameters": { 40 | "input_token": "Marker", 41 | "output_token": "EngineDefaults.Marker", 42 | "limit_key": "MaxRecords", 43 | "result_key": "EngineDefaults.Parameters" 44 | }, 45 | "DescribeEvents": { 46 | "input_token": "Marker", 47 | "output_token": "Marker", 48 | "limit_key": "MaxRecords", 49 | "result_key": "Events" 50 | }, 51 | "DescribeReservedCacheNodes": { 52 | "input_token": "Marker", 53 | "output_token": "Marker", 54 | "limit_key": "MaxRecords", 55 | "result_key": "ReservedCacheNodes" 56 | }, 57 | "DescribeReservedCacheNodesOfferings": { 58 | "input_token": "Marker", 59 | "output_token": "Marker", 60 | "limit_key": "MaxRecords", 61 | "result_key": "ReservedCacheNodesOfferings" 62 | }, 63 | "DescribeReplicationGroups": { 64 | "input_token": "Marker", 65 | "output_token": "Marker", 66 | "limit_key": "MaxRecords", 67 | "result_key": "ReplicationGroups" 68 | }, 69 | "DescribeSnapshots": { 70 | "input_token": "Marker", 71 | "output_token": "Marker", 72 | "limit_key": "MaxRecords", 73 | "result_key": "Snapshots" 74 | } 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/apis/elasticbeanstalk-2010-12-01.paginators.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "DescribeApplicationVersions": { 4 | "result_key": "ApplicationVersions" 5 | }, 6 | "DescribeApplications": { 7 | "result_key": "Applications" 8 | }, 9 | "DescribeConfigurationOptions": { 10 | "result_key": "Options" 11 | }, 12 | "DescribeEnvironments": { 13 | "result_key": "Environments" 14 | }, 15 | "DescribeEvents": { 16 | "input_token": "NextToken", 17 | "output_token": "NextToken", 18 | "limit_key": "MaxRecords", 19 | "result_key": "Events" 20 | }, 21 | "ListAvailableSolutionStacks": { 22 | "result_key": "SolutionStacks" 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/apis/elasticloadbalancing-2012-06-01.paginators.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "DescribeInstanceHealth": { 4 | "result_key": "InstanceStates" 5 | }, 6 | "DescribeLoadBalancerPolicies": { 7 | "result_key": "PolicyDescriptions" 8 | }, 9 | "DescribeLoadBalancerPolicyTypes": { 10 | "result_key": "PolicyTypeDescriptions" 11 | }, 12 | "DescribeLoadBalancers": { 13 | "input_token": "Marker", 14 | "output_token": "NextMarker", 15 | "result_key": "LoadBalancerDescriptions" 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/apis/elasticmapreduce-2009-03-31.paginators.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "DescribeJobFlows": { 4 | "result_key": "JobFlows" 5 | }, 6 | "ListBootstrapActions": { 7 | "input_token": "Marker", 8 | "output_token": "Marker", 9 | "result_key": "BootstrapActions" 10 | }, 11 | "ListClusters": { 12 | "input_token": "Marker", 13 | "output_token": "Marker", 14 | "result_key": "Clusters" 15 | }, 16 | "ListInstanceGroups": { 17 | "input_token": "Marker", 18 | "output_token": "Marker", 19 | "result_key": "InstanceGroups" 20 | }, 21 | "ListInstances": { 22 | "input_token": "Marker", 23 | "output_token": "Marker", 24 | "result_key": "Instances" 25 | }, 26 | "ListSteps": { 27 | "input_token": "Marker", 28 | "output_token": "Marker", 29 | "result_key": "Steps" 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/apis/elastictranscoder-2012-09-25.paginators.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "ListJobsByPipeline": { 4 | "input_token": "PageToken", 5 | "output_token": "NextPageToken", 6 | "result_key": "Jobs" 7 | }, 8 | "ListJobsByStatus": { 9 | "input_token": "PageToken", 10 | "output_token": "NextPageToken", 11 | "result_key": "Jobs" 12 | }, 13 | "ListPipelines": { 14 | "input_token": "PageToken", 15 | "output_token": "NextPageToken", 16 | "result_key": "Pipelines" 17 | }, 18 | "ListPresets": { 19 | "input_token": "PageToken", 20 | "output_token": "NextPageToken", 21 | "result_key": "Presets" 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/apis/elastictranscoder-2012-09-25.waiters.json: -------------------------------------------------------------------------------- 1 | { 2 | "waiters": { 3 | "JobComplete": { 4 | "operation": "ReadJob", 5 | "success_type": "output", 6 | "success_path": "Job.Status", 7 | "interval": 30, 8 | "max_attempts": 120, 9 | "success_value": "Complete", 10 | "failure_value": [ 11 | "Canceled", 12 | "Error" 13 | ] 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/apis/email-2010-12-01.paginators.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "ListIdentities": { 4 | "input_token": "NextToken", 5 | "output_token": "NextToken", 6 | "limit_key": "MaxItems", 7 | "result_key": "Identities" 8 | }, 9 | "ListVerifiedEmailAddresses": { 10 | "result_key": "VerifiedEmailAddresses" 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/apis/email-2010-12-01.waiters.json: -------------------------------------------------------------------------------- 1 | { 2 | "waiters": { 3 | "__default__": { 4 | "interval": 3, 5 | "max_attempts": 20 6 | }, 7 | "IdentityExists": { 8 | "operation": "GetIdentityVerificationAttributes", 9 | "success_type": "output", 10 | "success_path": "VerificationAttributes[].VerificationStatus", 11 | "success_value": true 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/apis/glacier-2012-06-01.paginators.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "ListJobs": { 4 | "input_token": "marker", 5 | "output_token": "Marker", 6 | "limit_key": "limit", 7 | "result_key": "JobList" 8 | }, 9 | "ListMultipartUploads": { 10 | "input_token": "marker", 11 | "output_token": "Marker", 12 | "limit_key": "limit", 13 | "result_key": "UploadsList" 14 | }, 15 | "ListParts": { 16 | "input_token": "marker", 17 | "output_token": "Marker", 18 | "limit_key": "limit", 19 | "result_key": "Parts" 20 | }, 21 | "ListVaults": { 22 | "input_token": "marker", 23 | "output_token": "Marker", 24 | "limit_key": "limit", 25 | "result_key": "VaultList" 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/apis/glacier-2012-06-01.waiters.json: -------------------------------------------------------------------------------- 1 | { 2 | "waiters": { 3 | "__default__": { 4 | "interval": 3, 5 | "max_attempts": 15 6 | }, 7 | "__VaultState": { 8 | "operation": "DescribeVault" 9 | }, 10 | "VaultExists": { 11 | "extends": "__VaultState", 12 | "ignore_errors": [ 13 | "ResourceNotFoundException" 14 | ], 15 | "success_type": "output" 16 | }, 17 | "VaultNotExists": { 18 | "extends": "__VaultState", 19 | "success_type": "error", 20 | "success_value": "ResourceNotFoundException" 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/apis/importexport-2010-06-01.paginators.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "ListJobs": { 4 | "input_token": "Marker", 5 | "output_token": "Jobs[-1].JobId", 6 | "more_results": "IsTruncated", 7 | "limit_key": "MaxJobs", 8 | "result_key": "Jobs" 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/apis/kinesis-2013-12-02.paginators.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "DescribeStream": { 4 | "input_token": "ExclusiveStartShardId", 5 | "limit_key": "Limit", 6 | "more_results": "StreamDescription.HasMoreShards", 7 | "output_token": "StreamDescription.Shards[-1].ShardId", 8 | "result_key": "StreamDescription.Shards" 9 | }, 10 | "ListStreams": { 11 | "input_token": "ExclusiveStartStreamName", 12 | "limit_key": "Limit", 13 | "more_results": "HasMoreStreams", 14 | "output_token": "StreamNames[-1]", 15 | "result_key": "StreamNames" 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/apis/kms-2014-11-01.paginators.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "ListAliases": { 4 | "limit_key": "Limit", 5 | "input_token": "Marker", 6 | "output_token": "NextMarker", 7 | "more_results": "Truncated", 8 | "result_key": "Aliases" 9 | }, 10 | "ListGrants": { 11 | "limit_key": "Limit", 12 | "input_token": "Marker", 13 | "output_token": "NextMarker", 14 | "more_results": "Truncated", 15 | "result_key": "Grants" 16 | }, 17 | "ListKeyPolicies": { 18 | "limit_key": "Limit", 19 | "input_token": "Marker", 20 | "output_token": "NextMarker", 21 | "more_results": "Truncated", 22 | "result_key": "PolicyNames" 23 | }, 24 | "ListKeys": { 25 | "limit_key": "Limit", 26 | "input_token": "Marker", 27 | "output_token": "NextMarker", 28 | "more_results": "Truncated", 29 | "result_key": "Keys" 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/apis/lambda-2014-11-11.paginators.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "ListEventSources": { 4 | "input_token": "Marker", 5 | "output_token": "NextMarker", 6 | "limit_key": "MaxItems", 7 | "result_key": "EventSources" 8 | }, 9 | "ListFunctions": { 10 | "input_token": "Marker", 11 | "output_token": "NextMarker", 12 | "limit_key": "MaxItems", 13 | "result_key": "Functions" 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/apis/lambda-2015-03-31.paginators.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "ListEventSourceMappings": { 4 | "input_token": "Marker", 5 | "output_token": "NextMarker", 6 | "limit_key": "MaxItems", 7 | "result_key": "EventSourceMappings" 8 | }, 9 | "ListFunctions": { 10 | "input_token": "Marker", 11 | "output_token": "NextMarker", 12 | "limit_key": "MaxItems", 13 | "result_key": "Functions" 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/apis/logs-2014-03-28.paginators.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "DescribeDestinations": { 4 | "input_token": "nextToken", 5 | "output_token": "nextToken", 6 | "limit_key": "limit", 7 | "result_key": "destinations" 8 | }, 9 | "DescribeLogGroups": { 10 | "input_token": "nextToken", 11 | "output_token": "nextToken", 12 | "limit_key": "limit", 13 | "result_key": "logGroups" 14 | }, 15 | "DescribeLogStreams": { 16 | "input_token": "nextToken", 17 | "output_token": "nextToken", 18 | "limit_key": "limit", 19 | "result_key": "logStreams" 20 | }, 21 | "DescribeMetricFilters": { 22 | "input_token": "nextToken", 23 | "output_token": "nextToken", 24 | "limit_key": "limit", 25 | "result_key": "metricFilters" 26 | }, 27 | "DescribeSubscriptionFilters": { 28 | "input_token": "nextToken", 29 | "output_token": "nextToken", 30 | "limit_key": "limit", 31 | "result_key": "subscriptionFilters" 32 | }, 33 | "FilterLogEvents": { 34 | "input_token": "nextToken", 35 | "output_token": "nextToken", 36 | "limit_key": "limit", 37 | "result_key": [ 38 | "events", 39 | "searchedLogStreams" 40 | ] 41 | }, 42 | "GetLogEvents": { 43 | "input_token": "nextToken", 44 | "output_token": "nextForwardToken", 45 | "limit_key": "limit", 46 | "result_key": "events" 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/apis/machinelearning-2014-12-12.paginators.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "DescribeBatchPredictions": { 4 | "limit_key": "Limit", 5 | "output_token": "NextToken", 6 | "input_token": "NextToken", 7 | "result_key": "Results" 8 | }, 9 | "DescribeDataSources": { 10 | "limit_key": "Limit", 11 | "output_token": "NextToken", 12 | "input_token": "NextToken", 13 | "result_key": "Results" 14 | }, 15 | "DescribeEvaluations": { 16 | "limit_key": "Limit", 17 | "output_token": "NextToken", 18 | "input_token": "NextToken", 19 | "result_key": "Results" 20 | }, 21 | "DescribeMLModels": { 22 | "limit_key": "Limit", 23 | "output_token": "NextToken", 24 | "input_token": "NextToken", 25 | "result_key": "Results" 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/apis/marketplacecommerceanalytics-2015-07-01.min.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0", 3 | "metadata": { 4 | "apiVersion": "2015-07-01", 5 | "endpointPrefix": "marketplacecommerceanalytics", 6 | "jsonVersion": "1.1", 7 | "serviceFullName": "AWS Marketplace Commerce Analytics", 8 | "signatureVersion": "v4", 9 | "signingName": "marketplacecommerceanalytics", 10 | "targetPrefix": "MarketplaceCommerceAnalytics20150701", 11 | "protocol": "json" 12 | }, 13 | "operations": { 14 | "GenerateDataSet": { 15 | "input": { 16 | "type": "structure", 17 | "required": [ 18 | "dataSetType", 19 | "dataSetPublicationDate", 20 | "roleNameArn", 21 | "destinationS3BucketName", 22 | "snsTopicArn" 23 | ], 24 | "members": { 25 | "dataSetType": {}, 26 | "dataSetPublicationDate": { 27 | "type": "timestamp" 28 | }, 29 | "roleNameArn": {}, 30 | "destinationS3BucketName": {}, 31 | "destinationS3Prefix": {}, 32 | "snsTopicArn": {} 33 | } 34 | }, 35 | "output": { 36 | "type": "structure", 37 | "members": { 38 | "dataSetRequestId": {} 39 | } 40 | } 41 | } 42 | }, 43 | "shapes": {}, 44 | "examples": {} 45 | } -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/apis/mobileanalytics-2014-06-05.min.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0", 3 | "metadata": { 4 | "apiVersion": "2014-06-05", 5 | "endpointPrefix": "mobileanalytics", 6 | "serviceFullName": "Amazon Mobile Analytics", 7 | "signatureVersion": "v4", 8 | "protocol": "rest-json" 9 | }, 10 | "operations": { 11 | "PutEvents": { 12 | "http": { 13 | "requestUri": "/2014-06-05/events", 14 | "responseCode": 202 15 | }, 16 | "input": { 17 | "type": "structure", 18 | "required": [ 19 | "events", 20 | "clientContext" 21 | ], 22 | "members": { 23 | "events": { 24 | "type": "list", 25 | "member": { 26 | "type": "structure", 27 | "required": [ 28 | "eventType", 29 | "timestamp" 30 | ], 31 | "members": { 32 | "eventType": {}, 33 | "timestamp": {}, 34 | "session": { 35 | "type": "structure", 36 | "members": { 37 | "id": {}, 38 | "duration": { 39 | "type": "long" 40 | }, 41 | "startTimestamp": {}, 42 | "stopTimestamp": {} 43 | } 44 | }, 45 | "version": {}, 46 | "attributes": { 47 | "type": "map", 48 | "key": {}, 49 | "value": {} 50 | }, 51 | "metrics": { 52 | "type": "map", 53 | "key": {}, 54 | "value": { 55 | "type": "double" 56 | } 57 | } 58 | } 59 | } 60 | }, 61 | "clientContext": { 62 | "location": "header", 63 | "locationName": "x-amz-Client-Context" 64 | }, 65 | "clientContextEncoding": { 66 | "location": "header", 67 | "locationName": "x-amz-Client-Context-Encoding" 68 | } 69 | } 70 | } 71 | } 72 | }, 73 | "shapes": {} 74 | } -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/apis/monitoring-2010-08-01.paginators.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "DescribeAlarmHistory": { 4 | "input_token": "NextToken", 5 | "output_token": "NextToken", 6 | "limit_key": "MaxRecords", 7 | "result_key": "AlarmHistoryItems" 8 | }, 9 | "DescribeAlarms": { 10 | "input_token": "NextToken", 11 | "output_token": "NextToken", 12 | "limit_key": "MaxRecords", 13 | "result_key": "MetricAlarms" 14 | }, 15 | "DescribeAlarmsForMetric": { 16 | "result_key": "MetricAlarms" 17 | }, 18 | "ListMetrics": { 19 | "input_token": "NextToken", 20 | "output_token": "NextToken", 21 | "result_key": "Metrics" 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/apis/opsworks-2013-02-18.paginators.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "DescribeApps": { 4 | "result_key": "Apps" 5 | }, 6 | "DescribeCommands": { 7 | "result_key": "Commands" 8 | }, 9 | "DescribeDeployments": { 10 | "result_key": "Deployments" 11 | }, 12 | "DescribeEcsClusters": { 13 | "input_token": "NextToken", 14 | "output_token": "NextToken", 15 | "limit_key": "MaxResults", 16 | "result_key": "EcsClusters" 17 | }, 18 | "DescribeElasticIps": { 19 | "result_key": "ElasticIps" 20 | }, 21 | "DescribeElasticLoadBalancers": { 22 | "result_key": "ElasticLoadBalancers" 23 | }, 24 | "DescribeInstances": { 25 | "result_key": "Instances" 26 | }, 27 | "DescribeLayers": { 28 | "result_key": "Layers" 29 | }, 30 | "DescribeLoadBasedAutoScaling": { 31 | "result_key": "LoadBasedAutoScalingConfigurations" 32 | }, 33 | "DescribePermissions": { 34 | "result_key": "Permissions" 35 | }, 36 | "DescribeRaidArrays": { 37 | "result_key": "RaidArrays" 38 | }, 39 | "DescribeServiceErrors": { 40 | "result_key": "ServiceErrors" 41 | }, 42 | "DescribeStacks": { 43 | "result_key": "Stacks" 44 | }, 45 | "DescribeTimeBasedAutoScaling": { 46 | "result_key": "TimeBasedAutoScalingConfigurations" 47 | }, 48 | "DescribeUserProfiles": { 49 | "result_key": "UserProfiles" 50 | }, 51 | "DescribeVolumes": { 52 | "result_key": "Volumes" 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/apis/rds-2013-01-10.paginators.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "DescribeDBEngineVersions": { 4 | "input_token": "Marker", 5 | "output_token": "Marker", 6 | "limit_key": "MaxRecords", 7 | "result_key": "DBEngineVersions" 8 | }, 9 | "DescribeDBInstances": { 10 | "input_token": "Marker", 11 | "output_token": "Marker", 12 | "limit_key": "MaxRecords", 13 | "result_key": "DBInstances" 14 | }, 15 | "DescribeDBParameterGroups": { 16 | "input_token": "Marker", 17 | "output_token": "Marker", 18 | "limit_key": "MaxRecords", 19 | "result_key": "DBParameterGroups" 20 | }, 21 | "DescribeDBParameters": { 22 | "input_token": "Marker", 23 | "output_token": "Marker", 24 | "limit_key": "MaxRecords", 25 | "result_key": "Parameters" 26 | }, 27 | "DescribeDBSecurityGroups": { 28 | "input_token": "Marker", 29 | "output_token": "Marker", 30 | "limit_key": "MaxRecords", 31 | "result_key": "DBSecurityGroups" 32 | }, 33 | "DescribeDBSnapshots": { 34 | "input_token": "Marker", 35 | "output_token": "Marker", 36 | "limit_key": "MaxRecords", 37 | "result_key": "DBSnapshots" 38 | }, 39 | "DescribeDBSubnetGroups": { 40 | "input_token": "Marker", 41 | "output_token": "Marker", 42 | "limit_key": "MaxRecords", 43 | "result_key": "DBSubnetGroups" 44 | }, 45 | "DescribeEngineDefaultParameters": { 46 | "input_token": "Marker", 47 | "output_token": "EngineDefaults.Marker", 48 | "limit_key": "MaxRecords", 49 | "result_key": "EngineDefaults.Parameters" 50 | }, 51 | "DescribeEventSubscriptions": { 52 | "input_token": "Marker", 53 | "output_token": "Marker", 54 | "limit_key": "MaxRecords", 55 | "result_key": "EventSubscriptionsList" 56 | }, 57 | "DescribeEvents": { 58 | "input_token": "Marker", 59 | "output_token": "Marker", 60 | "limit_key": "MaxRecords", 61 | "result_key": "Events" 62 | }, 63 | "DescribeOptionGroupOptions": { 64 | "input_token": "Marker", 65 | "output_token": "Marker", 66 | "limit_key": "MaxRecords", 67 | "result_key": "OptionGroupOptions" 68 | }, 69 | "DescribeOptionGroups": { 70 | "input_token": "Marker", 71 | "output_token": "Marker", 72 | "limit_key": "MaxRecords", 73 | "result_key": "OptionGroupsList" 74 | }, 75 | "DescribeOrderableDBInstanceOptions": { 76 | "input_token": "Marker", 77 | "output_token": "Marker", 78 | "limit_key": "MaxRecords", 79 | "result_key": "OrderableDBInstanceOptions" 80 | }, 81 | "DescribeReservedDBInstances": { 82 | "input_token": "Marker", 83 | "output_token": "Marker", 84 | "limit_key": "MaxRecords", 85 | "result_key": "ReservedDBInstances" 86 | }, 87 | "DescribeReservedDBInstancesOfferings": { 88 | "input_token": "Marker", 89 | "output_token": "Marker", 90 | "limit_key": "MaxRecords", 91 | "result_key": "ReservedDBInstancesOfferings" 92 | }, 93 | "ListTagsForResource": { 94 | "result_key": "TagList" 95 | } 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/apis/rds-2013-09-09.waiters.json: -------------------------------------------------------------------------------- 1 | { 2 | "waiters": { 3 | "__default__": { 4 | "interval": 30, 5 | "max_attempts": 60 6 | }, 7 | "__DBInstanceState": { 8 | "operation": "DescribeDBInstances", 9 | "acceptor_path": "DBInstances[].DBInstanceStatus", 10 | "acceptor_type": "output" 11 | }, 12 | "DBInstanceAvailable": { 13 | "extends": "__DBInstanceState", 14 | "success_value": "available", 15 | "failure_value": [ 16 | "deleted", 17 | "deleting", 18 | "failed", 19 | "incompatible-restore", 20 | "incompatible-parameters", 21 | "incompatible-parameters", 22 | "incompatible-restore" 23 | ] 24 | }, 25 | "DBInstanceDeleted": { 26 | "extends": "__DBInstanceState", 27 | "success_value": "deleted", 28 | "failure_value": [ 29 | "creating", 30 | "modifying", 31 | "rebooting", 32 | "resetting-master-credentials" 33 | ] 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/apis/rds-2014-10-31.waiters.json: -------------------------------------------------------------------------------- 1 | { 2 | "waiters": { 3 | "__default__": { 4 | "interval": 30, 5 | "max_attempts": 60 6 | }, 7 | "__DBInstanceState": { 8 | "operation": "DescribeDBInstances", 9 | "acceptor_path": "DBInstances[].DBInstanceStatus", 10 | "acceptor_type": "output" 11 | }, 12 | "DBInstanceAvailable": { 13 | "extends": "__DBInstanceState", 14 | "success_value": "available", 15 | "failure_value": [ 16 | "deleted", 17 | "deleting", 18 | "failed", 19 | "incompatible-restore", 20 | "incompatible-parameters", 21 | "incompatible-parameters", 22 | "incompatible-restore" 23 | ] 24 | }, 25 | "DBInstanceDeleted": { 26 | "extends": "__DBInstanceState", 27 | "success_value": "deleted", 28 | "failure_value": [ 29 | "creating", 30 | "modifying", 31 | "rebooting", 32 | "resetting-master-credentials" 33 | ] 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/apis/redshift-2012-12-01.paginators.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "DescribeClusterParameterGroups": { 4 | "input_token": "Marker", 5 | "output_token": "Marker", 6 | "limit_key": "MaxRecords", 7 | "result_key": "ParameterGroups" 8 | }, 9 | "DescribeClusterParameters": { 10 | "input_token": "Marker", 11 | "output_token": "Marker", 12 | "limit_key": "MaxRecords", 13 | "result_key": "Parameters" 14 | }, 15 | "DescribeClusterSecurityGroups": { 16 | "input_token": "Marker", 17 | "output_token": "Marker", 18 | "limit_key": "MaxRecords", 19 | "result_key": "ClusterSecurityGroups" 20 | }, 21 | "DescribeClusterSnapshots": { 22 | "input_token": "Marker", 23 | "output_token": "Marker", 24 | "limit_key": "MaxRecords", 25 | "result_key": "Snapshots" 26 | }, 27 | "DescribeClusterSubnetGroups": { 28 | "input_token": "Marker", 29 | "output_token": "Marker", 30 | "limit_key": "MaxRecords", 31 | "result_key": "ClusterSubnetGroups" 32 | }, 33 | "DescribeClusterVersions": { 34 | "input_token": "Marker", 35 | "output_token": "Marker", 36 | "limit_key": "MaxRecords", 37 | "result_key": "ClusterVersions" 38 | }, 39 | "DescribeClusters": { 40 | "input_token": "Marker", 41 | "output_token": "Marker", 42 | "limit_key": "MaxRecords", 43 | "result_key": "Clusters" 44 | }, 45 | "DescribeDefaultClusterParameters": { 46 | "input_token": "Marker", 47 | "output_token": "DefaultClusterParameters.Marker", 48 | "limit_key": "MaxRecords", 49 | "result_key": "DefaultClusterParameters.Parameters" 50 | }, 51 | "DescribeEventSubscriptions": { 52 | "input_token": "Marker", 53 | "output_token": "Marker", 54 | "limit_key": "MaxRecords", 55 | "result_key": "EventSubscriptionsList" 56 | }, 57 | "DescribeEvents": { 58 | "input_token": "Marker", 59 | "output_token": "Marker", 60 | "limit_key": "MaxRecords", 61 | "result_key": "Events" 62 | }, 63 | "DescribeHsmClientCertificates": { 64 | "input_token": "Marker", 65 | "output_token": "Marker", 66 | "limit_key": "MaxRecords", 67 | "result_key": "HsmClientCertificates" 68 | }, 69 | "DescribeHsmConfigurations": { 70 | "input_token": "Marker", 71 | "output_token": "Marker", 72 | "limit_key": "MaxRecords", 73 | "result_key": "HsmConfigurations" 74 | }, 75 | "DescribeOrderableClusterOptions": { 76 | "input_token": "Marker", 77 | "output_token": "Marker", 78 | "limit_key": "MaxRecords", 79 | "result_key": "OrderableClusterOptions" 80 | }, 81 | "DescribeReservedNodeOfferings": { 82 | "input_token": "Marker", 83 | "output_token": "Marker", 84 | "limit_key": "MaxRecords", 85 | "result_key": "ReservedNodeOfferings" 86 | }, 87 | "DescribeReservedNodes": { 88 | "input_token": "Marker", 89 | "output_token": "Marker", 90 | "limit_key": "MaxRecords", 91 | "result_key": "ReservedNodes" 92 | } 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/apis/redshift-2012-12-01.waiters.json: -------------------------------------------------------------------------------- 1 | { 2 | "waiters": { 3 | "__default__": { 4 | "acceptor_type": "output" 5 | }, 6 | "__ClusterState": { 7 | "interval": 60, 8 | "max_attempts": 30, 9 | "operation": "DescribeClusters", 10 | "acceptor_path": "Clusters[].ClusterStatus" 11 | }, 12 | "ClusterAvailable": { 13 | "extends": "__ClusterState", 14 | "ignore_errors": [ 15 | "ClusterNotFound" 16 | ], 17 | "success_value": "available", 18 | "failure_value": [ 19 | "deleting" 20 | ] 21 | }, 22 | "ClusterDeleted": { 23 | "extends": "__ClusterState", 24 | "success_type": "error", 25 | "success_value": "ClusterNotFound", 26 | "failure_value": [ 27 | "creating", 28 | "rebooting" 29 | ] 30 | }, 31 | "SnapshotAvailable": { 32 | "interval": 15, 33 | "max_attempts": 20, 34 | "operation": "DescribeClusterSnapshots", 35 | "acceptor_path": "Snapshots[].Status", 36 | "success_value": "available", 37 | "failure_value": [ 38 | "failed", 39 | "deleted" 40 | ] 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/apis/route53-2013-04-01.paginators.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "ListHealthChecks": { 4 | "input_token": "Marker", 5 | "output_token": "NextMarker", 6 | "more_results": "IsTruncated", 7 | "limit_key": "MaxItems", 8 | "result_key": "HealthChecks" 9 | }, 10 | "ListHostedZones": { 11 | "input_token": "Marker", 12 | "output_token": "NextMarker", 13 | "more_results": "IsTruncated", 14 | "limit_key": "MaxItems", 15 | "result_key": "HostedZones" 16 | }, 17 | "ListResourceRecordSets": { 18 | "more_results": "IsTruncated", 19 | "limit_key": "MaxItems", 20 | "result_key": "ResourceRecordSets", 21 | "input_token": [ 22 | "StartRecordName", 23 | "StartRecordType", 24 | "StartRecordIdentifier" 25 | ], 26 | "output_token": [ 27 | "NextRecordName", 28 | "NextRecordType", 29 | "NextRecordIdentifier" 30 | ] 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/apis/route53domains-2014-05-15.paginators.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0", 3 | "pagination": { 4 | "ListDomains": { 5 | "limit_key": "MaxItems", 6 | "input_token": "Marker", 7 | "output_token": "NextPageMarker", 8 | "result_key": "Domains" 9 | }, 10 | "ListOperations": { 11 | "limit_key": "MaxItems", 12 | "input_token": "Marker", 13 | "output_token": "NextPageMarker", 14 | "result_key": "Operations" 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/apis/s3-2006-03-01.paginators.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "ListBuckets": { 4 | "result_key": "Buckets" 5 | }, 6 | "ListMultipartUploads": { 7 | "limit_key": "MaxUploads", 8 | "more_results": "IsTruncated", 9 | "output_token": [ 10 | "NextKeyMarker", 11 | "NextUploadIdMarker" 12 | ], 13 | "input_token": [ 14 | "KeyMarker", 15 | "UploadIdMarker" 16 | ], 17 | "result_key": [ 18 | "Uploads", 19 | "CommonPrefixes" 20 | ] 21 | }, 22 | "ListObjectVersions": { 23 | "more_results": "IsTruncated", 24 | "limit_key": "MaxKeys", 25 | "output_token": [ 26 | "NextKeyMarker", 27 | "NextVersionIdMarker" 28 | ], 29 | "input_token": [ 30 | "KeyMarker", 31 | "VersionIdMarker" 32 | ], 33 | "result_key": [ 34 | "Versions", 35 | "DeleteMarkers", 36 | "CommonPrefixes" 37 | ] 38 | }, 39 | "ListObjects": { 40 | "more_results": "IsTruncated", 41 | "limit_key": "MaxKeys", 42 | "output_token": "NextMarker || Contents[-1].Key", 43 | "input_token": "Marker", 44 | "result_key": [ 45 | "Contents", 46 | "CommonPrefixes" 47 | ] 48 | }, 49 | "ListParts": { 50 | "more_results": "IsTruncated", 51 | "limit_key": "MaxParts", 52 | "output_token": "NextPartNumberMarker", 53 | "input_token": "PartNumberMarker", 54 | "result_key": "Parts" 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/apis/s3-2006-03-01.waiters.json: -------------------------------------------------------------------------------- 1 | { 2 | "waiters": { 3 | "__default__": { 4 | "interval": 5, 5 | "max_attempts": 20 6 | }, 7 | "BucketExists": { 8 | "operation": "HeadBucket", 9 | "ignore_errors": [ 10 | 404 11 | ], 12 | "success_type": "output" 13 | }, 14 | "BucketNotExists": { 15 | "operation": "HeadBucket", 16 | "success_type": "error", 17 | "success_value": 404 18 | }, 19 | "ObjectExists": { 20 | "operation": "HeadObject", 21 | "ignore_errors": [ 22 | 404 23 | ], 24 | "success_type": "output" 25 | }, 26 | "ObjectNotExists": { 27 | "operation": "HeadObject", 28 | "success_type": "error", 29 | "success_value": 404 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/apis/sdb-2009-04-15.paginators.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "ListDomains": { 4 | "input_token": "NextToken", 5 | "output_token": "NextToken", 6 | "limit_key": "MaxNumberOfDomains", 7 | "result_key": "DomainNames" 8 | }, 9 | "Select": { 10 | "input_token": "NextToken", 11 | "output_token": "NextToken", 12 | "result_key": "Items" 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/apis/sns-2010-03-31.paginators.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "ListEndpointsByPlatformApplication": { 4 | "input_token": "NextToken", 5 | "output_token": "NextToken", 6 | "result_key": "Endpoints" 7 | }, 8 | "ListPlatformApplications": { 9 | "input_token": "NextToken", 10 | "output_token": "NextToken", 11 | "result_key": "PlatformApplications" 12 | }, 13 | "ListSubscriptions": { 14 | "input_token": "NextToken", 15 | "output_token": "NextToken", 16 | "result_key": "Subscriptions" 17 | }, 18 | "ListSubscriptionsByTopic": { 19 | "input_token": "NextToken", 20 | "output_token": "NextToken", 21 | "result_key": "Subscriptions" 22 | }, 23 | "ListTopics": { 24 | "input_token": "NextToken", 25 | "output_token": "NextToken", 26 | "result_key": "Topics" 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/apis/sqs-2012-11-05.examples.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0", 3 | "examples": { 4 | "CreateQueue": [ 5 | { 6 | "input": { 7 | "QueueName": "MyQueue" 8 | }, 9 | "output": { 10 | "QueueUrl": "https://queue.amazonaws.com/012345678910/MyQueue" 11 | }, 12 | "comments": { 13 | "input": { 14 | }, 15 | "output": { 16 | } 17 | }, 18 | "description": "The following operation creates an SQS queue named MyQueue.", 19 | "id": "create-an-sqs-queue-1445915686197", 20 | "title": "Create an SQS queue" 21 | } 22 | ], 23 | "GetQueueUrl": [ 24 | { 25 | "input": { 26 | "QueueName": "MyQueue", 27 | "QueueOwnerAWSAccountId": "12345678910" 28 | }, 29 | "output": { 30 | "QueueUrl": "https://queue.amazonaws.com/123456789101112/MyQueue" 31 | }, 32 | "comments": { 33 | "input": { 34 | }, 35 | "output": { 36 | } 37 | }, 38 | "description": "The following example retrieves the queue ARN.", 39 | "id": "retrieve-queue-attributes-from-an-sqs-queue-1445915930574", 40 | "title": "Retrieve queue attributes from an SQS queue" 41 | } 42 | ] 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/apis/sqs-2012-11-05.paginators.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "ListQueues": { 4 | "result_key": "QueueUrls" 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/apis/ssm-2014-11-06.paginators.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "ListAssociations": { 4 | "input_token": "NextToken", 5 | "output_token": "NextToken", 6 | "limit_key": "MaxResults", 7 | "result_key": "Associations" 8 | }, 9 | "ListCommandInvocations": { 10 | "input_token": "NextToken", 11 | "output_token": "NextToken", 12 | "limit_key": "MaxResults", 13 | "result_key": "CommandInvocations" 14 | }, 15 | "ListCommands": { 16 | "input_token": "NextToken", 17 | "output_token": "NextToken", 18 | "limit_key": "MaxResults", 19 | "result_key": "Commands" 20 | }, 21 | "ListDocuments": { 22 | "input_token": "NextToken", 23 | "output_token": "NextToken", 24 | "limit_key": "MaxResults", 25 | "result_key": "DocumentIdentifiers" 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/apis/storagegateway-2013-06-30.paginators.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "DescribeCachediSCSIVolumes": { 4 | "result_key": "CachediSCSIVolumes" 5 | }, 6 | "DescribeStorediSCSIVolumes": { 7 | "result_key": "StorediSCSIVolumes" 8 | }, 9 | "DescribeTapeArchives": { 10 | "input_token": "Marker", 11 | "limit_key": "Limit", 12 | "output_token": "Marker", 13 | "result_key": "TapeArchives" 14 | }, 15 | "DescribeTapeRecoveryPoints": { 16 | "input_token": "Marker", 17 | "limit_key": "Limit", 18 | "output_token": "Marker", 19 | "result_key": "TapeRecoveryPointInfos" 20 | }, 21 | "DescribeTapes": { 22 | "input_token": "Marker", 23 | "limit_key": "Limit", 24 | "output_token": "Marker", 25 | "result_key": "Tapes" 26 | }, 27 | "DescribeVTLDevices": { 28 | "input_token": "Marker", 29 | "limit_key": "Limit", 30 | "output_token": "Marker", 31 | "result_key": "VTLDevices" 32 | }, 33 | "ListGateways": { 34 | "input_token": "Marker", 35 | "limit_key": "Limit", 36 | "output_token": "Marker", 37 | "result_key": "Gateways" 38 | }, 39 | "ListLocalDisks": { 40 | "result_key": "Disks" 41 | }, 42 | "ListVolumeRecoveryPoints": { 43 | "result_key": "VolumeRecoveryPointInfos" 44 | }, 45 | "ListVolumes": { 46 | "input_token": "Marker", 47 | "limit_key": "Limit", 48 | "output_token": "Marker", 49 | "result_key": "VolumeInfos" 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/apis/support-2013-04-15.paginators.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "DescribeCases": { 4 | "input_token": "nextToken", 5 | "output_token": "nextToken", 6 | "limit_key": "maxResults", 7 | "result_key": "cases" 8 | }, 9 | "DescribeCommunications": { 10 | "input_token": "nextToken", 11 | "output_token": "nextToken", 12 | "limit_key": "maxResults", 13 | "result_key": "communications" 14 | }, 15 | "DescribeServices": { 16 | "result_key": "services" 17 | }, 18 | "DescribeTrustedAdvisorCheckRefreshStatuses": { 19 | "result_key": "statuses" 20 | }, 21 | "DescribeTrustedAdvisorCheckSummaries": { 22 | "result_key": "summaries" 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/apis/swf-2012-01-25.paginators.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "GetWorkflowExecutionHistory": { 4 | "limit_key": "maximumPageSize", 5 | "input_token": "nextPageToken", 6 | "output_token": "nextPageToken", 7 | "result_key": "events" 8 | }, 9 | "ListActivityTypes": { 10 | "limit_key": "maximumPageSize", 11 | "input_token": "nextPageToken", 12 | "output_token": "nextPageToken", 13 | "result_key": "typeInfos" 14 | }, 15 | "ListClosedWorkflowExecutions": { 16 | "limit_key": "maximumPageSize", 17 | "input_token": "nextPageToken", 18 | "output_token": "nextPageToken", 19 | "result_key": "executionInfos" 20 | }, 21 | "ListDomains": { 22 | "limit_key": "maximumPageSize", 23 | "input_token": "nextPageToken", 24 | "output_token": "nextPageToken", 25 | "result_key": "domainInfos" 26 | }, 27 | "ListOpenWorkflowExecutions": { 28 | "limit_key": "maximumPageSize", 29 | "input_token": "nextPageToken", 30 | "output_token": "nextPageToken", 31 | "result_key": "executionInfos" 32 | }, 33 | "ListWorkflowTypes": { 34 | "limit_key": "maximumPageSize", 35 | "input_token": "nextPageToken", 36 | "output_token": "nextPageToken", 37 | "result_key": "typeInfos" 38 | }, 39 | "PollForDecisionTask": { 40 | "limit_key": "maximumPageSize", 41 | "input_token": "nextPageToken", 42 | "output_token": "nextPageToken", 43 | "result_key": "events" 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/apis/workspaces-2015-04-08.paginators.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "DescribeWorkspaceBundles": { 4 | "input_token": "NextToken", 5 | "output_token": "NextToken", 6 | "result_key": "Bundles" 7 | }, 8 | "DescribeWorkspaceDirectories": { 9 | "input_token": "NextToken", 10 | "output_token": "NextToken", 11 | "result_key": "Directories" 12 | }, 13 | "DescribeWorkspaces": { 14 | "limit_key": "Limit", 15 | "input_token": "NextToken", 16 | "output_token": "NextToken", 17 | "result_key": "Workspaces" 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "aws-sdk", 3 | "ignore": [ 4 | "apis", "doc-src", "dist-tools", "eslint-rules", "features", "lib", 5 | "scripts", "tasks", "test", "Gemfile*", "configuration*", 6 | "Rakefile", "package.json", "testem.json", ".*", "index.js" 7 | ], 8 | "main": "dist/aws-sdk.js" 9 | } 10 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/dist-tools/browser-builder.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | var path = require('path'); 4 | 5 | var AWS = require('../'); 6 | 7 | var license = [ 8 | '// AWS SDK for JavaScript v' + AWS.VERSION, 9 | '// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.', 10 | '// License at https://sdk.amazonaws.com/js/BUNDLE_LICENSE.txt' 11 | ].join('\n') + '\n'; 12 | 13 | function minify(code) { 14 | var uglify = require('uglify-js'); 15 | var minified = uglify.minify(code, {fromString: true}); 16 | return minified.code; 17 | } 18 | 19 | function stripComments(code) { 20 | var lines = code.split(/\r?\n/); 21 | var multiLine = false; 22 | lines = lines.map(function (line) { 23 | var rLine = line; 24 | if (line.match(/^\s*\/\//)) { 25 | rLine = null; 26 | } else if (line.match(/^\s*\/\*/)) { 27 | multiLine = true; 28 | rLine = null; 29 | } 30 | 31 | if (multiLine) { 32 | var multiLineEnd = line.match(/\*\/(.*)/); 33 | if (multiLineEnd) { 34 | multiLine = false; 35 | rLine = multiLineEnd[1]; 36 | } else { 37 | rLine = null; 38 | } 39 | } 40 | 41 | return rLine; 42 | }).filter(function(l) { return l !== null; }); 43 | 44 | var newCode = lines.join('\n'); 45 | newCode = newCode.replace(/\/\*\*[\s\S]+?Copyright\s+.+?Amazon[\s\S]+?\*\//g, ''); 46 | return newCode; 47 | } 48 | 49 | function build(options, callback) { 50 | if (arguments.length === 1) { 51 | callback = options; 52 | options = {}; 53 | } 54 | 55 | var img = require('browserify/node_modules/insert-module-globals'); 56 | img.vars.process = function() { return '{browser:true}'; }; 57 | 58 | if (options.services) process.env.AWS_SERVICES = options.services; 59 | 60 | var browserify = require('browserify'); 61 | var brOpts = { basedir: path.resolve(__dirname, '..') }; 62 | browserify(brOpts).add('./').ignore('domain').bundle(function(err, data) { 63 | if (err) return callback(err); 64 | 65 | var code = (data || '').toString(); 66 | if (options.minify) code = minify(code); 67 | else code = stripComments(code); 68 | 69 | code = license + code; 70 | callback(null, code); 71 | }); 72 | } 73 | 74 | // run if we called this tool directly 75 | if (require.main === module) { 76 | var opts = { 77 | services: process.argv[2] || process.env.SERVICES, 78 | minify: process.env.MINIFY ? true : false 79 | }; 80 | build(opts, function(err, code) { 81 | if (err) console.error(err.message); 82 | else console.log(code); 83 | }); 84 | } 85 | 86 | build.license = license; 87 | module.exports = build; 88 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/dist-tools/transform.js: -------------------------------------------------------------------------------- 1 | var Transform = require('stream').Transform; 2 | var collector = require('./service-collector'); 3 | var license = require('./browser-builder').license; 4 | 5 | module.exports = function(file) { 6 | var stream = new Transform(); 7 | stream._transform = function(data, encoding, callback) { 8 | callback(null, data); 9 | }; 10 | 11 | if (file.match(/[\/\\]lib[\/\\]browser\.js$/)) { 12 | stream.push(license); 13 | 14 | var src = collector(process.env.AWS_SERVICES); 15 | stream._flush = function(callback) { stream.push(src); callback(); }; 16 | } 17 | 18 | return stream; 19 | }; 20 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/index.js: -------------------------------------------------------------------------------- 1 | // Convenience file to require the SDK from the root of the repository 2 | module.exports = require('./lib/aws'); 3 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/lib/aws.js: -------------------------------------------------------------------------------- 1 | var AWS = require('./core'); 2 | module.exports = AWS; 3 | 4 | // Use default API loader function 5 | AWS.apiLoader = require('./api_loader').load; 6 | 7 | // Load the xml2js XML parser 8 | AWS.XML.Parser = require('./xml/node_parser'); 9 | 10 | // Load Node HTTP client 11 | require('./http/node'); 12 | 13 | // Load all service classes 14 | require('./services'); 15 | 16 | // Load custom credential providers 17 | require('./credentials/ec2_metadata_credentials'); 18 | require('./credentials/environment_credentials'); 19 | require('./credentials/file_system_credentials'); 20 | require('./credentials/shared_ini_file_credentials'); 21 | 22 | // Setup default chain providers 23 | AWS.CredentialProviderChain.defaultProviders = [ 24 | function () { return new AWS.EnvironmentCredentials('AWS'); }, 25 | function () { return new AWS.EnvironmentCredentials('AMAZON'); }, 26 | function () { return new AWS.SharedIniFileCredentials(); }, 27 | function () { return new AWS.EC2MetadataCredentials(); } 28 | ]; 29 | 30 | // Update configuration keys 31 | AWS.util.update(AWS.Config.prototype.keys, { 32 | credentials: function () { 33 | var credentials = null; 34 | new AWS.CredentialProviderChain([ 35 | function () { return new AWS.EnvironmentCredentials('AWS'); }, 36 | function () { return new AWS.EnvironmentCredentials('AMAZON'); }, 37 | function () { return new AWS.SharedIniFileCredentials(); } 38 | ]).resolve(function(err, creds) { 39 | if (!err) credentials = creds; 40 | }); 41 | return credentials; 42 | }, 43 | credentialProvider: function() { 44 | return new AWS.CredentialProviderChain(); 45 | }, 46 | region: function() { 47 | return process.env.AWS_REGION || process.env.AMAZON_REGION; 48 | } 49 | }); 50 | 51 | // Reset configuration 52 | AWS.config = new AWS.Config(); 53 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/lib/browser.js: -------------------------------------------------------------------------------- 1 | var AWS = require('./core'); 2 | 3 | // Load browser API loader 4 | AWS.apiLoader = function(svc, version) { 5 | return AWS.apiLoader.services[svc][version]; 6 | }; 7 | 8 | /** 9 | * @api private 10 | */ 11 | AWS.apiLoader.services = {}; 12 | 13 | // Load the DOMParser XML parser 14 | AWS.XML.Parser = require('./xml/browser_parser'); 15 | 16 | // Load the XHR HttpClient 17 | require('./http/xhr'); 18 | 19 | if (typeof window !== 'undefined') window.AWS = AWS; 20 | if (typeof module !== 'undefined') module.exports = AWS; 21 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/lib/core.js: -------------------------------------------------------------------------------- 1 | /** 2 | * The main AWS namespace 3 | */ 4 | var AWS = { util: require('./util') }; 5 | 6 | /** 7 | * @api private 8 | * @!macro [new] nobrowser 9 | * @note This feature is not supported in the browser environment of the SDK. 10 | */ 11 | var _hidden = {}; _hidden.toString(); // hack to parse macro 12 | 13 | module.exports = AWS; 14 | 15 | AWS.util.update(AWS, { 16 | 17 | /** 18 | * @constant 19 | */ 20 | VERSION: '2.2.33', 21 | 22 | /** 23 | * @api private 24 | */ 25 | Signers: {}, 26 | 27 | /** 28 | * @api private 29 | */ 30 | Protocol: { 31 | Json: require('./protocol/json'), 32 | Query: require('./protocol/query'), 33 | Rest: require('./protocol/rest'), 34 | RestJson: require('./protocol/rest_json'), 35 | RestXml: require('./protocol/rest_xml') 36 | }, 37 | 38 | /** 39 | * @api private 40 | */ 41 | XML: { 42 | Builder: require('./xml/builder'), 43 | Parser: null // conditionally set based on environment 44 | }, 45 | 46 | /** 47 | * @api private 48 | */ 49 | JSON: { 50 | Builder: require('./json/builder'), 51 | Parser: require('./json/parser') 52 | }, 53 | 54 | /** 55 | * @api private 56 | */ 57 | Model: { 58 | Api: require('./model/api'), 59 | Operation: require('./model/operation'), 60 | Shape: require('./model/shape'), 61 | Paginator: require('./model/paginator'), 62 | ResourceWaiter: require('./model/resource_waiter') 63 | }, 64 | 65 | util: require('./util'), 66 | 67 | /** 68 | * @api private 69 | */ 70 | apiLoader: function() { throw new Error('No API loader set'); } 71 | }); 72 | 73 | require('./service'); 74 | 75 | require('./credentials'); 76 | require('./credentials/credential_provider_chain'); 77 | require('./credentials/temporary_credentials'); 78 | require('./credentials/web_identity_credentials'); 79 | require('./credentials/cognito_identity_credentials'); 80 | require('./credentials/saml_credentials'); 81 | 82 | require('./config'); 83 | require('./http'); 84 | require('./sequential_executor'); 85 | require('./event_listeners'); 86 | require('./request'); 87 | require('./response'); 88 | require('./resource_waiter'); 89 | require('./signers/request_signer'); 90 | require('./param_validator'); 91 | 92 | /** 93 | * @readonly 94 | * @return [AWS.SequentialExecutor] a collection of global event listeners that 95 | * are attached to every sent request. 96 | * @see AWS.Request AWS.Request for a list of events to listen for 97 | * @example Logging the time taken to send a request 98 | * AWS.events.on('send', function startSend(resp) { 99 | * resp.startTime = new Date().getTime(); 100 | * }).on('complete', function calculateTime(resp) { 101 | * var time = (new Date().getTime() - resp.startTime) / 1000; 102 | * console.log('Request took ' + time + ' seconds'); 103 | * }); 104 | * 105 | * new AWS.S3().listBuckets(); // prints 'Request took 0.285 seconds' 106 | */ 107 | AWS.events = new AWS.SequentialExecutor(); 108 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/lib/credentials/ec2_metadata_credentials.js: -------------------------------------------------------------------------------- 1 | var AWS = require('../core'); 2 | require('../metadata_service'); 3 | 4 | /** 5 | * Represents credentials received from the metadata service on an EC2 instance. 6 | * 7 | * By default, this class will connect to the metadata service using 8 | * {AWS.MetadataService} and attempt to load any available credentials. If it 9 | * can connect, and credentials are available, these will be used with zero 10 | * configuration. 11 | * 12 | * This credentials class will timeout after 1 second of inactivity by default. 13 | * If your requests to the EC2 metadata service are timing out, you can increase 14 | * the value by configuring them directly: 15 | * 16 | * ```javascript 17 | * AWS.config.credentials = new AWS.EC2MetadataCredentials({ 18 | * httpOptions: { timeout: 5000 } // 5 second timeout 19 | * }); 20 | * ``` 21 | * 22 | * @!macro nobrowser 23 | */ 24 | AWS.EC2MetadataCredentials = AWS.util.inherit(AWS.Credentials, { 25 | constructor: function EC2MetadataCredentials(options) { 26 | AWS.Credentials.call(this); 27 | 28 | options = options ? AWS.util.copy(options) : {}; 29 | if (!options.httpOptions) options.httpOptions = {}; 30 | options.httpOptions = AWS.util.merge( 31 | {timeout: this.defaultTimeout}, options.httpOptions); 32 | 33 | this.metadataService = new AWS.MetadataService(options); 34 | this.metadata = {}; 35 | }, 36 | 37 | /** 38 | * @api private 39 | */ 40 | defaultTimeout: 1000, 41 | 42 | /** 43 | * Loads the credentials from the instance metadata service 44 | * 45 | * @callback callback function(err) 46 | * Called when the instance metadata service responds (or fails). When 47 | * this callback is called with no error, it means that the credentials 48 | * information has been loaded into the object (as the `accessKeyId`, 49 | * `secretAccessKey`, and `sessionToken` properties). 50 | * @param err [Error] if an error occurred, this value will be filled 51 | * @see get 52 | */ 53 | refresh: function refresh(callback) { 54 | var self = this; 55 | if (!callback) callback = function(err) { if (err) throw err; }; 56 | 57 | self.metadataService.loadCredentials(function (err, creds) { 58 | if (!err) { 59 | self.expired = false; 60 | self.metadata = creds; 61 | self.accessKeyId = creds.AccessKeyId; 62 | self.secretAccessKey = creds.SecretAccessKey; 63 | self.sessionToken = creds.Token; 64 | self.expireTime = new Date(creds.Expiration); 65 | } 66 | callback(err); 67 | }); 68 | } 69 | }); 70 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/lib/credentials/environment_credentials.js: -------------------------------------------------------------------------------- 1 | var AWS = require('../core'); 2 | 3 | /** 4 | * Represents credentials from the environment. 5 | * 6 | * By default, this class will look for the matching environment variables 7 | * prefixed by a given {envPrefix}. The un-prefixed environment variable names 8 | * for each credential value is listed below: 9 | * 10 | * ```javascript 11 | * accessKeyId: ACCESS_KEY_ID 12 | * secretAccessKey: SECRET_ACCESS_KEY 13 | * sessionToken: SESSION_TOKEN 14 | * ``` 15 | * 16 | * With the default prefix of 'AWS', the environment variables would be: 17 | * 18 | * AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN 19 | * 20 | * @!attribute envPrefix 21 | * @readonly 22 | * @return [String] the prefix for the environment variable names excluding 23 | * the separating underscore ('_'). 24 | */ 25 | AWS.EnvironmentCredentials = AWS.util.inherit(AWS.Credentials, { 26 | 27 | /** 28 | * Creates a new EnvironmentCredentials class with a given variable 29 | * prefix {envPrefix}. For example, to load credentials using the 'AWS' 30 | * prefix: 31 | * 32 | * ```javascript 33 | * var creds = new AWS.EnvironmentCredentials('AWS'); 34 | * creds.accessKeyId == 'AKID' // from AWS_ACCESS_KEY_ID env var 35 | * ``` 36 | * 37 | * @param envPrefix [String] the prefix to use (e.g., 'AWS') for environment 38 | * variables. Do not include the separating underscore. 39 | */ 40 | constructor: function EnvironmentCredentials(envPrefix) { 41 | AWS.Credentials.call(this); 42 | this.envPrefix = envPrefix; 43 | this.get(function() {}); 44 | }, 45 | 46 | /** 47 | * Loads credentials from the environment using the prefixed 48 | * environment variables. 49 | * 50 | * @callback callback function(err) 51 | * Called after the (prefixed) ACCESS_KEY_ID, SECRET_ACCESS_KEY, and 52 | * SESSION_TOKEN environment variables are read. When this callback is 53 | * called with no error, it means that the credentials information has 54 | * been loaded into the object (as the `accessKeyId`, `secretAccessKey`, 55 | * and `sessionToken` properties). 56 | * @param err [Error] if an error occurred, this value will be filled 57 | * @see get 58 | */ 59 | refresh: function refresh(callback) { 60 | if (!callback) callback = function(err) { if (err) throw err; }; 61 | 62 | if (process === undefined) { 63 | callback(new Error('No process info available')); 64 | return; 65 | } 66 | 67 | var keys = ['ACCESS_KEY_ID', 'SECRET_ACCESS_KEY', 'SESSION_TOKEN']; 68 | var values = []; 69 | 70 | for (var i = 0; i < keys.length; i++) { 71 | var prefix = ''; 72 | if (this.envPrefix) prefix = this.envPrefix + '_'; 73 | values[i] = process.env[prefix + keys[i]]; 74 | if (!values[i] && keys[i] !== 'SESSION_TOKEN') { 75 | callback(new Error('Variable ' + prefix + keys[i] + ' not set.')); 76 | return; 77 | } 78 | } 79 | 80 | this.expired = false; 81 | AWS.Credentials.apply(this, values); 82 | callback(); 83 | } 84 | 85 | }); 86 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/lib/credentials/file_system_credentials.js: -------------------------------------------------------------------------------- 1 | var AWS = require('../core'); 2 | 3 | /** 4 | * Represents credentials from a JSON file on disk. 5 | * If the credentials expire, the SDK can {refresh} the credentials 6 | * from the file. 7 | * 8 | * The format of the file should be similar to the options passed to 9 | * {AWS.Config}: 10 | * 11 | * ```javascript 12 | * {accessKeyId: 'akid', secretAccessKey: 'secret', sessionToken: 'optional'} 13 | * ``` 14 | * 15 | * @example Loading credentials from disk 16 | * var creds = new AWS.FileSystemCredentials('./configuration.json'); 17 | * creds.accessKeyId == 'AKID' 18 | * 19 | * @!attribute filename 20 | * @readonly 21 | * @return [String] the path to the JSON file on disk containing the 22 | * credentials. 23 | * @!macro nobrowser 24 | */ 25 | AWS.FileSystemCredentials = AWS.util.inherit(AWS.Credentials, { 26 | 27 | /** 28 | * @overload AWS.FileSystemCredentials(filename) 29 | * Creates a new FileSystemCredentials object from a filename 30 | * 31 | * @param filename [String] the path on disk to the JSON file to load. 32 | */ 33 | constructor: function FileSystemCredentials(filename) { 34 | AWS.Credentials.call(this); 35 | this.filename = filename; 36 | this.get(function() {}); 37 | }, 38 | 39 | /** 40 | * Loads the credentials from the {filename} on disk. 41 | * 42 | * @callback callback function(err) 43 | * Called after the JSON file on disk is read and parsed. When this callback 44 | * is called with no error, it means that the credentials information 45 | * has been loaded into the object (as the `accessKeyId`, `secretAccessKey`, 46 | * and `sessionToken` properties). 47 | * @param err [Error] if an error occurred, this value will be filled 48 | * @see get 49 | */ 50 | refresh: function refresh(callback) { 51 | if (!callback) callback = function(err) { if (err) throw err; }; 52 | try { 53 | var creds = JSON.parse(AWS.util.readFileSync(this.filename)); 54 | AWS.Credentials.call(this, creds); 55 | if (!this.accessKeyId || !this.secretAccessKey) { 56 | throw new Error('Credentials not set in ' + this.filename); 57 | } 58 | this.expired = false; 59 | callback(); 60 | } catch (err) { 61 | callback(err); 62 | } 63 | } 64 | 65 | }); 66 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/lib/dynamodb/converter.js: -------------------------------------------------------------------------------- 1 | var util = require('../core').util; 2 | var typeOf = require('./types').typeOf; 3 | var DynamoDBSet = require('./set'); 4 | 5 | function convertInput(data) { 6 | if (typeOf(data) === 'Object') { 7 | var map = {M: {}}; 8 | for (var key in data) { 9 | map['M'][key] = convertInput(data[key]); 10 | } 11 | return map; 12 | } else if (typeOf(data) === 'Array') { 13 | var list = {L: []}; 14 | for (var i = 0; i < data.length; i++) { 15 | list['L'].push(convertInput(data[i])); 16 | } 17 | return list; 18 | } else if (typeOf(data) === 'Set') { 19 | return formatSet(data); 20 | } else if (typeOf(data) === 'String') { 21 | return { 'S': data }; 22 | } else if (typeOf(data) === 'Number') { 23 | return { 'N': data.toString() }; 24 | } else if (typeOf(data) === 'Binary') { 25 | return { 'B': data }; 26 | } else if (typeOf(data) === 'Boolean') { 27 | return {'BOOL': data}; 28 | } else if (typeOf(data) === 'null') { 29 | return {'NULL': true}; 30 | } 31 | } 32 | 33 | function formatSet(data) { 34 | var map = {}; 35 | switch (data.type) { 36 | case 'String': map['SS'] = data.values; break; 37 | case 'Binary': map['BS'] = data.values; break; 38 | case 'Number': map['NS'] = data.values.map(function (value) { 39 | return value.toString(); 40 | }); 41 | } 42 | return map; 43 | } 44 | 45 | function convertOutput(data) { 46 | var list, map, i; 47 | for (var type in data) { 48 | var values = data[type]; 49 | if (type === 'M') { 50 | map = {}; 51 | for (var key in values) { 52 | map[key] = convertOutput(values[key]); 53 | } 54 | return map; 55 | } else if (type === 'L') { 56 | list = []; 57 | for (i = 0; i < values.length; i++) { 58 | list.push(convertOutput(values[i])); 59 | } 60 | return list; 61 | } else if (type === 'SS') { 62 | list = []; 63 | for (i = 0; i < values.length; i++) { 64 | list.push(values[i] + ''); 65 | } 66 | return new DynamoDBSet(list); 67 | } else if (type === 'NS') { 68 | list = []; 69 | for (i = 0; i < values.length; i++) { 70 | list.push(Number(values[i])); 71 | } 72 | return new DynamoDBSet(list); 73 | } else if (type === 'BS') { 74 | list = []; 75 | for (i = 0; i < values.length; i++) { 76 | list.push(new util.Buffer(values[i])); 77 | } 78 | return new DynamoDBSet(list); 79 | } else if (type === 'S') { 80 | return values + ''; 81 | } else if (type === 'N') { 82 | return Number(values); 83 | } else if (type === 'B') { 84 | return new util.Buffer(values); 85 | } else if (type === 'BOOL') { 86 | return (values === 'true' || values === 'TRUE' || values === true); 87 | } else if (type === 'NULL') { 88 | return null; 89 | } 90 | } 91 | } 92 | 93 | module.exports = { 94 | input: convertInput, 95 | output: convertOutput 96 | }; 97 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/lib/dynamodb/set.js: -------------------------------------------------------------------------------- 1 | var util = require('../core').util; 2 | var typeOf = require('./types').typeOf; 3 | 4 | var DynamoDBSet = util.inherit({ 5 | 6 | constructor: function Set(list, options) { 7 | options = options || {}; 8 | this.initialize(list, options.validate); 9 | }, 10 | 11 | initialize: function(list, validate) { 12 | var self = this; 13 | self.values = [].concat(list); 14 | self.detectType(); 15 | if (validate) { 16 | self.validate(); 17 | } 18 | }, 19 | 20 | detectType: function() { 21 | var self = this; 22 | var value = self.values[0]; 23 | if (typeOf(value) === 'String') { 24 | self.type = 'String'; 25 | } else if (typeOf(value) === 'Number') { 26 | self.type = 'Number'; 27 | } else if (typeOf(value) === 'Binary') { 28 | self.type = 'Binary'; 29 | } else { 30 | throw util.error(new Error(), { 31 | code: 'InvalidSetType', 32 | message: 'Sets can contain string, number, or binary values' 33 | }); 34 | } 35 | }, 36 | 37 | validate: function() { 38 | var self = this; 39 | var length = self.values.length; 40 | var values = self.values; 41 | for (var i = 0; i < length; i++) { 42 | if (typeOf(values[i]) !== self.type) { 43 | throw util.error(new Error(), { 44 | code: 'InvalidType', 45 | message: self.type + ' Set contains ' + typeOf(values[i]) + ' value' 46 | }); 47 | } 48 | } 49 | } 50 | 51 | }); 52 | 53 | module.exports = DynamoDBSet; 54 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/lib/dynamodb/translator.js: -------------------------------------------------------------------------------- 1 | var util = require('../core').util; 2 | var convert = require('./converter'); 3 | 4 | var Translator = function(options) { 5 | options = options || {}; 6 | this.attrValue = options.attrValue; 7 | }; 8 | 9 | Translator.prototype.translateInput = function(value, shape) { 10 | this.mode = 'input'; 11 | return this.translate(value, shape); 12 | }; 13 | 14 | Translator.prototype.translateOutput = function(value, shape) { 15 | this.mode = 'output'; 16 | return this.translate(value, shape); 17 | }; 18 | 19 | Translator.prototype.translate = function(value, shape) { 20 | var self = this; 21 | if (!shape || value === undefined) return undefined; 22 | 23 | if (shape.shape === self.attrValue) { 24 | return convert[self.mode](value); 25 | } 26 | switch (shape.type) { 27 | case 'structure': return self.translateStructure(value, shape); 28 | case 'map': return self.translateMap(value, shape); 29 | case 'list': return self.translateList(value, shape); 30 | default: return self.translateScalar(value, shape); 31 | } 32 | }; 33 | 34 | Translator.prototype.translateStructure = function(structure, shape) { 35 | var self = this; 36 | if (structure == null) return undefined; 37 | 38 | var struct = {}; 39 | util.each(structure, function(name, value) { 40 | var memberShape = shape.members[name]; 41 | if (memberShape) { 42 | var result = self.translate(value, memberShape); 43 | if (result !== undefined) struct[name] = result; 44 | } 45 | }); 46 | return struct; 47 | }; 48 | 49 | Translator.prototype.translateList = function(list, shape) { 50 | var self = this; 51 | if (list == null) return undefined; 52 | 53 | var out = []; 54 | util.arrayEach(list, function(value) { 55 | var result = self.translate(value, shape.member); 56 | if (result === undefined) out.push(null); 57 | else out.push(result); 58 | }); 59 | return out; 60 | }; 61 | 62 | Translator.prototype.translateMap = function(map, shape) { 63 | var self = this; 64 | if (map == null) return undefined; 65 | 66 | var out = {}; 67 | util.each(map, function(key, value) { 68 | var result = self.translate(value, shape.value); 69 | if (result === undefined) out[key] = null; 70 | else out[key] = result; 71 | }); 72 | return out; 73 | }; 74 | 75 | Translator.prototype.translateScalar = function(value, shape) { 76 | return shape.toType(value); 77 | }; 78 | 79 | module.exports = Translator; 80 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/lib/dynamodb/types.js: -------------------------------------------------------------------------------- 1 | var util = require('../core').util; 2 | 3 | function typeOf(data) { 4 | if (data === null && typeof data === 'object') { 5 | return 'null'; 6 | } else if (data !== undefined && isBinary(data)) { 7 | return 'Binary'; 8 | } else if (data !== undefined && data.constructor) { 9 | return util.typeName(data.constructor); 10 | } else { 11 | return 'undefined'; 12 | } 13 | } 14 | 15 | function isBinary(data) { 16 | var types = [ 17 | 'Buffer', 'File', 'Blob', 'ArrayBuffer', 'DataView', 18 | 'Int8Array', 'Uint8Array', 'Uint8ClampedArray', 19 | 'Int16Array', 'Uint16Array', 'Int32Array', 'Uint32Array', 20 | 'Float32Array', 'Float64Array' 21 | ]; 22 | if (util.isNode()) { 23 | var Stream = util.nodeRequire('stream').Stream; 24 | if (util.Buffer.isBuffer(data) || data instanceof Stream) 25 | return true; 26 | } else { 27 | for (var i = 0; i < types.length; i++) { 28 | if (data !== undefined && data.constructor) { 29 | if (util.isType(data, types[i])) return true; 30 | if (util.typeName(data.constructor) === types[i]) return true; 31 | } 32 | } 33 | } 34 | return false; 35 | } 36 | 37 | module.exports = { 38 | typeOf: typeOf, 39 | isBinary: isBinary 40 | }; 41 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/lib/json/builder.js: -------------------------------------------------------------------------------- 1 | var util = require('../util'); 2 | 3 | function JsonBuilder() { } 4 | 5 | JsonBuilder.prototype.build = function(value, shape) { 6 | return JSON.stringify(translate(value, shape)); 7 | }; 8 | 9 | function translate(value, shape) { 10 | if (!shape || value === undefined || value === null) return undefined; 11 | 12 | switch (shape.type) { 13 | case 'structure': return translateStructure(value, shape); 14 | case 'map': return translateMap(value, shape); 15 | case 'list': return translateList(value, shape); 16 | default: return translateScalar(value, shape); 17 | } 18 | } 19 | 20 | function translateStructure(structure, shape) { 21 | var struct = {}; 22 | util.each(structure, function(name, value) { 23 | var memberShape = shape.members[name]; 24 | if (memberShape) { 25 | if (memberShape.location !== 'body') return; 26 | var locationName = memberShape.isLocationName ? memberShape.name : name; 27 | var result = translate(value, memberShape); 28 | if (result !== undefined) struct[locationName] = result; 29 | } 30 | }); 31 | return struct; 32 | } 33 | 34 | function translateList(list, shape) { 35 | var out = []; 36 | util.arrayEach(list, function(value) { 37 | var result = translate(value, shape.member); 38 | if (result !== undefined) out.push(result); 39 | }); 40 | return out; 41 | } 42 | 43 | function translateMap(map, shape) { 44 | var out = {}; 45 | util.each(map, function(key, value) { 46 | var result = translate(value, shape.value); 47 | if (result !== undefined) out[key] = result; 48 | }); 49 | return out; 50 | } 51 | 52 | function translateScalar(value, shape) { 53 | return shape.toWireFormat(value); 54 | } 55 | 56 | module.exports = JsonBuilder; 57 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/lib/json/parser.js: -------------------------------------------------------------------------------- 1 | var util = require('../util'); 2 | 3 | function JsonParser() { } 4 | 5 | JsonParser.prototype.parse = function(value, shape) { 6 | return translate(JSON.parse(value), shape); 7 | }; 8 | 9 | function translate(value, shape) { 10 | if (!shape || value === undefined) return undefined; 11 | 12 | switch (shape.type) { 13 | case 'structure': return translateStructure(value, shape); 14 | case 'map': return translateMap(value, shape); 15 | case 'list': return translateList(value, shape); 16 | default: return translateScalar(value, shape); 17 | } 18 | } 19 | 20 | function translateStructure(structure, shape) { 21 | if (structure == null) return undefined; 22 | 23 | var struct = {}; 24 | var shapeMembers = shape.members; 25 | util.each(shapeMembers, function(name, memberShape) { 26 | var locationName = memberShape.isLocationName ? memberShape.name : name; 27 | if (structure.hasOwnProperty(locationName)) { 28 | var value = structure[locationName]; 29 | var result = translate(value, memberShape); 30 | if (result !== undefined) struct[name] = result; 31 | } 32 | }); 33 | return struct; 34 | } 35 | 36 | function translateList(list, shape) { 37 | if (list == null) return undefined; 38 | 39 | var out = []; 40 | util.arrayEach(list, function(value) { 41 | var result = translate(value, shape.member); 42 | if (result === undefined) out.push(null); 43 | else out.push(result); 44 | }); 45 | return out; 46 | } 47 | 48 | function translateMap(map, shape) { 49 | if (map == null) return undefined; 50 | 51 | var out = {}; 52 | util.each(map, function(key, value) { 53 | var result = translate(value, shape.value); 54 | if (result === undefined) out[key] = null; 55 | else out[key] = result; 56 | }); 57 | return out; 58 | } 59 | 60 | function translateScalar(value, shape) { 61 | return shape.toType(value); 62 | } 63 | 64 | module.exports = JsonParser; 65 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/lib/model/api.js: -------------------------------------------------------------------------------- 1 | var Collection = require('./collection'); 2 | var Operation = require('./operation'); 3 | var Shape = require('./shape'); 4 | var Paginator = require('./paginator'); 5 | var ResourceWaiter = require('./resource_waiter'); 6 | 7 | var util = require('../util'); 8 | var property = util.property; 9 | var memoizedProperty = util.memoizedProperty; 10 | 11 | function Api(api, options) { 12 | api = api || {}; 13 | options = options || {}; 14 | options.api = this; 15 | 16 | api.metadata = api.metadata || {}; 17 | 18 | property(this, 'isApi', true, false); 19 | property(this, 'apiVersion', api.metadata.apiVersion); 20 | property(this, 'endpointPrefix', api.metadata.endpointPrefix); 21 | property(this, 'signingName', api.metadata.signingName); 22 | property(this, 'globalEndpoint', api.metadata.globalEndpoint); 23 | property(this, 'signatureVersion', api.metadata.signatureVersion); 24 | property(this, 'jsonVersion', api.metadata.jsonVersion); 25 | property(this, 'targetPrefix', api.metadata.targetPrefix); 26 | property(this, 'protocol', api.metadata.protocol); 27 | property(this, 'timestampFormat', api.metadata.timestampFormat); 28 | property(this, 'xmlNamespaceUri', api.metadata.xmlNamespace); 29 | property(this, 'abbreviation', api.metadata.serviceAbbreviation); 30 | property(this, 'fullName', api.metadata.serviceFullName); 31 | 32 | memoizedProperty(this, 'className', function() { 33 | var name = api.metadata.serviceAbbreviation || api.metadata.serviceFullName; 34 | if (!name) return null; 35 | 36 | name = name.replace(/^Amazon|AWS\s*|\(.*|\s+|\W+/g, ''); 37 | if (name === 'ElasticLoadBalancing') name = 'ELB'; 38 | return name; 39 | }); 40 | 41 | property(this, 'operations', new Collection(api.operations, options, function(name, operation) { 42 | return new Operation(name, operation, options); 43 | }, util.string.lowerFirst)); 44 | 45 | property(this, 'shapes', new Collection(api.shapes, options, function(name, shape) { 46 | return Shape.create(shape, options); 47 | })); 48 | 49 | property(this, 'paginators', new Collection(api.paginators, options, function(name, paginator) { 50 | return new Paginator(name, paginator, options); 51 | })); 52 | 53 | property(this, 'waiters', new Collection(api.waiters, options, function(name, waiter) { 54 | return new ResourceWaiter(name, waiter, options); 55 | }, util.string.lowerFirst)); 56 | 57 | if (options.documentation) { 58 | property(this, 'documentation', api.documentation); 59 | property(this, 'documentationUrl', api.documentationUrl); 60 | } 61 | } 62 | 63 | module.exports = Api; 64 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/lib/model/collection.js: -------------------------------------------------------------------------------- 1 | var memoizedProperty = require('../util').memoizedProperty; 2 | 3 | function memoize(name, value, fn, nameTr) { 4 | memoizedProperty(this, nameTr(name), function() { 5 | return fn(name, value); 6 | }); 7 | } 8 | 9 | function Collection(iterable, options, fn, nameTr) { 10 | nameTr = nameTr || String; 11 | var self = this; 12 | 13 | for (var id in iterable) { 14 | if (iterable.hasOwnProperty(id)) { 15 | memoize.call(self, id, iterable[id], fn, nameTr); 16 | } 17 | } 18 | } 19 | 20 | module.exports = Collection; 21 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/lib/model/operation.js: -------------------------------------------------------------------------------- 1 | var Shape = require('./shape'); 2 | 3 | var util = require('../util'); 4 | var property = util.property; 5 | var memoizedProperty = util.memoizedProperty; 6 | 7 | function Operation(name, operation, options) { 8 | options = options || {}; 9 | 10 | property(this, 'name', operation.name || name); 11 | property(this, 'api', options.api, false); 12 | 13 | operation.http = operation.http || {}; 14 | property(this, 'httpMethod', operation.http.method || 'POST'); 15 | property(this, 'httpPath', operation.http.requestUri || '/'); 16 | 17 | memoizedProperty(this, 'input', function() { 18 | if (!operation.input) { 19 | return new Shape.create({type: 'structure'}, options); 20 | } 21 | return Shape.create(operation.input, options); 22 | }); 23 | 24 | memoizedProperty(this, 'output', function() { 25 | if (!operation.output) { 26 | return new Shape.create({type: 'structure'}, options); 27 | } 28 | return Shape.create(operation.output, options); 29 | }); 30 | 31 | memoizedProperty(this, 'errors', function() { 32 | var list = []; 33 | if (!operation.errors) return null; 34 | 35 | for (var i = 0; i < operation.errors.length; i++) { 36 | list.push(Shape.create(operation.errors[i], options)); 37 | } 38 | 39 | return list; 40 | }); 41 | 42 | memoizedProperty(this, 'paginator', function() { 43 | return options.api.paginators[name]; 44 | }); 45 | 46 | if (options.documentation) { 47 | property(this, 'documentation', operation.documentation); 48 | property(this, 'documentationUrl', operation.documentationUrl); 49 | } 50 | } 51 | 52 | module.exports = Operation; 53 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/lib/model/paginator.js: -------------------------------------------------------------------------------- 1 | var property = require('../util').property; 2 | 3 | function Paginator(name, paginator) { 4 | property(this, 'inputToken', paginator.input_token); 5 | property(this, 'limitKey', paginator.limit_key); 6 | property(this, 'moreResults', paginator.more_results); 7 | property(this, 'outputToken', paginator.output_token); 8 | property(this, 'resultKey', paginator.result_key); 9 | } 10 | 11 | module.exports = Paginator; 12 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/lib/model/resource_waiter.js: -------------------------------------------------------------------------------- 1 | var util = require('../util'); 2 | var property = util.property; 3 | 4 | function ResourceWaiter(name, waiter, options) { 5 | options = options || {}; 6 | 7 | function InnerResourceWaiter() { 8 | property(this, 'name', name); 9 | property(this, 'api', options.api, false); 10 | 11 | if (waiter.operation) { 12 | property(this, 'operation', util.string.lowerFirst(waiter.operation)); 13 | } 14 | 15 | var self = this, map = { 16 | ignoreErrors: 'ignore_errors', 17 | successType: 'success_type', 18 | successValue: 'success_value', 19 | successPath: 'success_path', 20 | acceptorType: 'acceptor_type', 21 | acceptorValue: 'acceptor_value', 22 | acceptorPath: 'acceptor_path', 23 | failureType: 'failure_type', 24 | failureValue: 'failure_value', 25 | failurePath: 'success_path', 26 | interval: 'interval', 27 | maxAttempts: 'max_attempts' 28 | }; 29 | Object.keys(map).forEach(function(key) { 30 | var value = waiter[map[key]]; 31 | if (value) property(self, key, value); 32 | }); 33 | } 34 | 35 | if (options.api) { 36 | var proto = null; 37 | if (waiter['extends']) { 38 | proto = options.api.waiters[waiter['extends']]; 39 | } else if (name !== '__default__') { 40 | proto = options.api.waiters['__default__']; 41 | } 42 | 43 | if (proto) InnerResourceWaiter.prototype = proto; 44 | } 45 | 46 | return new InnerResourceWaiter(); 47 | } 48 | 49 | module.exports = ResourceWaiter; 50 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/lib/protocol/json.js: -------------------------------------------------------------------------------- 1 | var util = require('../util'); 2 | var JsonBuilder = require('../json/builder'); 3 | var JsonParser = require('../json/parser'); 4 | 5 | function buildRequest(req) { 6 | var httpRequest = req.httpRequest; 7 | var api = req.service.api; 8 | var target = api.targetPrefix + '.' + api.operations[req.operation].name; 9 | var version = api.jsonVersion || '1.0'; 10 | var input = api.operations[req.operation].input; 11 | var builder = new JsonBuilder(); 12 | 13 | if (version === 1) version = '1.0'; 14 | httpRequest.body = builder.build(req.params || {}, input); 15 | httpRequest.headers['Content-Type'] = 'application/x-amz-json-' + version; 16 | httpRequest.headers['X-Amz-Target'] = target; 17 | } 18 | 19 | function extractError(resp) { 20 | var error = {}; 21 | var httpResponse = resp.httpResponse; 22 | 23 | error.code = httpResponse.headers['x-amzn-errortype'] || 'UnknownError'; 24 | if (typeof error.code === 'string') { 25 | error.code = error.code.split(':')[0]; 26 | } 27 | 28 | if (httpResponse.body.length > 0) { 29 | var e = JSON.parse(httpResponse.body.toString()); 30 | if (e.__type || e.code) { 31 | error.code = (e.__type || e.code).split('#').pop(); 32 | } 33 | if (error.code === 'RequestEntityTooLarge') { 34 | error.message = 'Request body must be less than 1 MB'; 35 | } else { 36 | error.message = (e.message || e.Message || null); 37 | } 38 | } else { 39 | error.statusCode = httpResponse.statusCode; 40 | error.message = httpResponse.statusCode.toString(); 41 | } 42 | 43 | resp.error = util.error(new Error(), error); 44 | } 45 | 46 | function extractData(resp) { 47 | var body = resp.httpResponse.body.toString() || '{}'; 48 | if (resp.request.service.config.convertResponseTypes === false) { 49 | resp.data = JSON.parse(body); 50 | } else { 51 | var operation = resp.request.service.api.operations[resp.request.operation]; 52 | var shape = operation.output || {}; 53 | var parser = new JsonParser(); 54 | resp.data = parser.parse(body, shape); 55 | } 56 | } 57 | 58 | module.exports = { 59 | buildRequest: buildRequest, 60 | extractError: extractError, 61 | extractData: extractData 62 | }; 63 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/lib/protocol/rest_json.js: -------------------------------------------------------------------------------- 1 | var util = require('../util'); 2 | var Rest = require('./rest'); 3 | var Json = require('./json'); 4 | var JsonBuilder = require('../json/builder'); 5 | var JsonParser = require('../json/parser'); 6 | 7 | function populateBody(req) { 8 | var builder = new JsonBuilder(); 9 | var input = req.service.api.operations[req.operation].input; 10 | 11 | if (input.payload) { 12 | var params = {}; 13 | var payloadShape = input.members[input.payload]; 14 | params = req.params[input.payload]; 15 | if (params === undefined) return; 16 | 17 | if (payloadShape.type === 'structure') { 18 | req.httpRequest.body = builder.build(params, payloadShape); 19 | } else { // non-JSON payload 20 | req.httpRequest.body = params; 21 | } 22 | } else { 23 | req.httpRequest.body = builder.build(req.params, input); 24 | } 25 | } 26 | 27 | function buildRequest(req) { 28 | Rest.buildRequest(req); 29 | 30 | // never send body payload on GET/HEAD/DELETE 31 | if (['GET', 'HEAD', 'DELETE'].indexOf(req.httpRequest.method) < 0) { 32 | populateBody(req); 33 | } 34 | } 35 | 36 | function extractError(resp) { 37 | Json.extractError(resp); 38 | } 39 | 40 | function extractData(resp) { 41 | Rest.extractData(resp); 42 | 43 | var req = resp.request; 44 | var rules = req.service.api.operations[req.operation].output || {}; 45 | if (rules.payload) { 46 | var payloadMember = rules.members[rules.payload]; 47 | var body = resp.httpResponse.body; 48 | if (payloadMember.isStreaming) { 49 | resp.data[rules.payload] = body; 50 | } else if (payloadMember.type === 'structure' || payloadMember.type === 'list') { 51 | var parser = new JsonParser(); 52 | resp.data[rules.payload] = parser.parse(body, payloadMember); 53 | } else { 54 | resp.data[rules.payload] = body.toString(); 55 | } 56 | } else { 57 | var data = resp.data; 58 | Json.extractData(resp); 59 | resp.data = util.merge(data, resp.data); 60 | } 61 | } 62 | 63 | module.exports = { 64 | buildRequest: buildRequest, 65 | extractError: extractError, 66 | extractData: extractData 67 | }; 68 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/lib/protocol/rest_xml.js: -------------------------------------------------------------------------------- 1 | var AWS = require('../core'); 2 | var util = require('../util'); 3 | var Rest = require('./rest'); 4 | 5 | function populateBody(req) { 6 | var input = req.service.api.operations[req.operation].input; 7 | var builder = new AWS.XML.Builder(); 8 | var params = req.params; 9 | 10 | var payload = input.payload; 11 | if (payload) { 12 | var payloadMember = input.members[payload]; 13 | params = params[payload]; 14 | if (params === undefined) return; 15 | 16 | if (payloadMember.type === 'structure') { 17 | var rootElement = payloadMember.name; 18 | req.httpRequest.body = builder.toXML(params, payloadMember, rootElement, true); 19 | } else { // non-xml payload 20 | req.httpRequest.body = params; 21 | } 22 | } else { 23 | req.httpRequest.body = builder.toXML(params, input, input.name || 24 | input.shape || util.string.upperFirst(req.operation) + 'Request'); 25 | } 26 | } 27 | 28 | function buildRequest(req) { 29 | Rest.buildRequest(req); 30 | 31 | // never send body payload on GET/HEAD 32 | if (['GET', 'HEAD'].indexOf(req.httpRequest.method) < 0) { 33 | populateBody(req); 34 | } 35 | } 36 | 37 | function extractError(resp) { 38 | Rest.extractError(resp); 39 | 40 | var data = new AWS.XML.Parser().parse(resp.httpResponse.body.toString()); 41 | if (data.Errors) data = data.Errors; 42 | if (data.Error) data = data.Error; 43 | if (data.Code) { 44 | resp.error = util.error(new Error(), { 45 | code: data.Code, 46 | message: data.Message 47 | }); 48 | } else { 49 | resp.error = util.error(new Error(), { 50 | code: resp.httpResponse.statusCode, 51 | message: null 52 | }); 53 | } 54 | } 55 | 56 | function extractData(resp) { 57 | Rest.extractData(resp); 58 | 59 | var parser; 60 | var req = resp.request; 61 | var body = resp.httpResponse.body; 62 | var operation = req.service.api.operations[req.operation]; 63 | var output = operation.output; 64 | 65 | var payload = output.payload; 66 | if (payload) { 67 | var payloadMember = output.members[payload]; 68 | if (payloadMember.isStreaming) { 69 | resp.data[payload] = body; 70 | } else if (payloadMember.type === 'structure') { 71 | parser = new AWS.XML.Parser(); 72 | resp.data[payload] = parser.parse(body.toString(), payloadMember); 73 | } else { 74 | resp.data[payload] = body.toString(); 75 | } 76 | } else if (body.length > 0) { 77 | parser = new AWS.XML.Parser(); 78 | var data = parser.parse(body.toString(), output); 79 | util.update(resp.data, data); 80 | } 81 | } 82 | 83 | module.exports = { 84 | buildRequest: buildRequest, 85 | extractError: extractError, 86 | extractData: extractData 87 | }; 88 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/lib/query/query_param_serializer.js: -------------------------------------------------------------------------------- 1 | var util = require('../util'); 2 | 3 | function QueryParamSerializer() { 4 | } 5 | 6 | QueryParamSerializer.prototype.serialize = function(params, shape, fn) { 7 | serializeStructure('', params, shape, fn); 8 | }; 9 | 10 | function ucfirst(shape) { 11 | if (shape.isQueryName || shape.api.protocol !== 'ec2') { 12 | return shape.name; 13 | } else { 14 | return shape.name[0].toUpperCase() + shape.name.substr(1); 15 | } 16 | } 17 | 18 | function serializeStructure(prefix, struct, rules, fn) { 19 | util.each(rules.members, function(name, member) { 20 | var value = struct[name]; 21 | if (value === null || value === undefined) return; 22 | 23 | var memberName = ucfirst(member); 24 | memberName = prefix ? prefix + '.' + memberName : memberName; 25 | serializeMember(memberName, value, member, fn); 26 | }); 27 | } 28 | 29 | function serializeMap(name, map, rules, fn) { 30 | var i = 1; 31 | util.each(map, function (key, value) { 32 | var prefix = rules.flattened ? '.' : '.entry.'; 33 | var position = prefix + (i++) + '.'; 34 | var keyName = position + (rules.key.name || 'key'); 35 | var valueName = position + (rules.value.name || 'value'); 36 | serializeMember(name + keyName, key, rules.key, fn); 37 | serializeMember(name + valueName, value, rules.value, fn); 38 | }); 39 | } 40 | 41 | function serializeList(name, list, rules, fn) { 42 | var memberRules = rules.member || {}; 43 | 44 | if (list.length === 0) { 45 | fn.call(this, name, null); 46 | return; 47 | } 48 | 49 | util.arrayEach(list, function (v, n) { 50 | var suffix = '.' + (n + 1); 51 | if (rules.api.protocol === 'ec2') { 52 | // Do nothing for EC2 53 | suffix = suffix + ''; // make linter happy 54 | } else if (rules.flattened) { 55 | if (memberRules.name) { 56 | var parts = name.split('.'); 57 | parts.pop(); 58 | parts.push(ucfirst(memberRules)); 59 | name = parts.join('.'); 60 | } 61 | } else { 62 | suffix = '.member' + suffix; 63 | } 64 | serializeMember(name + suffix, v, memberRules, fn); 65 | }); 66 | } 67 | 68 | function serializeMember(name, value, rules, fn) { 69 | if (value === null || value === undefined) return; 70 | if (rules.type === 'structure') { 71 | serializeStructure(name, value, rules, fn); 72 | } else if (rules.type === 'list') { 73 | serializeList(name, value, rules, fn); 74 | } else if (rules.type === 'map') { 75 | serializeMap(name, value, rules, fn); 76 | } else { 77 | fn(name, rules.toWireFormat(value).toString()); 78 | } 79 | } 80 | 81 | module.exports = QueryParamSerializer; 82 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/lib/region_config.js: -------------------------------------------------------------------------------- 1 | var util = require('./util'); 2 | var regionConfig = require('./region_config.json'); 3 | 4 | function generateRegionPrefix(region) { 5 | if (!region) return null; 6 | 7 | var parts = region.split('-'); 8 | if (parts.length < 3) return null; 9 | return parts.slice(0, parts.length - 2).join('-') + '-*'; 10 | } 11 | 12 | function derivedKeys(service) { 13 | var region = service.config.region; 14 | var regionPrefix = generateRegionPrefix(region); 15 | var endpointPrefix = service.api.endpointPrefix; 16 | 17 | return [ 18 | [region, endpointPrefix], 19 | [regionPrefix, endpointPrefix], 20 | [region, '*'], 21 | [regionPrefix, '*'], 22 | ['*', endpointPrefix], 23 | ['*', '*'] 24 | ].map(function(item) { 25 | return item[0] && item[1] ? item.join('/') : null; 26 | }); 27 | } 28 | 29 | function applyConfig(service, config) { 30 | util.each(config, function(key, value) { 31 | if (key === 'globalEndpoint') return; 32 | if (service.config[key] === undefined || service.config[key] === null) { 33 | service.config[key] = value; 34 | } 35 | }); 36 | } 37 | 38 | function configureEndpoint(service) { 39 | var keys = derivedKeys(service); 40 | for (var i = 0; i < keys.length; i++) { 41 | var key = keys[i]; 42 | if (!key) continue; 43 | 44 | if (regionConfig.rules.hasOwnProperty(key)) { 45 | var config = regionConfig.rules[key]; 46 | if (typeof config === 'string') { 47 | config = regionConfig.patterns[config]; 48 | } 49 | 50 | // set global endpoint 51 | service.isGlobalEndpoint = !!config.globalEndpoint; 52 | 53 | // signature version 54 | if (!config.signatureVersion) config.signatureVersion = 'v4'; 55 | 56 | // merge config 57 | applyConfig(service, config); 58 | return; 59 | } 60 | } 61 | } 62 | 63 | module.exports = configureEndpoint; 64 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/lib/region_config.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "*/*": { 4 | "endpoint": "{service}.{region}.amazonaws.com" 5 | }, 6 | "cn-*/*": { 7 | "endpoint": "{service}.{region}.amazonaws.com.cn" 8 | }, 9 | "*/cloudfront": "globalSSL", 10 | "*/iam": "globalSSL", 11 | "*/sts": "globalSSL", 12 | "*/importexport": { 13 | "endpoint": "{service}.amazonaws.com", 14 | "signatureVersion": "v2", 15 | "globalEndpoint": true 16 | }, 17 | "*/route53": { 18 | "endpoint": "https://{service}.amazonaws.com", 19 | "signatureVersion": "v3https", 20 | "globalEndpoint": true 21 | }, 22 | "*/waf": "globalSSL", 23 | "us-gov-*/iam": "globalGovCloud", 24 | "us-gov-*/sts": { 25 | "endpoint": "{service}.{region}.amazonaws.com" 26 | }, 27 | "us-gov-west-1/s3": "s3dash", 28 | "us-west-1/s3": "s3dash", 29 | "us-west-2/s3": "s3dash", 30 | "eu-west-1/s3": "s3dash", 31 | "ap-southeast-1/s3": "s3dash", 32 | "ap-southeast-2/s3": "s3dash", 33 | "ap-northeast-1/s3": "s3dash", 34 | "sa-east-1/s3": "s3dash", 35 | "us-east-1/s3": { 36 | "endpoint": "{service}.amazonaws.com", 37 | "signatureVersion": "s3" 38 | }, 39 | "us-east-1/sdb": { 40 | "endpoint": "{service}.amazonaws.com", 41 | "signatureVersion": "v2" 42 | }, 43 | "*/sdb": { 44 | "endpoint": "{service}.{region}.amazonaws.com", 45 | "signatureVersion": "v2" 46 | } 47 | }, 48 | 49 | "patterns": { 50 | "globalSSL": { 51 | "endpoint": "https://{service}.amazonaws.com", 52 | "globalEndpoint": true 53 | }, 54 | "globalGovCloud": { 55 | "endpoint": "{service}.us-gov.amazonaws.com" 56 | }, 57 | "s3dash": { 58 | "endpoint": "{service}-{region}.amazonaws.com", 59 | "signatureVersion": "s3" 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/lib/services.js: -------------------------------------------------------------------------------- 1 | var fs = require('fs'); 2 | var path = require('path'); 3 | var AWS = require('./core'); 4 | var apis = require('./api_loader'); 5 | 6 | // define services using map 7 | apis.services.forEach(function(identifier) { 8 | var name = apis.serviceName(identifier); 9 | var versions = apis.serviceVersions(identifier); 10 | AWS[name] = AWS.Service.defineService(identifier, versions); 11 | 12 | // load any customizations from lib/services/.js 13 | var svcFile = path.join(__dirname, 'services', identifier + '.js'); 14 | if (fs.existsSync(svcFile)) require('./services/' + identifier); 15 | }); 16 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/lib/services/apigateway.js: -------------------------------------------------------------------------------- 1 | var AWS = require('../core'); 2 | 3 | AWS.util.update(AWS.APIGateway.prototype, { 4 | /** 5 | * Sets the Accept header to application/json. 6 | * 7 | * @api private 8 | */ 9 | setAcceptHeader: function setAcceptHeader(req) { 10 | var httpRequest = req.httpRequest; 11 | httpRequest.headers['Accept'] = 'application/json'; 12 | }, 13 | 14 | /** 15 | * @api private 16 | */ 17 | setupRequestListeners: function setupRequestListeners(request) { 18 | request.addListener('build', this.setAcceptHeader); 19 | } 20 | }); 21 | 22 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/lib/services/cloudfront.js: -------------------------------------------------------------------------------- 1 | var AWS = require('../core'); 2 | 3 | // pull in CloudFront signer 4 | require('../cloudfront/signer'); 5 | 6 | AWS.util.update(AWS.CloudFront.prototype, { 7 | 8 | setupRequestListeners: function setupRequestListeners(request) { 9 | request.addListener('extractData', AWS.util.hoistPayloadMember); 10 | } 11 | 12 | }); 13 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/lib/services/cognitoidentity.js: -------------------------------------------------------------------------------- 1 | var AWS = require('../core'); 2 | 3 | AWS.util.update(AWS.CognitoIdentity.prototype, { 4 | getOpenIdToken: function getOpenIdToken(params, callback) { 5 | return this.makeUnauthenticatedRequest('getOpenIdToken', params, callback); 6 | }, 7 | 8 | getId: function getId(params, callback) { 9 | return this.makeUnauthenticatedRequest('getId', params, callback); 10 | }, 11 | 12 | getCredentialsForIdentity: function getCredentialsForIdentity(params, callback) { 13 | return this.makeUnauthenticatedRequest('getCredentialsForIdentity', params, callback); 14 | } 15 | }); 16 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/lib/services/dynamodb.js: -------------------------------------------------------------------------------- 1 | var AWS = require('../core'); 2 | require('../dynamodb/document_client'); 3 | 4 | AWS.util.update(AWS.DynamoDB.prototype, { 5 | /** 6 | * @api private 7 | */ 8 | setupRequestListeners: function setupRequestListeners(request) { 9 | if (request.service.config.dynamoDbCrc32) { 10 | request.removeListener('extractData', AWS.EventListeners.Json.EXTRACT_DATA); 11 | request.addListener('extractData', this.checkCrc32); 12 | request.addListener('extractData', AWS.EventListeners.Json.EXTRACT_DATA); 13 | } 14 | }, 15 | 16 | /** 17 | * @api private 18 | */ 19 | checkCrc32: function checkCrc32(resp) { 20 | if (!resp.httpResponse.streaming && !resp.request.service.crc32IsValid(resp)) { 21 | resp.error = AWS.util.error(new Error(), { 22 | code: 'CRC32CheckFailed', 23 | message: 'CRC32 integrity check failed', 24 | retryable: true 25 | }); 26 | resp.request.haltHandlersOnError(); 27 | throw (resp.error); 28 | } 29 | }, 30 | 31 | /** 32 | * @api private 33 | */ 34 | crc32IsValid: function crc32IsValid(resp) { 35 | var crc = resp.httpResponse.headers['x-amz-crc32']; 36 | if (!crc) return true; // no (valid) CRC32 header 37 | return parseInt(crc, 10) === AWS.util.crypto.crc32(resp.httpResponse.body); 38 | }, 39 | 40 | /** 41 | * @api private 42 | */ 43 | defaultRetryCount: 10, 44 | 45 | /** 46 | * @api private 47 | */ 48 | retryDelays: function retryDelays() { 49 | var retryCount = this.numRetries(); 50 | var delays = []; 51 | for (var i = 0; i < retryCount; ++i) { 52 | if (i === 0) { 53 | delays.push(0); 54 | } else { 55 | delays.push(50 * Math.pow(2, i - 1)); 56 | } 57 | } 58 | return delays; 59 | } 60 | }); 61 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/lib/services/ec2.js: -------------------------------------------------------------------------------- 1 | var AWS = require('../core'); 2 | 3 | AWS.util.update(AWS.EC2.prototype, { 4 | /** 5 | * @api private 6 | */ 7 | setupRequestListeners: function setupRequestListeners(request) { 8 | request.removeListener('extractError', AWS.EventListeners.Query.EXTRACT_ERROR); 9 | request.addListener('extractError', this.extractError); 10 | 11 | if (request.operation === 'copySnapshot') { 12 | request.onAsync('validate', this.buildCopySnapshotPresignedUrl); 13 | } 14 | }, 15 | 16 | /** 17 | * @api private 18 | */ 19 | buildCopySnapshotPresignedUrl: function buildCopySnapshotPresignedUrl(req, done) { 20 | if (req.params.PresignedUrl || req._subRequest) { 21 | return done(); 22 | } 23 | 24 | req.params = AWS.util.copy(req.params); 25 | req.params.DestinationRegion = req.service.config.region; 26 | 27 | var config = AWS.util.copy(req.service.config); 28 | delete config.endpoint; 29 | config.region = req.params.SourceRegion; 30 | var svc = new req.service.constructor(config); 31 | var newReq = svc[req.operation](req.params); 32 | newReq._subRequest = true; 33 | newReq.presign(function(err, url) { 34 | if (err) done(err); 35 | else { 36 | req.params.PresignedUrl = url; 37 | done(); 38 | } 39 | }); 40 | }, 41 | 42 | /** 43 | * @api private 44 | */ 45 | extractError: function extractError(resp) { 46 | // EC2 nests the error code and message deeper than other AWS Query services. 47 | var httpResponse = resp.httpResponse; 48 | var data = new AWS.XML.Parser().parse(httpResponse.body.toString() || ''); 49 | if (data.Errors) { 50 | resp.error = AWS.util.error(new Error(), { 51 | code: data.Errors.Error.Code, 52 | message: data.Errors.Error.Message 53 | }); 54 | } else { 55 | resp.error = AWS.util.error(new Error(), { 56 | code: httpResponse.statusCode, 57 | message: null 58 | }); 59 | } 60 | resp.error.requestId = data.RequestID || null; 61 | } 62 | }); 63 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/lib/services/iotdata.js: -------------------------------------------------------------------------------- 1 | var AWS = require('../core'); 2 | 3 | /** 4 | * Constructs a service interface object. Each API operation is exposed as a 5 | * function on service. 6 | * 7 | * ### Sending a Request Using IotData 8 | * 9 | * ```javascript 10 | * var iotdata = new AWS.IotData({endpoint: 'my.host.tld'}); 11 | * iotdata.getThingShadow(params, function (err, data) { 12 | * if (err) console.log(err, err.stack); // an error occurred 13 | * else console.log(data); // successful response 14 | * }); 15 | * ``` 16 | * 17 | * ### Locking the API Version 18 | * 19 | * In order to ensure that the IotData object uses this specific API, 20 | * you can construct the object by passing the `apiVersion` option to the 21 | * constructor: 22 | * 23 | * ```javascript 24 | * var iotdata = new AWS.IotData({ 25 | * endpoint: 'my.host.tld', 26 | * apiVersion: '2015-05-28' 27 | * }); 28 | * ``` 29 | * 30 | * You can also set the API version globally in `AWS.config.apiVersions` using 31 | * the **iotdata** service identifier: 32 | * 33 | * ```javascript 34 | * AWS.config.apiVersions = { 35 | * iotdata: '2015-05-28', 36 | * // other service API versions 37 | * }; 38 | * 39 | * var iotdata = new AWS.IotData({endpoint: 'my.host.tld'}); 40 | * ``` 41 | * 42 | * @note You *must* provide an `endpoint` configuration parameter when 43 | * constructing this service. See {constructor} for more information. 44 | * 45 | * @!method constructor(options = {}) 46 | * Constructs a service object. This object has one method for each 47 | * API operation. 48 | * 49 | * @example Constructing a IotData object 50 | * var iotdata = new AWS.IotData({endpoint: 'my.host.tld'}); 51 | * @note You *must* provide an `endpoint` when constructing this service. 52 | * @option (see AWS.Config.constructor) 53 | * 54 | * @service iotdata 55 | * @version 2015-05-28 56 | */ 57 | AWS.util.update(AWS.IotData.prototype, { 58 | /** 59 | * @api private 60 | */ 61 | validateService: function validateService() { 62 | if (!this.config.endpoint || this.config.endpoint.indexOf('{') >= 0) { 63 | var msg = 'AWS.IotData requires an explicit ' + 64 | '`endpoint\' configuration option.'; 65 | throw AWS.util.error(new Error(), 66 | {name: 'InvalidEndpoint', message: msg}); 67 | } 68 | }, 69 | 70 | /** 71 | * @api private 72 | */ 73 | setupRequestListeners: function setupRequestListeners(request) { 74 | request.addListener('validateResponse', this.validateResponseBody) 75 | }, 76 | 77 | /** 78 | * @api private 79 | */ 80 | validateResponseBody: function validateResponseBody(resp) { 81 | var body = resp.httpResponse.body.toString() || '{}'; 82 | var bodyCheck = body.trim(); 83 | if (!bodyCheck || bodyCheck.charAt(0) !== '{') { 84 | resp.httpResponse.body = ''; 85 | } 86 | } 87 | 88 | }); 89 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/lib/services/machinelearning.js: -------------------------------------------------------------------------------- 1 | var AWS = require('../core'); 2 | 3 | AWS.util.update(AWS.MachineLearning.prototype, { 4 | /** 5 | * @api private 6 | */ 7 | setupRequestListeners: function setupRequestListeners(request) { 8 | if (request.operation === 'predict') { 9 | request.addListener('build', this.buildEndpoint); 10 | } 11 | }, 12 | 13 | /** 14 | * Updates request endpoint from PredictEndpoint 15 | * @api private 16 | */ 17 | buildEndpoint: function buildEndpoint(request) { 18 | var url = request.params.PredictEndpoint; 19 | if (url) { 20 | request.httpRequest.endpoint = new AWS.Endpoint(url); 21 | } 22 | } 23 | 24 | }); 25 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/lib/services/route53.js: -------------------------------------------------------------------------------- 1 | var AWS = require('../core'); 2 | 3 | AWS.util.update(AWS.Route53.prototype, { 4 | /** 5 | * @api private 6 | */ 7 | setupRequestListeners: function setupRequestListeners(request) { 8 | request.on('build', this.sanitizeUrl); 9 | }, 10 | 11 | /** 12 | * @api private 13 | */ 14 | sanitizeUrl: function sanitizeUrl(request) { 15 | var path = request.httpRequest.path; 16 | request.httpRequest.path = path.replace(/\/%2F\w+%2F/, '/'); 17 | } 18 | }); 19 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/lib/services/sts.js: -------------------------------------------------------------------------------- 1 | var AWS = require('../core'); 2 | 3 | AWS.util.update(AWS.STS.prototype, { 4 | /** 5 | * @overload credentialsFrom(data, credentials = null) 6 | * Creates a credentials object from STS response data containing 7 | * credentials information. Useful for quickly setting AWS credentials. 8 | * 9 | * @note This is a low-level utility function. If you want to load temporary 10 | * credentials into your process for subsequent requests to AWS resources, 11 | * you should use {AWS.TemporaryCredentials} instead. 12 | * @param data [map] data retrieved from a call to {getFederatedToken}, 13 | * {getSessionToken}, {assumeRole}, or {assumeRoleWithWebIdentity}. 14 | * @param credentials [AWS.Credentials] an optional credentials object to 15 | * fill instead of creating a new object. Useful when modifying an 16 | * existing credentials object from a refresh call. 17 | * @return [AWS.TemporaryCredentials] the set of temporary credentials 18 | * loaded from a raw STS operation response. 19 | * @example Using credentialsFrom to load global AWS credentials 20 | * var sts = new AWS.STS(); 21 | * sts.getSessionToken(function (err, data) { 22 | * if (err) console.log("Error getting credentials"); 23 | * else { 24 | * AWS.config.credentials = sts.credentialsFrom(data); 25 | * } 26 | * }); 27 | * @see AWS.TemporaryCredentials 28 | */ 29 | credentialsFrom: function credentialsFrom(data, credentials) { 30 | if (!data) return null; 31 | if (!credentials) credentials = new AWS.TemporaryCredentials(); 32 | credentials.expired = false; 33 | credentials.accessKeyId = data.Credentials.AccessKeyId; 34 | credentials.secretAccessKey = data.Credentials.SecretAccessKey; 35 | credentials.sessionToken = data.Credentials.SessionToken; 36 | credentials.expireTime = data.Credentials.Expiration; 37 | return credentials; 38 | }, 39 | 40 | assumeRoleWithWebIdentity: function assumeRoleWithWebIdentity(params, callback) { 41 | return this.makeUnauthenticatedRequest('assumeRoleWithWebIdentity', params, callback); 42 | }, 43 | 44 | assumeRoleWithSAML: function assumeRoleWithSAML(params, callback) { 45 | return this.makeUnauthenticatedRequest('assumeRoleWithSAML', params, callback); 46 | } 47 | }); 48 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/lib/services/swf.js: -------------------------------------------------------------------------------- 1 | var AWS = require('../core'); 2 | 3 | AWS.util.hideProperties(AWS, ['SimpleWorkflow']); 4 | 5 | /** 6 | * @constant 7 | * @readonly 8 | * Backwards compatibility for access to the {AWS.SWF} service class. 9 | */ 10 | AWS.SimpleWorkflow = AWS.SWF; 11 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/lib/signers/request_signer.js: -------------------------------------------------------------------------------- 1 | var AWS = require('../core'); 2 | var inherit = AWS.util.inherit; 3 | 4 | /** 5 | * @api private 6 | */ 7 | AWS.Signers.RequestSigner = inherit({ 8 | constructor: function RequestSigner(request) { 9 | this.request = request; 10 | } 11 | }); 12 | 13 | AWS.Signers.RequestSigner.getVersion = function getVersion(version) { 14 | switch (version) { 15 | case 'v2': return AWS.Signers.V2; 16 | case 'v3': return AWS.Signers.V3; 17 | case 'v4': return AWS.Signers.V4; 18 | case 's3': return AWS.Signers.S3; 19 | case 'v3https': return AWS.Signers.V3Https; 20 | } 21 | throw new Error('Unknown signing version ' + version); 22 | }; 23 | 24 | require('./v2'); 25 | require('./v3'); 26 | require('./v3https'); 27 | require('./v4'); 28 | require('./s3'); 29 | require('./presign'); 30 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/lib/signers/v2.js: -------------------------------------------------------------------------------- 1 | var AWS = require('../core'); 2 | var inherit = AWS.util.inherit; 3 | 4 | /** 5 | * @api private 6 | */ 7 | AWS.Signers.V2 = inherit(AWS.Signers.RequestSigner, { 8 | addAuthorization: function addAuthorization(credentials, date) { 9 | 10 | if (!date) date = AWS.util.date.getDate(); 11 | 12 | var r = this.request; 13 | 14 | r.params.Timestamp = AWS.util.date.iso8601(date); 15 | r.params.SignatureVersion = '2'; 16 | r.params.SignatureMethod = 'HmacSHA256'; 17 | r.params.AWSAccessKeyId = credentials.accessKeyId; 18 | 19 | if (credentials.sessionToken) { 20 | r.params.SecurityToken = credentials.sessionToken; 21 | } 22 | 23 | delete r.params.Signature; // delete old Signature for re-signing 24 | r.params.Signature = this.signature(credentials); 25 | 26 | r.body = AWS.util.queryParamsToString(r.params); 27 | r.headers['Content-Length'] = r.body.length; 28 | }, 29 | 30 | signature: function signature(credentials) { 31 | return AWS.util.crypto.hmac(credentials.secretAccessKey, this.stringToSign(), 'base64'); 32 | }, 33 | 34 | stringToSign: function stringToSign() { 35 | var parts = []; 36 | parts.push(this.request.method); 37 | parts.push(this.request.endpoint.host.toLowerCase()); 38 | parts.push(this.request.pathname()); 39 | parts.push(AWS.util.queryParamsToString(this.request.params)); 40 | return parts.join('\n'); 41 | } 42 | 43 | }); 44 | 45 | module.exports = AWS.Signers.V2; 46 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/lib/signers/v3.js: -------------------------------------------------------------------------------- 1 | var AWS = require('../core'); 2 | var inherit = AWS.util.inherit; 3 | 4 | /** 5 | * @api private 6 | */ 7 | AWS.Signers.V3 = inherit(AWS.Signers.RequestSigner, { 8 | addAuthorization: function addAuthorization(credentials, date) { 9 | 10 | var datetime = AWS.util.date.rfc822(date); 11 | 12 | this.request.headers['X-Amz-Date'] = datetime; 13 | 14 | if (credentials.sessionToken) { 15 | this.request.headers['x-amz-security-token'] = credentials.sessionToken; 16 | } 17 | 18 | this.request.headers['X-Amzn-Authorization'] = 19 | this.authorization(credentials, datetime); 20 | 21 | }, 22 | 23 | authorization: function authorization(credentials) { 24 | return 'AWS3 ' + 25 | 'AWSAccessKeyId=' + credentials.accessKeyId + ',' + 26 | 'Algorithm=HmacSHA256,' + 27 | 'SignedHeaders=' + this.signedHeaders() + ',' + 28 | 'Signature=' + this.signature(credentials); 29 | }, 30 | 31 | signedHeaders: function signedHeaders() { 32 | var headers = []; 33 | AWS.util.arrayEach(this.headersToSign(), function iterator(h) { 34 | headers.push(h.toLowerCase()); 35 | }); 36 | return headers.sort().join(';'); 37 | }, 38 | 39 | canonicalHeaders: function canonicalHeaders() { 40 | var headers = this.request.headers; 41 | var parts = []; 42 | AWS.util.arrayEach(this.headersToSign(), function iterator(h) { 43 | parts.push(h.toLowerCase().trim() + ':' + String(headers[h]).trim()); 44 | }); 45 | return parts.sort().join('\n') + '\n'; 46 | }, 47 | 48 | headersToSign: function headersToSign() { 49 | var headers = []; 50 | AWS.util.each(this.request.headers, function iterator(k) { 51 | if (k === 'Host' || k === 'Content-Encoding' || k.match(/^X-Amz/i)) { 52 | headers.push(k); 53 | } 54 | }); 55 | return headers; 56 | }, 57 | 58 | signature: function signature(credentials) { 59 | return AWS.util.crypto.hmac(credentials.secretAccessKey, this.stringToSign(), 'base64'); 60 | }, 61 | 62 | stringToSign: function stringToSign() { 63 | var parts = []; 64 | parts.push(this.request.method); 65 | parts.push('/'); 66 | parts.push(''); 67 | parts.push(this.canonicalHeaders()); 68 | parts.push(this.request.body); 69 | return AWS.util.crypto.sha256(parts.join('\n')); 70 | } 71 | 72 | }); 73 | 74 | module.exports = AWS.Signers.V3; 75 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/lib/signers/v3https.js: -------------------------------------------------------------------------------- 1 | var AWS = require('../core'); 2 | var inherit = AWS.util.inherit; 3 | 4 | require('./v3'); 5 | 6 | /** 7 | * @api private 8 | */ 9 | AWS.Signers.V3Https = inherit(AWS.Signers.V3, { 10 | authorization: function authorization(credentials) { 11 | return 'AWS3-HTTPS ' + 12 | 'AWSAccessKeyId=' + credentials.accessKeyId + ',' + 13 | 'Algorithm=HmacSHA256,' + 14 | 'Signature=' + this.signature(credentials); 15 | }, 16 | 17 | stringToSign: function stringToSign() { 18 | return this.request.headers['X-Amz-Date']; 19 | } 20 | }); 21 | 22 | module.exports = AWS.Signers.V3Https; 23 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/lib/state_machine.js: -------------------------------------------------------------------------------- 1 | function AcceptorStateMachine(states, state) { 2 | this.currentState = state || null; 3 | this.states = states || {}; 4 | } 5 | 6 | AcceptorStateMachine.prototype.runTo = function runTo(finalState, done, bindObject, inputError) { 7 | if (typeof finalState === 'function') { 8 | inputError = bindObject; bindObject = done; 9 | done = finalState; finalState = null; 10 | } 11 | 12 | var self = this; 13 | var state = self.states[self.currentState]; 14 | state.fn.call(bindObject || self, inputError, function(err) { 15 | if (err) { 16 | if (state.fail) self.currentState = state.fail; 17 | else return done ? done.call(bindObject, err) : null; 18 | } else { 19 | if (state.accept) self.currentState = state.accept; 20 | else return done ? done.call(bindObject) : null; 21 | } 22 | if (self.currentState === finalState) { 23 | return done ? done.call(bindObject, err) : null; 24 | } 25 | 26 | self.runTo(finalState, done, bindObject, err); 27 | }); 28 | }; 29 | 30 | AcceptorStateMachine.prototype.addState = function addState(name, acceptState, failState, fn) { 31 | if (typeof acceptState === 'function') { 32 | fn = acceptState; acceptState = null; failState = null; 33 | } else if (typeof failState === 'function') { 34 | fn = failState; failState = null; 35 | } 36 | 37 | if (!this.currentState) this.currentState = name; 38 | this.states[name] = { accept: acceptState, fail: failState, fn: fn }; 39 | return this; 40 | }; 41 | 42 | module.exports = AcceptorStateMachine; 43 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/lib/xml/builder.js: -------------------------------------------------------------------------------- 1 | var util = require('../util'); 2 | var builder = require('xmlbuilder'); 3 | 4 | function XmlBuilder() { } 5 | 6 | XmlBuilder.prototype.toXML = function(params, shape, rootElement, noEmpty) { 7 | var xml = builder.create(rootElement); 8 | applyNamespaces(xml, shape); 9 | serialize(xml, params, shape); 10 | return xml.children.length > 0 || noEmpty ? xml.root().toString() : ''; 11 | }; 12 | 13 | function serialize(xml, value, shape) { 14 | switch (shape.type) { 15 | case 'structure': return serializeStructure(xml, value, shape); 16 | case 'map': return serializeMap(xml, value, shape); 17 | case 'list': return serializeList(xml, value, shape); 18 | default: return serializeScalar(xml, value, shape); 19 | } 20 | } 21 | 22 | function serializeStructure(xml, params, shape) { 23 | util.arrayEach(shape.memberNames, function(memberName) { 24 | var memberShape = shape.members[memberName]; 25 | if (memberShape.location !== 'body') return; 26 | 27 | var value = params[memberName]; 28 | var name = memberShape.name; 29 | if (value !== undefined && value !== null) { 30 | if (memberShape.isXmlAttribute) { 31 | xml.att(name, value); 32 | } else if (memberShape.flattened) { 33 | serialize(xml, value, memberShape); 34 | } else { 35 | var element = xml.ele(name); 36 | applyNamespaces(element, memberShape); 37 | serialize(element, value, memberShape); 38 | } 39 | } 40 | }); 41 | } 42 | 43 | function serializeMap(xml, map, shape) { 44 | var xmlKey = shape.key.name || 'key'; 45 | var xmlValue = shape.value.name || 'value'; 46 | 47 | util.each(map, function(key, value) { 48 | var entry = xml.ele(shape.flattened ? shape.name : 'entry'); 49 | serialize(entry.ele(xmlKey), key, shape.key); 50 | serialize(entry.ele(xmlValue), value, shape.value); 51 | }); 52 | } 53 | 54 | function serializeList(xml, list, shape) { 55 | if (shape.flattened) { 56 | util.arrayEach(list, function(value) { 57 | var name = shape.member.name || shape.name; 58 | var element = xml.ele(name); 59 | serialize(element, value, shape.member); 60 | }); 61 | } else { 62 | util.arrayEach(list, function(value) { 63 | var name = shape.member.name || 'member'; 64 | var element = xml.ele(name); 65 | serialize(element, value, shape.member); 66 | }); 67 | } 68 | } 69 | 70 | function serializeScalar(xml, value, shape) { 71 | xml.txt(shape.toWireFormat(value)); 72 | } 73 | 74 | function applyNamespaces(xml, shape) { 75 | var uri, prefix = 'xmlns'; 76 | if (shape.xmlNamespaceUri) { 77 | uri = shape.xmlNamespaceUri; 78 | if (shape.xmlNamespacePrefix) prefix += ':' + shape.xmlNamespacePrefix; 79 | } else if (xml.isRoot && shape.api.xmlNamespaceUri) { 80 | uri = shape.api.xmlNamespaceUri; 81 | } 82 | 83 | if (uri) xml.att(prefix, uri); 84 | } 85 | 86 | module.exports = XmlBuilder; 87 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/scripts/console: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | var repl = require('repl').start('aws-sdk> '), 4 | replEval = repl.eval, 5 | defaultOptions = { 6 | logger: process.stdout, 7 | region: process.env.AWS_REGION || 'us-east-1' 8 | }; 9 | 10 | 11 | function customEval(cmd, context, filename, callback) { 12 | replEval(cmd, context, filename, function(err, value) { 13 | if (err) { 14 | callback(err, null); 15 | return; 16 | } 17 | 18 | if (value && value.constructor === AWS.Request) { 19 | if (!value.__hasBeenSent__) { 20 | value.__hasBeenSent__ = true; 21 | try { 22 | value.on('complete', function consoleDataExtraction(resp) { 23 | context.data = resp.data; 24 | context.error = resp.error; 25 | callback(resp.error, resp.data); 26 | }); 27 | context.request = value; 28 | context.data = null; 29 | context.error = null; 30 | context.response = value.send(); 31 | } catch (err2) { 32 | callback(err2, null); 33 | return; 34 | } 35 | } else { 36 | callback(null, value); 37 | } 38 | } else { 39 | callback(null, value); 40 | } 41 | }); 42 | } 43 | 44 | var AWS = repl.context.AWS = require('../lib/aws'); 45 | repl.eval = customEval; 46 | 47 | // context variables 48 | repl.context.data = null; 49 | repl.context.error = null; 50 | repl.context.request = null; 51 | repl.context.response = null; 52 | 53 | // setup REPL history 54 | try { 55 | var replHistory = require('repl.history'); 56 | replHistory(repl, process.env.HOME + '/.node_history'); 57 | } catch (e) { 58 | console.log("Missing repl.history package, history will not be supported."); 59 | console.log(" Type `npm install repl.history` to enable history."); 60 | } 61 | 62 | // load services as defined instances 63 | for (var key in AWS) { 64 | var id = AWS[key].serviceIdentifier; 65 | if (id) { 66 | if (id === 'cloudsearchdomain' || id === 'iotdata') continue; // this required an explicit endpoint 67 | 68 | var svcClass = AWS[key]; 69 | var svc = new svcClass(defaultOptions); 70 | svc.with = function(config) { 71 | return new this.constructor.__super__(AWS.util.merge(this.config, config)); 72 | }; 73 | repl.context[svcClass.serviceIdentifier] = svc; 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/scripts/translate-api: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | var fs = require('fs'); 4 | var Translator = require('./lib/translator'); 5 | var util = require('util'); 6 | 7 | var basePath = __dirname + '/../apis/'; 8 | var paths = fs.readdirSync(basePath); 9 | var modelName = process.argv[2] || ''; 10 | 11 | paths.forEach(function (path) { 12 | if (path.match(new RegExp(modelName + ".+\\.normal\\.json$"))) { 13 | var opath = path.replace(/\.normal\.json$/, '.min.json'); 14 | var data = JSON.parse(fs.readFileSync(basePath + path).toString()); 15 | var translated = new Translator(data, {documentation: false}); 16 | var json = JSON.stringify(translated, null, ' '); 17 | fs.writeFileSync(basePath + opath, json); 18 | } 19 | }); 20 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/aws-sdk/testem.json: -------------------------------------------------------------------------------- 1 | { 2 | "test_page": "test/browser/runner.html" 3 | } 4 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/sax/AUTHORS: -------------------------------------------------------------------------------- 1 | # contributors sorted by whether or not they're me. 2 | Isaac Z. Schlueter 3 | Stein Martin Hustad 4 | Mikeal Rogers 5 | Laurie Harper 6 | Jann Horn 7 | Elijah Insua 8 | Henry Rawas 9 | Justin Makeig 10 | Mike Schilling 11 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/sax/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) Isaac Z. Schlueter ("Author") 2 | All rights reserved. 3 | 4 | The BSD License 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions 8 | are met: 9 | 10 | 1. Redistributions of source code must retain the above copyright 11 | notice, this list of conditions and the following disclaimer. 12 | 13 | 2. Redistributions in binary form must reproduce the above copyright 14 | notice, this list of conditions and the following disclaimer in the 15 | documentation and/or other materials provided with the distribution. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 20 | PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS 21 | BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 24 | BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 25 | WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 26 | OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 27 | IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | 29 | 30 | The file "examples/strict.dtd" is licensed by the W3C and used according 31 | to the terms of the W3C SOFTWARE NOTICE AND LICENSE. See LICENSE-W3C.html 32 | for details. 33 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/sax/component.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "sax", 3 | "description": "An evented streaming XML parser in JavaScript", 4 | "author": "Isaac Z. Schlueter (http://blog.izs.me/)", 5 | "version": "0.5.2", 6 | "main": "lib/sax.js", 7 | "license": "BSD", 8 | "scripts": [ 9 | "lib/sax.js" 10 | ], 11 | "repository": "git://github.com/isaacs/sax-js.git" 12 | } 13 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/sax/examples/example.js: -------------------------------------------------------------------------------- 1 | 2 | var fs = require("fs"), 3 | util = require("util"), 4 | path = require("path"), 5 | xml = fs.readFileSync(path.join(__dirname, "test.xml"), "utf8"), 6 | sax = require("../lib/sax"), 7 | strict = sax.parser(true), 8 | loose = sax.parser(false, {trim:true}), 9 | inspector = function (ev) { return function (data) { 10 | console.error("%s %s %j", this.line+":"+this.column, ev, data); 11 | }}; 12 | 13 | sax.EVENTS.forEach(function (ev) { 14 | loose["on"+ev] = inspector(ev); 15 | }); 16 | loose.onend = function () { 17 | console.error("end"); 18 | console.error(loose); 19 | }; 20 | 21 | // do this in random bits at a time to verify that it works. 22 | (function () { 23 | if (xml) { 24 | var c = Math.ceil(Math.random() * 1000) 25 | loose.write(xml.substr(0,c)); 26 | xml = xml.substr(c); 27 | process.nextTick(arguments.callee); 28 | } else loose.close(); 29 | })(); 30 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/sax/examples/get-products.js: -------------------------------------------------------------------------------- 1 | // pull out /GeneralSearchResponse/categories/category/items/product tags 2 | // the rest we don't care about. 3 | 4 | var sax = require("../lib/sax.js") 5 | var fs = require("fs") 6 | var path = require("path") 7 | var xmlFile = path.resolve(__dirname, "shopping.xml") 8 | var util = require("util") 9 | var http = require("http") 10 | 11 | fs.readFile(xmlFile, function (er, d) { 12 | http.createServer(function (req, res) { 13 | if (er) throw er 14 | var xmlstr = d.toString("utf8") 15 | 16 | var parser = sax.parser(true) 17 | var products = [] 18 | var product = null 19 | var currentTag = null 20 | 21 | parser.onclosetag = function (tagName) { 22 | if (tagName === "product") { 23 | products.push(product) 24 | currentTag = product = null 25 | return 26 | } 27 | if (currentTag && currentTag.parent) { 28 | var p = currentTag.parent 29 | delete currentTag.parent 30 | currentTag = p 31 | } 32 | } 33 | 34 | parser.onopentag = function (tag) { 35 | if (tag.name !== "product" && !product) return 36 | if (tag.name === "product") { 37 | product = tag 38 | } 39 | tag.parent = currentTag 40 | tag.children = [] 41 | tag.parent && tag.parent.children.push(tag) 42 | currentTag = tag 43 | } 44 | 45 | parser.ontext = function (text) { 46 | if (currentTag) currentTag.children.push(text) 47 | } 48 | 49 | parser.onend = function () { 50 | var out = util.inspect(products, false, 3, true) 51 | res.writeHead(200, {"content-type":"application/json"}) 52 | res.end("{\"ok\":true}") 53 | // res.end(JSON.stringify(products)) 54 | } 55 | 56 | parser.write(xmlstr).end() 57 | }).listen(1337) 58 | }) 59 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/sax/examples/hello-world.js: -------------------------------------------------------------------------------- 1 | require("http").createServer(function (req, res) { 2 | res.writeHead(200, {"content-type":"application/json"}) 3 | res.end(JSON.stringify({ok: true})) 4 | }).listen(1337) 5 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/sax/examples/not-pretty.xml: -------------------------------------------------------------------------------- 1 | 2 | something blerm a bit down here 9 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/sax/examples/pretty-print.js: -------------------------------------------------------------------------------- 1 | var sax = require("../lib/sax") 2 | , printer = sax.createStream(false, {lowercasetags:true, trim:true}) 3 | , fs = require("fs") 4 | 5 | function entity (str) { 6 | return str.replace('"', '"') 7 | } 8 | 9 | printer.tabstop = 2 10 | printer.level = 0 11 | printer.indent = function () { 12 | print("\n") 13 | for (var i = this.level; i > 0; i --) { 14 | for (var j = this.tabstop; j > 0; j --) { 15 | print(" ") 16 | } 17 | } 18 | } 19 | printer.on("opentag", function (tag) { 20 | this.indent() 21 | this.level ++ 22 | print("<"+tag.name) 23 | for (var i in tag.attributes) { 24 | print(" "+i+"=\""+entity(tag.attributes[i])+"\"") 25 | } 26 | print(">") 27 | }) 28 | 29 | printer.on("text", ontext) 30 | printer.on("doctype", ontext) 31 | function ontext (text) { 32 | this.indent() 33 | print(text) 34 | } 35 | 36 | printer.on("closetag", function (tag) { 37 | this.level -- 38 | this.indent() 39 | print("") 40 | }) 41 | 42 | printer.on("cdata", function (data) { 43 | this.indent() 44 | print("") 45 | }) 46 | 47 | printer.on("comment", function (comment) { 48 | this.indent() 49 | print("") 50 | }) 51 | 52 | printer.on("error", function (error) { 53 | console.error(error) 54 | throw error 55 | }) 56 | 57 | if (!process.argv[2]) { 58 | throw new Error("Please provide an xml file to prettify\n"+ 59 | "TODO: read from stdin or take a file") 60 | } 61 | var xmlfile = require("path").join(process.cwd(), process.argv[2]) 62 | var fstr = fs.createReadStream(xmlfile, { encoding: "utf8" }) 63 | 64 | function print (c) { 65 | if (!process.stdout.write(c)) { 66 | fstr.pause() 67 | } 68 | } 69 | 70 | process.stdout.on("drain", function () { 71 | fstr.resume() 72 | }) 73 | 74 | fstr.pipe(printer) 75 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/sax/examples/test.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | testing the parser 6 | 7 | 8 | 9 |

hello 10 | 11 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/sax/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | "sax@0.5.3", 5 | "/Users/leeatk/WorkDocs/Not Shared/Repos/aws-waf-ip-reputation-list/process-spamhaus-lambda/node_modules/aws-sdk" 6 | ] 7 | ], 8 | "_from": "sax@0.5.3", 9 | "_id": "sax@0.5.3", 10 | "_inCache": true, 11 | "_installable": true, 12 | "_location": "/sax", 13 | "_npmUser": { 14 | "email": "i@izs.me", 15 | "name": "isaacs" 16 | }, 17 | "_npmVersion": "1.2.18", 18 | "_phantomChildren": {}, 19 | "_requested": { 20 | "name": "sax", 21 | "raw": "sax@0.5.3", 22 | "rawSpec": "0.5.3", 23 | "scope": null, 24 | "spec": "0.5.3", 25 | "type": "version" 26 | }, 27 | "_requiredBy": [ 28 | "/aws-sdk", 29 | "/xml2js" 30 | ], 31 | "_resolved": "https://registry.npmjs.org/sax/-/sax-0.5.3.tgz", 32 | "_shasum": "3773714a0d9157caaa7302971efa5c6dcda552d6", 33 | "_shrinkwrap": null, 34 | "_spec": "sax@0.5.3", 35 | "_where": "/Users/leeatk/WorkDocs/Not Shared/Repos/aws-waf-ip-reputation-list/process-spamhaus-lambda/node_modules/aws-sdk", 36 | "author": { 37 | "email": "i@izs.me", 38 | "name": "Isaac Z. Schlueter", 39 | "url": "http://blog.izs.me/" 40 | }, 41 | "bugs": { 42 | "url": "https://github.com/isaacs/sax-js/issues" 43 | }, 44 | "contributors": [ 45 | { 46 | "name": "Isaac Z. Schlueter", 47 | "email": "i@izs.me" 48 | }, 49 | { 50 | "name": "Stein Martin Hustad", 51 | "email": "stein@hustad.com" 52 | }, 53 | { 54 | "name": "Mikeal Rogers", 55 | "email": "mikeal.rogers@gmail.com" 56 | }, 57 | { 58 | "name": "Laurie Harper", 59 | "email": "laurie@holoweb.net" 60 | }, 61 | { 62 | "name": "Jann Horn", 63 | "email": "jann@Jann-PC.fritz.box" 64 | }, 65 | { 66 | "name": "Elijah Insua", 67 | "email": "tmpvar@gmail.com" 68 | }, 69 | { 70 | "name": "Henry Rawas", 71 | "email": "henryr@schakra.com" 72 | }, 73 | { 74 | "name": "Justin Makeig", 75 | "email": "jmpublic@makeig.com" 76 | }, 77 | { 78 | "name": "Mike Schilling", 79 | "email": "mike@emotive.com" 80 | } 81 | ], 82 | "dependencies": {}, 83 | "description": "An evented streaming XML parser in JavaScript", 84 | "devDependencies": {}, 85 | "directories": {}, 86 | "dist": { 87 | "shasum": "3773714a0d9157caaa7302971efa5c6dcda552d6", 88 | "tarball": "http://registry.npmjs.org/sax/-/sax-0.5.3.tgz" 89 | }, 90 | "homepage": "https://github.com/isaacs/sax-js#readme", 91 | "license": "BSD", 92 | "main": "lib/sax.js", 93 | "maintainers": [ 94 | { 95 | "name": "isaacs", 96 | "email": "i@izs.me" 97 | } 98 | ], 99 | "name": "sax", 100 | "optionalDependencies": {}, 101 | "readme": "ERROR: No README data found!", 102 | "repository": { 103 | "type": "git", 104 | "url": "git://github.com/isaacs/sax-js.git" 105 | }, 106 | "scripts": { 107 | "test": "node test/index.js" 108 | }, 109 | "version": "0.5.3" 110 | } 111 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/sax/test/attribute-name.js: -------------------------------------------------------------------------------- 1 | require(__dirname).test( 2 | { xml: "" 3 | , expect: [ 4 | ["attribute", { 5 | name: "length" 6 | , value: "12345" 7 | , prefix: "" 8 | , local: "length" 9 | , uri: "" 10 | }] 11 | , ["opentag", { 12 | name: "root" 13 | , prefix: "" 14 | , local: "root" 15 | , uri: "" 16 | , attributes: { 17 | length: { 18 | name: "length" 19 | , value: "12345" 20 | , prefix: "" 21 | , local: "length" 22 | , uri: "" 23 | } 24 | } 25 | , ns: {} 26 | , isSelfClosing: false 27 | }] 28 | , ["closetag", "root"] 29 | ] 30 | , strict: true 31 | , opt: { xmlns: true } 32 | } 33 | ) 34 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/sax/test/buffer-overrun.js: -------------------------------------------------------------------------------- 1 | // set this really low so that I don't have to put 64 MB of xml in here. 2 | var sax = require("../lib/sax") 3 | var bl = sax.MAX_BUFFER_LENGTH 4 | sax.MAX_BUFFER_LENGTH = 5; 5 | 6 | require(__dirname).test({ 7 | expect : [ 8 | ["error", "Max buffer length exceeded: tagName\nLine: 0\nColumn: 15\nChar: "], 9 | ["error", "Max buffer length exceeded: tagName\nLine: 0\nColumn: 30\nChar: "], 10 | ["error", "Max buffer length exceeded: tagName\nLine: 0\nColumn: 45\nChar: "], 11 | ["opentag", { 12 | "name": "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ", 13 | "attributes": {}, 14 | "isSelfClosing": false 15 | }], 16 | ["text", "yo"], 17 | ["closetag", "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ"] 18 | ] 19 | }).write("") 23 | .write("yo") 24 | .write("") 25 | .close(); 26 | sax.MAX_BUFFER_LENGTH = bl 27 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/sax/test/case.js: -------------------------------------------------------------------------------- 1 | // default to uppercase 2 | require(__dirname).test 3 | ( { xml : 4 | "" 5 | , expect : 6 | [ [ "attribute", { name: "CLASS", value: "test" } ] 7 | , [ "attribute", { name: "HELLO", value: "world" } ] 8 | , [ "opentag", { name: "SPAN", 9 | attributes: { CLASS: "test", HELLO: "world" }, 10 | isSelfClosing: false } ] 11 | , [ "closetag", "SPAN" ] 12 | ] 13 | , strict : false 14 | , opt : {} 15 | } 16 | ) 17 | 18 | // lowercase option : lowercase tag/attribute names 19 | require(__dirname).test 20 | ( { xml : 21 | "" 22 | , expect : 23 | [ [ "attribute", { name: "class", value: "test" } ] 24 | , [ "attribute", { name: "hello", value: "world" } ] 25 | , [ "opentag", { name: "span", 26 | attributes: { class: "test", hello: "world" }, 27 | isSelfClosing: false } ] 28 | , [ "closetag", "span" ] 29 | ] 30 | , strict : false 31 | , opt : {lowercase:true} 32 | } 33 | ) 34 | 35 | // backward compatibility with old lowercasetags opt 36 | require(__dirname).test 37 | ( { xml : 38 | "" 39 | , expect : 40 | [ [ "attribute", { name: "class", value: "test" } ] 41 | , [ "attribute", { name: "hello", value: "world" } ] 42 | , [ "opentag", { name: "span", 43 | attributes: { class: "test", hello: "world" }, 44 | isSelfClosing: false } ] 45 | , [ "closetag", "span" ] 46 | ] 47 | , strict : false 48 | , opt : {lowercasetags:true} 49 | } 50 | ) 51 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/sax/test/cdata-chunked.js: -------------------------------------------------------------------------------- 1 | 2 | require(__dirname).test({ 3 | expect : [ 4 | ["opentag", {"name": "R","attributes": {}, "isSelfClosing": false}], 5 | ["opencdata", undefined], 6 | ["cdata", " this is character data  "], 7 | ["closecdata", undefined], 8 | ["closetag", "R"] 9 | ] 10 | }).write("").close(); 11 | 12 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/sax/test/cdata-end-split.js: -------------------------------------------------------------------------------- 1 | 2 | require(__dirname).test({ 3 | expect : [ 4 | ["opentag", {"name": "R","attributes": {}, "isSelfClosing": false}], 5 | ["opencdata", undefined], 6 | ["cdata", " this is "], 7 | ["closecdata", undefined], 8 | ["closetag", "R"] 9 | ] 10 | }) 11 | .write("") 13 | .write("") 14 | .close(); 15 | 16 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/sax/test/cdata-fake-end.js: -------------------------------------------------------------------------------- 1 | 2 | var p = require(__dirname).test({ 3 | expect : [ 4 | ["opentag", {"name": "R","attributes": {}, "isSelfClosing": false}], 5 | ["opencdata", undefined], 6 | ["cdata", "[[[[[[[[]]]]]]]]"], 7 | ["closecdata", undefined], 8 | ["closetag", "R"] 9 | ] 10 | }) 11 | var x = "" 12 | for (var i = 0; i < x.length ; i ++) { 13 | p.write(x.charAt(i)) 14 | } 15 | p.close(); 16 | 17 | 18 | var p2 = require(__dirname).test({ 19 | expect : [ 20 | ["opentag", {"name": "R","attributes": {}, "isSelfClosing": false}], 21 | ["opencdata", undefined], 22 | ["cdata", "[[[[[[[[]]]]]]]]"], 23 | ["closecdata", undefined], 24 | ["closetag", "R"] 25 | ] 26 | }) 27 | var x = "" 28 | p2.write(x).close(); 29 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/sax/test/cdata-multiple.js: -------------------------------------------------------------------------------- 1 | 2 | require(__dirname).test({ 3 | expect : [ 4 | ["opentag", {"name": "R","attributes": {}, "isSelfClosing": false}], 5 | ["opencdata", undefined], 6 | ["cdata", " this is "], 7 | ["closecdata", undefined], 8 | ["opencdata", undefined], 9 | ["cdata", "character data  "], 10 | ["closecdata", undefined], 11 | ["closetag", "R"] 12 | ] 13 | }).write("").write("").close(); 15 | 16 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/sax/test/cdata.js: -------------------------------------------------------------------------------- 1 | require(__dirname).test({ 2 | xml : "", 3 | expect : [ 4 | ["opentag", {"name": "R","attributes": {}, "isSelfClosing": false}], 5 | ["opencdata", undefined], 6 | ["cdata", " this is character data  "], 7 | ["closecdata", undefined], 8 | ["closetag", "R"] 9 | ] 10 | }); 11 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/sax/test/cyrillic.js: -------------------------------------------------------------------------------- 1 | require(__dirname).test({ 2 | xml: '<Р>тест', 3 | expect: [ 4 | ['opentag', {'name':'Р', attributes:{}, isSelfClosing: false}], 5 | ['text', 'тест'], 6 | ['closetag', 'Р'] 7 | ] 8 | }); 9 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/sax/test/duplicate-attribute.js: -------------------------------------------------------------------------------- 1 | require(__dirname).test 2 | ( { xml : 3 | "" 4 | , expect : 5 | [ [ "attribute", { name: "ID", value: "hello" } ] 6 | , [ "opentag", { name: "SPAN", 7 | attributes: { ID: "hello" }, isSelfClosing: false } ] 8 | , [ "closetag", "SPAN" ] 9 | ] 10 | , strict : false 11 | , opt : {} 12 | } 13 | ) 14 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/sax/test/entities.js: -------------------------------------------------------------------------------- 1 | require(__dirname).test({ 2 | xml: '⌋ ' + 3 | '♠ © → & ' + 4 | '< < < < < > ℜ ℘ €', 5 | expect: [ 6 | ['opentag', {'name':'R', attributes:{}, isSelfClosing: false}], 7 | ['text', '⌋ ♠ © → & < < < < < > ℜ ℘ €'], 8 | ['closetag', 'R'] 9 | ] 10 | }); 11 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/sax/test/entity-mega.js: -------------------------------------------------------------------------------- 1 | var sax = require('../'); 2 | var xml = ''; 3 | var text = ''; 4 | for (var i in sax.ENTITIES) { 5 | xml += '&' + i + ';' 6 | text += sax.ENTITIES[i] 7 | } 8 | xml += '' 9 | require(__dirname).test({ 10 | xml: xml, 11 | expect: [ 12 | ['opentag', {'name':'R', attributes:{}, isSelfClosing: false}], 13 | ['text', text], 14 | ['closetag', 'R'] 15 | ] 16 | }); 17 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/sax/test/issue-23.js: -------------------------------------------------------------------------------- 1 | 2 | require(__dirname).test 3 | ( { xml : 4 | ""+ 5 | ""+ 6 | "653724009"+ 7 | "-1"+ 8 | "01pG0000002KoSUIA0"+ 9 | "-1"+ 10 | "CalendarController"+ 11 | "true"+ 12 | ""+ 13 | "" 14 | 15 | , expect : 16 | [ [ "opentag", { name: "COMPILECLASSESRESPONSE", attributes: {}, isSelfClosing: false } ] 17 | , [ "opentag", { name : "RESULT", attributes: {}, isSelfClosing: false } ] 18 | , [ "opentag", { name: "BODYCRC", attributes: {}, isSelfClosing: false } ] 19 | , [ "text", "653724009" ] 20 | , [ "closetag", "BODYCRC" ] 21 | , [ "opentag", { name: "COLUMN", attributes: {}, isSelfClosing: false } ] 22 | , [ "text", "-1" ] 23 | , [ "closetag", "COLUMN" ] 24 | , [ "opentag", { name: "ID", attributes: {}, isSelfClosing: false } ] 25 | , [ "text", "01pG0000002KoSUIA0" ] 26 | , [ "closetag", "ID" ] 27 | , [ "opentag", {name: "LINE", attributes: {}, isSelfClosing: false } ] 28 | , [ "text", "-1" ] 29 | , [ "closetag", "LINE" ] 30 | , [ "opentag", {name: "NAME", attributes: {}, isSelfClosing: false } ] 31 | , [ "text", "CalendarController" ] 32 | , [ "closetag", "NAME" ] 33 | , [ "opentag", {name: "SUCCESS", attributes: {}, isSelfClosing: false } ] 34 | , [ "text", "true" ] 35 | , [ "closetag", "SUCCESS" ] 36 | , [ "closetag", "RESULT" ] 37 | , [ "closetag", "COMPILECLASSESRESPONSE" ] 38 | ] 39 | , strict : false 40 | , opt : {} 41 | } 42 | ) 43 | 44 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/sax/test/issue-30.js: -------------------------------------------------------------------------------- 1 | // https://github.com/isaacs/sax-js/issues/33 2 | require(__dirname).test 3 | ( { xml : "\n"+ 4 | "\n"+ 7 | "\n"+ 8 | "" 9 | 10 | , expect : 11 | [ [ "opentag", { name: "xml", attributes: {}, isSelfClosing: false } ] 12 | , [ "text", "\n" ] 13 | , [ "comment", " \n comment with a single dash- in it\n" ] 14 | , [ "text", "\n" ] 15 | , [ "opentag", { name: "data", attributes: {}, isSelfClosing: true } ] 16 | , [ "closetag", "data" ] 17 | , [ "text", "\n" ] 18 | , [ "closetag", "xml" ] 19 | ] 20 | , strict : true 21 | , opt : {} 22 | } 23 | ) 24 | 25 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/sax/test/issue-35.js: -------------------------------------------------------------------------------- 1 | // https://github.com/isaacs/sax-js/issues/35 2 | require(__dirname).test 3 | ( { xml : " \n"+ 4 | "" 5 | 6 | , expect : 7 | [ [ "opentag", { name: "xml", attributes: {}, isSelfClosing: false } ] 8 | , [ "text", "\r\r\n" ] 9 | , [ "closetag", "xml" ] 10 | ] 11 | , strict : true 12 | , opt : {} 13 | } 14 | ) 15 | 16 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/sax/test/issue-47.js: -------------------------------------------------------------------------------- 1 | // https://github.com/isaacs/sax-js/issues/47 2 | require(__dirname).test 3 | ( { xml : '' 4 | , expect : [ 5 | [ "attribute", { name:'HREF', value:"query.svc?x=1&y=2&z=3"} ], 6 | [ "opentag", { name: "A", attributes: { HREF:"query.svc?x=1&y=2&z=3"}, isSelfClosing: true } ], 7 | [ "closetag", "A" ] 8 | ] 9 | , opt : {} 10 | } 11 | ) 12 | 13 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/sax/test/issue-49.js: -------------------------------------------------------------------------------- 1 | // https://github.com/isaacs/sax-js/issues/49 2 | require(__dirname).test 3 | ( { xml : "" 4 | , expect : 5 | [ [ "opentag", { name: "xml", attributes: {}, isSelfClosing: false } ] 6 | , [ "opentag", { name: "script", attributes: {}, isSelfClosing: false } ] 7 | , [ "text", "hello world" ] 8 | , [ "closetag", "script" ] 9 | , [ "closetag", "xml" ] 10 | ] 11 | , strict : false 12 | , opt : { lowercasetags: true, noscript: true } 13 | } 14 | ) 15 | 16 | require(__dirname).test 17 | ( { xml : "" 18 | , expect : 19 | [ [ "opentag", { name: "xml", attributes: {}, isSelfClosing: false } ] 20 | , [ "opentag", { name: "script", attributes: {}, isSelfClosing: false } ] 21 | , [ "opencdata", undefined ] 22 | , [ "cdata", "hello world" ] 23 | , [ "closecdata", undefined ] 24 | , [ "closetag", "script" ] 25 | , [ "closetag", "xml" ] 26 | ] 27 | , strict : false 28 | , opt : { lowercasetags: true, noscript: true } 29 | } 30 | ) 31 | 32 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/sax/test/issue-84.js: -------------------------------------------------------------------------------- 1 | // https://github.com/isaacs/sax-js/issues/49 2 | require(__dirname).test 3 | ( { xml : "body" 4 | , expect : 5 | [ [ "processinginstruction", { name: "has", body: "unbalanced \"quotes" } ], 6 | [ "opentag", { name: "xml", attributes: {}, isSelfClosing: false } ] 7 | , [ "text", "body" ] 8 | , [ "closetag", "xml" ] 9 | ] 10 | , strict : false 11 | , opt : { lowercasetags: true, noscript: true } 12 | } 13 | ) 14 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/sax/test/parser-position.js: -------------------------------------------------------------------------------- 1 | var sax = require("../lib/sax"), 2 | assert = require("assert") 3 | 4 | function testPosition(chunks, expectedEvents) { 5 | var parser = sax.parser(); 6 | expectedEvents.forEach(function(expectation) { 7 | parser['on' + expectation[0]] = function() { 8 | for (var prop in expectation[1]) { 9 | assert.equal(parser[prop], expectation[1][prop]); 10 | } 11 | } 12 | }); 13 | chunks.forEach(function(chunk) { 14 | parser.write(chunk); 15 | }); 16 | }; 17 | 18 | testPosition(['

'], 19 | [ ['opentag', { position: 5, startTagPosition: 1 }] 20 | , ['text', { position: 19, startTagPosition: 14 }] 21 | , ['closetag', { position: 19, startTagPosition: 14 }] 22 | ]); 23 | 24 | testPosition(['
abcde','fgh
'], 25 | [ ['opentag', { position: 5, startTagPosition: 1 }] 26 | , ['text', { position: 19, startTagPosition: 14 }] 27 | , ['closetag', { position: 19, startTagPosition: 14 }] 28 | ]); 29 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/sax/test/script-close-better.js: -------------------------------------------------------------------------------- 1 | require(__dirname).test({ 2 | xml : "", 3 | expect : [ 4 | ["opentag", {"name": "HTML","attributes": {}, isSelfClosing: false}], 5 | ["opentag", {"name": "HEAD","attributes": {}, isSelfClosing: false}], 6 | ["opentag", {"name": "SCRIPT","attributes": {}, isSelfClosing: false}], 7 | ["script", "'
foo
", 3 | expect : [ 4 | ["opentag", {"name": "HTML","attributes": {}, "isSelfClosing": false}], 5 | ["opentag", {"name": "HEAD","attributes": {}, "isSelfClosing": false}], 6 | ["opentag", {"name": "SCRIPT","attributes": {}, "isSelfClosing": false}], 7 | ["script", "if (1 < 0) { console.log('elo there'); }"], 8 | ["closetag", "SCRIPT"], 9 | ["closetag", "HEAD"], 10 | ["closetag", "HTML"] 11 | ] 12 | }); 13 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/sax/test/self-closing-child-strict.js: -------------------------------------------------------------------------------- 1 | 2 | require(__dirname).test({ 3 | xml : 4 | ""+ 5 | "" + 6 | "" + 7 | "" + 8 | "" + 9 | "=(|)" + 10 | "" + 11 | "", 12 | expect : [ 13 | ["opentag", { 14 | "name": "root", 15 | "attributes": {}, 16 | "isSelfClosing": false 17 | }], 18 | ["opentag", { 19 | "name": "child", 20 | "attributes": {}, 21 | "isSelfClosing": false 22 | }], 23 | ["opentag", { 24 | "name": "haha", 25 | "attributes": {}, 26 | "isSelfClosing": true 27 | }], 28 | ["closetag", "haha"], 29 | ["closetag", "child"], 30 | ["opentag", { 31 | "name": "monkey", 32 | "attributes": {}, 33 | "isSelfClosing": false 34 | }], 35 | ["text", "=(|)"], 36 | ["closetag", "monkey"], 37 | ["closetag", "root"], 38 | ["end"], 39 | ["ready"] 40 | ], 41 | strict : true, 42 | opt : {} 43 | }); 44 | 45 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/sax/test/self-closing-child.js: -------------------------------------------------------------------------------- 1 | 2 | require(__dirname).test({ 3 | xml : 4 | ""+ 5 | "" + 6 | "" + 7 | "" + 8 | "" + 9 | "=(|)" + 10 | "" + 11 | "", 12 | expect : [ 13 | ["opentag", { 14 | "name": "ROOT", 15 | "attributes": {}, 16 | "isSelfClosing": false 17 | }], 18 | ["opentag", { 19 | "name": "CHILD", 20 | "attributes": {}, 21 | "isSelfClosing": false 22 | }], 23 | ["opentag", { 24 | "name": "HAHA", 25 | "attributes": {}, 26 | "isSelfClosing": true 27 | }], 28 | ["closetag", "HAHA"], 29 | ["closetag", "CHILD"], 30 | ["opentag", { 31 | "name": "MONKEY", 32 | "attributes": {}, 33 | "isSelfClosing": false 34 | }], 35 | ["text", "=(|)"], 36 | ["closetag", "MONKEY"], 37 | ["closetag", "ROOT"], 38 | ["end"], 39 | ["ready"] 40 | ], 41 | strict : false, 42 | opt : {} 43 | }); 44 | 45 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/sax/test/self-closing-tag.js: -------------------------------------------------------------------------------- 1 | 2 | require(__dirname).test({ 3 | xml : 4 | " "+ 5 | " "+ 6 | " "+ 7 | " "+ 8 | "=(|) "+ 9 | ""+ 10 | " ", 11 | expect : [ 12 | ["opentag", {name:"ROOT", attributes:{}, isSelfClosing: false}], 13 | ["opentag", {name:"HAHA", attributes:{}, isSelfClosing: true}], 14 | ["closetag", "HAHA"], 15 | ["opentag", {name:"HAHA", attributes:{}, isSelfClosing: true}], 16 | ["closetag", "HAHA"], 17 | // ["opentag", {name:"HAHA", attributes:{}}], 18 | // ["closetag", "HAHA"], 19 | ["opentag", {name:"MONKEY", attributes:{}, isSelfClosing: false}], 20 | ["text", "=(|)"], 21 | ["closetag", "MONKEY"], 22 | ["closetag", "ROOT"] 23 | ], 24 | opt : { trim : true } 25 | }); -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/sax/test/stray-ending.js: -------------------------------------------------------------------------------- 1 | // stray ending tags should just be ignored in non-strict mode. 2 | // https://github.com/isaacs/sax-js/issues/32 3 | require(__dirname).test 4 | ( { xml : 5 | "
" 6 | , expect : 7 | [ [ "opentag", { name: "A", attributes: {}, isSelfClosing: false } ] 8 | , [ "opentag", { name: "B", attributes: {}, isSelfClosing: false } ] 9 | , [ "text", "" ] 10 | , [ "closetag", "B" ] 11 | , [ "closetag", "A" ] 12 | ] 13 | , strict : false 14 | , opt : {} 15 | } 16 | ) 17 | 18 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/sax/test/trailing-attribute-no-value.js: -------------------------------------------------------------------------------- 1 | 2 | require(__dirname).test({ 3 | xml : 4 | "", 5 | expect : [ 6 | ["attribute", {name:"ATTRIB", value:"attrib"}], 7 | ["opentag", {name:"ROOT", attributes:{"ATTRIB":"attrib"}, isSelfClosing: false}] 8 | ], 9 | opt : { trim : true } 10 | }); 11 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/sax/test/trailing-non-whitespace.js: -------------------------------------------------------------------------------- 1 | 2 | require(__dirname).test({ 3 | xml : "Welcome, to monkey land", 4 | expect : [ 5 | ["opentag", { 6 | "name": "SPAN", 7 | "attributes": {}, 8 | isSelfClosing: false 9 | }], 10 | ["text", "Welcome,"], 11 | ["closetag", "SPAN"], 12 | ["text", " to monkey land"], 13 | ["end"], 14 | ["ready"] 15 | ], 16 | strict : false, 17 | opt : {} 18 | }); 19 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/sax/test/unclosed-root.js: -------------------------------------------------------------------------------- 1 | require(__dirname).test 2 | ( { xml : "" 3 | 4 | , expect : 5 | [ [ "opentag", { name: "root", attributes: {}, isSelfClosing: false } ] 6 | , [ "error", "Unclosed root tag\nLine: 0\nColumn: 6\nChar: " ] 7 | ] 8 | , strict : true 9 | , opt : {} 10 | } 11 | ) 12 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/sax/test/unquoted.js: -------------------------------------------------------------------------------- 1 | // unquoted attributes should be ok in non-strict mode 2 | // https://github.com/isaacs/sax-js/issues/31 3 | require(__dirname).test 4 | ( { xml : 5 | "" 6 | , expect : 7 | [ [ "attribute", { name: "CLASS", value: "test" } ] 8 | , [ "attribute", { name: "HELLO", value: "world" } ] 9 | , [ "opentag", { name: "SPAN", 10 | attributes: { CLASS: "test", HELLO: "world" }, 11 | isSelfClosing: false } ] 12 | , [ "closetag", "SPAN" ] 13 | ] 14 | , strict : false 15 | , opt : {} 16 | } 17 | ) 18 | 19 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/sax/test/xmlns-issue-41.js: -------------------------------------------------------------------------------- 1 | var t = require(__dirname) 2 | 3 | , xmls = // should be the same both ways. 4 | [ "" 5 | , "" ] 6 | 7 | , ex1 = 8 | [ [ "opennamespace" 9 | , { prefix: "a" 10 | , uri: "http://ATTRIBUTE" 11 | } 12 | ] 13 | , [ "attribute" 14 | , { name: "xmlns:a" 15 | , value: "http://ATTRIBUTE" 16 | , prefix: "xmlns" 17 | , local: "a" 18 | , uri: "http://www.w3.org/2000/xmlns/" 19 | } 20 | ] 21 | , [ "attribute" 22 | , { name: "a:attr" 23 | , local: "attr" 24 | , prefix: "a" 25 | , uri: "http://ATTRIBUTE" 26 | , value: "value" 27 | } 28 | ] 29 | , [ "opentag" 30 | , { name: "parent" 31 | , uri: "" 32 | , prefix: "" 33 | , local: "parent" 34 | , attributes: 35 | { "a:attr": 36 | { name: "a:attr" 37 | , local: "attr" 38 | , prefix: "a" 39 | , uri: "http://ATTRIBUTE" 40 | , value: "value" 41 | } 42 | , "xmlns:a": 43 | { name: "xmlns:a" 44 | , local: "a" 45 | , prefix: "xmlns" 46 | , uri: "http://www.w3.org/2000/xmlns/" 47 | , value: "http://ATTRIBUTE" 48 | } 49 | } 50 | , ns: {"a": "http://ATTRIBUTE"} 51 | , isSelfClosing: true 52 | } 53 | ] 54 | , ["closetag", "parent"] 55 | , ["closenamespace", { prefix: "a", uri: "http://ATTRIBUTE" }] 56 | ] 57 | 58 | // swap the order of elements 2 and 1 59 | , ex2 = [ex1[0], ex1[2], ex1[1]].concat(ex1.slice(3)) 60 | , expected = [ex1, ex2] 61 | 62 | xmls.forEach(function (x, i) { 63 | t.test({ xml: x 64 | , expect: expected[i] 65 | , strict: true 66 | , opt: { xmlns: true } 67 | }) 68 | }) 69 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/sax/test/xmlns-unbound.js: -------------------------------------------------------------------------------- 1 | 2 | require(__dirname).test( 3 | { strict : true 4 | , opt : { xmlns: true } 5 | , expect : 6 | [ ["error", "Unbound namespace prefix: \"unbound\"\nLine: 0\nColumn: 28\nChar: >"] 7 | 8 | , [ "attribute", { name: "unbound:attr", value: "value", uri: "unbound", prefix: "unbound", local: "attr" } ] 9 | , [ "opentag", { name: "root", uri: "", prefix: "", local: "root", 10 | attributes: { "unbound:attr": { name: "unbound:attr", value: "value", uri: "unbound", prefix: "unbound", local: "attr" } }, 11 | ns: {}, isSelfClosing: true } ] 12 | , [ "closetag", "root" ] 13 | ] 14 | } 15 | ).write("") 16 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/sax/test/xmlns-xml-default-ns.js: -------------------------------------------------------------------------------- 1 | var xmlns_attr = 2 | { 3 | name: "xmlns", value: "http://foo", prefix: "xmlns", 4 | local: "", uri : "http://www.w3.org/2000/xmlns/" 5 | }; 6 | 7 | var attr_attr = 8 | { 9 | name: "attr", value: "bar", prefix: "", 10 | local : "attr", uri : "" 11 | }; 12 | 13 | 14 | require(__dirname).test 15 | ( { xml : 16 | "" 17 | , expect : 18 | [ [ "opennamespace", { prefix: "", uri: "http://foo" } ] 19 | , [ "attribute", xmlns_attr ] 20 | , [ "attribute", attr_attr ] 21 | , [ "opentag", { name: "elm", prefix: "", local: "elm", uri : "http://foo", 22 | ns : { "" : "http://foo" }, 23 | attributes: { xmlns: xmlns_attr, attr: attr_attr }, 24 | isSelfClosing: true } ] 25 | , [ "closetag", "elm" ] 26 | , [ "closenamespace", { prefix: "", uri: "http://foo"} ] 27 | ] 28 | , strict : true 29 | , opt : {xmlns: true} 30 | } 31 | ) 32 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/sax/test/xmlns-xml-default-prefix-attribute.js: -------------------------------------------------------------------------------- 1 | require(__dirname).test( 2 | { xml : "" 3 | , expect : 4 | [ [ "attribute" 5 | , { name: "xml:lang" 6 | , local: "lang" 7 | , prefix: "xml" 8 | , uri: "http://www.w3.org/XML/1998/namespace" 9 | , value: "en" 10 | } 11 | ] 12 | , [ "opentag" 13 | , { name: "root" 14 | , uri: "" 15 | , prefix: "" 16 | , local: "root" 17 | , attributes: 18 | { "xml:lang": 19 | { name: "xml:lang" 20 | , local: "lang" 21 | , prefix: "xml" 22 | , uri: "http://www.w3.org/XML/1998/namespace" 23 | , value: "en" 24 | } 25 | } 26 | , ns: {} 27 | , isSelfClosing: true 28 | } 29 | ] 30 | , ["closetag", "root"] 31 | ] 32 | , strict : true 33 | , opt : { xmlns: true } 34 | } 35 | ) 36 | 37 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/sax/test/xmlns-xml-default-prefix.js: -------------------------------------------------------------------------------- 1 | require(__dirname).test( 2 | { xml : "" 3 | , expect : 4 | [ 5 | [ "opentag" 6 | , { name: "xml:root" 7 | , uri: "http://www.w3.org/XML/1998/namespace" 8 | , prefix: "xml" 9 | , local: "root" 10 | , attributes: {} 11 | , ns: {} 12 | , isSelfClosing: true 13 | } 14 | ] 15 | , ["closetag", "xml:root"] 16 | ] 17 | , strict : true 18 | , opt : { xmlns: true } 19 | } 20 | ) 21 | 22 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/sax/test/xmlns-xml-default-redefine.js: -------------------------------------------------------------------------------- 1 | require(__dirname).test( 2 | { xml : "" 3 | , expect : 4 | [ ["error" 5 | , "xml: prefix must be bound to http://www.w3.org/XML/1998/namespace\n" 6 | + "Actual: ERROR\n" 7 | + "Line: 0\nColumn: 27\nChar: '" 8 | ] 9 | , [ "attribute" 10 | , { name: "xmlns:xml" 11 | , local: "xml" 12 | , prefix: "xmlns" 13 | , uri: "http://www.w3.org/2000/xmlns/" 14 | , value: "ERROR" 15 | } 16 | ] 17 | , [ "opentag" 18 | , { name: "xml:root" 19 | , uri: "http://www.w3.org/XML/1998/namespace" 20 | , prefix: "xml" 21 | , local: "root" 22 | , attributes: 23 | { "xmlns:xml": 24 | { name: "xmlns:xml" 25 | , local: "xml" 26 | , prefix: "xmlns" 27 | , uri: "http://www.w3.org/2000/xmlns/" 28 | , value: "ERROR" 29 | } 30 | } 31 | , ns: {} 32 | , isSelfClosing: true 33 | } 34 | ] 35 | , ["closetag", "xml:root"] 36 | ] 37 | , strict : true 38 | , opt : { xmlns: true } 39 | } 40 | ) 41 | 42 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/xml2js/.npmignore: -------------------------------------------------------------------------------- 1 | *.swp 2 | .idea 3 | node_modules 4 | src 5 | test 6 | Cakefile -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/xml2js/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | 3 | node_js: 4 | - "0.8" 5 | - "0.10" 6 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/xml2js/83.coffee: -------------------------------------------------------------------------------- 1 | xml2js = require 'xml2js' 2 | util = require 'util' 3 | 4 | body = 'Character data here!' 5 | xml2js.parseString body, (err, result) -> 6 | console.log util.inspect result, false, null 7 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/xml2js/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2010, 2011, 2012, 2013. All rights reserved. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to 5 | deal in the Software without restriction, including without limitation the 6 | rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 7 | sell copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | IN THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/xml2js/text.coffee: -------------------------------------------------------------------------------- 1 | fs = require 'fs' 2 | xml2js = require 'xml2js' 3 | 4 | parser = new xml2js.Parser 5 | 6 | fs.readFile 'canon.xml', (err, data) -> 7 | console.log err 8 | parser.parseString (err, result) -> 9 | console.log err 10 | console.dir result 11 | 12 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/xmlbuilder/.npmignore: -------------------------------------------------------------------------------- 1 | .gitignore 2 | .travis.yml 3 | Makefile 4 | .git/ 5 | src/ 6 | test/ 7 | node_modules/ 8 | 9 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/xmlbuilder/README.md: -------------------------------------------------------------------------------- 1 | # xmlbuilder-js 2 | 3 | An XMLBuilder for [node.js](http://nodejs.org/) similar to 4 | [java-xmlbuilder](http://code.google.com/p/java-xmlbuilder/). 5 | 6 | [![Build Status](https://secure.travis-ci.org/oozcitak/xmlbuilder-js.png)](http://travis-ci.org/oozcitak/xmlbuilder-js) 7 | 8 | ### Installation: 9 | 10 | ``` sh 11 | npm install xmlbuilder 12 | ``` 13 | 14 | ### Important: 15 | 16 | I had to break compatibility while adding multiple instances in 0.1.3. 17 | As a result, version from v0.1.3 are **not** compatible with previous versions. 18 | 19 | ### Usage: 20 | 21 | ``` js 22 | var builder = require('xmlbuilder'); 23 | var xml = builder.create('root') 24 | .ele('xmlbuilder', {'for': 'node-js'}) 25 | .ele('repo', {'type': 'git'}, 'git://github.com/oozcitak/xmlbuilder-js.git') 26 | .end({ pretty: true}); 27 | 28 | console.log(xml); 29 | ``` 30 | 31 | will result in: 32 | 33 | ``` xml 34 | 35 | 36 | 37 | git://github.com/oozcitak/xmlbuilder-js.git 38 | 39 | 40 | ``` 41 | 42 | If you need to do some processing: 43 | 44 | ``` js 45 | var root = builder.create('squares'); 46 | root.com('f(x) = x^2'); 47 | for(var i = 1; i <= 5; i++) 48 | { 49 | var item = root.ele('data'); 50 | item.att('x', i); 51 | item.att('y', i * i); 52 | } 53 | ``` 54 | 55 | This will result in: 56 | 57 | ``` xml 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | ``` 68 | 69 | See the [Usage](https://github.com/oozcitak/xmlbuilder-js/wiki/Usage) page in the wiki for more detailed instructions. 70 | 71 | ### License: 72 | 73 | `xmlbuilder-js` is [MIT Licensed](http://opensource.org/licenses/mit-license.php). 74 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/xmlbuilder/lib/index.js: -------------------------------------------------------------------------------- 1 | // Generated by CoffeeScript 1.3.3 2 | (function() { 3 | var XMLBuilder; 4 | 5 | XMLBuilder = require('./XMLBuilder'); 6 | 7 | module.exports.create = function(name, xmldec, doctype) { 8 | if (name != null) { 9 | return new XMLBuilder(name, xmldec, doctype).root(); 10 | } else { 11 | return new XMLBuilder(); 12 | } 13 | }; 14 | 15 | }).call(this); 16 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/node_modules/xmlbuilder/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | "xmlbuilder@0.4.2", 5 | "/Users/leeatk/WorkDocs/Not Shared/Repos/aws-waf-ip-reputation-list/process-spamhaus-lambda/node_modules/aws-sdk" 6 | ] 7 | ], 8 | "_defaultsLoaded": true, 9 | "_engineSupported": true, 10 | "_from": "xmlbuilder@0.4.2", 11 | "_id": "xmlbuilder@0.4.2", 12 | "_inCache": true, 13 | "_installable": true, 14 | "_location": "/xmlbuilder", 15 | "_nodeVersion": "v0.6.3", 16 | "_npmUser": { 17 | "email": "oozcitak@gmail.com", 18 | "name": "oozcitak" 19 | }, 20 | "_npmVersion": "1.1.0-alpha-2", 21 | "_phantomChildren": {}, 22 | "_requested": { 23 | "name": "xmlbuilder", 24 | "raw": "xmlbuilder@0.4.2", 25 | "rawSpec": "0.4.2", 26 | "scope": null, 27 | "spec": "0.4.2", 28 | "type": "version" 29 | }, 30 | "_requiredBy": [ 31 | "/aws-sdk" 32 | ], 33 | "_resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-0.4.2.tgz", 34 | "_shasum": "1776d65f3fdbad470a08d8604cdeb1c4e540ff83", 35 | "_shrinkwrap": null, 36 | "_spec": "xmlbuilder@0.4.2", 37 | "_where": "/Users/leeatk/WorkDocs/Not Shared/Repos/aws-waf-ip-reputation-list/process-spamhaus-lambda/node_modules/aws-sdk", 38 | "author": { 39 | "email": "oozcitak@gmail.com", 40 | "name": "Ozgur Ozcitak" 41 | }, 42 | "bugs": { 43 | "url": "http://github.com/oozcitak/xmlbuilder-js/issues" 44 | }, 45 | "dependencies": {}, 46 | "description": "An XML builder for node.js", 47 | "devDependencies": { 48 | "coffee-script": "1.1.x" 49 | }, 50 | "directories": {}, 51 | "dist": { 52 | "shasum": "1776d65f3fdbad470a08d8604cdeb1c4e540ff83", 53 | "tarball": "http://registry.npmjs.org/xmlbuilder/-/xmlbuilder-0.4.2.tgz" 54 | }, 55 | "engines": { 56 | "node": ">=0.2.0" 57 | }, 58 | "homepage": "http://github.com/oozcitak/xmlbuilder-js", 59 | "keywords": [ 60 | "xml", 61 | "xmlbuilder" 62 | ], 63 | "licenses": [ 64 | { 65 | "type": "MIT", 66 | "url": "http://opensource.org/licenses/mit-license.php" 67 | } 68 | ], 69 | "main": "./lib/index", 70 | "maintainers": [ 71 | { 72 | "name": "oozcitak", 73 | "email": "oozcitak@gmail.com" 74 | } 75 | ], 76 | "name": "xmlbuilder", 77 | "optionalDependencies": {}, 78 | "readme": "ERROR: No README data found!", 79 | "repository": { 80 | "type": "git", 81 | "url": "git://github.com/oozcitak/xmlbuilder-js.git" 82 | }, 83 | "scripts": { 84 | "test": "make test" 85 | }, 86 | "version": "0.4.2" 87 | } 88 | -------------------------------------------------------------------------------- /waf-reputation-lists/lambda/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "aws-waf-reputation-lists-lambda", 3 | "version": "1.0.0", 4 | "description": "Lambda function for processing IP reputation lists for AWS WAF", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "Lee Atkinson", 10 | "license": "SEE LICENSE IN LICENSE.txt", 11 | "dependencies": { 12 | "async": "^1.5.2", 13 | "aws-sdk": "^2.2.33" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /waf-tor-blocking/.gitignore: -------------------------------------------------------------------------------- 1 | deploy/ -------------------------------------------------------------------------------- /waf-tor-blocking/README.md: -------------------------------------------------------------------------------- 1 | # waf-tor-blocking 2 | > **NOTE**: This solution has been integrated into the [AWS WAF Security Automations](https://aws.amazon.com/answers/security/aws-waf-security-automations/), and is now maintained in that repository: [https://github.com/awslabs/aws-waf-security-automations](https://github.com/awslabs/aws-waf-security-automations). 3 | > Please refer suggestions for improvement to that repository. 4 | 5 | An AWS Lambda function for importing the TOR exit node list (https://check.torproject.org/exit-addresses) and updating AWS WAF IP Sets in order to deny access from the TOR network. 6 | Amazon CloudWatch Scheduled Events can be utilised to execute the function regularly in order to automate the update of the IP Sets as the list are updated. 7 | 8 | The function expects to be passed an event containing the list if WAF IP Set IDs that it will populate with the IP addresses found in the list, using the following format: 9 | 10 | ```json 11 | { 12 | "ipSetIds": [ 13 | "", 14 | "" 15 | ] 16 | } 17 | ``` 18 | 19 | Please see waf-reputation-lists for a solution that supports multiple reputation lists, including the Tor Exit Node. 20 | 21 | *** 22 | 23 | Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 24 | SPDX-License-Identifier: MIT-0 25 | -------------------------------------------------------------------------------- /waf-tor-blocking/lambda/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | -------------------------------------------------------------------------------- /waf-tor-blocking/lambda/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software is furnished to do so. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 10 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 11 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 12 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 13 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 14 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 15 | -------------------------------------------------------------------------------- /waf-tor-blocking/lambda/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "aws-waf-tor-blocking", 3 | "version": "1.0.0", 4 | "description": "AWS Lambda function for importing TOR exit node list and updating AWS WAF IP Sets in order to deny access from the TOR network", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "dependencies": { 10 | "async": "^1.5.2" 11 | }, 12 | "devDependencies": { 13 | "aws-sdk": "latest" 14 | }, 15 | "author": "Lee Atkinson", 16 | "license": "SEE LICENSE IN LICENSE.txt" 17 | } --------------------------------------------------------------------------------