Skip to content

Instantly share code, notes, and snippets.


Filippo Valsorda FiloSottile

View GitHub Profile
FiloSottile / 32.asm
Last active Jun 1, 2021
NASM Hello World for x86 and x86_64 Intel Mac OS X (get yourself an updated nasm with brew)
View 32.asm
; /usr/local/bin/nasm -f macho 32.asm && ld -macosx_version_min 10.7.0 -o 32 32.o && ./32
global start
section .text
push dword msg.len
push dword msg
push dword 1
mov eax, 4
FiloSottile /
Created Feb 4, 2013
This small python script makes use of watchdog (and sh) to monitor your code directory (recursively) and build less and CoffeeScript files upon edit.
#!/usr/bin/env python2
import watchdog.observers
import sh
import time
import os
# Detach
if os.fork(): os._exit(0)
FiloSottile /
Created Mar 12, 2012
Simple script to dump an IMAP folder into eml files
#!/usr/bin/env python
#-*- coding:utf-8 -*-
import imaplib
import getpass
import argparse
argparser = argparse.ArgumentParser(description="Dump a IMAP folder into .eml files")
argparser.add_argument('-s', dest='host', help="IMAP host, like", required=True)
argparser.add_argument('-u', dest='username', help="IMAP username", required=True)
FiloSottile / La Coscienza di un Hacker
Last active Mar 10, 2021
Traduzione in italiano dell'Hacker Manifesto
View La Coscienza di un Hacker
Questa è una traduzione in italiano del celebre Hacker Manifesto. Tutte quelle
esistenti contengono grossolani errori, perlopiù dovuti ad una carente
comprensione della materia e del periodo, o in ogni caso sono poco fedeli al
contenuto e allo spirito dell'originale. Mi auguro che questa mia traduzione non
soffra degli stessi problemi. Sail strong.
-- FiloSottile
Da: Phrack, Volume Uno, Issue 7, Phile 3 of 10
FiloSottile / How to dump the iOS simulator
Last active Jan 27, 2021
How to dump the iOS simulator memory
View How to dump the iOS simulator

Dumping the iOS simulator memory

To audit memory or to debug with external tools it can be useful to get a dump of the running memory of an app.

To do so on a device you'll need a Jailbreak, SSH access, and gdb. See this or this.

If instead you're up to a simulated app, things are easier: apps running in the simulator are actually just native processes on your Mac OS X.

So, how to get a core dump of a Mac OS X process? Sadly gdb can't do so. Mac OS X Internals comes to the rescue with this article.

FiloSottile /
Created Mar 18, 2012
Script to follow HTTP redirects and print the resulting URL - a.k.a. URL un-shortener
#!/usr/bin/env python
#-*- coding:utf-8 -*-
import sys
import urllib2
# This script uses HEAD requests (with fallback in case of 405)
# to follow the redirect path up to the real URL
# (c) 2012 Filippo Valsorda - FiloSottile
# Released under the GPL license
FiloSottile /
Created Jun 25, 2017
Unbound python-script to route websites over IPv4.
def init(id, cfg):
return True
def deinit(id):
return True
def inform_super(id, qstate, superqstate, qdata):
return True
domains = [
FiloSottile / browser_request
Created Dec 12, 2013
Analysis of the new GMail image proxy
View browser_request
"accept-language": "en-US,en;q=0.8,it-IT;q=0.6,it;q=0.4",
"accept-encoding": "gzip,deflate,sdch",
"cache-control": "max-age=0",
"connection": "keep-alive",
"accept": "image/webp,*/*;q=0.8",
"user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36",
"host": "",
"if-modified-since": "Wed, 31 Oct 2012 23:52:07 GMT"
#! /bin/sh
GOOS=linux go build -o $2 "$1"
GOOS=linux go build -ldflags="-s -w" -o $2.-sw "$1"
upx -f --brute -o $2.upx $2
upx -f --brute -o $2.-sw.upx $2.-sw
GOOS=linux gotip build -o $2.tip "$1"
GOOS=linux gotip build -ldflags="-s -w" -o $2.tip.-sw "$1"
upx -f --brute -o $2.tip.upx $2.tip


I am writing to request my personal data, the purposes of their processing, the recipients to whom they have been or will be disclosed, the envisaged period for which they will be stored, and the existence of automated decision-making, including profiling, according to Article 15 of the GDPR.

For any kinds of data for which it makes sense, I would like to receive them in structured form, according to Article 20 of the Regulation.

Examples of my personal data you might be in control of, or might have shared with others, include:

  • the content and topics of saved articles
  • the state of saved articles (liked, archived, read) and their history (saving, reading, and archival timestamps)