Skip to content

Instantly share code, notes, and snippets.

$ ./hashcat -b
hashcat (v6.2.6-549-gd3f7c5132) starting in benchmark mode
Benchmarking uses hand-optimized kernel code by default.
You can use it in your cracking session by setting the -O option.
Note: Using optimized kernel code limits the maximum supported password length.
To disable the optimized kernel code in benchmark mode, use the -w option.
The device #1 has been disabled as it most likely also exists as an OpenCL device, but it is not possible to automatically map it.
You can use -d 1 to use Metal API instead of OpenCL API. In some rare cases this is more stable.
@dustyfresh
dustyfresh / osx_finder_rce_21.yar
Last active September 21, 2021 22:18
yara rule for OSX finder RCE
rule osx_finder_rce_21 {
meta:
description = "https://ssd-disclosure.com/ssd-advisory-macos-finder-rce/"
strings:
$xml_1 = /\<\?xml/
$xml_2 = /\<plist/
$xml_3 = /\<key\>URL/
$sploit_str = /\<string\>(file|ssh|sftp|ftp|git|svn|news|afp|telnet)\:\/\// nocase
@dustyfresh
dustyfresh / Cargo.toml
Last active June 9, 2021 00:41
Simple http sensor written in Rust with Rocket. Always responds 200 to every request, logs POST data, and each request has a random content-length
[package]
name = "http-sensor"
version = "0.1.0"
authors = [""]
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
rocket = "0.4.10"
@dustyfresh
dustyfresh / pandas-m1.md
Created March 28, 2021 17:06
install pandas and numpy on the macbook M1
$ virtualenv -p python3 venv
$ source venv/bin/activate
$ pip install --upgrade pip
$ pip install Cython
$ pip install numpy --no-use-pep517
$ pip install pandas
@dustyfresh
dustyfresh / create_vultr_instance.py
Last active December 29, 2020 19:26
Simple python script for launching a Vultr instance using the v2 API https://www.vultr.com/api/v2
#!/usr/bin/python
import os
import json
import requests
from time import sleep
def main():
# API configuration
VULTR_SECRET = os.getenv("VULTR_SECRET")
# SSH_KEYS must be a list of SSH key uuids as tracked by Vultr.
@dustyfresh
dustyfresh / Cargo.toml
Created December 28, 2020 23:05
certstream logger written in Rust
[package]
name = "certstream-logger"
version = "0.1.0"
authors = [""]
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
websocket = "0.26.2"
@dustyfresh
dustyfresh / dump_ip2asn.py
Last active December 11, 2020 22:40
quick and dirty script for streaming ip2asn tsv and then saving the data locally as json
#!/usr/bin/env python3
import netaddr
import json
from smart_open import open
def main():
# Use smart_open to stream the compressed data line by line
with open('./ip2asn.json', 'a+') as outfile:
for line in open('https://iptoasn.com/data/ip2asn-v4.tsv.gz', encoding='utf-8'):
range_start,range_end,AS_number,country_code,AS_description = line.split('\t')
@dustyfresh
dustyfresh / inkyphat-crypto-ticker.py
Created November 18, 2020 00:54
Crypto price ticker with the inkyphat eink display
#!/usr/bin/env python3
import cryptocompare
from time import sleep
from inky import InkyPHAT
from random import shuffle
from datetime import datetime
from PIL import Image, ImageDraw, ImageColor, ImageFont
def log(msg):
#print(msg)
@dustyfresh
dustyfresh / mysql_json_table_dump.py
Last active October 3, 2020 01:49
dump mysql table as jsonl file
#!/usr/bin/env python
import json
import pymysql.cursors
def main():
# Connect to the database
connection = pymysql.connect(
host='localhost',
user='changeme',
password='changeme',
@dustyfresh
dustyfresh / hashtables.py
Created April 22, 2020 23:50
script for quickly generating hash tables from a password list
#!/usr/bin/env python
import json
import time
import hashlib
import multiprocessing as mp
class Hashes(object):
def md5(s):
return hashlib.md5(str(s).encode()).hexdigest()