I hereby claim:
- I am red5d on github.
- I am red5d (https://keybase.io/red5d) on keybase.
- I have a public key whose fingerprint is 2CB6 B1AA AD59 0C00 7226 33E7 C9A4 29E2 A9F7 EF57
To claim this, I am signing this object:
| #! /bin/bash | |
| info=$(curl -s http://www.infosniper.net/?ip_address=$1 | grep content-td2 | cut -d'>' -f2 | cut -d'<' -f1 | sed 's/ //g') | |
| echo -n "Country: " | |
| echo "$info" | sed -n '10p' | |
| echo -n "State: " | |
| echo "$info" | sed -n '6p' |
| #! /bin/bash | |
| # This script helps set up GeoIP-based access restriction. | |
| # Commands adapted from http://blog.grimneko.de/?p=228 | |
| echo "Installing libgeoip-dev, libpam0g-dev, and make (just in case it's not there)..." | |
| sudo apt-get install libgeoip-dev libpam0g-dev make | |
| echo |
| #! /bin/bash | |
| echo "Installing basic security..." | |
| apt-get -y install ufw rkhunter fail2ban | |
| ufw allow 22 | |
| ufw allow 80 | |
| ufw allow 443 | |
| ufw enable | |
| # Scan network range (replace with yours) for MAC addresses, compare with previous scan, and report differences with PushBullet. | |
| # Requires pushbullet bash script from https://github.com/Red5d/pushbullet-bash | |
| touch prev-macs.txt | |
| sudo nmap -sP -n 192.168.1.1/24 | grep "MAC Address" | sort > macs.txt | |
| if [ $(diff macs.txt prev-macs.txt) ];then | |
| pushbullet push all note "New network devices: $(diff macs.txt prev-macs.txt)" | |
| fi | |
| mv macs.txt prev-macs.txt |
| function mempercent { | |
| total=$(free -m | sed -n '2p' | awk '{print $2}') | |
| used=$(free -m | sed -n '3p' | awk '{print $4}') | |
| echo $(echo $(echo 'scale=2;'$used'/'$total'' | bc)*100 | bc | cut -d'.' -f1)"% memory usage (${used}M Used / ${total}M Total)" | |
| } | |
| function systemload { | |
| loadAverage=$(uptime | cut -d',' -f4 | grep -o "[0-9]*\.[0-9]*$") | |
| processors=$(cat /proc/cpuinfo | grep processor | tail -n1 | awk '{ print $3 }') | |
| let processors=$processors+1 |
| #! /bin/bash | |
| # Author: Red5d | |
| # Commands adapted from: https://www.digitalocean.com/community/tutorials/how-to-install-an-ssl-certificate-from-a-commercial-certificate-authority | |
| if [ $(which openssl) -eq "" ];then | |
| echo "Can't find openssl command. Exiting..." | |
| exit 1 | |
| fi |
I hereby claim:
To claim this, I am signing this object:
| #! /usr/bin/env python | |
| # Author: Red5d | |
| # Date: 8/11/2014 | |
| # | |
| # Description: Ansible module to manage the PBIS config. | |
| # | |
| # Examples: | |
| # | |
| # Get all current PBIS config settings and put them into the pbis_output variable: |
| #! /usr/bin/env python | |
| # Author: Red5d | |
| # Client tool for the http://memegen.link/ service. | |
| # Run with no parameters for help. | |
| import json, sys, urllib | |
| if len(sys.argv) < 2: |
| #! /usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| from docker import Client | |
| import sys | |
| reload(sys) | |
| sys.setdefaultencoding('utf8') | |
| c = Client(base_url='unix://var/run/docker.sock') |