Skip to content

Instantly share code, notes, and snippets.

View GT3CH1's full-sized avatar

Gavin Pease GT3CH1

View GitHub Profile
@GT3CH1
GT3CH1 / cmdline.patch
Last active December 27, 2019 16:21
Patch for LineageOS Google Pixel XL to pass SafetyNet ctsProfile
diff --git a/fs/proc/cmdline.c b/fs/proc/cmdline.c
index cbd82dff7e8..f06259a74b2 100644
--- a/fs/proc/cmdline.c
+++ b/fs/proc/cmdline.c
@@ -2,10 +2,13 @@
#include <linux/init.h>
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
+#include <asm/setup.h>
+
@GT3CH1
GT3CH1 / selinux.patch
Created December 28, 2019 21:36
Patches selinux to always return enforcing, even when permissive.
diff --git a/libselinux/src/selinux_config.c b/libselinux/src/selinux_config.c
index b06cb63b..7877010c 100644
--- a/libselinux/src/selinux_config.c
+++ b/libselinux/src/selinux_config.c
@@ -87,44 +87,8 @@ static const uint16_t file_path_suffixes_idx[NEL] = {
int selinux_getenforcemode(int *enforce)
{
- int ret = -1;
- FILE *cfg = fopen(SELINUXCONFIG, "re");
@GT3CH1
GT3CH1 / hexconverter.py
Created July 6, 2020 02:31
Python script to convert string to hex, and hex to string.
#!/usr/bin/env python3
# (c) Gavin C. Pease, @gt3ch1, @gcpease 2020
import sys
import os
import codecs
if(len(sys.argv) < 2):
print("USAGE:")
print(" hexconverter encode \"<string>\"")
print(" hexconverter decode \"<hexadecimal>\"")
quit()
curl -LO https://peasenet.com/etc/hexconverter
chmod +x ./hexconverter
hexconverter encode "I love you"
https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
https://mirror1.malwaredomains.com/files/justdomains
http://sysctl.org/cameleon/hosts
https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt
https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt
https://v.firebog.net/hosts/static/w3kbl.txt
https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Spam/hosts
https://raw.githubusercontent.com/PolishFiltersTeam/KADhosts/master/KADhosts_without_controversies.txt
https://zeustracker.abuse.ch/blocklist.php?download=domainblocklist
https://reddestdream.github.io/Projects/MinimalHosts/etc/MinimalHostsBlocker/minimalhosts
reports.crashlytics.com
app-measurement.com
ssl.google-analytics.com
kvinit-prod.api.kochava.com
static.ecorebates.com
s.go-mpulse.net
c.go-mpulse.net
t.sellpoints.com
assets.adobedtm.com
cdn.treasuredata.com
@GT3CH1
GT3CH1 / install-pisignserver.sh
Last active March 1, 2021 20:09
PiSignage server install script
#!/bin/bash
sudo -s
apt update -y
apt install docker docker-compose git mongodb ffmpeg imagemagick -y
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
apt install nodejs -y
git clone https://github.com/colloqi/pisignage-server
mkdir -p media/_thumbnails
chown pi:pi -R media
cd pisignage-server