I hereby claim:
- I am diegoparrilla on github.
- I am diegoparrilla (https://keybase.io/diegoparrilla) on keybase.
- I have a public key ASAKD-FQAW-uya3hSvwHSGx15DU6OqRSoVN0A-L90WklVgo
To claim this, I am signing this object:
addEventListener('fetch', event => { | |
event.respondWith(fetchAndCheckOrigin(event.request)) | |
}) | |
async function fetchAndCheckOrigin(req) { | |
try { | |
const body = await req.body; | |
const ip = req.headers.get('cf-connecting-ip'); | |
const apilityio = await fetch('https://api.apility.net/badip/' + ip + '?token=APILITY_IO_API_KEY'); |
'use strict'; | |
const http = require('http'); | |
exports.handler = (event, context, callback) => { | |
var startTime = new Date(); | |
const request = event.Records[0].cf.request; | |
let clientIp = request.clientIp; | |
var options = { | |
host: "api.apility.net", | |
path: "/badip/" + clientIp, |
{ | |
"response": { | |
"score": 0, | |
"ip": { | |
"score": 0, | |
"blacklist": [], | |
"is_quarantined": false, | |
"address": "35.189.84.182" | |
}, | |
"address": { |
function SIGNALSFULLIP(input) { | |
var response = UrlFetchApp.fetch("https://signals.api.auth0.com/ip/" + input + "?token=YOUR_API_TOKEN"); | |
// Parse the JSON reply | |
var json = response.getContentText(); | |
var data = JSON.parse(json); | |
var score = data['fullip']['score']; | |
var blacklists = data['fullip']['badip']['blacklists'].join(','); | |
var as = data['fullip']['geo']['as']['name']; | |
var asnum = data['fullip']['geo']['as']['asn']; | |
var country = data['fullip']['geo']['country']; |
[Definition] | |
# Option: actionban | |
# Notes.: command executed when banning an IP. Take care that the | |
# command is executed with Fail2Ban user rights. | |
# | |
# Tags: See jail.conf(5) man page | |
# Values: CMD | |
# | |
actionban = curl -X 'POST' <threatjammer_url>/v1/ip -H 'accept: application/json' -H 'Authorization: Bearer <threatjammer_apikey>' -H 'Content-Type: application/json' -d '{ "addresses": [ "<ip>" ], "ttl": <threatjammer_ttl>, "type": "<threatjammer_type>", "tags": ["<threatjammer_tag>"] }' |
I hereby claim:
To claim this, I am signing this object: