Skip to content

Instantly share code, notes, and snippets.

@kleo
kleo / check-tor.sh
Created December 4, 2020 06:26
Simple addon to check if script is running on Tor
#!/bin/bash
# alias foo='torsocks script.sh'
curl -s https://check.torproject.org | sed '/<!doctype/d' | sed '/&raquo/d' | xmlstarlet sel -t -v '//html/body/div[2]/h1' | tr -d '\n' | awk '{$1=$1};1'
echo
curl https://ipv4.icanhazip.com
echo
[Unit]
Description=Switch Lan Play
After=network.target network-online.target
[Service]
Type=simple
Restart=on-failure
RestartSec=60
ExecStart=/home/pi/switch-lan-play/build/src/lan-play --netif eth0 --pmtu 500 --relay-server-addr lanplay.cpalm.org:11451
@kleo
kleo / tig.md
Last active October 29, 2020 01:48

TIG Stack AN5506-04-FA and Raspberry Pi

Defaults has UTC configured to GMT+8, configure NTP with adminpldt

Management > Device Management > NTP Check Time

time.google.com
time.google.com
https://thiru.in/333/tech/get-github-vanity-url-git-io/
$ curl -i https://git.io -F "url=https://github.com/ithiru" -F "code=thiru"
HTTP/1.1 100 Continue
HTTP/1.1 201 Created
Server: Cowboy
Connection: keep-alive
Date: Thu, 22 Sep 2016 05:05:35 GMT
Status: 201 Created
@kleo
kleo / sm-n910k.txt
Last active October 26, 2020 16:55
USB debugging enabled remove/change lock screen password SM-N910K (2017-02-18)
# USB debugging enabled remove/change lock screen password SM-N910K (2017-02-18)
# Copy lock screen password
/data/data/com.android.providers.settings/databases/settings.db
# Copy MMS/SMS storage (optional)
/data/data/com.android.providers.telephony/databases/mmssms.db
# Remove or change the password entry from settings.db copy
# I used DB.Browser.for.SQLite-3.9.1-win64.exe from https://sqlitebrowser.org/
@kleo
kleo / gist:93fda5d3d925dbdaab7e62c40708caa6
Last active December 10, 2020 19:58
timwr/CVE-2016-5195 dirtycow vagrant
# timwr/CVE-2016-5195 dirtycow vagrant
vagrant init debian/stretch64
vagrant up
# remote forward adb server port on host to vagrant
vagrant ssh -- -R 5037:localhost:5037
# https://bbs.archlinux.org/viewtopic.php?pid=1628620#p1628620
mount -o remount,size=4G /run/archiso/cowspace
@kleo
kleo / gist:91d6f893cb4090ac9c3d08ec503e5f9d
Last active October 23, 2020 20:48
Building Luma3DS on Arch Linux

Building Luma3DS on Arch Linux

Install text editor

sudo pacman --noconfirm -Syu

sudo pacman --noconfirm -S vim
@kleo
kleo / gist:5091e178b3ba1e758137d660d8e9e080
Last active November 8, 2020 16:22
Philippines mobile number generate wordlist
# 11 GB
crunch 11 11 -t 09@@@@@@@@@ -f charset.lst numeric -o ph-mobile-09.lst
# 12 GB
crunch 12 12 -t 639@@@@@@@@@ -f charset.lst numeric -o ph-mobile-639.lst
@kleo
kleo / buildroot-utils-pldthomefibr.txt
Created May 29, 2020 10:05
building utils for pldthomefibr an5506-04-fa
# building utils for pldthomefibr an5506-04-fa
# vagrant ubuntu xenial
sudo apt install build-essential libncurses5-dev bison flex gettext texinfo python unzip
sudo apt remove gcc-5 g++-5
sudo apt install gcc-4.7 g++-4.7