Skip to content

Instantly share code, notes, and snippets.

View themultiplexer's full-sized avatar

Joshua Rutschmann themultiplexer

View GitHub Profile
@shepgoba
shepgoba / yeet.c
Last active July 13, 2023 14:06
actual battery health algorithm as of ios 13.3
//requires: com.apple.private.iokit.batterydata entitlement
extern "C"
CFArrayRef IOPSCopyPowerSourcesByType(int type);
int healthPercent;
NSArray *sources = (__bridge NSArray *)IOPSCopyPowerSourcesByType(1);
NSDictionary *batteryDict = sources[0];
if (sources && sources.count && batteryDict[@"Maximum Capacity Percent"]) {
@jankais3r
jankais3r / iOS 13 Entitlements
Created May 1, 2020 12:46
iOS 13 Entitlements
//Sourced from http://newosxbook.com/ent.jl?ent=&osVer=iOS13
abs-client
absinthe-client
adi-client
allow-obliterate-device
allow-softwareupdated
appData
application-identifier
aps-connection-initiate
aps-environment
@jakeajames
jakeajames / patch.sh
Last active April 5, 2024 13:42
Make h3lix work when installed not-via-Impactor. To be used with the latest h3lix.
if [ $# != 2 ]; then
echo "Usage: $0 /path/to/input_ipa /path/to/output_ipa"
exit 1
fi
if ! [ -f $1 ]; then
echo "'$1' does not exist"
exit 1
fi
@rabssm
rabssm / ffmpegtips.txt
Last active June 30, 2023 12:43
ffmpeg tips
# Interpolate video frames for a higher frame rate
ffmpeg -i source.mp4 -filter:v minterpolate -r 25 result.mp4
ffmpeg -i source.mp4 -vf minterpolate=50,tblend=all_mode=average,framestep=2 result.mp4
# Crop a video to the bottom right quarter
ffmpeg -i in.mp4 -filter:v "crop=in_w/2:in_h/2:in_w/2:in_h/2" -c:a copy out.mp4
# Resize a video to half size
ffmpeg -i input.mkv -filter_complex "scale=in_w/2:in_h/2" output.mkv
@yunazuno
yunazuno / ethtool.py
Last active March 12, 2024 10:51
ethtool -S in Python
#!/usr/bin/env python
import socket
import fcntl
import struct
import array
SIOCETHTOOL = 0x8946
ETHTOOL_GSTRINGS = 0x0000001b
ETHTOOL_GSSET_INFO = 0x00000037
ETHTOOL_GSTATS = 0x0000001d
@holzschu
holzschu / LLVM_for_iOS.sh
Last active December 5, 2023 02:42
Cross-compiling LLVM for iOS
#! /bin/bash
curl http://releases.llvm.org/6.0.0/llvm-6.0.0.src.tar.xz -O
tar xvzf llvm-6.0.0.src.tar.xz
rm llvm-6.0.0.src.tar.xz
cd llvm-6.0.0.src
# get clang
pushd tools
curl http://releases.llvm.org/6.0.0/cfe-6.0.0.src.tar.xz -O
@INT0x00
INT0x00 / ethsend.c
Last active February 4, 2024 16:25
raw ethernet frame sending explained in code..
/* think this is good way to send ethernet frame, commented where needed.
use code for experimentation ,use man pages if u want to build something from it...
some useful man pages on my machine were: man 2 socket, man 7 socket, man 7 packet, man 7 netdevice, man 7 raw
to slap a licence i'd say gpl-2 so that. https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
this gist inspired me to make one which is more tuned to actual raw eth frames and is a bit more complete/correct
in that regard in my opinion.
https://gist.github.com/austinmarton/1922600
@mkaminsky11
mkaminsky11 / wl_monitor.sh
Last active December 1, 2023 17:59
Enables monitor mode for wl driver(Broadcom)
#!/bin/sh
# so, by default, monitoring and injection cannot be used with Broadcom wl wifi drivers (such as those for Macs)
# this makes it impossible to do stuff like crack wifi passwords with aircrack-ng
# fortunately, there is a solution burried in https://www.broadcom.com/docs/linux_sta/README.txt
echo 1 > /proc/brcm_monitor0 #enables monitor mode. That's it!
# prism0 is now like "mon0" (monitor mode)
@iondune
iondune / SimpleOpenGL.cpp
Created January 28, 2015 19:28
Simple OpenGL sample using GLEW and GLFW
#include <GL/glew.h>
#include <GLFW/glfw3.h>
#include <iostream>
#include <string>
void PrintOpenGLErrors(char const * const Function, char const * const File, int const Line)
{