Skip to content

Instantly share code, notes, and snippets.

INFO global: Vagrant version: 2.3.3
INFO global: Ruby version: 2.7.6
INFO global: RubyGems version: 3.1.6
INFO global: VAGRANT_INSTALLER_VERSION="2"
INFO global: VAGRANT_EXECUTABLE="/opt/vagrant/embedded/gems/2.3.3/gems/vagrant-2.3.3/bin/vagrant"
INFO global: VAGRANT_INSTALLER_EMBEDDED_DIR="/opt/vagrant/embedded"
INFO global: VAGRANT_INSTALLER_ENV="1"
INFO global: VAGRANT_LOG="debug"
WARN global: resolv replacement has not been enabled!
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.3/gems/vagrant-2.3.3/plugins/kernel_v1/plugin.rb
# Add SSH keys
ssh-add -L >/dev/null 2>&1
if [ $? -eq 1 ]; then
find ~/.ssh -maxdepth 1 -type f -regex '~/.ssh/id_[^.]*' -print0 | xargs -0 ssh-add
fi
@matlink
matlink / sum_under.sh
Created February 14, 2019 13:24
print SUM until threshold
awk '{ if ($1<=1e7){SUM+=$3} else{print SUM; exit}}'
@matlink
matlink / cve_2016_0728.c
Last active December 3, 2018 00:10 — forked from PerceptionPointTeam/cve_2016_0728.c
cve_2016_0728 exploit
/* $ gcc cve_2016_0728.c -o cve_2016_0728 -lkeyutils -Wall */
/* $ ./cve_2016_072 PP_KEY */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <keyutils.h>
#include <unistd.h>
#include <time.h>
@matlink
matlink / hcstat.sh
Created February 16, 2018 13:48
create hcstat2 file
hcstat2gen < inputfile 2>/dev/null | xz --compress --format=raw --stdout -9e 2>/dev/null > output.hcstat2
@matlink
matlink / default_value.py
Created March 12, 2018 14:03
Default value for missing value of python dict
from collections import defaultdict as ddict
dic = ddict(lambda: '<my_default_value>')
@matlink
matlink / print sum of 2nd column.sh
Last active March 5, 2018 16:17
print sum of 2nd column
awk '{ SUM += $2 } END { print SUM }'
@matlink
matlink / max_column.sh
Created February 17, 2018 19:04
print max of 2nd column
awk '{ if(max<$2) {max=$2} } END { print max }'
@matlink
matlink / hashcat_crackpos.sh
Created February 17, 2018 13:18
hashcat get cracking positions
hashcat -m99999 -o ${BASENAME}.hc.ranks --outfile-format=10 --potfile-disable --markov-hcstat=${BASENAME}.hcstat2 --session=${BASENAME} --increment -a3 -1?l?u?d ${BASENAME} ?1?1?1?1?1?1?1?1?1?1
@matlink
matlink / hashcat_markov.sh
Last active February 17, 2018 13:15
hashcat use markov stat
hashcat --markov-hcstat=${FILEBASE}.hcstat2 --session=${FILEBASE} --increment --stdout -a3 -1?l?u?d ?1?1?1?1?1?1?1?1?1?1