Skip to content

Instantly share code, notes, and snippets.

View mahmoudimus's full-sized avatar
💭
@_@

Mahmoud Rusty Abdelkader mahmoudimus

💭
@_@
View GitHub Profile
@mahmoudimus
mahmoudimus / nsmb.conf
Created February 24, 2025 19:29 — forked from jbfriedrich/nsmb.conf
macOS 11.2 NSMB configuration
# /etc/nsmb.conf - macOS 11.3 - 2021-04-29
#------------------------------------------------------------------------------
# SMB configuration for macOS 11.3 <-> Synology
#------------------------------------------------------------------------------
# Additional information:
# -----------------------
# https://support.apple.com/de-de/HT211927
# https://support.apple.com/en-us/HT208209
# https://apple.stackexchange.com/questions/309016/smb-share-deadlocks-since-high-sierra
# https://photographylife.com/afp-vs-nfs-vs-smb-performance
@mahmoudimus
mahmoudimus / fix-cursor-remote-ssh-connection-failure.py
Last active February 28, 2025 18:29
Missing cli-win32-x64.tar.gz File Causes Remote SSH Connection Failure in Cursor
"""
On remote machine:
## windows (powershell)
$ python.exe fix-cursor-remote-ssh-connection-failure.py `
--commit b1e87884330fc271d5eb589e368c35f14e76dec0 `
--username ${YOUR_USERNAME_HERE} `
--file-hash-override 84b9c6d907219bb8c2874f299540eb6a079187a0
## (linux/macos)
@mahmoudimus
mahmoudimus / idapro_python_apply_dif_file_patch_to_idb.py
Created February 18, 2025 21:51
Program for using IDA's .dif files to patch binaries
# from https://reverseengineering.stackexchange.com/a/11835/13408
# ported to python3 and IDA 8.0+ by Mahmoud Abdelkader
import idaapi
import ida_bytes
import ida_kernwin
def apply_dif_file(dif_file_name):
print("Applying " + dif_file_name + " to database.")
@mahmoudimus
mahmoudimus / show_builtin_ida_pro_icons.py
Created February 15, 2025 23:35
show tabular data with icons from ida pro
"""
summary: show tabular data with icons
"""
import ida_kernwin
from ida_kernwin import Choose
# -----------------------------------------------------------------------
class chooser_handler_t(ida_kernwin.action_handler_t):
@mahmoudimus
mahmoudimus / base256.py
Created February 11, 2025 19:37
dumb base256 encoding
import re
class Base256:
def __init__(self):
self.list = [['aardvark','adroitness'],['absurd','adviser'],['accrue','aftermath'],['acme','aggregate'],['adrift','alkali'],['adult','almighty'],['afflict','amulet'],['ahead','amusement'],['aimless','antenna'],['Algol','applicant'],['allow','Apollo'],['alone','armistice'],['ammo','article'],['ancient','asteroid'],['apple','Atlantic'],['artist','atmosphere'],['assume','autopsy'],['Athens','Babylon'],['atlas','backwater'],['Aztec','barbecue'],['baboon','belowground'],['backfield','bifocals'],['backward','bodyguard'],['banjo','bookseller'],['beaming','borderline'],['bedlamp','bottomless'],['beehive','Bradbury'],['beeswax','bravado'],['befriend','Brazilian'],['Belfast','breakaway'],['berserk','Burlington'],['billiard','businessman'],['bison','butterfat'],['blackjack','Camelot'],['blockade','candidate'],['blowtorch','cannonball'],['bluebird','Capricorn'],['bombast','caravan'],['bookshelf','caretaker'],['brackish','celebrate'],['breadline','cellulose'],['br
@mahmoudimus
mahmoudimus / change-default-open.md
Last active January 17, 2025 18:58
Allows one to change the default file handler for `public.data` content types on Mac OS
bundleid=$(mdls <APP_PATH_HERE> | grep kMDItemCFBundleIdentifier | cut -d'"' -f2)

defaults write com.apple.LaunchServices LSHandlers -array-add \
     "{ LSHandlerContentType = \"public.data\"; LSHandlerRoleAll = \"$bundleid\"; };"
@mahmoudimus
mahmoudimus / EmacsClient.applescript
Last active January 17, 2025 18:24
An AppleScript that allows Automator to open a file via emacsclient
-- Function to check if a file exists and is executable
on fileExistsAndExecutable(thePath)
try
do shell script "test -x " & quoted form of thePath
return true
on error
return false
end try
end fileExistsAndExecutable
@mahmoudimus
mahmoudimus / log_mutations.js
Created December 10, 2024 22:07
Log all mutations to a particular node
// Select the node that will be observed for mutations
// Options for the observer (which mutations to observe)
const config = {attributes: true, childList: true, subtree: true};
const htmlify = xs => xs && [...xs].map(x => x.innerHTML)
let counter = 0
// Callback function to execute when mutations are observed
const callback = function (mutationsList, observer) {
@mahmoudimus
mahmoudimus / stop-cheatengine-laugh.bat
Last active August 9, 2024 19:31
Cheat Engine's Creepy Laughter on Windows Mahmoud Abdelkader (aka mahmoudimus)
@echo off
REM Place this file into the cheat engine directory and run it.
REM
REM If you've downloaded Cheat Engine and installed it from a non-standard installer,
REM you might periodically hear a creepy man's laugh lasting three seconds or so. It
REM seems like it might be a virus, malware or something untoward but it is not. It
REM turns out, for non-Patreon users, cheat engine software has a two-stage installer.
REM
REM The first stage is basically adware. The second stage downloads the actual
REM installer, which can malfunction if not launched by the ad-filled installer.
@mahmoudimus
mahmoudimus / keybinder.py
Last active August 2, 2024 18:05
Exploiting IDA Pro's Qt 5.5 Keybindings For Emacs-like Mnemonic Keybindings
"""
Further updates located at https://github.com/mahmoudimus/ida-keybinder
Mahmoud Abdelkader
"""
import re
import sys
from PyQt5 import QtWidgets