Skip to content

Instantly share code, notes, and snippets.

@muff-in
muff-in / resources.md
Last active July 25, 2025 15:56
A curated list of Assembly Language / Reversing / Malware Analysis / Game Hacking-resources
@rexim
rexim / main.rs
Last active October 31, 2024 20:32
The Most Memory Safe Buffer Overflow in Rust!
// The Most Memory Safe Buffer Overflow in Rust!
//
// Consider all the code below under Public Domain
//
// How to build:
// $ rustc main.rs
//
// Wrong password:
// $ printf "hello\n" | ./main
//

The Rust macro learning: A Methodical Introduction

There are four types of macros in rust.

macro_rules!

As noted previously, macro_rules! is itself a syntax extension, meaning it is technically not part of the Rust Syntax. It uses the following forms:

Macro_rules! $name {
    $rule0 ;
    $rule1 ;
 // ...
@aucker
aucker / Rust type.md
Created April 22, 2022 14:56
some type convert

Converting a &str to a String

There are several ways to convert.

  • to_string()
fn main() {
    let new_string = "hello".to_string();
}

to_string() turns a &str to String.

  • to_owned()
@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
# -----------------------------------------------------------------------
@bashbunni
bashbunni / .zshrc
Created January 4, 2023 16:28
CLI Pomodoro for Linux
# study stream aliases
# Requires https://github.com/caarlos0/timer to be installed. spd-say should ship with your distro
declare -A pomo_options
pomo_options["work"]="45"
pomo_options["break"]="10"
pomodoro () {
if [ -n "$1" -a -n "${pomo_options["$1"]}" ]; then
val=$1