Skip to content

Instantly share code, notes, and snippets.

View azet's full-sized avatar
🔐
hacking audio devices, diving caves, breaking codes

Aaron Zauner azet

🔐
hacking audio devices, diving caves, breaking codes
View GitHub Profile
@azet
azet / crime.py
Created August 28, 2013 03:15 — forked from koto/crime.py
# This is supposedly what CRIME by Juliano Rizzo and Thai Duong will do
# Algorithm by Thomas Pornin, coding by xorninja, improved by @kkotowicz
# http://security.blogoverflow.com/2012/09/how-can-you-protect-yourself-from-crime-beasts-successor/
import string
import zlib
import sys
import random
charset = string.letters + string.digits + "%/+="
@azet
azet / sniff.rb
Last active April 3, 2019 22:56
boilerplate code for ruby packet sniffer
#!/usr/bin/env ruby
require 'packetfu'
# filter = argv[0] - tcpdump style.
# e.g. 'dst host bla.dom.tld and port http and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)'
# to cap. http traffic. or 'host W.X.Y.Z' to cap a speficic host/ip
cap = PacketFu::Capture.new(:start => true)
cap.save(:filter => ARGV[0])
@azet
azet / private_primes.rb
Last active December 25, 2015 09:49
Fuck Rubys 'Prime' Class!
#!/usr/bin/env ruby
#
# W = Number of Bits (e.g. 1024, 2048,..)
# Generate W/2-bit primes p and q such that p != q and |pq| = W
#
require 'securerandom'
# constant W bits:
W = 1024
# subtract one integer to avoid confusion with bit-shifting later on
@azet
azet / build_VASP-5.2.12.txt
Last active December 26, 2015 16:49
building optimized VASP 5.2.12 with Intel toolchain
#modules:
> module list
Currently Loaded Modulefiles:
1) shared 6) intel/compiler/64/13.1/2013.5.192
2) cmgui/6.1 7) torque/4.2.2
3) cmsh 8) intel/mkl/64/11.0/2013.5.192
4) cmd 9) intel-mpi/64/4.1.1/036
5) cluster-tools/6.1
#build:
@azet
azet / p.md
Last active December 29, 2015 23:29
P.I.M.P.
@azet
azet / gist:8039410
Last active December 31, 2015 20:19
UV2000
UV00000261-P000:~ # free -g
total used free shared buffers cached
Mem: 1956 4 1952 0 0 0
-/+ buffers/cache: 3 1952
Swap: 7 0 7
UV00000261-P000:~ # free -m
total used free shared buffers cached
Mem: 2003210 4283 1998927 0 19 328
-/+ buffers/cache: 3935 1999275
@azet
azet / nginx.conf
Created January 24, 2014 12:45
nginx/nessus ssl config
server {
listen 80;
server_name nessus.gmi.oeaw.ac.at;
rewrite ^ https://$server_name$request_uri? permanent;
}
server {
listen 443;
server_name nessus.gmi.oeaw.ac.at;
client_max_body_size 100m;
@azet
azet / gist:8693255
Created January 29, 2014 17:53
fuck you too, ASA.
vpn(config)# ldap attribute-map group_vpn-users
vpn(config-ldap-attribute-map)# map-name memberOf vpn-users
^
ERROR: % Invalid input detected at '^' marker.
vpn(config-ldap-attribute-map)# map-name memberOf vpnusers
^
ERROR: % Invalid input detected at '^' marker.
vpn(config-ldap-attribute-map)# map-name memberOf vpn_users
^
ERROR: % Invalid input detected at '^' marker.
@azet
azet / threading.tcl
Last active August 29, 2015 13:56
threading in Tcl with package "Thread"
package require Thread
set network "192.168.0"
set threads 8
# create $threads number of threads
for {set t 0} {$t < $threads} {incr t} {
set thread_id [thread::create {
puts " >> thread [thread::id] started."
proc example_function {value} {
@azet
azet / force_automation
Created February 7, 2014 18:10
expect(1) script to force puppet on EL6 hosts in a subnet
#!/usr/bin/expect -f
#
# force puppet on previously unmanaged centos 6 hosts
#
# author: Aaron <azet@azet.org> Zauner @ 7.2.2014
# depends: expect
# license: MIT
#
set timeout 60