Skip to content

Instantly share code, notes, and snippets.

View paulolorenzobasilio's full-sized avatar

Paulo Basilio paulolorenzobasilio

View GitHub Profile
paulolorenzobasilio /
Created August 15, 2022 04:30 — forked from moyix/
Script to inject an exit(0) syscall into a running process. NB: only x86_64 for now!
gdb -p "$1" -batch -ex 'set {short}$rip = 0x050f' -ex 'set $rax=231' -ex 'set $rdi=0' -ex 'cont'
paulolorenzobasilio /
Created October 14, 2021 06:20 — forked from esperlu/
MySQL to Sqlite converter
# Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the
# CREATE block and create them in separate commands _after_ all the INSERTs.
# Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk.
# The mysqldump file is traversed only once.
# Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite
# Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite
paulolorenzobasilio / squash.php
Created May 5, 2021 05:57 — forked from woganmay/squash.php
Use PHP to flatten a multidimensional stdClass object (like a json_decode result)
View squash.php
function squash($array, $prefix = '')
$flat = array();
$sep = ".";
if (!is_array($array)) $array = (array)$array;
foreach($array as $key => $value)
View puppeteer-with-adblock.js
'use strict';
const puppeteer = require('puppeteer');
(async () => {
0. download ublock, I used
1. run $PATH_TO_CHROME --user-data-dir=/some/empty/directory --load-extension=/location/of/ublock
2. enable block lists you want to use