Skip to content

Instantly share code, notes, and snippets.

@gteissier
gteissier / root-my-emulator.py
Created June 3, 2020 13:23
gdb Python script that adds root-single command to elevate a process given by the name of its executable
import gdb
import re
from collections import namedtuple
DETAILS = {
# API 24 playstore
# API 25 playstore
'3.10.0+': (0xC0887D20, 0xC092138C, 316, 0xC0A7754C, 4),
# API 26 playstore
@ekollof
ekollof / sshfp.yml
Created January 30, 2020 12:40
ansible playbook getting/registering sshfp records with cloudflare
- name: get SSHFP records
shell: "ssh-keygen -r {{ ansible_nodename }} | awk '{print $4, $5, $6}'"
register: sshfp_entries
- name: Register SSHFP with CloudFlare
cloudflare_dns:
zone: "hackerheaven.org"
record: "{{ ansible_hostname }}"
type: SSHFP
account_email: "{{ cloudflare_email }}"
@olivierlemoal
olivierlemoal / event_listener.py
Last active February 17, 2021 19:48
i3 script to toggle between last windows
Moved to https://github.com/olivierlemoal/i3-swap-focus
@richinseattle
richinseattle / ghidra_processor_docs_downloader.py
Created May 17, 2019 21:34 — forked from ckuethe/ghidra_processor_docs_downloader.py
Ghidra Processor Documentation Downloader
#!/usr/bin/env python
# vim: tabstop=4:softtabstop=4:shiftwidth=4:expandtab:
import os
import requests
import sys
docs = {
'68000': {
'M68000PRM.pdf': 'https://www.nxp.com/files-static/archives/doc/ref_manual/M68000PRM.pdf',
@HardenedArray
HardenedArray / Efficient UEFI Encrypted Root and Swap Arch Linux Installation Procedure with an ENCRYPTED BOOT
Last active August 19, 2024 11:34
Efficient UEFI Encrypted Root and Swap Arch Linux Installation with an ENCRYPTED BOOT
# OBJECTIVE: Install Arch Linux with encrypted root and swap filesystems with an ENCRYPTED BOOT and boot from UEFI. We will
also decrypt and mount our entire encrypted system using a single LUKS passphrase entry.
# Note: This method supports both dedicated Arch installs and those who wish to install Arch on a multi-OS-UEFI booting system.
# External USB HDD/SSD Installers Notes: Encrypted Arch installs can be booted and run from an external USB HDD or SSD, but
# only when the installation is correctly set up. There are several necessary changes to my standard procedure you'll want
# to make during the install process. Read my External USB HDD/SSD Installation section below before proceeding.
@hax0kartik
hax0kartik / export_symbol.idc
Last active September 5, 2024 15:05
Export symbols from IDA to a ghidra importable symbol file
#include <idc.idc>
static FuncDump(f, start)
{
auto ea, str, count, ref;
auto end;
auto teststr;
ea = start;
@cquest
cquest / gist:9db8aebcaa1fb1b53b2424c74b821b39
Created July 30, 2017 20:13
Téléchargement couche DRONES depuis Géoportail
# génération auto par gdal du fichier XML de description du service WMTS
gdal_translate "WMTS:https://wxs.ign.fr/an7nvfzojv5wa96dsga5nk8w/geoportail/wmts?Service=WMTS&Request=GetCapabilities&Version=1.0.0,layer=TRANSPORTS.DRONES.RESTRICTIONS" drones.xml -of WMTS
# téléchargement des tuiles et sortie en geotiff
gdal_translate drones.xml drones.tif -co COMPRESS=DEFLATE -co TILED=YES
@koenrh
koenrh / gcp-gpu-vm-hashcat.md
Last active August 12, 2024 16:00
Running Hashcat on Google Cloud's new GPU-based VMs

Running Hashcat on Google Cloud's GPU-based VMs

In February 2017, Google announced the availability GPU-based VMs. I spun up a few of these instances, and ran some benchmarks. Along the way, I wrote down the steps taken to provision these VM instances, and install relevant drivers.

Update April 2019: Updated instructions to use instances with the Tesla T4 GPUs.

@velizarn
velizarn / ip6tables_setup.bash
Last active July 11, 2024 12:52
Basic setup for ip6tables - drop all traffic except local, ICMP and DHCPv6 traffic.
#!/bin/bash
# http://serverfault.com/questions/410321/debian-ip6tables-rules-setup-for-ipv6/410327#410327
# http://ipset.netfilter.org/iptables.man.html
# https://www.sixxs.net/wiki/IPv6_Firewalling
# https://www.cyberciti.biz/faq/ip6tables-ipv6-firewall-for-linux/
# https://gist.github.com/thomasfr/9712418
# https://gist.github.com/SnakeDrak/f4150f6e517e5a1d525f
# http://www.thegeekstuff.com/2011/06/iptables-rules-examples
# http://www.thegeekstuff.com/scripts/iptables-rules
Start GDB and execute the following commands:
catch syscall ptrace
commands 1
set ($eax) = 0
continue
end
Then, run the app and voilá! you can debug your program :)