Skip to content

Instantly share code, notes, and snippets.

View msh31's full-sized avatar
🌴

Marco msh31

🌴
View GitHub Profile
@haram
haram / decrypt.cpp
Created June 20, 2020 02:51
Escape From Tarkov encryption defeated
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
// yousif, namazso, can1357, defcon42
namespace packet
{
constexpr size_t be_xor_key = 0xd774f59d;
@oleg-andreyev
oleg-andreyev / nproc-alias.sh
Created April 15, 2019 22:45
nproc alias on macOS
alias nproc="sysctl -n hw.physicalcpu"
@nguyen-phillip
nguyen-phillip / proc.c
Last active September 1, 2026 12:08
Using libproc.h
#include <stdio.h>
#include <stdlib.h>
#include <libproc.h>
// Uses proc_pidinfo from libproc.h to find the parent of given pid.
// Call this repeatedly until ppid(pid) == pid to get ancestors.
int ppid(pid_t pid) {
struct proc_bsdinfo info;
proc_pidinfo(pid, PROC_PIDTBSDINFO, 0, &info, sizeof(info));
return info.pbi_ppid;
@0xjac
0xjac / private_fork.md
Last active August 30, 2026 19:36
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare git@github.com:usi-systems/easytrace.git