Skip to content

Instantly share code, notes, and snippets.

@NyaMisty
NyaMisty / main.mm
Created June 8, 2023 18:59
Login additional account on MacOS
#import <Foundation/Foundation.h>
@interface AMSBag : NSObject {}
+(id)bagForProfile:(id)arg1 profileVersion:(id)arg2 ;
+(id)bagForProfile:(id)arg1 profileVersion:(id)arg2 processInfo:(id)arg3 ;
-(NSString *)URLForKey:(NSString *)key;
@end
@interface ACAccount : NSObject {}
@end
@NyaMisty
NyaMisty / RemapCtrl.py
Last active February 22, 2023 20:51
Ghidra Script: Remap Ctrl&Meta to platform Ctrl key (i.e. Command on macOS, Ctrl on Win/Linux). Note: because Ghidra does not support running script on startup, you'll need to run this script manually on ech start :(
# Remap Ctrl&Meta to platform Ctrl key (i.e. Command on macOS, Ctrl on Win/Linux)
#@author NyaMisty
#@category UIHelper
#@keybinding Alt-C
#@menupath Edit.RemapCtrl
#@toolbar RemapCtrl
from javax.swing import KeyStroke
from java.awt.event import InputEvent
@NyaMisty
NyaMisty / GhidraIDA.md
Last active March 14, 2023 15:15
Misty's Ghidra IDA like experience

How to Use

  1. In Ghidra's Project Tool, Go to Tools -> Import Tool..., select mistyCodeBrowser.tool
  2. Dragging file onto the new CodeBrowser_1 in ToolChest
@NyaMisty
NyaMisty / jetsam.sh
Created November 21, 2022 16:33
Create Jetsam entry
JETSAM="/System/Library/LaunchDaemons/com.apple.jetsamproperties.D21.plist"
DAEMON="misty.qtierdaemon"
sudo plutil -Version4 -Daemon -Override -key "$DAEMON" -dict $JETSAM
sudo plutil -Version4 -Daemon -Override -key "$DAEMON" -key ActiveHardMemoryLimit -int 256 $JETSAM
sudo plutil -Version4 -Daemon -Override -key "$DAEMON" -key ActiveSoftMemoryLimit -int 256 $JETSAM
sudo plutil -Version4 -Daemon -Override -key "$DAEMON" -key InactiveHardMemoryLimit -int 256 $JETSAM
sudo plutil -Version4 -Daemon -Override -key "$DAEMON" -key InactiveSoftMemoryLimit -int 256 $JETSAM
sudo plutil -Version4 -Daemon -Override -key "$DAEMON" -key EnergyEfficiencyMode -string UserInterface $JETSAM
@NyaMisty
NyaMisty / outline_graph.py
Created September 1, 2022 01:02
IDA Graph view with outlined function included
"""
summary: drawing custom graphs
description:
Showing custom graphs, using `ida_graph.GraphViewer`. In addition,
show how to write actions that can be performed on those.
keywords: graph, actions
"""
from __future__ import print_function
# -----------------------------------------------------------------------
@NyaMisty
NyaMisty / jeb-shortcuts.cfg
Created May 15, 2022 15:20
Better JEB Shortcut
#*TEMPLATE*
#*TEMPLATE* Rename or copy this file without the .TEMPLATE extension
#*TEMPLATE*
#------------------------------------------------------------------------------
# JEB Custom Keyboard Shortcuts
#------------------------------------------------------------------------------
# Uncomment and add your own keyboard shortcuts for the actions for which you'd like to override the default shortcuts
# Example: by default, Jump is mapped to the 'G' key; the following line (minus the # character) can be used to remap the action to CTRL+J:
#jump=Ctrl+J
@NyaMisty
NyaMisty / README.md
Created May 4, 2022 22:21
WSL Systemd Configuration: in 2022
@NyaMisty
NyaMisty / mem_scan.c
Last active September 9, 2022 23:05
search for mem with hex pattern contains wildcards
#include <stdio.h>
#include <stdlib.h>
static void* mem_scan(const void* addr, size_t size, const char* hex_pattern) {
union pattern_holder {
struct {
unsigned char content : 8;
unsigned char mask : 8;
};
wchar_t pat_char;
@NyaMisty
NyaMisty / extract-installbuilder.tcl
Last active September 3, 2023 11:11 — forked from zhangyoufu/extract-installbuilder.tcl
extract password-protected InstallBuilder installer
#!./tclkit
## prepare runtime environment
proc init {} {
## mount optional.pak (for tcltwofish)
set optionalPak installbuilder/paks/optional.pak
vfs::mk4::Mount $optionalPak $optionalPak -readonly
## adjust library search path
set ::auto_path [list $tcl::kitpath/lib/tcl$::tcl_version $tcl::kitpath/lib $tcl::kitpath/libraries $optionalPak/linux-x64 $tcl::kitpath]
@NyaMisty
NyaMisty / README.md
Created December 28, 2021 22:37
Make HNS not consuming too much ports