Skip to content

Instantly share code, notes, and snippets.

View grant-h's full-sized avatar

Grant Hernandez grant-h

View GitHub Profile
@tonyg
tonyg / qnd_cbd.py
Created September 9, 2020 21:06
Quick-and-dirty plain-kernel-interface python modem boot and operation scripts for Samsung Galaxy S7
#!/usr/bin/env python3
# Per cbd, "SS310 modem", "shannon310". This is a Samsung Galaxy S7 SM-G930F.
# ["/sbin/cbd", "-d", "-tss310", "-bm", "-mm", "-P", "platform/155a0000.ufs/by-name/RADIO"]
boot0_path = '/dev/umts_boot0'
firmware_partition = '/dev/disk/by-partlabel/RADIO' ## maps to /dev/sda8 on my phone
nv_data_path = '/efs/nv_data.bin' ## mount /dev/disk/by-partlabel/EFS (/dev/sda3 for me) on /efs
import cffi
@astarasikov
astarasikov / convert_teegris_tas.py
Last active April 19, 2024 20:53
Exynos9820 TEEGRIS TZAR unpack script
#!/usr/bin/env python3
# Usage: python convert_teegris_tas.py ~/Downloads/sw/pda/s10/fw/fw_G973FXXU4BTA8/AP/vendor/tee/
import os
import sys
from textwrap import wrap
def teegris_ta_to_elf(path_from, path_to):
with open(path_from, 'rb') as fin:
with open(path_to, 'wb') as fout:
@andreicristianpetcu
andreicristianpetcu / ansible-summary.md
Created May 30, 2016 19:25
This is an ANSIBLE Cheat Sheet from Jon Warbrick

An Ansible summary

Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)

Configuration file

intro_configuration.html

First one found from of

@v-p-b
v-p-b / Skeptics_Guide_to_Security_Cons.md
Last active January 23, 2020 13:43
Skeptics Guide to Security Conferences
@joubin
joubin / bypassSafeConnect.py
Last active July 13, 2020 17:37
This is a small script to bypass SafeConnect. SaveConnect is a small tool some universities use to manage you system. It installs their third party tool to monitor your usage and to check to see if you are running a virus scanner. The system is pretty flawed both in code and implementation. You can bypass it all together by running this.
#!/usr/bin/python
#
# Version 1.0
# This script will pass a linux HTML header causing safe connect to ignor the host mac address as safeconnect is not developed for *nix machines
# For educational purposes only.
# Joubin Jabbari
import sys
import urllib2
import random
@ElectronicRU
ElectronicRU / dmenu_history.sh
Last active December 14, 2015 19:48
dmenu script for providing unlimited history sorted by number of uses/most recent use.
#!/bin/sh
if [ $# -lt 1 ] ; then
echo 1>&2 "usage: dmenu_history hist_file dmenu_opts..."
exit 1
fi
f="$1"
tf=`mktemp`
if ! [ -e "$f" ]; then touch "$f"; fi
shift
( sort -r -k 1,1 -n -s "$f" | cut -d' ' -f2- ; cat - ) | dmenu "$@" |
@saetia
saetia / gist:1623487
Last active March 19, 2024 15:21
Clean Install – OS X 10.11 El Capitan

OS X Preferences


most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat
@BlockoS
BlockoS / openDisplay.c
Created December 9, 2009 20:57
Smallest possible raw X11 init
//// TODO :: 3. Clean up
//// 4. Events
//// 5. Create a colormap
//// 6. glx ?
#ifdef DEBUG
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <sys/un.h>
#include <sys/select.h>