Skip to content

Instantly share code, notes, and snippets.

@m1stadev
m1stadev / generator-apnonce.md
Last active March 8, 2024 18:01
Short guide on how to get a generator-apnonce pair for A12+ iOS devices (both jailbroken and non-jailbroken).

What's nonce entanglement?

Beginning with devices using an A12 SoC or higher, Apple introduced nonce entangling.

  • This meant that, when saving SHSH blobs, a nonce generator would generate a different ApNonce for each device.
  • When saving SHSH blobs for an A12+ device, you now must find a generator-ApNonce pair for your device, then use that generator-ApNonce pair when saving SHSH blobs.
  • After you have found a generator-ApNonce pair for your device, you can save it and re-use it whenever you save SHSH blobs again.

Getting a generator-ApNonce pair (jailbroken)

  1. (iOS 14+ only) Install an iOS kernel r/w library.
    • On Taurine, install libkernrw.
  • On unc0ver, install libkrw.
@thepeoplesbourgeois
thepeoplesbourgeois / allEventListeners.js
Last active September 1, 2023 02:18 — forked from tkafka/listAllEventListeners.js
List all event listeners in a document
function allEventListeners(){
const eventNames = Object.keys(window).filter(key => /^on/.test(key))
return [...document.querySelectorAll('*'), document].flatMap((node) => eventNames
.filter(event => node[event])
.map(event => {
return {
node,
event,
listener: (typeof node[event] === 'function') ? node[event].toString() : node[event]
}
@dmnsgn
dmnsgn / listAllEventListeners.js
Created April 5, 2017 15:40
List all event listeners in a document
const listeners = (function listAllEventListeners() {
let elements = [];
const allElements = document.querySelectorAll('*');
const types = [];
for (let ev in window) {
if (/^on/.test(ev)) types[types.length] = ev;
}
for (let i = 0; i < allElements.length; i++) {
const currentElement = allElements[i];
@aemxn
aemxn / index.php
Created July 5, 2015 00:29
crud-slim-tutorial
<?php
/**
* ROUTES:
* (Authorization header with api key is required for user session)
*
* /register
* method - post
* params - name, email, password
*
@ndarville
ndarville / README.md
Last active May 23, 2024 09:02
From CSV to HTML table (Simple)

This code generates an HTML table based from a CSV file. This is from the tutorial by Christophe Viau.

In trying his code example, I discovered that the code doesn't work as-is, so I figured others might like to see a working d3.js example that did not rely on a pre-existing container HTML element.

The code remains the same except for some cosmetic tweaks.

The task of writing the CSS is left as an exercise for the reader.

@aspyct
aspyct / signal.c
Last active February 19, 2024 11:24
Unix signal handling example in C, SIGINT, SIGALRM, SIGHUP...
/**
* More info?
* a.dotreppe@aspyct.org
* http://aspyct.org
*
* Hope it helps :)
*/
#include <stdio.h>
#include <stdlib.h>
@pditommaso
pditommaso / gist:2265496
Created March 31, 2012 14:26
Read/write input/output stream of interactive process
import java.io.*;
public class TestProcessIO {
public static boolean isAlive(Process p) {
try {
p.exitValue();
return false;
}
catch (IllegalThreadStateException e) {
@ozanyildiz
ozanyildiz / thread_project2
Created February 19, 2012 12:33
Example of Multithreading in C
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
#define M 3
#define K 2
#define N 3
#define NUM_THREADS M * N
/* Global variables for threads to share */