Skip to content

Instantly share code, notes, and snippets.

View ianblenke's full-sized avatar
🎯
Focusing

Ian Blenke ianblenke

🎯
Focusing
View GitHub Profile
#!/bin/bash
#
# Idempotent Ubuntu distribution agnostic docker-ce and container runtime installation script.
# Author: github.com/ianblenke
# Allow bash clobbering of files on redirect
set +o noclobber
# Install docker-ce
sudo apt-get update
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: sysctl
namespace: kube-system
labels:
k8s-app: sysctl
spec:
selector:
matchLabels:
@ianblenke
ianblenke / Dockerfile
Created December 30, 2018 00:18
cerbero gstreamer 1.14 for android build Dockerfile
FROM ubuntu:bionic
RUN apt-get update
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get install -y python3-pip python3 git build-essential sudo
RUN apt-get install -y autotools-dev automake autoconf libtool g++ autopoint make cmake bison flex yasm pkg-config gtk-doc-tools libxv-dev libx11-dev libpulse-dev python3-dev texinfo gettext build-essential pkg-config doxygen curl libxext-dev libxi-dev x11proto-record-dev libxrender-dev libgl1-mesa-dev libxfixes-dev libxdamage-dev libxcomposite-dev libasound2-dev libxml-simple-perl dpkg-dev debhelper build-essential devscripts fakeroot transfig gperf libdbus-glib-1-dev wget glib-networking libxtst-dev libxrandr-dev libglu1-mesa-dev libegl1-mesa-dev git subversion xutils-dev intltool ccache python3-setuptools
RUN apt-get install -y libpython-dev libpython2.7 libpython2.7-dev python-dev python2.7-dev libfuse2 libselinux1-dev libsepol1-dev fuse chrpath libfuse-dev
RUN git clone -b 1.14 https://gitlab.freedesktop.org/gstreamer/cerbero /cerbero
WORKDIR /cerbero
@ianblenke
ianblenke / hackrf_sweep.sh
Last active September 24, 2018 14:44
How to run the hackrf_sweep sorter
#!/bin/bash
hackrf_sweep -1 -f1:7250 -w 100000 -l32 -g8 2>/dev/null | grep 2018 | ./hackrf_sweep_sorter.pl
@ianblenke
ianblenke / hackrf_sweep_sorter.pl
Created September 24, 2018 14:43
A hackrf_sweep sorter script
#!/usr/bin/perl
my %powers;
while (my $line = <STDIN>) {
chomp($line);
( $date, $time, $fstart, $fstop, $fwidth, $unknown, @rest ) = split(/, /, $line);
foreach $power (@rest) {
$powerfloat = 0.0 + $power;
if(!$powers{$powerfloat}) {
$powers{$powerfloat} = [];
}
#!/bin/bash
org=${1:-sofwerx}
for page in $(seq 1 3); do
curl -H "Authorization: token $GITHUB_TOKEN" -sL 'https://api.github.com/orgs/'$org'/repos?per_page=100&page='$page | jq -r .[].clone_url ; done | xargs -P20 -L1 git clone -q $url ;
done
@ianblenke
ianblenke / alethios-root.sh
Created May 30, 2018 19:09
Root shell script using Kali Nethunter chroot paths mounted in alethios /data/ volumes as symlinked from root
#!/system/bin/sh
if ! mount | grep -v grep | grep /dev/pts ; then
mount -t devpts devpts /dev/pts
fi
if ! mount | grep -v grep | grep /data/usr; then
mount --bind /data/local/nhsystem/kali-armhf/usr /data/usr
fi
if ! mount | grep -v grep | grep /data/bin; then
mount --bind /data/local/nhsystem/kali-armhf/bin /data/bin
fi
@ianblenke
ianblenke / alethios-chroot.sh
Created May 30, 2018 19:07
Chroot script for Kali NetHunter with all of the various supporting device filesystems mounted
#!/system/bin/sh
if ! mount | grep -v grep | grep /data/local/nhsystem/kali-armhf/proc ; then
mount --bind /proc/ /data/local/nhsystem/kali-armhf/proc/
fi
if ! mount | grep -v grep | grep /data/local/nhsystem/kali-armhf/dev ; then
mount --bind /dev/ /data/local/nhsystem/kali-armhf/dev/
fi
if ! mount | grep -v grep | grep /data/local/nhsystem/kali-armhf/sys ; then
mount --bind /sys/ /data/local/nhsystem/kali-armhf/sys/
fi
@ianblenke
ianblenke / cgroup-prefix.patch
Created May 4, 2018 13:24
cgroup prefix option
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index 5ed7fc3..c1cc306 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -1658,6 +1658,10 @@ static int parse_cgroupfs_options(char *data, struct cgroup_sb_opts *opts)
opts->flags |= CGRP_ROOT_SANE_BEHAVIOR;
continue;
}
+ if (!strcmp(token, "prefix")) {
+ opts->flags &= ~CGRP_ROOT_NOPREFIX;
#!/system/xbin/bash
cd /data/ssh
cat <<EOF > sshd_config
AuthorizedKeysFile /data/ssh/authorized_keys
ChallengeResponseAuthentication no
PasswordAuthentication no
PermitRootLogin yes
Subsystem sftp internal-sftp