Skip to content

Instantly share code, notes, and snippets.

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

Mahmoud Rusty Abdelkader mahmoudimus

💭
@_@
View GitHub Profile
@mahmoudimus
mahmoudimus / capslock.ahk
Created January 11, 2023 17:19 — forked from scottming/capslock.ahk
; Autohotkey Capslock Remapping Script
; Autohotkey Capslock Remapping Script
; - Deactivates capslock for normal (accidental) use.
; - Hold Capslock and drag anywhere in a window to move it (not just the title bar).
; - Access the following functions when pressing Capslock:
;Cursor keys - h, j, k, l
;Home,End - N, ;
;Page up,down - - =
;Esc - CapsLock only
;CapsLock - Space
@mahmoudimus
mahmoudimus / macOS-shortcuts.ahk
Created January 10, 2023 00:24 — forked from apfelchips/macOS-shortcuts.ahk
First remap modifier keys with sharpkeys; AHK script has to run as Administrator to work on System Windows / Apps running as Administrator; see Watchdog ScheduledTask below, when you do this make sure to remove the inherited file permissions from C:/tools and only allow administrators write access.
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
;#NoTrayIcon
Menu, Tray, Icon, accessibilitycpl.dll, 6 ; Keyboard Icon
;#Persistent https://www.autohotkey.com/docs/commands/_Persistent.htm
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#SingleInstance force
; Debugging
#Warn All, OutputDebug ; Show Warnings on DebugView
; Colemak layout for AutoHotkey (MS Windows)
; 2006-01-01 Shai Coleman, http://colemak.com/ . Public domain.
; See http://www.autohotkey.com/ for more information
; For this to work you have to make sure that the US (QWERTY) layout is installed,
; that is set as the default layout, and that it is set as the current layout.
; Otherwise some of the key mappings will be wrong.
;
; This is mainly useful for those who don't have privileges to install a new layout
; This doesn't support the international features of the Colemak layout.
#MaxHotkeysPerInterval 20000
@mahmoudimus
mahmoudimus / core-keys.ahk
Created January 9, 2023 23:47 — forked from sriramkswamy/core-keys.ahk
Windows AutoHotKey script for some shotrcuts
;; Change the basic layout of the keyboard a little bit
; Use just the Home key for Win Tab
Home::#Tab
; Use the End key to quit programs
End::!F4
; Switch between virtual desktops with Page Up and Page Down
PgUp::#^Left
@mahmoudimus
mahmoudimus / Mac OS X 10_5_ Windows Ctrl.xml
Created January 9, 2023 07:12 — forked from fljot/Mac OS X 10_5_ Windows Ctrl.xml
AutoHotkey mappings to emulate OSX keyboard shortcuts on Windows
<!-- put this to IDEA keymaps config folder. For v13 it is <userdir>\.IntelliJIdea13\config\keymaps\ -->
<?xml version="1.0" encoding="UTF-8"?>
<keymap version="1" name="Mac OS X 10.5+ Windows Ctrl" parent="Mac OS X 10.5+">
<action id="$Copy">
<keyboard-shortcut first-keystroke="meta C" />
<keyboard-shortcut first-keystroke="meta INSERT" />
<keyboard-shortcut first-keystroke="control C" />
<keyboard-shortcut first-keystroke="control INSERT" />
</action>
<action id="$Cut">
@mahmoudimus
mahmoudimus / OS X keyboard for Windows
Created January 9, 2023 07:12 — forked from erikmueller/OS X keyboard for Windows
AutoHotkey mappings to emulate OSX keyboard shortcuts on Windows
;
; AutoHotkey Version: 1.x
;
;
; --------------------------------------------------------------
; Emulate OSX keymap layout
; on Windows
; --------------------------------------------------------------
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
@mahmoudimus
mahmoudimus / r21337patch.py
Created January 6, 2023 21:21 — forked from scrapbird/r21337patch.py
Applies an x64dbg .1337 patch file to a binary in radare2. Call with: #!pipe ./r21337patch.py /path/to/patch.1337
#!/usr/bin/env python
import r2pipe
import sys
r2 = r2pipe.open()
# r2 base address
delta = 0x400000
@mahmoudimus
mahmoudimus / README.md
Created December 31, 2022 18:29
modified dtruss

macOS Dtrace scripts

I've been using Dtrace off-and-on to diagnose and debug problems on macOS for some years. Unfortunately, some of the scripts that are included with macOS itself have gone rather stale, or didn't survive the port from Solaris/BSD particularly well. This includes the all-important dtruss script for tracing processes' syscalls, which doesn't seem to have changed since Mac OS X 10.5, and where many of its options simply don't work as advertised. While I was doing some development under contract for Microsoft in their attempt at porting VFS for Git to macOS, we needed a passable option for tracing, so I was able to update Mac dtruss and fix many of its issues as part of that engagement. The patches were originally applied on that repo but it's not a good long-term home for them, especially as the Mac port for VFS for Git was stopped when Apple deprecated the APIs used in a subsequent macOS release, so that entire subtree has been removed from recent revisions of the repository. I'll keep up

@mahmoudimus
mahmoudimus / intel_pintools_vs2019.md
Created December 31, 2022 02:37 — forked from PollyP/intel_pintools_vs2019.md
Building and Running Intel Pintools with VS 2019 on Windows 10
@mahmoudimus
mahmoudimus / patmake.py
Created December 30, 2022 06:00 — forked from NeatMonster/patmake.py
Creates a pattern file from a database
"""
@file patmake.py
@brief Creates a pattern file from a database
@author neat
"""
import os
import idautils
import ida_bytes
import ida_funcs