Skip to content

Instantly share code, notes, and snippets.

Avatar

Jakob Löw M4GNV5

View GitHub Profile
@M4GNV5
M4GNV5 / luca-sms-bypass.js
Last active Apr 29, 2021
Bypass luca-app sms verify allowing users to test the app without a real phone number. Use responsibly
View luca-sms-bypass.js
// Paste this into the js console of your browser whilst viewing the Luca webapp
(function() {
var originalFetch = fetch;
window.fetch = (url, options) => {
if(url === '/api//v3/sms/request') {
console.log('hooked fetch', url, options);
return Promise.resolve({
json: () => Promise.resolve({
challengeId: '00000000-0000-0000-0000-000000000000',
})
View displaylink--debug
View _output_x86_64.txt
function optimized func(i1 : int) : int
incoming_reg(i1, rdi)
.L:
i3 = 42
l5 = retrieve_frame_pointer
outgoing_reg(i3, rsi)
outgoing_reg(l5, rdi)
call child
.L:
return_reg(i8, rax)
View diceModuloCounts.hs
import Data.Ord
import Data.List
import Data.Function
dice n = [1..n]
combinations xs ys = concat $ map (\y -> map (\x -> x : y) xs) ys
diceCombinations n k = foldr (combinations) (map return diceN) (replicate (k - 1) diceN)
@M4GNV5
M4GNV5 / gdblog.txt
Created Jul 1, 2018
Mongoose MQTT Crash
View gdblog.txt
Remote debugging using /dev/ttyUSB0
0x40094624 in invoke_abort () at /home/jakob/git/Open-Vehicle-Monitoring-System-3/env/esp-idf/components/esp32/panic.c:139
139 *((int *) 0) = 0;
(gdb) back
#0 0x40094624 in invoke_abort () at /home/jakob/git/Open-Vehicle-Monitoring-System-3/env/esp-idf/components/esp32/panic.c:139
#1 0x400947ee in abort () at /home/jakob/git/Open-Vehicle-Monitoring-System-3/env/esp-idf/components/esp32/panic.c:148
#2 0x4010504e in __assert_func (
file=0x3f412e80 "/home/jakob/git/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/mongoose/mongoose/mongoose.c",
line=10700, func=<optimized out>, failedexpr=0x3f41308c "nc->send_mbuf.len >= len")
at ../../../.././newlib/libc/stdlib/assert.c:63
View cppMacro.sh
#!/bin/bash
printf "#include <stdio.h>\n" > /tmp/cppmacro.c
while [ $# -gt 1 ]; do
printf "#include <$1.h>\n" >> /tmp/cppmacro.c
shift
done
printf "int main()\n{\n\tprintf(\"%%d\\\\n\", $1);\n\treturn 0;\n}" >> /tmp/cppmacro.c
gcc -D_GNU_SOURCE /tmp/cppmacro.c -o /tmp/cppmacro
View esp8266 exception
ctx: sys
sp: 3ffffd70 end: 3fffffb0 offset: 01a0
>>>stack>>>
3fffff10: 4010502c 001d3def 3ffe9284 00000000
3fffff20: 4010502c 001d45f1 3ffeedf0 00000000
3fffff30: 3ffee6f0 3ffeedf0 40222613 3ffe9284
3fffff40: 00000000 001ccbdf 40201364 00000064
3fffff50: 3ffeedf0 01b12953 60000600 40106895
3fffff60: 40229e70 00000001 00000000 4020207c
View input.ino
#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ESP8266mDNS.h>
#define WIFI_SSID "<removed>"
#define WIFI_PSK "<removed>"
#define GPIO_LED 13
#define GPIO_RELAY 12
@M4GNV5
M4GNV5 / measure.sh
Created Feb 10, 2018
Brainfuck compiler comparasion script
View measure.sh
#!/bin/bash
set -e
input="../$1"
stdin="$2"
function measure()
{
total=0
View primes.hs
import Control.Concurrent.Async
import Data.Foldable
import Control.Exception
import Control.DeepSeq
numThreads = 4
maxChunkSize = 1024000
isPrime :: [Int] -> Int -> Bool
isPrime primes x = all ((/=0) . (mod x)) $ takeWhile ((<=x) . (^2)) primes