Skip to content

Instantly share code, notes, and snippets.

@ariankordi
ariankordi / miitomo mitmproggsy.py
Created September 14, 2024 04:19
Scripts to assist in deobfuscating Miitomo/DeNA XOR + LZ4 encryption, with a mitmproxy script, Go reverse proxy, and Python decoding script. (Note: AI slop)
import mitmproxy.http
from mitmproxy import ctx
import lz4.block
import binascii
# NOTE: miitomo common key is '9ec1c78fa2cb34e2bed5691c08432f04'
COMMON_KEY = "9ec1c78fa2cb34e2bed5691c08432f04"
SESSION_ID_COOKIE_NAME = "player_session_id"
def transform_common_key(s):
#*.discord.com/*.gif$image
https://sentry.io/api/*
# remove DISCORD(tm) NITRO(tm) button below friends list button in most cases
discord.com##[href="/store"]
discord.com##[href="/shop"]
discord.com##[href="/discovery"]
discord.com##[href="//discord.com/snowsgiving"]
discord.com##[href="/activities"]
discord.com##div[data-list-item-id=private-channels-uid_40___snowsgiving]
# remove discord ready animation n video
@ariankordi
ariankordi / mii2charinfonx.py
Created July 12, 2024 21:15
uses HEYimHEROIC/mii2studio (PLACE IN THAT REPO!!!) to convert to the Switch Mii format, nn::mii::CharInfo, hacky script
import sys
from struct import pack
import os
from kaitaistruct import KaitaiStream, BytesIO
if len(sys.argv) < 4:
print("CLI Usage: python mii2studio.py <input mii file / qr code / cmoc entry number> <output studio mii file> <input type (wii/ds/3ds/wiiu/miitomo/switchdb/switch/studio)>\n")
input_file = input("Enter the path to the input file (binary file or QR Code), a CMOC entry number, or a URL to a QR Code: ")
output_file = input("Enter the path to the output file (which will be importable with Mii Studio): ")
@ariankordi
ariankordi / extract-ffsd-from-ffl-odb.cpp
Created June 24, 2024 21:25
Tool using the FFL decomp (not straightforward to run) that extracts FFSDs from an FFL_ODB.dat, aka Wii U Mii Maker database
// NOTE: Meant to be built in my FFL-Testing repo, placed in src.
// LDFLAGS="-lssl -lcrypto" make SRC=src/extract-ffsd-from-ffl-odb.cpp EXEC=extract-ffsd-from-ffl-odb
#include <filedevice/rio_FileDeviceMgr.h>
#include <nn/ffl.h>
// get mii studio title id
#include <nn/ffl/detail/FFLiFileWriteBuffer.h>
#include <nn/ffl/FFLiMiiData.h>
@ariankordi
ariankordi / switch-qr-connect2.py
Created May 26, 2024 00:15
Do you want to transfer screenshots from your Switch to your PC easier, and already have a capture card set up? This is a script that scans the QR code for the "Send to Smartphone" feature and opens the browser for you automatically. Should be convenient... if you get it working, that is.
#!/usr/bin/env python3
import sys # for executable and exit
# OpenCV opens the camera and provides basic QR scanning.
# pip3 install opencv-python
try:
import cv2
except ImportError as e:
# red then bold
print('\033[91m'
@ariankordi
ariankordi / switch-qr-connect-v1-linux.bash
Created May 18, 2024 05:21
todo i gotta rewrite both in python hhhh
#!/bin/bash
pw=$(ffmpeg -hide_banner -loglevel fatal -video_size 720x480 -f v4l2 -ss 1 \
-i /dev/v4l/by-id/usb-Elgato_Game_Capture_HD60_X_*-video-index0 \
-frames:v 1 -f apng - \
| zbarimg --quiet --raw --oneshot - \
| awk -F ';' '{printf substr($3, 3)}')
if [ ! -z "$pw" ]; then
nmcli connection modify ENTER_SWITCH_SSID_HERE wifi-sec.psk "$pw"
@ariankordi
ariankordi / ellisprotect.py
Created November 6, 2023 05:14
EllisProtect™ Technology wipes Tom Ellis off the face of the earth. No context is provided.
from selenium import webdriver
# import the service so a custom executable path can be specified
from selenium.webdriver.chrome.service import Service
from shutil import which
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
import selenium.common.exceptions
@ariankordi
ariankordi / arian.splatnet-kindle.plist
Last active February 12, 2024 00:43
python selenium script (meant to work in conjunction with cursed nso reverse proxy!!!!!) that shows splatoon stages on your kindle
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>arian.splatnet-kindle</string>
<key>Program</key>
<string>/opt/homebrew/bin/python3</string>
<key>ProgramArguments</key>
<array>
@ariankordi
ariankordi / README also you need to make a folder called app here
Last active September 23, 2023 04:30
two versions of my "nso reverse proxy" (deranged) (and CURSED)
in order to make the scripts happy, there is supposed to be a folder here called "app"
it is actually just from the nxapi electron app, it SHOULD be just resources/app
after that, you DO need to authenticate to nxapi - do something like this: node app/dist/bundle/cli-bundle.js nso auth
MORE GENERAL EXPLANATION:
this is a reverse proxy that's meant to help me access splatnet 3 in my browser, leveraging other tools to do so
bruh.js, bruhx.py, and bruh.sh are more or less carried over from a previous hack for nooklink that actually just used a hacked up iksm from splatnet2statink: https://gist.github.com/ariankordi/016ac1d24eb45f13efb9e8660b6d62b2
this calls out to nxapi, which, you would need to download the app folder for AND authenticate to.
the proxy is meant to be used via a systemd socket spawning it and then later killing it, this ensures it literally only runs when it needs to. then, you can use a browser extension to selectively proxy that nintendo site over and voila, it SHOULD load correctly. it SHOU
@ariankordi
ariankordi / backup.sh
Last active February 10, 2024 00:29
script that automatically backs up my iphone over wifi using idevicebackup2, avahi-daemon, and netmuxd running as usbmuxd i'm too lazy to explain the rest rn (it's more complex because my jailbreak makes it not work when doing it the correct way)
#!/bin/sh
# udid of device that is already paired and wifi enabled on
udid=""
# todo replace with reverse lookup of the mac address??? but it wouldn't be
# the wifi mac address we know it would have to be the anonymized one
# ip neighbor | grep 02:21:21:21:21:21 | awk '{split($0, a, " dev"); printf a[1]}'
ip="192.168.2.21"
# 24 hours