Skip to content

Instantly share code, notes, and snippets.

View jnovack's full-sized avatar
😠
Changing tabs to spaces...

Justin J. Novack jnovack

😠
Changing tabs to spaces...
View GitHub Profile
@jnovack
jnovack / Makefile
Created February 21, 2017 13:42
heroes-of-the-assets
.PHONY:i ptr version extract docker images all
version-ptr:
storm-extract -f DataBuildId.txt -x -q -i "/Applications/Heroes of the Storm"
$(eval BUILD = `cat mods/core.stormmod/base.stormdata/DataBuildId.txt | sed 's/[[:alpha:]]//'`)
@echo ${BUILD}
extract-ptr:
storm-extract -f DataBuildId.txt -x -q -i "/Applications/Heroes of the Storm"
$(eval BUILD = `cat mods/core.stormmod/base.stormdata/DataBuildId.txt | sed 's/[[:alpha:]]//'`)
@jnovack
jnovack / script.js
Created April 18, 2017 21:05
Freeze Window
// ==UserScript==
// @name Freeze Window
// @namespace
// @version 0.0.1
// @description
// @author Justin J. Novack
// @include http*://*.hotslogs.com/*
// @run-at document-end
// ==/UserScript==
@jnovack
jnovack / cisco-decrypt-type7-password.js
Last active July 20, 2021 17:38
Javascript function() to decrypt Type 7 passwords from Cisco
function crackPassword(password) {
var crypttext = password.toUpperCase();
var plaintext = '';
var xlate = "dsfd;kfoA,.iyewrkldJKDHSUBsgvca69834ncxv9873254k;fg87";
var seed, i, val = 0;
if(crypttext.length & 1)
return;
seed = (crypttext.charCodeAt(0) - 0x30) * 10 + crypttext.charCodeAt(1) - 0x30;
@jnovack
jnovack / recurse.sh
Created June 25, 2017 20:07
rancher-metadata recursion debug script
#!/bin/sh
# Recurse through http://rancher-metadata/ for debugging purposes
recurse() {
local URL=${1//\/\//\/};
for FILE in $(curl ${URL});
do
if [[ $FILE == "Not" || $FILE == "found" ]]; then
break;
fi;
@jnovack
jnovack / storm.js
Created July 7, 2017 12:16
Nydus HeroProtocol Storm-Replay (C++ extractor) demo
"use strict";
const fs = require('fs');
const path = require('path');
const protocol29406 = exports.protocol = require('../lib/protocol29406');
const storm = require('storm-replay');
const version = exports.version = require('../package.json').version;
@jnovack
jnovack / Makefile
Last active June 4, 2018 06:13
CentOS 7 - Custom Kickstart Build
build:
genisoimage \
-U -r -v -T -J -joliet-long \
-V 'CentOS 7 x86_64' \
-volset 'CentOS 7 x86_64' \
-A 'CentOS 7 x86_64' \
-b isolinux/isolinux.bin \
-c isolinux/boot.cat \
-no-emul-boot \
-boot-load-size 4 \
@jnovack
jnovack / make-self-signed-cert.sh
Last active July 13, 2017 19:29
OpenSSL Self-Signed Certificate
#!/bin/sh
openssl req -x509 -nodes -newkey rsa:4096 -keyout key.pem -out certificate.pem -days 720 \
-subj "/C=XX/ST=State/L=City/O=Department/OU=Organization/CN=localhost.localdomain"
@jnovack
jnovack / alpine-nfs.md
Last active May 2, 2024 16:02
Setting up an Alpine NFS v4 Server
Welcome to Alpine!

The Alpine Wiki contains a large amount of how-to guides and general
information about administrating Alpine systems.
See <http://wiki.alpinelinux.org>.

You can setup the system with the command: setup-alpine

You may change this message by editing /etc/motd.
@jnovack
jnovack / Makefile
Last active November 23, 2020 03:35
bash_completion on OSX without Homebrew
all:
@echo "WARNING: Installation requires your sudo access, please enter your password when prompted."
@echo " ... press Enter to continue... "
@read
curl -LOs https://src.fedoraproject.org/repo/pkgs/bash-completion/bash-completion-1.3.tar.bz2/a1262659b4bbf44dc9e59d034de505ec/bash-completion-1.3.tar.bz2
curl -LOs https://raw.githubusercontent.com/Homebrew/formula-patches/c1d87451da3b5b147bed95b2dc783a1b02520ac5/bash-completion/bug-740971.patch
curl -LOs https://gist.githubusercontent.com/jnovack/e66f40e7a31e04f909c2f503c6df7367/raw/287b97a1f24bb47746248a15659b9478e6ec8e02/osx.patch
curl -LOs https://gist.github.com/jnovack/e66f40e7a31e04f909c2f503c6df7367/raw/SHA256SUMS
shasum -c SHA256SUMS || (@echo "There was an error downloading one or more files... please try again."; exit 1)
tar -xzvf bash-completion-1.3.tar.bz2
@jnovack
jnovack / append_once.sh
Created July 24, 2017 23:44
append_once()
#!/bin/bash
function append_once() {
while read data; do
grep -q "$data" $1 || echo "$data" >> $1
done
}
append_once ~/.bashrc <<EOF
echo 'This line is only written once.'