This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function api_request($id='nobody') { | |
$redis = new Redis(); | |
if($redis->connect($GLOBALS['REDIS_HOST'], $GLOBALS['REDIS_PORT'])) { | |
if($redis->auth($GLOBALS['REDIS_PASSWORD'])) { | |
$redis->incr($id); | |
} else { | |
error_log('Error authenticating to redis!'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
Script to generate aggregate availability based on data from Signal Sciences. | |
https://landing.google.com/sre/book/chapters/embracing-risk.html#risk-management_measuring-service-risk_aggregate-availability-equation | |
Usage: | |
./sigsci_site_availability.py -1d | |
Examples specifying different time periods: | |
./sigsci_site_availability.py -3d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
# HoneyDB helper script: | |
# honeydb-search-payloads.py | |
# For a given array of strings, this script will search payloads for a match. | |
# https://riskdiscovery.com/honeydb/threats#sensor_data_filtered | |
# Edit the SEARCH_STRINGS variable to specify what you want to search for. | |
# DATE is a required field for the API, and the default is today's date. | |
# Edit the DATE variable to search on a specific date. | |
# Requires: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
################### | |
# Signal Sciences helper script: | |
# sigsci-copy-users.sh | |
# For a given site, copy all users to specified sites. | |
# Requires: | |
# - pysigsci (https://pypi.org/project/pysigsci/) | |
# - jq (https://stedolan.github.io/jq/) | |
# short name of site that has users you want to copy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
################### | |
# Signal Sciences helper script: | |
# sigsci-copy-request-rule.sh | |
# For a given site and rule id, the script will the rule to all sites. | |
# Requires: | |
# - pysigsci (https://pypi.org/project/pysigsci/) | |
# - jq (https://stedolan.github.io/jq/) | |
if [ -z $1 ]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
################### | |
# Signal Sciences helper script: | |
# sigsci-copy-custom-siganl.sh | |
# For a given site and tagName, the script will copy that signal to all sites. | |
# Requires: | |
# - pysigsci (https://pypi.org/project/pysigsci/) | |
# - jq (https://stedolan.github.io/jq/) | |
if [ -z $1 ]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
################### | |
# Signal Sciences helper script: | |
# sigsci-expire-all-events.sh | |
# For a given site, the script will expire all flagged ip events. | |
# Requires: | |
# - pysigsci (https://pypi.org/project/pysigsci/) | |
# - jq (https://stedolan.github.io/jq/) | |
if [ -z $1 ]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if($redis->connect($GLOBALS['REDIS_HOST'], $GLOBALS['REDIS_PORT'])) { | |
if($redis->auth($GLOBALS['REDIS_PASSWORD'])) { | |
$keys = $redis->keys('*'); | |
foreach($keys as $key) { | |
$redis->set($key, 0); | |
} | |
} else { | |
error_log('Error authenticating to redis!'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function api_limit_exceeded($id='nobody', $limit=1500) { | |
$redis = new Redis(); | |
$usage = 0; | |
if($redis->connect($GLOBALS['REDIS_HOST'], $GLOBALS['REDIS_PORT'])) { | |
if($redis->auth($GLOBALS['REDIS_PASSWORD'])) { | |
$usage = $redis->get($id); | |
} else { | |
error_log('Error authenticating to redis!'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# Installs/upgrades the latest version of honeydb-agent. | |
# An existing configuration will be backed up, and applied | |
# to the new install/upgrade. | |
# | |
# sudo ./honeydb-agent-install.sh | |
# | |
ARCHITECTURE=`uname -m` |
OlderNewer