Skip to content

Instantly share code, notes, and snippets.

View ianblenke's full-sized avatar
🎯
Focusing

Ian Blenke ianblenke

🎯
Focusing
View GitHub Profile
#!/system/xbin/bash
for cmd in docker docker-containerd docker-containerd-ctr docker-containerd-shim docker-init docker-proxy docker-runc dockerd ; do
patchelf --set-interpreter /data/local/nhsystem/kali-armhf/lib/ld-linux-aarch64.so.1 /usr/bin/$cmd
done
CHROOTFS=/data/local/nhsystem/kali-armhf
export PATH=$PATH:${CHROOTFS}/usr/bin:${CHROOTFS}/bin:${CHROOTFS}/usr/local/bin:${CHROOTFS}/usr/sbin:${CHROOTFS}/sbin:${CHROOTFS}/usr/local/sbin
export LD_LIBRARY_PATH=${CHROOTFS}/usr/lib:${CHROOTFS}/lib:${CHROOTFS}/usr/local/lib:${CHROOTFS}/lib/aarch64-linux-gnu:${CHROOTFS}/lib/arm-linux-gnueabihf:${CHROOTFS}/usr/lib/aarch64-linux-gnu:${CHROOTFS}:/usr/lib/arm-linux-gnueabihf:$LD_LIBRARY_PATH
#!/system/bin/sh
mount --bind /proc/ /data/local/nhsystem/kali-armhf/proc/
mount --bind /dev/ /data/local/nhsystem/kali-armhf/dev/
mount --bind /sys/ /data/local/nhsystem/kali-armhf/sys/
mount --bind /data/local/tmp /data/local/nhsystem/kali-armhf/tmp/
chroot /data/local/nhsystem/kali-armhf/ /bin/bash
@ianblenke
ianblenke / gist:94d8a4935a5c247596f47b46633983d7
Created May 1, 2018 13:32
aletheios docker info output
root@localhost:/# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
eb849b15e1e8 arm64v8/ubuntu:latest "bash" 12 hours ago Created angry_davinci
5659f4a209b7 arm64v8/ubuntu:latest "bash" 13 hours ago Created infallible_chandrasekhar
root@localhost:/# docker info
Containers: 2
Running: 0
Paused: 0
Stopped: 2
Images: 1
@ianblenke
ianblenke / gist:66a43c731a045c7e3af892840b57882d
Created May 1, 2018 13:23
aletheios kernel config support for docker
info: reading kernel config from /proc/config.gz ...
Generally Necessary:
- cgroup hierarchy: properly mounted [/sys/fs/cgroup]
- CONFIG_NAMESPACES: enabled
- CONFIG_NET_NS: enabled
- CONFIG_PID_NS: enabled
- CONFIG_IPC_NS: enabled
- CONFIG_UTS_NS: enabled
- CONFIG_CGROUPS: enabled
@ianblenke
ianblenke / cot.js
Created October 30, 2017 23:25
Attempting to feed ATAK a Cursor on Target message
const dgram = require('dgram');
const socket = dgram.createSocket('udp4');
//var port = 4242
//var port = 8087
var port = 18999
var address = "192.168.14.151"
var msg = '<?xml version="1.0" standalone="yes"?><event version="2.0" uid="J-01334" type="a-h-A-M-F-U-M" time="2005-04-05T11:43:38.07Z" start="2005-04-05T11:43:38.07Z" stale="2005-04-05T11:45:38.07Z"><detail></detail><point lat="30.0090027" lon="-85.9578735" ce="45.3" hae="-42.6" le="99.5"/></event>'

Keybase proof

I hereby claim:

  • I am ianblenke on github.
  • I am ianblenke (https://keybase.io/ianblenke) on keybase.
  • I have a public key whose fingerprint is DC24 B486 F872 77C4 3858 FBEE 96CF F92B BC9D A7AC

To claim this, I am signing this object:

@ianblenke
ianblenke / fixdm.sh
Created August 2, 2016 19:20
Fix docker-machine configs
#!/bin/bash
INCONFIG=config.json
OUTCONFIG=config.json.$$
if [ ! -f $INCONFIG ]; then
echo "Cannot find $INCONFIG file"
exit 1
fi
SSHKeyPath="$(jq -r .Driver.SSHKeyPath $INCONFIG)"
@ianblenke
ianblenke / zil_and_arc.sh
Last active December 1, 2021 11:35
FreeBSD ZFS: Putting a ZIL mirror and an L2ARC on only 2 SSD drives
#!/bin/bash
# Based on this blog post: https://clinta.github.io/FreeNAS-Multipurpose-SSD/
set -xe
ssd1=ada2
ssd2=ada3
pool=tank
gpart create -s gpt $ssd1
gpart create -s gpt $ssd2
gpart add -a 4k -b 128 -t freebsd-zfs -s 30G $ssd1
@ianblenke
ianblenke / Dockerfile
Created April 13, 2016 21:20
Dockerfile for building tesseract from source using .travis.yml
FROM ubuntu
MAINTAINER Ian Blenke <[email protected]>
RUN apt-get update
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y git ruby bundler wget unzip
RUN gem install travis --no-ri --no-rdoc
RUN git clone https://github.com/travis-ci/travis-build ~/.travis/travis-build
RUN bundle install --gemfile ~/.travis/travis-build/Gemfile
ADD . /tesseract
@ianblenke
ianblenke / full_submodule_clone.sh
Created March 3, 2016 03:35
Do a full submodule clone
#!/bin/bash
git submodule update --init --recursive ; git submodule | while read line ; do submodule=$(echo $line | awk '{print $2}'); if [ -f $submodule/.git ] ; then url=$(grep -2 $submodule .gitmodules | grep url | tail -1 | awk '{print $3}') ; rm -fr $submodule; git clone $url $submodule; fi ; done ; git submodule update --init --recursive