Skip to content

Instantly share code, notes, and snippets.

@kambala-decapitator
kambala-decapitator / chipsec_io_read.py
Created March 24, 2024 19:39
reading from I/O port using Chipsec
#!/usr/bin/env python3
from chipsec.chipset import cs
from chipsec.exceptions import UnknownChipsetError
from chipsec.hal.io import PortIO
from chipsec.logger import level, logger
# creates empty file in CWD/logs
log = logger()
log.chipsecLogger.setLevel(level.CRITICAL.value)
@kambala-decapitator
kambala-decapitator / main.m
Created November 20, 2022 13:59
test Kodi RPC
//
// main.m
// TestInputStream
//
// Created by Andrey Filipenkov on 12.10.2022.
//
#import <Foundation/Foundation.h>
NSString *server;
@kambala-decapitator
kambala-decapitator / dll.cpp
Created September 7, 2022 14:27
Inject DLL into Windows process
#include <Windows.h>
struct Target {
HWND hwnd;
WNDPROC wndProc;
bool isUnicode;
};
Target target;
@kambala-decapitator
kambala-decapitator / CMakeUserPresets.json
Last active October 17, 2022 10:23
local CMake presets for VCMI iOS
{
"version": 3,
"cmakeMinimumRequired": {
"major": 3,
"minor": 21,
"patch": 0
},
"configurePresets": [
{
"name": "ios-common",
@kambala-decapitator
kambala-decapitator / gist:da1ffefd599c49d702e1e1386be0f2db
Last active July 29, 2022 12:21
Qt iOS/macOS event dispatcher logging
define env var QT_LOGGING_RULES with value qt.eventdispatcher.debug=true
iOS output on 5.15.5:
[qt.eventdispatcher] Running UIApplicationMain
[qt.eventdispatcher] Application launched with options NSObject(0x0)
[qt.eventdispatcher] Running main() on separate stack
[qt.eventdispatcher] Signaled posted event run-loop source
...
@kambala-decapitator
kambala-decapitator / gist:cfd3213c08117a79b8ac3c1001f56125
Created February 21, 2021 14:50
get Fork password from macOS keychain
1. security find-generic-password -s Fork.account.SOME_ACCOUNT -g
2. in the output find "password: 0x...", you need this hex value without 0x up to "bplist...
3. echo 'ABOVE_VALUE' | xxd -r -p | plutil -p -
4. now you can read the password, sample output:
2 => "username"
3 => "password"
4 => "type"
5 => "USERNAME"
6 => "PASSWORD"
@kambala-decapitator
kambala-decapitator / test_json.m
Created February 16, 2021 17:11
simple test of JSON decoding in ObjC
#import <Foundation/Foundation.h>
#include <string.h>
int main(int argc, char *argv[])
{
if (argc != 2)
{
printf("pass JSON in a single argument\n");
return 1;
}
#!/bin/bash
showUsage() {
echo "usage: $(basename "$0") --app_identifier APP_ID --app_name APP_NAME [--group_name GROUP_NAME] [--username USERNAME] [--team_id TEAM_ID] [--team_name TEAM_NAME]"
}
if [[ $# -eq 0 ]]; then
showUsage
exit 1
fi
@kambala-decapitator
kambala-decapitator / sign_kodi_darwin-embedded.sh
Last active April 8, 2020 09:14
bash script to sign iOS/tvOS Kodi
#!/usr/bin/env bash
# required:
# KODI_PATH - path to Kodi app that will be resigned, can be deb / ipa / app
# PROVISIONING_PROFILE - path to provisioning profile
# CODE_SIGN_IDENTITY - certificate name, e.g. 'iPhone Developer: ***'
# optional:
# OUT_DIR - where to save the resulting file
# PACKAGE_IPA - set to 1 to create .ipa file instead of plain .app
@kambala-decapitator
kambala-decapitator / Fastfile
Last active September 27, 2023 07:32
fastlane: execute lanes from different platforms in a single lane
# https://github.com/fastlane/fastlane/issues/7676
desc "All App Store Connect"
lane :appStoreConnect do #|options|
self.runner.current_platform = :ios
appStoreConnect
self.runner.current_platform = :tvos
appStoreConnect
# the following executes before_all every time