Skip to content

Instantly share code, notes, and snippets.

@stek29
stek29 / 0readme.md
Last active April 11, 2022 17:59
proof of concept
git clone https://github.com/grishka/libtgvoip.git
cd libtgvoip
# Build openssl-1.0.1 and opus-1.1 to prefix libraries/
# Save CMakeLists.txt here (in repo root)
mkdir build
cd build
# Save CallMakefile and main.cpp here

Error codes

According to Webogram (And TDesktop a bit)

  • 400 -- Bad request (Almost all errors)
  • 401 -- Unauthorized
  • 403 -- Forbidden
  • 404 -- Not found
  • 406 -- Network
  • 420 -- Flood
  • 500 and greater -- "Temporary" errors
@stek29
stek29 / langpacker.py
Last active March 9, 2021 12:14
Get TG langpack with Telethon
from telethon.tl.functions import InitConnectionRequest, InvokeWithLayerRequest
from telethon.tl.functions import langpack # GetLangPackRequest, GetDifference
from telethon.tl import all_tlobjects # for LAYER
from telethon.tl.types import LangPackString, LangPackStringPluralized, LangPackStringDeleted
from telethon.tl.functions import InitConnectionRequest, InvokeWithLayerRequest
from telethon.tl.functions import langpack # GetLangPackRequest, GetDifference
from telethon.tl import all_tlobjects
from telethon.tl.types import LangPackString, LangPackStringPluralized, LangPackStringDeleted
@stek29
stek29 / cloner.py
Last active July 13, 2022 05:00
t.me/stickerclonerbot -- Can somebody host this?
import requests
import io
from PIL import Image
import re
from queue import Queue
import threading
class BotException(Exception):
pass
@stek29
stek29 / 0UniversalPaperclips.md
Last active October 27, 2018 21:33
Universal Paperclips related scrips

See Universal Paperclips

qbot.js

"non-cheat" quantum computing bot (makes decisions based on chip opacity, without accessing game's internal variables)

qtoggle.js

Add "toggle" button to quantum computing

@stek29
stek29 / ZZZpanic.txt
Last active December 15, 2017 00:56
setuid(0) with async_wait
panic(cpu 0 caller 0xfffffff00a18b574): "shenanigans!"@/BuildRoot/Library/Caches/com.apple.xbs/Sources/Sandbox_executables/Sandbox-765.20.5.0.1/src/kext/evaluate.c:2674
Debugger message: panic
Memory ID: 0x6
OS version: 15B202
Kernel version: Darwin Kernel Version 17.2.0: Fri Sep 29 18:14:51 PDT 2017; root:xnu-4570.20.62~4/RELEASE_ARM64_T7000
KernelCache UUID: ---who needs dis---
iBoot version: iBoot-4076.20.48
secure boot?: YES
Paniclog version: 8
Kernel slide: 0x0000000003a00000
// unset MNT_ROOTFS flag, remount, set it back
// based on xerub's extra_recipe code
//
int mountroot(void) {
int ret;
uint64_t kaslr_shift = find_kernel_base() - 0xFFFFFFF007004000;
// iPod7,1 iOS 11.1.2
uint64_t _rootvnode = 0xfffffff007622088 + kaslr_shift;
@stek29
stek29 / uitools11.diff
Last active December 9, 2021 04:09
git://git.saurik.com/uikittools.git
diff --git a/makefile b/makefile
index bb00062cb52c..f9b011a8d94f 100644
--- a/makefile
+++ b/makefile
@@ -1,4 +1,4 @@
-uikittools = uiduid uicache uiopen gssc sbdidlaunch sbreload cfversion iomfsetgamma ldrestart
+uikittools = uiduid uicache uiopen gssc cfversion iomfsetgamma ldrestart
all: $(uikittools)
@stek29
stek29 / unlocknvram.c
Last active April 16, 2023 14:29
async_wake nvram
// iOS 11 moves OFVariables to const
// https://twitter.com/s1guza/status/908790514178301952
// however, if we:
// 1) Can find IODTNVRAM service
// 2) Have tfp0 / kernel read|write|alloc
// 3) Can leak kernel address of mach port
// then we can fake vtable on IODTNVRAM object
// async_wake satisfies those requirements
// however, I wasn't able to actually set or get ANY nvram variable
// not even userread/userwrite
@stek29
stek29 / 0_ropemporium.md
Last active January 4, 2018 20:59
ropemporium

ROP Emporium

import struct
def dumpx(x): return (''.join(map(lambda x: '\\x%02x'%x, struct.pack('<Q', x))))
def d(x): print ('print "%s";' % dumpx(x))