View node_crypto.js
var crypto = require('crypto');
var key = 'MySecretKey12345';
var iv = '1234567890123456';
var cipher = crypto.createCipheriv('aes-128-cbc', key, iv);
var decipher = crypto.createDecipheriv('aes-128-cbc', key, iv);
var text = 'plain text';
var encrypted = cipher.update(text, 'utf8', 'binary');
encrypted += cipher.final('binary');
hexVal = new Buffer(encrypted, 'binary');
View nzbtunnel.sh
#!/bin/bash
# Script that attempts to create a tunnel for Usenet (NNTP) to pass through
# This script: creates a tunnel, assigns the host address to local address in /etc/hosts
# For Mac OS X
### CONFIGURATION ###
SERVER='your.nntp.server'
PORT='your.nntp.port'
LOCAL='127.0.0.1'
USER='root'
HOST='your.ssh.server'
View file1.txt
dGVzdDIwMTYtMTEtMDUgMTc6MzQ6MTAsNzI5fDgzQkQyMDJFNEExN0RGQzJFRDRDRUZBOEVFMkU5RTE4RDU1QzQ1OEZ8MjEzLjQ3LjE1Mi41OTo2ODgxCjIwMTYtMTEtMDUgMTc6MzQ6MTEsMDY4fDNEODMzMUVFRjZEQzg5NEMzNUE3M0M0MDcyNkUwODVFQTI5M0QwREN8ODguMjAzLjE3MC4xNzoyMTMzNgoyMDE2LTExLTA1IDE3OjM0OjExLDE4OHxEQTQ4M0I4ODA0QTI3NjU3NDBGMkZEN0YwQkQ3RTA5Q0I0NDg1M0JCfDg2LjYxLjI2LjE3OjUxNDEzCjIwMTYtMTEtMDUgMTc6MzQ6MTEsMTg4fERBNDgzQjg4MDRBMjc2NTc0MEYyRkQ3RjBCRDdFMDlDQjQ0ODUzQkJ8ODYuNjEuMjYuMTc6NTE0MTMKMjAxNi0xMS0wNSAxNzozNDoxMSwyNTF8OTIzMkQ3QUQ4RjIzQkE5Q0E5ODZERTJDRjA4Qzk4OUZBN0NGMUVBMnw0Ni4xNDguOTYuMTk2OjU5Mzg2CjIwMTYtMTEtMDUgMTc6MzQ6MTEsNzQ3fDc2QjAxMEUxNkNENkFFNTI5MDQ5RjFFNTAwMDA2NzdGMDAwMDI2QjR8MTc4LjE1MC4xMDguNTM6NTU4OTcKMjAxNi0xMS0wNSAxNzozNDoxMSw3NzR8RTdBQTA1NURCMEI4OEI4MkJENTg5MUY3MTAwMDFCRTAwMDAwMTI3MHwxMzAuMjU1LjEzMy42MDo1NTI3OAoyMDE2LTExLTA1IDE3OjM0OjExLDkwM3wwQzM0RDMxOUM1NzAzRUU4MDJGNzM1NDYyNEE5MzNBQjc4MDEyMEUyfDg0LjIxLjIwOS4xMzU6OTcwOAoyMDE2LTExLTA1IDE3OjM0OjExLDkxNnw5MUZGNjBBODZFQ0I4MDk1RDZDOUExMkMxMzFBREJFRDcwRDgzRjI0fDE3Ni4yMTMuMTkyLjE5Nzo1OTc1Mgoy
View fail2ban_ctry_stats.sh
#!/bin/bash
# get a country statistic for Fail2Ban blocks:
# this just accounts for IPs once. Multiple failed attempts by one IP just show up once for a country.
for i in `sudo cat /var/log/fail2ban.log | sed 's/.*[Bb]an \(.*\)/\1/' | sort | uniq | cut -d ' ' -f 1 | grep "\."`;
do
echo $i; whois $i | grep country\: |head -n 1 >> fail2ban_ctry.log ;
done
cat fail2ban_ctry.log | sed 's/country: //g' |sort | uniq -c | sort -nr
View fail2ban-report
#!/bin/bash
echo "Baned last log"
awk '($(NF-1) = /Ban/){print $NF}' /var/log/fail2ban.log | sort | uniq -c | sort -n
echo "------------ Baned in all files --------------"
zgrep -h "Ban " /var/log/fail2ban.log* | awk '{print $NF}' | sort | uniq -c
echo "------------ Baned by subnet --------------------"
zgrep -h "Ban " /var/log/fail2ban.log* | awk '{print $NF}' | awk -F\. '{print $1"."$2"."}' | sort | uniq -c | sort -n | tail
echo "------------ Baned by date -------------------------"
zgrep -h "Ban " /var/log/fail2ban.log* | awk '{print $5,$1}' | sort | uniq -c