Skip to content

Instantly share code, notes, and snippets.

@exelix11
exelix11 / screenshot.csx
Created August 16, 2018 11:25
C# android screenshot in memory with ADB
//Rquired to run in C# Interactive (csi screenshot.csx)
#r "C:\Windows\Microsoft.NET\Framework\v4.0.30319\System.Windows.Forms.dll" //depends on your pc
using System.Windows.Forms;
using System.IO;
static void screenshot()
{
var process = new System.Diagnostics.Process();
var start = new System.Diagnostics.ProcessStartInfo()
@exelix11
exelix11 / nvrpass.cs
Created August 15, 2023 18:03
Reolink NVR super password
// Calculates the password reset "super password" that reolink support can give you if you forget your NVR password.
// May work only on specific models.
// Original code can be found in the router binary in the firmware files, look for constant 3703 or string "MSG_AUTH_FORGET_PWD_LOGIN"
var key = "1987304876298745017645449830875611094356923076019854398671285463";
string find_key(string seed)
{
char[] pass = new char[4 * 8];
@exelix11
exelix11 / Sleepless.cpp
Created September 24, 2020 18:20
Sleepless: a simple program to make sure your PC stays awake
#include <iostream>
#include <windows.h>
int main()
{
SetConsoleTitleW(L"Sleepless");
if (SetThreadExecutionState(ES_CONTINUOUS | ES_SYSTEM_REQUIRED | ES_AWAYMODE_REQUIRED))
std::cout << "Here, have some coffee." << std::endl << "Press return to quit...";
else
{
pm disable-user com.xiaomi.mipicks
pm disable-user com.android.browser
pm disable-user com.miui.calculator
pm disable-user com.miui.compass
pm disable-user com.miui.bugreport
pm disable-user com.mi.android.globalFileexplorer
pm disable-user com.miui.gallery
pm disable-user com.xiaomi.glgm
pm disable-user com.xiaomi.midrop
pm disable-user com.mipay.wallet.id
@exelix11
exelix11 / no-interop-wsl.conf
Last active September 30, 2020 18:36
Wsl scripts
[automount]
enabled=false
[interop]
enabled=false
appendWindowsPath=false
{
"PatchName":"Red applet buttons example V3. Color format is AABBGGRR",
"AuthorName":"exelix",
"TargetName": "ResidentMenu.szs",
"Ready8X":true,
"Files":[
{
"FileName":"blyt/RdtBtnCtrl.bflyt",
"Patches":[
{
@exelix11
exelix11 / RemoteInstallNXTheme.sh
Created August 9, 2019 10:47
RemoteInstall script for NXThemes Installer on Linux
#!/bin/bash
#If used on WSL mind the line endings, only use LF (unix-style)
echo "RemoteInstall for NXThemeInstaller by exelix"
echo "Tested on Installer 2.0.1, may break for future versions (hopefully not)"
IPADDR=$1
FILENAME=$2
if [ -z "$FILENAME" ] || [ -z "$IPADDR" ]
then
echo "Usage $0 [IpAddress] [fileName]"
@exelix11
exelix11 / script.js
Created July 4, 2019 21:31
Get yi home device id with frida
/*
LAUNCHER:
import frida
import time
device = frida.get_usb_device()
pid = device.spawn(["com.ants360.yicamera.international"])
time.sleep(1) #Without it Java.perform silently fails
session = device.attach(pid)
script = session.create_script(open("script.js").read())
@exelix11
exelix11 / IpcMitm.c
Last active May 4, 2019 09:35
mitm and block ipc requests for the Yi IOT cameras
#include <stdio.h>
#include <malloc.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <mqueue.h>
#include <unistd.h>
#define LOGGING
//#define NOPRINT
@exelix11
exelix11 / YiCli.cs
Last active April 23, 2019 11:40
Yi cloud api RE
using System;
using System.Collections.Generic;
using System.Net;
using System.Security.Cryptography;
using System.Text;
using System.IO;
using System.Linq;
using System.Collections;
namespace YiCli