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
base { | |
log_debug = on; | |
log_info = on; | |
log = "file:/var/log/redsocks.log"; | |
daemon = on; | |
user = redsocks; | |
group = redsocks; | |
redirector = iptables; | |
} |
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 | |
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 |
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
IPT=/sbin/iptables | |
set -e | |
# Clean configurations. | |
$IPT -t nat -F | |
($IPT -t nat --delete-chain PROXY || true) 2> /dev/null |
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
## 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 | |
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
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; | |
/** |
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
# 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 |