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
[root@node03 ~]# cat blub.txt
132 ls
133 cd
134 ls
135 cd KNC_gold_update_2
136 ls
137 screen -rd
138 ls
139 rpmbuild --rebuild intel-mic-kmod-2.1.5889-16.el6.src.rpm
140 yum install kernel-headers
@azet
azet / gist:5577607
Last active December 17, 2015 08:08
dynamic aliasing in bash
# here be dragons
syscommon_eval_bin() {
# figure out pwd
# search params for lustre path
chklfs() {
if [[ $PWD == *lustre* ]] || [[ "$*" == *lustre* ]]; then
return 0
else
return 1
fi
-- Author: Aaron <azet@azet.org> Zauner
-- License: MIT License (http://opensource.org/licenses/mit-license.php)
-- Description:
whatis("Changes PS1 color depending on the host category (e.g. login, compute,..) in the cluster")
family("syscommon")
hostname = os.getenv("HOSTNAME")
if string.match(hostname, "dmn") then
setenv("PS1", "\\e[45m \\e[0m \\[\\e]0;\\u@\\h: \\w\\a\\]\\u@\\e[0;35m\\h\\e[0m [\\w]> ")
elseif string.match(hostname, "login") then
@azet
azet / gist:5682571
Last active December 17, 2015 22:29
#!/usr/bin/env ruby
require "openssl"
require 'digest/sha2'
require 'base64'
# We use the AES 256 bit counter mode symetric encryption
alg = "AES-256-CTR"
# We want a 256 bit key symetric key based on some passphrase
digest = Digest::SHA256.new
@azet
azet / untaint_gold_premake.patch
Last active December 19, 2015 00:09
Gold allocation manager, remove -T option due to old codebase this results in every binary to be tainted
diff -Naur gold-2.2.0.5/Makefile.in gold-2.2.0.5-b/Makefile.in
--- gold-2.2.0.5/Makefile.in 2013-06-26 14:38:42.107590570 +0200
+++ gold-2.2.0.5-b/Makefile.in 2013-06-26 14:38:04.343509990 +0200
@@ -96,12 +96,12 @@
$(BINS): Makefile
-mkdir -p bin
basename=`echo $@ | sed -e 's#^.*/##'`; \
- sed '1s%#!.*%#! $(PERL) -w%' src/$${basename}.pl | sed "s%use lib .*%use lib qw(@libdir@ @libdir@/perl5);%" >$@
+ sed '1s%#!.*%#! $(PERL) -wT%' src/$${basename}.pl | sed "s%use lib .*%use lib qw(@libdir@ @libdir@/perl5);%" >$@
chmod 4755 $@
@azet
azet / LULZ
Created July 4, 2013 19:49
reading list for cryptocat developers
http://www.amazon.com/Applied-Cryptography-Protocols-Algorithms-Source/dp/0471117099/
http://www.amazon.com/Practical-Cryptography-Niels-Ferguson/dp/0471223573
http://www.amazon.com/Security-Engineering-Building-Dependable-Distributed/dp/0470068523/
http://www.amazon.de/Elliptic-Cryptography-Springer-Professional-Computing/dp/038795273X/
https://www.imperialviolet.org/
@azet
azet / not_as_good_as_nmap.bash
Created July 23, 2013 20:11
one-line TCP portscanner (bash)
SCHOST=127.0.0.1 ; for p in {1..65535}; do (timeout 4 echo >/dev/tcp/${SCHOST}/$p) > /dev/null 2>&1 && echo $SCHOST:$p open; done
@azet
azet / apache_PFS_TLS_setup
Last active December 20, 2015 14:08
Perfect Forward Secrecy/TLS Setup with Apache 2.4 / OpenSSL 1.0.1e on Debian Wheezy
### _/IMPORTANT NOTE_/
### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
### i really prefer ruby, python, C, sh, pgsql or whatever. but this was done for a DIY project, so
### please do not flame on the mariadb and php5 installation, thats not whats important here anyways.
###
### if i forgot someting, please drop me a line instantly via: Mail: azet@azet.org (GPG prefered) or
### via XMPP (OTR prefered): azet@jabber.ccc.de - see also: www.azet.org / https://twitter.com/a_z_e_t
###
### as always, of course: this is public domain knowledge. no warranties.
### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@azet
azet / seccomp_test.c
Created August 15, 2013 17:03
just testing SECCOMP kernel feature. apparently this really works :)
#include <stdio.h>
#include <errno.h>
#include <unistd.h>
#include <sys/prctl.h>
void main(int argc) {
printf("-- SECCOMP Test --\n\n");
if(prctl(PR_SET_SECCOMP, 1, 0, 0) == 0)
printf("[+]\tSECCOMP (via prctl(2)): ON\n");
@azet
azet / gist:6360062
Created August 27, 2013 22:43
tcpdump
tcpdump -i ETH -vvvvvnnXSs 0