Skip to content

Instantly share code, notes, and snippets.

Hugo Branquinho de Carvalho hugobcar

Block or report user

Report or block hugobcar

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Purge_IPs_Waf_Dynamodb_PROD.py
import boto3
import math
import time
import datetime
import ipaddress
from boto3.dynamodb.conditions import Key, Attr
from os import environ
# Get the service resource.
dynamodb = boto3.resource('dynamodb', region_name=environ['DYNAMODB_REGION'])
@hugobcar
hugobcar / Insert_Waf_analyserequests_PROD.py
Last active Mar 13, 2019
Instant block of attacks to AWS Websites using CloudFront + Lambda@Edge + DynamoDB + WAF
View Insert_Waf_analyserequests_PROD.py
import json
import boto3
import math
import time
import datetime
import ipaddress
from boto3.dynamodb.conditions import Key, Attr
from os import environ
# Get the service resource.
@hugobcar
hugobcar / Cf_analyserequests_Waf_PROD.js
Last active Mar 13, 2019
Instant block of attacks to AWS Websites using CloudFront + Lambda@Edge + DynamoDB + WAF
View Cf_analyserequests_Waf_PROD.js
'use strict';
var http = require('http');
// Load the SDK for JavaScript
const https = require('https');
var AWS = require('aws-sdk');
// Set the region
AWS.config.update({region: 'sa-east-1'});
You can’t perform that action at this time.