Skip to content

Instantly share code, notes, and snippets.

Avatar

Bruno Cardoso brnrc

View GitHub Profile
View redsocks.conf
base {
log_debug = on;
log_info = on;
log = "file:/var/log/redsocks.log";
daemon = on;
user = redsocks;
group = redsocks;
redirector = iptables;
}
View transparent_proxy.sh
#!/bin/bash
set -o errexit
# Aliases
IPT=/sbin/iptables
printf 'Cleaning the environment... '
# Delete the PROXY chain
($IPT --table nat --delete-chain PROXY || true) 2> /dev/null # ignore error
View clean_iptables.sh
IPT=/sbin/iptables
set -e
# Clean configurations.
$IPT -t nat -F
($IPT -t nat --delete-chain PROXY || true) 2> /dev/null
View OpenSSL certificate creation
## Creating a Certification Authority (CA)
openssl genrsa -aes256 -out <key file name>.key <key size>
# Creating the request (example of a DN "/O=Me/OU=MyOrganizationalUnit/CN=My CA Common Name")
openssl req -new -extensions v3_req -key <key pair file>.key -out <csr file>.csr -days <csr validity> -config ca.conf -subj <certificate subject DN>
# self-sign
openssl x509 -req -in <csr file>.csr -out <cert file>.crt -extensions ca_cert_exts -days 3650 -extfile ca.conf -signkey <key pair file>.key -CAcreateserial
@brnrc
brnrc / gist:f46bd04e73d604d97127
Created May 10, 2014
Relative path to .properties file.
View gist:f46bd04e73d604d97127
package com.timezone.jdbc;
import org.apache.commons.dbcp.BasicDataSource;
import javax.sql.DataSource;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.Properties;
/**
@brnrc
brnrc / stingy_steam.py
Last active Jul 31, 2020
Script to get a free steam key
View stingy_steam.py
# Fetches an url and scan the html document for a regex pattern (the STEAM KEY)
# monitoring if the KEY changes and copying it to the system's clipboard.
#
# Output:
# CBT2J-R0GID-8FAJI -> 12:20
# K5RJH-86RH7-W0Y2W -> 12:25
# IV37H-83VGQ-MT9BF -> 12:30
# WY2T9-Q35ZV-8LYCX -> 12:35
# MR7BH-RJ3VJ-MADHW -> 12:40
# HBQPD-BFCG7-06577 -> 12:45