Skip to content

Instantly share code, notes, and snippets.

@dreness
dreness / filesink.rb
Last active November 7, 2017 00:39
Blather XMPP bot that receives file transfers that are sent using XEP 0096. Not at all complete, but wanted to post something that demonstrates working file transfer, since I couldn't find any.
require 'rubygems'
require 'blather/client'
require 'awesome_print'
require 'nokogiri'
require 'pretty-xml'
require 'nokogiri-pretty'
include PrettyXML
# This is a Blather bot that receives file transfers that are sent using
# XEP 0096, using either p2p SOCKS5 (XEP 0065), or through the server
@mrexodia
mrexodia / Decrypted iTunes Library.grammar
Created December 27, 2014 00:26
Decrypted iTunes Library File Format
<?xml version="1.0" encoding="UTF-8"?>
<ufwb version="1.9">
<grammar name="Decrypted iTunes Library" start="id:148" author="Mr. eXoDia" email="mr.exodia.tpodt@gmail.com" fileextension="itl" uti="com.apple.itunes.db">
<description>Grammar for decrypted iTunes Library files.</description>
<structure name="Defaults" id="149" repeatmin="0" repeatmax="-1" encoding="ISO_8859-1:1987" endian="little" signed="no"/>
<structure name="iTunes Library" id="148" repeatmin="0" repeatmax="-1" extends="id:149" order="variable">
<structref name="hdfm" id="152" repeatmin="0" repeatmax="-1" structure="id:151"/>
<structref name="msdh" id="154" repeatmin="0" repeatmax="-1" structure="id:153"/>
</structure>
<structure name="hdfm" id="151" length="this.headerLength" repeatmin="0" repeatmax="-1" extends="id:149" endian="big">
@dlangille
dlangille / 1 - The FileSet
Last active February 28, 2021 23:45
Each jail is in its own fileset. Snapshot each fileset, back it up. Destroy the filesets.
# the filesets will be different on each jail, thus, we'll always be doing a full unless
# we define this for each jail server
#
FileSet {
Name = "zuul jail snapshots"
Include {
Options {
signature = MD5
Exclude = yes
}
@dreness
dreness / attachments-for-buddy.sql
Last active June 24, 2020 15:52
List all #iMessage attachments associated with a given buddy
-- sqlite3 ~/Library/Messages/chat.db < attachments-for-buddy.sql
-- dates in the DB are NSDate. NSDate.h says: NSTimeIntervalSince1970 978328800
-- To list attachments for a specific buddy, put their handle in the 'where' clause at the end.
SELECT Datetime(created_date + 978328800, 'unixepoch', 'localtime'),
mime_type,
total_bytes,
filename
FROM attachment
@crittermike
crittermike / wget.sh
Last active August 8, 2026 10:29
Download an entire website with wget, along with assets.
# One liner
wget --recursive --page-requisites --adjust-extension --span-hosts --convert-links --restrict-file-names=windows --domains yoursite.com --no-parent yoursite.com
# Explained
wget \
--recursive \ # Download the whole site.
--page-requisites \ # Get all assets/elements (CSS/JS/images).
--adjust-extension \ # Save files with .html on the end.
--span-hosts \ # Include necessary assets from offsite as well.
--convert-links \ # Update links to still work in the static version.
@ygini
ygini / Reversing 10.13 RootGate, hands notes.md
Last active February 20, 2021 20:26
Work in progress, notes for the current state

Reversing 10.13 RootGate, hands notes

Inital discovery process

Original state of the root.plist

Dict {
    smb_sid = Array {
        S-1-5-18
@beren12
beren12 / Decrypted iTunes Library.grammar
Created January 24, 2018 16:39 — forked from mrexodia/Decrypted iTunes Library.grammar
Decrypted iTunes Library File Format
<?xml version="1.0" encoding="UTF-8"?>
<ufwb version="1.9">
<grammar name="Decrypted iTunes Library" start="id:148" author="Mr. eXoDia" email="mr.exodia.tpodt@gmail.com" fileextension="itl" uti="com.apple.itunes.db">
<description>Grammar for decrypted iTunes Library files.</description>
<structure name="Defaults" id="149" repeatmin="0" repeatmax="-1" encoding="ISO_8859-1:1987" endian="little" signed="no"/>
<structure name="iTunes Library" id="148" repeatmin="0" repeatmax="-1" extends="id:149" order="variable">
<structref name="hdfm" id="152" repeatmin="0" repeatmax="-1" structure="id:151"/>
<structref name="msdh" id="154" repeatmin="0" repeatmax="-1" structure="id:153"/>
</structure>
<structure name="hdfm" id="151" length="this.headerLength" repeatmin="0" repeatmax="-1" extends="id:149" endian="big">
@pwn20wndstuff
pwn20wndstuff / loader.c
Last active July 26, 2024 19:57
Full AMFI/CoreTrust bypass for iOS 11.0-12.1.2 by @Jakeashacks with implementation by @Pwn20wnd
//
// loader.c
// Undecimus
//
// Created by Pwn20wnd on 3/16/19.
// Copyright © 2019 Pwn20wnd. All rights reserved.
// Copyright © 2019 Jakeashacks. All rights reserved.
//
#include <common.h>
@dmp1ce
dmp1ce / move_zfs_child_datasets.bash
Last active February 6, 2022 03:41
Move all ZFS child datasets to a new parent dataset
#!/bin/bash
# Move all ZFS child datasets to a new parent dataset
# See post about problematic Docker datasets:
# https://daveparrish.net/posts/2020-11-10-Managing-ZFS-Snapshots-ignore-Docker-snapshots.html
if [ ! $# -eq 2 ]; then
echo "Please supply a source and destination ZFS dataset as the first and second parameter"
echo "Example: ./move_zfs_child_datasets.bash zpool/ROOT/default zpool/docker"
exit;
@frijole
frijole / dmg_extract.sh
Last active December 12, 2020 02:02
a shell script to copy the `Icons` folder out of an IconFactory archive DMG download, based on https://stackoverflow.com/a/48251635
#!/bin/bash
dmg_path="$1"
# use process redirection to capture the mount point and dev entry
IFS=$'\n' read -rd '\n' mount_point dev_entry < <(
# mount the diskimage; leave out -readonly if making changes to the filesystem
hdiutil attach -readonly -plist "$dmg_path" | \
# convert output plist to json