Skip to content

Instantly share code, notes, and snippets.

View hrbrmstr's full-sized avatar
💤
#tired

boB Rudis hrbrmstr

💤
#tired
View GitHub Profile
@williballenthin
williballenthin / macOS_savedstate.py
Last active April 20, 2024 21:13
parse macOS savedState files
'''
parse SavedState artifacts extracted from OSX.
author: Willi Ballenthin (william.ballenthin@fireeye.com)
license: Apache 2.0
'''
import re
import sys
import json
import struct
@williballenthin
williballenthin / macOS_keychain.py
Last active November 19, 2022 12:13
bling.py - extract keys from macOS keychains.
#!/usr/bin/env python3
'''
bling.py - extract keys from macOS keychains.
installation:
pip install pytz hexdump vivisect-vstruct-wb tabulate argparse pycryptodome
usage:
python bling.py /path/to/keychain-db <password> ./path/to/output/directory
@williballenthin
williballenthin / macOS_stickies.py
Last active June 24, 2022 15:32
extract entries from the osx sticky database
'''
parse osx sticky databases.
author: Willi Ballenthin <william.ballenthin@fireeye.com>
license: Apache 2.0
usage:
$ python extract_stickies.py /path/to/input.bin /path/to/output/directory/
'''
@roycewilliams
roycewilliams / mta-sts_scans-io_dns-any_2018-08-24.txt
Created September 16, 2018 03:24
MTA-STS hostnames from the scans.io "DNS ANY" dataset as of 2018-08-24
mta-sts.0xdeadbeef600ddecafbad.de,cname,sb33.not-your-server.de
mta-sts.123apps.net,cname,mta-sts.luteijn.email
mta-sts.79p.de,cname,79p.de
mta-sts.abel-battenberg.de,a,78.46.137.164
mta-sts.abel-fkb.de,a,78.46.137.164
mta-sts.adrien-martin.net,cname,adrien-martin.net
mta-sts.akademeia.moe,cname,mta-sts.luteijn.email
mta-sts.akademiaf2p.pl,cname,ha.hetzner.tensquaregames.com
mta-sts.alainwolf.ch,cname,mta-sts.urown.net
mta-sts.alainwolf.net,cname,mta-sts.urown.net
@noamross
noamross / put64.R
Last active November 17, 2023 22:22
Simple R object to base64 conversion. Free to a good home in your R package! If you put it in your package, let me know 🙂
# Copyright 2018 Noam Ross
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
@jonocarroll
jonocarroll / boyermoor.py
Last active November 26, 2021 22:41
Boyer-Moore Implementations for @coolbutuseless' comparisons
def alphabet_index(c):
"""
Returns the index of the given character in the English alphabet, counting from 0.
"""
return ord(c.lower()) - 97 # 'a' is ASCII character 97
def match_length(S, idx1, idx2):
"""
Returns the length of the match of the substrings of S beginning at idx1 and idx2.
"""
@seanhandley
seanhandley / docker-compose.yml
Last active April 9, 2024 04:05
How To Set Up Docker For Mac (Mojave) with Native NFS
version: '2'
services:
api:
volumes:
- "nfsmount:${CONTAINER_DIR}"
volumes:
nfsmount:
driver: local
driver_opts:
Only including this file so the title of the gist isn't `.gitignore`
@simonecorsi
simonecorsi / git-create-remote.sh
Last active January 16, 2018 04:59
This function will walk you through the creation of a remote repository on github without wasting your precious time going to the website :)
# This function will walk you through the creation of a remote repository on github
# without wasting your precious time going to the website :)
# how:
# - source it in your (bash|zsh)rc
# - change the alias at the bottom of the script to your needs
# - call it, follow instructions... profit
function createRemoteGitRepository() {
local RED='\033[0;31m'
local NC='\033[0m' # No Color
local GITHUB_USER=''
@hrbrmstr
hrbrmstr / gg_tweet.R
Last active October 16, 2020 04:49
use the magick device to make ggplots conform to twitter card or in-stream image optimal sizes, with or without "retina" resolution
library(httr)
library(magick)
library(hrbrthemes)
library(ggplot2)
theme_tweet_rc <- function(grid = "XY", style = c("stream", "card"), retina=TRUE) {
style <- match.arg(tolower(style), c("stream", "card"))
switch(