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
#!/bin/sh | |
### | |
# | |
# Change Tor exit node | |
# | |
# Sometimes when using Tor you'd like to change the IP address that | |
# servers see when you connect (that is, change your Tor exit node). | |
# This happens automatically from time to time, but this shell script | |
# lets you force it. | |
# |
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
require 'rubygems' | |
require 'bitcoin' | |
require 'eventmachine' | |
require 'resolv' | |
require 'set' | |
module BitcoinTransactionReader | |
def initialize(ip_address, database) | |
@ip_address = ip_address | |
@database = database |
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 -e | |
# These variables can be overridden in the environment | |
: ${TIMESPAN:=} # hour|day|week|month|year|all | |
: ${LISTING:=} # hot|new|top | |
: ${LIMIT:=} # 1-100, default 25 | |
: ${DOWNLOAD_DIR:=~/.reddit-pics} | |
: ${CURL:=curl -sL} | |
# "Constants" |
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
http://tracker.driverpacks.net:6969/stats?mode=tpbs&format=ben | |
-> per torrent: hash (ben-encoded), complete, downloaded, incomplete | |
http://tracker.driverpacks.net:6969/stats?mode=tpbs&format=txt | |
-> per torrent: hash, seeders, leechers | |
http://tracker.driverpacks.net:6969/stats?mode=statedump | |
-> per torrent: hash, base (time in minutes since epoch when the torrent last had >0 peers, *60 = unix timestamp), downloaded |
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
#! /bin/bash | |
# Script to automate creating new OpenVPN clients | |
# The client cert and key, along with the CA cert is | |
# zipped up and placed somewhere to download securely | |
# | |
# H Cooper - 05/02/11 | |
# | |
# Usage: new-openvpn-client.sh <common-name> | |
# Set where we're working from |
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
Managing multiple Tor processes on one host | |
=========================================== | |
Due to Tor's internal architecture, running only one Tor process per physical | |
host is often not enough. As a thumb rule, you should run one Tor process per | |
physical CPU core to make full use of the host's CPU power. This, however | |
brings with it other difficulties: The tor network limits the number of Tor | |
relays per IP in the consensus to 2. Also, the relay nodes should be rechable | |
on Port 80 and 443 since those ports are often unfiltered and unblocked. |
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
#!/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 |
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
#!/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 |
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
#!/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' |
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
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'); |
OlderNewer