Skip to content

Instantly share code, notes, and snippets.

View M0nteCarl0's full-sized avatar
🎰

Alex M0nteCarl0

🎰
View GitHub Profile
@tomtzook
tomtzook / CMakeLists.txt
Created January 16, 2021 11:15
Compiling C++ EFI application with CMake and GNU-EFI, and running in QEMU
cmake_minimum_required(VERSION 3.16.3)
project(cppefi C CXX)
if (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
endif()
if (NOT CMAKE_LIBRARY_OUTPUT_DIRECTORY)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
endif()
@00p513-dev
00p513-dev / commands.md
Last active August 13, 2025 16:21
Useful fastboot commands
Command Purpose
fastboot devices Lists attached devices, along with their serial number
fastboot oem unlock Unlocks bootloader on most phones
fastboot oem unlock UNLOCK_CODE Use this if you have an unlock code
fastboot flashing unlock May be needed on older devices and some weird mtk phones (Tecno ke5k needed this for some reason)
fastboot flash PARTITION_NAME PATH_TO_IMAGE Flashes the partition with the image file
--disable-verity --disable-verification Add to a vbmeta flash command to disable verified boot
fastboot erase PARTITION NAME Erases the partition USE WITH CAUTION
fastboot -w
@x0nu11byt3
x0nu11byt3 / elf_format_cheatsheet.md
Created February 27, 2021 05:26
ELF Format Cheatsheet

ELF Format Cheatsheet

Introduction

Executable and Linkable Format (ELF), is the default binary format on Linux-based systems.

ELF

Compilation

@DreamVB
DreamVB / source.cpp
Last active February 18, 2024 14:26
Sorting Algorithms in C++
//Sorting Class with 5 sorting algorithms that can sort arrays
//Compiled in Visual Studio 2013 but should work on any C++ compiler with a few tweaks.
//Incase you need som info on sorting algorithms
//https://en.wikipedia.org/wiki/Sorting_algorithm
// Algorithms in this class
// 1 Boubble Sort
// 2 Merge Sort
// 3 Selection Sort
@h4x5p4c3
h4x5p4c3 / solve.py
Last active July 29, 2025 08:23
solve script for QilingLab x86_64
#!/usr/bin/env python3
# https://www.shielder.it/blog/2021/07/qilinglab-release/
from qiling import Qiling
from qiling.const import QL_VERBOSE
from qiling.os.mapper import QlFsMappedObject
import struct
def u8(inp):
return struct.unpack("<Q", inp)
@dark-lbp
dark-lbp / solve_aarch64.py
Created July 23, 2021 13:13
This is my solution to QilingLabs challenge
# !/usr/bin/env python3
# coding=utf-8
import sys
from qiling import *
from qiling.os.mapper import QlFsMappedObject
from qiling.const import QL_VERBOSE
base_address = 0x555555554000
@charlie-x
charlie-x / gist:96a92aaaa04346bdf1fb4c3621f3e392
Created July 28, 2021 20:55
recompile wsl2 kernel, add modules and CAN modules + can utils.
mines ubuntu 20.04 based, WSL2
in windows
wsl --list -v
* Ubuntu-20.04 Stopped 2
in wsl
# the old update routine
sudo apt-get update -y
# add tools to build kernel, apologies if i missed anything as i already have a bunch of dev stuff setup
sudo apt-get install -y autoconf bison build-essential flex libelf-dev libncurses-dev libssl-dev libtool libudev-dev
@convict-git
convict-git / concurrency-sync-cpp.md
Created August 8, 2021 13:31
Concurrency and Synchronization using Modern C++ - (Not so) Short Notes

Concurrency and Synchronization using Modern C++

Thread Management

Each running program has at least one thread which is occupied by its entry point. There can be many threads for a single program and the memory is shared among all threads. The objects possessed by the main thread (and shared by other threads as a reference to it) would be destroyed as soon as they go out of scope. This might lead to corrupt memory access by the rest of the threads.

Hence, sometimes, it's very important to make sure that all the threads are joined using std::thread::join() before the main thread terminates. Other times, you basically want a daemon thread running in background even after the termination of main thread and that can be achieved by calling std::thread::detach(), but it may or may not be possible to join a detachable thread.

Resource Acquisition Is Initialization (RAII) is a famous programming idiom in C++ (a misnomer actually) also (better) known and understood as **Scope-Bound Resource Managemen

@rjescobar
rjescobar / extend-trial-jetbrains-windows.bat
Created August 31, 2021 02:53
JetBrains IDE trial reset windows
REM Delete eval folder with licence key and options.xml which contains a reference to it
for %%I in ("WebStorm", "IntelliJ", "CLion", "Rider", "GoLand", "PhpStorm", "Resharper", "PyCharm") do (
for /d %%a in ("%USERPROFILE%\.%%I*") do (
rd /s /q "%%a/config/eval"
del /q "%%a\config\options\other.xml"
)
)
REM Delete registry key and jetbrains folder (not sure if needet but however)
rmdir /s /q "%APPDATA%\JetBrains"