Skip to content

Instantly share code, notes, and snippets.

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

Mahmoud Rusty Abdelkader mahmoudimus

💭
@_@
View GitHub Profile
@mahmoudimus
mahmoudimus / get_sig.py
Created June 28, 2025 18:28 — forked from yeggor/get_sig.py
Fixed ida2pat.py script provided by fireeye (https://github.com/fireeye/flare-ida/blob/master/python/flare/idb2pat.py) + get_sig.py script to generate FLIRT SIG file from many source binary files
#!/usr/bin/env python3
import os
import platform
import subprocess
import time
from concurrent.futures import ProcessPoolExecutor, as_completed
import click
from elftools.elf.elffile import ELFFile
@mahmoudimus
mahmoudimus / enviorenmentfixes.md
Created June 28, 2025 00:29 — forked from Acephalia/enviorenmentfixes.md
Quick Guide For Fixing/Installing Python, PyTorch, CUDA, Triton, Sage Attention and Flash Attention For Local AI Image Generation

Quick Guide For Fixing/Installing Python, PyTorch, CUDA, Triton, Sage Attention and Flash Attention For Local AI Image Generation

With all the new local image & video generation tools coming out I've been seeing a lot of posts and error threads being opened for various issues with cuda/pytorch/sage attantion/triton/flash attention. I was tired of digging links up so I initially made this as a cheat sheet for myself but expanded it with hopes that this will help some of you get your venvs and systems running smoothly.

In This Guide:

  1. Check Installed Python Versions
  2. Set Default Python Version by Changing PATH
  3. Installing VS Build Tools
  4. Check the Currently Active CUDA Version
@mahmoudimus
mahmoudimus / flattening_heuristic.py
Created June 3, 2025 20:15 — forked from mrphrazer/flattening_heuristic.py
Flattening Heuristic Implementation
# (c) Tim Blazytko 2021
# implementation based on the blog post "Automated Detection of Control-flow Flattening"
# https://synthesis.to/2021/03/03/flattening_detection.html
import sys
from miasm.analysis.binary import Container
from miasm.analysis.machine import Machine
from miasm.core.locationdb import LocationDB
@mahmoudimus
mahmoudimus / ida_mc_notes.md
Created May 24, 2025 00:05 — forked from icecr4ck/ida_mc_notes.md
Some notes about the IDA Microcode (intermediate language).
@mahmoudimus
mahmoudimus / _.md
Last active April 9, 2025 16:18 — forked from Jinmo/_.md
C/C++ header to IDA

Usage

In IDAPython,

execfile('<path>/cxxparser.py')
parse_file('<path>/a.cpp',[r'-I<path>\LuaJIT-2.0.5\src', '-D__NT__', '-D__X64__', '-D__EA64__'])
parse_file('<path>/malloc.c',['-target=x86_64-linux-gnu'])
@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 / Lua to Visual Studio tuto.txt
Created July 23, 2024 20:05
Compiling Lua in Visual Studio
Preparation
1 - Download lua source in https://www.lua.org/download.html
2 - Unpack (use 7-zip)
3 - Create an C:\src\lua
4 - In C:\src\lua create dirs: include, lib, bin and doc
5 - Copy 'doc' from lua.tar.gz to C:\src\lua\doc
6 - Copy all files from lua.tar.gz src, to C:\src\lua\include
Creating a .lib and .dll
1 - Create a new blank project in Visual Studio
@mahmoudimus
mahmoudimus / ODbgScript.txt
Created July 13, 2024 05:43 — forked from trietptm/ODbgScript.txt
ODbgScript.txt
-------------------------------
ODbgScript english plugin by E3
site : http://odbgscript.sf.net
-------------------------------
1. About OllyScript and ODbgScript
2. Status
2.1 What's new?
3. Documentation
3.1 Language
@mahmoudimus
mahmoudimus / endianness.h
Created July 12, 2024 04:59 — forked from jtbr/endianness.h
cross-platform / cross-compiler standalone endianness conversion
/**
* @file endianness.h
* @brief Convert Endianness of shorts, longs, long longs, regardless of architecture/OS
*
* Defines (without pulling in platform-specific network include headers):
* bswap16, bswap32, bswap64, ntoh16, hton16, ntoh32 hton32, ntoh64, hton64
*
* Should support linux / macos / solaris / windows.
* Supports GCC (on any platform, including embedded), MSVC2015, and clang,
* and should support intel, solaris, and ibm compilers as well.
@mahmoudimus
mahmoudimus / main.cpp
Created June 30, 2024 05:14 — forked from CaledoniaProject/main.cpp
system resources physical memory map VM detection trick
// system resources physical memory map VM detection trick
// written by Graham Sutherland (@gsuberland) for Nettitude
// based on prior work done as part of the al-khaser project
// https://github.com/LordNoteworthy/al-khaser/
// ref: https://blog.xpnsec.com/total-meltdown-cve-2018-1038/
// ref: https://gist.github.com/xpn/3792ec34d712425a5c47caf5677de5fe
// compile: