Skip to content

Instantly share code, notes, and snippets.

@tomleibo
tomleibo / socks_through_ssh.py
Created May 23, 2020 18:21 — forked from cybiere/socks_through_ssh.py
This is a basic python SOCK5 server which forwards the traffic through a SSH tunnel
#!/usr/bin/env python3
#This is https://github.com/rushter 's python socks server
#Tweaked by https://github.com/cybiere to forward to a SSH server
#via Fabric https://github.com/fabric/fabric
#to act as ssh -D
import logging
import select
import socket
import struct
import commands
signature = "22"
statusOutput = commands.getstatusoutput('git show -s --format=%ct HEAD');
if statusOutput[0] is not 0:
print("initial date fetching caused error "+statusOutput[1])
exit()
initialDate = int(statusOutput[1])
date = initialDate
while True:
statusOutput = commands.getstatusoutput('git show -s --format=%H HEAD');
@tomleibo
tomleibo / the_calculator_game_solution.py
Last active January 5, 2019 15:06
Solves levels in the calculator game
import re
print("Enter intial value:")
initial = int(input())
print("Enter goal:")
target = input()
print("Enter number of moves:")
moves = input()
print("Enter available buttons separated by commas (1, +1, -1, x2, /2, +/-, sum, 12=>34, reverse, <<, ^3, >, <, mirror)")
ops = map(str.strip,raw_input().split(','))
D = False
@tomleibo
tomleibo / self-signed-certificate-with-custom-ca.md
Created November 14, 2017 11:59 — forked from fntlnz/self-signed-certificate-with-custom-ca.md
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096