This file contains hidden or 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 python3 | |
"""This checks over large text files if your ip address if on a list | |
particular handy with CVEs and leaked data. | |
syntax: | |
./affected.py iplistofleak.txt | |
Needs 2 files to start: | |
1: a text file named 'aggregates' of your AS-system with CIDR notation, | |
per line, no other data or empty lines. This could be /32 if needed |
This file contains hidden or 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
#!/bin/env bash | |
# mass query tool, inputs needs further validation but he, it works. | |
if [[ $# -le 2 ]]; then | |
echo -e " | |
dnstest: Test a DNS server with queries | |
Usage: dnstest <server> <record> <limit>\t\tWhere server represents the ip address, the limit how many attempts" | |
exit 1 | |
fi |
This file contains hidden or 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
# Log all commands to the systems logger | |
if [[ $(ps | grep -oP 'su$') ]]; then | |
# User used su | |
# Get UID from parent process | |
_PPID="$(ps -o ppid= | head -n1)" | |
_USER_ID="$(ps -o user= -p $_PPID)" | |
# Get the username of the user id |
This file contains hidden or 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 | |
#aide check on centos7 | |
DATE=`date +%Y-%m-%d` | |
REPORT="/tmp/Aide-${DATE}.txt" | |
RECIPIENT="john.doe@somedomain.tld" | |
TF=$(mktemp) | |
/sbin/aide --check > $TF |
This file contains hidden or 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
# Simple script om een offending key te verwijderen | |
# Checks | |
if [[ $# -ne 1 ]]; then | |
echo -e "RemoveKEY: Remove an SSH-key\n\nUsage: rkey <int>\t\tWhere int represents the line number" | |
exit 1 | |
fi | |
if ! [[ "$1" =~ ^[0-9]+$ ]]; then | |
echo "Sorry, not a valid number" | |
exit 1 |