Skip to content

Instantly share code, notes, and snippets.

View turnipsoup's full-sized avatar
🍎

Jeremy Heckt turnipsoup

🍎
View GitHub Profile
@turnipsoup
turnipsoup / clicks.json
Created July 28, 2020 15:04
Example from a CTF
[
{
"_index": "packets-2020-07-13",
"_type": "pcap_file",
"_score": null,
"_source": {
"layers": {
"frame": {
"frame.interface_id": "0",
"frame.interface_id_tree": {
@turnipsoup
turnipsoup / roadhouse_music.txt
Created July 24, 2020 16:56
Tracking good roadhouse style music
# Tracks roadhouse style music, old preferably but new is good too.
# Thanks Eva Walker!
Bob Dorough - Don't Think Twice, its Alright
Inmates from Parchman Prison - Early In The Morning
Julius Daniels - 99 Year Blues
Sister Mary Nelson - Judgement
Herbie Hancock - Watermelon Man
Clarence Ashley - The coo Coo bird
The Elder's McIntorsh And Edwards Sanctified Singers - Since I Laid My Burden Down
@turnipsoup
turnipsoup / getmarbleemojis.py
Created July 22, 2020 20:55
Script to download all the team logos for Jelle's Marble Runs from slackmoji.com
import requests
import bs4 as bs
import os
# Try and make a directory to store the emojis
target_dir = "./jmr-emojis/"
try:
os.mkdir(target_dir)
except:
@turnipsoup
turnipsoup / CTF-Pwn.Dockerfile
Last active July 20, 2020 00:13
Dockerfile build for generic CTF pwnable challenges.
# When you run, do it like this:
# docker run -it -v $PWD:/pwn pwnable /bin/bash
FROM ubuntu:latest
RUN mkdir /pwn
WORKDIR /pwn
# Since our install of h4ck1n6 tools involves a TZ setting...
ARG DEBIAN_FRONTEND=noninteractive
@turnipsoup
turnipsoup / get_t9.py
Created June 30, 2020 05:47
Get T9 text words from string of phone-entered digits.
#!/usr/bin/env python3
str_one = "444333 99966688 277733 7773323444664 84433 22244474433777, 99966688 277733 666552999. 99966688777 777744277733 666333 84433 443344477778 4447777 44466 99966688777 4466688777733. 84433 5533999 8666 84433 55566622255 4447777 22335556669. 4666 8666 727774447777."
str_two = "47777888 995559888 4555 47777888 44999988 666555997 : 8555444888477744488866888648833369!!"
t9_text = {
"2": "a",
"22": "b",
"222": "c",
"3": "d",
@turnipsoup
turnipsoup / rsa_solver.py
Last active June 30, 2020 23:27
RSA Solver
# Sources
# https://stackoverflow.com/questions/4643647/fast-prime-factorization-module
# https://stackoverflow.com/questions/49856115/inverse-of-a-powa-b-n-function-in-python-decryption-code
# Solutions on cryptohack.org
## Imports
import binascii
import base64
from Crypto.Util.number import inverse, bytes_to_long, long_to_bytes
from sympy.ntheory import factorint
@turnipsoup
turnipsoup / light_sensor_iot_practice.ipynb
Last active July 23, 2020 18:06
Read from analog pin and generate HTTP POST message with data on an Arduino Nano 33 IOT
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@turnipsoup
turnipsoup / hanoi.go
Created February 14, 2020 20:39
The hanoi problem recursion solver from this computerfile video (but ported to Go): https://www.youtube.com/watch?v=8lhxIOAfDss&t=629s
package main
import (
"fmt"
"os"
"strconv"
)
func main() {
total_discs, _ := strconv.Atoi(os.Args[1])
@turnipsoup
turnipsoup / chartmake.py
Last active January 28, 2020 17:03
A thin wrapper to make Seaborn charts from the command line.
#!/usr/bin/env python3
#
# Here we parse the arguments and check their validity BEFORE importing the heavy libraries, just in case. Saves CPU.
# Arguments parsing
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("-f", help="File name")
parser.add_argument("-c", help="Chart type. To view list of support charts, use --charts")
@turnipsoup
turnipsoup / tasteOfHomeGet.py
Last active January 18, 2020 01:30
Get all publicly available recipes from tasteofhome.com and compiles them into a TSV file. Includes nutrition facts.
import requests as r
import bs4 as bs
import json
# Configuration
input_list = "tasteOfHome.csv"
base_url = "https://www.tasteofhome.com/recipes/page/"
site = 'https://www.tasteofhome.com'
output_filename = "tasteOfHome.csv" # URL csv for getRecipesList()
final_filename = "tasteOfHomeRecipes.tsv" # Recipe tsv output for tasteOfHomeCsvMake()