Skip to content

Instantly share code, notes, and snippets.

View depau's full-sized avatar

Davide Depau depau

View GitHub Profile
@depau
depau / tapo.js
Created November 27, 2020 15:25
Tapo app Frida request inspector
setTimeout(function() {
Java.perform(function () {
var Account = Java.use("com.tplink.libtpnetwork.cameranetwork.model.Account");
var Request = Java.use("com.tplink.libtpnetwork.cameranetwork.model.Request");
var Response = Java.use("com.tplink.libtpnetwork.cameranetwork.model.Response");
var TPIoTResponse = Java.use("com.tplink.libtpnetwork.IoTNetwork.TPIoTResponse");
var RequestInterceptor = Java.use("com.tplink.libtpnetwork.cameranetwork.c.a.a.b");
var ByteString = Java.use("com.android.okhttp.okio.ByteString");
var Buffer = Java.use("com.android.okhttp.okio.Buffer");
@depau
depau / Dockefile
Last active January 6, 2021 09:59
3D printing group sex spam bot nuker bot
FROM python:3.9.1
MAINTAINER "Davide Depau <[email protected]>"
RUN pip install pyrogram TgCrypto
COPY . /app
WORKDIR /app
ENTRYPOINT ["python3", "/app/userbot.py"]
@depau
depau / README.md
Created January 9, 2021 15:14
Strace indent and colorize

Strace indent and colorize

Parses strace's output and indents filesystem access calls, colorizing and indenting equally all access to the same file descriptor.

screenshot

@depau
depau / README.md
Last active April 17, 2025 19:39
Valetudo Gamepad Control

PyGame-based Valetudo Gamepad Remote Control

Uses PyGame, so it should work with all gamepads that work in actual games.

Nasty code ;)

It requires the gamepad to have at least one analog stick.

Modify the script and set DRY_RUN to True to avoid contacting Valetudo during gamepad testing.

@depau
depau / kelon_decoder.py
Last active January 18, 2022 17:41
Kelon AC IR command decoder
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
MODES = {
0: "heat",
1: "smart",
2: "cool",
3: "dehum",
" Vim syntax file
" Language: MVS jcl (jcl)
" Maintainer: Fiorenzo Zanotti
" Last Change: 2002 Sep 22
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
syntax clear
elseif exists("b:current_syntax")
@depau
depau / 1-README.md
Last active December 29, 2024 15:05
Force sound mode on LG C1 OLED webOS TV

Force sound mode on LG C1 OLED webOS TVs

This script works around the annoying feature of LG webOS TVs which automatically change the sound mode to "Game optimizer" when Game optimizer is selected as the video mode.

It works around it by setting it back to a user-selected mode every 5 seconds in case it changed to something else.

To install it your TV needs to be rooted. See RootMyTV and WebOSBrew.

if(GlobalVariable* GA = M.getGlobalVariable("llvm.global.annotations")) {
// the first operand holds the metadata
for (Value *AOp : GA->operands()) {
// all metadata are stored in an array of struct of metadata
if (ConstantArray *CA = dyn_cast<ConstantArray>(AOp)) {
// so iterate over the operands
for (Value *CAOp : CA->operands()) {
// get the struct, which holds a pointer to the annotated function
// as first field, and the annotation as second field
if (ConstantStruct *CS = dyn_cast<ConstantStruct>(CAOp)) {
@depau
depau / 0-README.md
Last active July 27, 2023 16:16
Python initialization adventures

Recommended viewing experience

@depau
depau / normalizer.sh
Created November 27, 2023 12:15
JavaCard SDK normalizer script for Linux and Unix-like systems
#!/bin/bash
set -euo pipefail
# Place this script next to `normalizer.bat`
# Set JC_CLASSIC_HOME to the parent directory of the script location
JC_CLASSIC_HOME=$(dirname "$(readlink -f "$0")")/..
# Print warning if no JAVA_HOME set
if [ -z "$JAVA_HOME" ]; then