Skip to content

Instantly share code, notes, and snippets.

View vgmoose's full-sized avatar
🌱
making my way downtown, walking fast

vgmoose vgmoose

🌱
making my way downtown, walking fast
View GitHub Profile
@vgmoose
vgmoose / socialist_millionaire_sockets.rb
Created May 10, 2016 21:06 — forked from cciollaro/socialist_millionaire_sockets.rb
socialist millionaire with tcp sockets
require 'socket'
#http://www.scribd.com/doc/34203336/How-to-Implement-RSA-in-Ruby#download
# Calculate a modular exponentiation eg: b^p mod m
def mod_pow(base, power, mod)
result = 1
while power > 0
result = (result * base) % mod if power & 1 == 1
base = (base * base) % mod
power >>= 1
@vgmoose
vgmoose / punch.py
Created March 28, 2017 21:09 — forked from koenbollen/punch.py
Proof of Concept: UDP Hole Punching
#!/usr/bin/env python
#
# Proof of Concept: UDP Hole Punching
# Two client connect to a server and get redirected to each other.
#
# This is the client.
#
# Koen Bollen <meneer koenbollen nl>
# 2010 GPL
#