Skip to content

Instantly share code, notes, and snippets.

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

Mahmoud Rusty Abdelkader mahmoudimus

💭
@_@
View GitHub Profile
@mahmoudimus
mahmoudimus / CodeCaveFinder.md
Last active December 22, 2022 19:30
(Python) Code Cave By Jean-Pierre LESUEUR

(Python) Code Cave By Jean-Pierre LESUEUR

Taken from https://unprotect.it/snippet/code-cave/54/

Description

-f / --file : Valid PE File location (Ex: /path/to/calc.exe).
-p / --payload : Shellcode Payload (Example: "\x01\x02\x03…\x0a").
-x / --encrypt : Encrypt main section (entry point section).
@mahmoudimus
mahmoudimus / fcntl.py
Created December 21, 2022 01:01
Fake fcntl module for windows
"""
This *fake* module is for windows only
Based on:
- https://github.com/facebook/tornado/blob/master/tornado/win32_support.py
- https://github.com/typecode/wikileaks/blob/23a6243df473102a9a1b84f5dde66173df3132b5/lib/tornado/win32_support.py
- https://raw.githubusercontent.com/twisted/twistedmatrix.com-trac-attachments/0a05e3294e7488d8864a73666a007db842c9633e/ticket/bc1/bc1a1f5e1875e3916492b3b509f58cd420eba1d5/b683c2d57b5d19e4fb24a78b44e76ad9129fe19f.patch
- https://github.com/yt-dlp/yt-dlp/blob/1fc089143c79b02b8373ae1d785d5e3a68635d4d/yt_dlp/utils.py#L2095-L2150
"""
@mahmoudimus
mahmoudimus / mac4win.ahk
Last active January 17, 2023 13:39
autohotkey mac4win/emacs
/*
Symbol Key
^ RCtrl
! Alt
# Windows Key (cmd in mac keyboard)
+ SHIFT
#c::Send, ^c
#v::Send, ^v
#x::Send, ^x

ZSH CheatSheet

This is a cheat sheet for how to perform various actions to ZSH, which can be tricky to find on the web as the syntax is not intuitive and it is generally not very well-documented.

Strings

Description Syntax
Get the length of a string ${#VARNAME}
Get a single character ${VARNAME[index]}
@mahmoudimus
mahmoudimus / README.md
Created November 12, 2022 05:30 — forked from adithyabsk/README.md
HOWTO: Convert iBook EPUBs to standard EPUBs

How to Convert iBook EPUBs to standard EPUBs

iBooks EPUBs actually show up on macOS as folders. If you need the actual file you can use the above script to convert your iBook directory of files to a destination directory.

The path of iBook files as of macOS 10.15.7 is: /Users/${USER}/Library/Mobile Documents/iCloud~com~apple~iBooks/Documents

Usage

@mahmoudimus
mahmoudimus / GHIDRA-MACOS.md
Last active January 14, 2023 23:13
Ghidra Launch Properties (using ZGC)

Setting up Ghidra.

Setting up Debugger

Install llvm (brew install llvm), and gradle (brew install gradle).

Clone Ghidra source. Open terminal at this directory, type in gradle -I gradle/support/fetchDependencies.gradle init

Edit the ghidra/Ghirda/Debug/Debugger-swig-lldb/buildNatives.gradle file with VSCode. Replace all $llvm_dir/lldb/include with $llvm_dir/include. Save and close.

@belm0
belm0 / article_sc_and_lua_1.md
Last active October 23, 2024 18:04
Structured concurrency and Lua (part 1)

Structured concurrency and Lua (part 1)

John Belmonte, 2022-Sep

I've started writing a toy structured concurrency implementation for the Lua programming language. Some motivations:

  • use it as a simple introduction to structured concurrency from the perspective of Lua (this article)
  • learn the fundamental properties of structured concurrency and how to implement them
  • share code that could become the starting point for a real Lua library and framework

So what is structured concurrency? For now, I'll just say that it's a programming paradigm that makes managing concurrency (arguably the hardest problem of computer science) an order of magnitude easier in many contexts. It achieves this in ways that seem subtle to us—clearly so, since its utility didn't reach critical mass until around 2018[^sc_birth] (just as control structures like functions, if, and while weren't introduced to languages until long after the first compu

@mahmoudimus
mahmoudimus / Node.java
Created May 28, 2022 20:06 — forked from norswap/Node.java
Fast Java Reflection
package demo;
public interface Node {}
@sciabarracom
sciabarracom / roadmap.md
Last active July 19, 2024 09:25
RoadMap for a new ditstro based on Apache OpenWHisk

ServerlessAnywhere RoadMap

About

ServerlessAnywhere will be a distro of Apache OpenWhisk.

It should let you to install itself on any supported Kubernetes with a single command:

curl get.serverlessanywere.com | kubectl apply -f -