Skip to content

Instantly share code, notes, and snippets.

with import <nixpkgs> { };
let
python38WithPackages = python38.withPackages(ps: with ps; [
binwalk
]);
firmware-mod-kit = fetchFromGitHub {
owner = "rampageX";
repo = "firmware-mod-kit";
with import <nixpkgs> { };
let
armhfDependencies = [
pkgsCross.armv7l-hf-multiplatform.buildPackages.targetPackages.glibc
pkgsCross.armv7l-hf-multiplatform.buildPackages.targetPackages.ncurses5
pkgsCross.armv7l-hf-multiplatform.buildPackages.targetPackages.readline5
];
in stdenv.mkDerivation {
name = "cross-environment";
@Pamplemousse
Pamplemousse / tag_parameter_definitions_decorator.py
Created November 4, 2020 17:22
Decorate function handlers in `angr`'s RDA to highlight definitions passed as parameter to external functions.
def tag_parameter_definitions(func):
"""
Add a `ParameterTag` to the definitions of the arguments of the function simulated by the handler.
"""
@functools.wraps(func)
def wrapper(self, state: 'ReachingDefinitionsState', codeloc: 'CodeLocation'):
arch = state.arch
tag = ParameterTag(
function = codeloc.ins_addr,
/*
Using this `shell.nix`, here is how to install BAP using `opam`:
```
opam init --comp=4.09.0
eval $(opam env)
opam install bap
```
*/
with import <nixpkgs> { };
import argparse
import sys
from pwnlib.tubes.listen import listen
def main(cli_arguments):
l = listen(port=cli_arguments.port, bindaddr='localhost', typ='tcp')
_ = l.wait_for_connection()

network

scan a box with default scripts and version detection

nmap -sC -sV <ip address>

system

Contribute to nixpkgs cheatsheet

Tips and tricks for one who wants to write expressions to contribute to NixOS/nixpkgs .

Build a package from local nixpkgs

nix-build <PATH_TO_NIXPKGS> -A <PACKAGE>
with import <nixpkgs> { };
let
arm-binutils = pkgsCross.arm-embedded.buildPackages.binutils;
binutils_commands = "as ld objcopy readelf";
python3WithCoolPackages = python3.withPackages(ps: with ps; [
flask
ipdb
ipython
# host
```
$ ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host noprefixroute
valid_lft forever preferred_lft forever
@Pamplemousse
Pamplemousse / CustomKeys.txt
Created June 14, 2016 05:05
"AZER" custom keys pour Warcraft3
// Version du 9 novembre 2003
//
///////////////////////////////////////////////////////////////////////////////
// Basé sur une version de corbax
//
// Modifié par escaflownn le 7 juillet 2003
// => Traduction en français de toutes les commandes elfes de la nuit
// => Traduction en français de toutes les commandes humaines
// Pour toute faute ou oubli : escaflownnn@yahoo.fr
//