Skip to content

Instantly share code, notes, and snippets.

View turnipsoup's full-sized avatar
🍎
Getting healthier

Jeremy Heckt turnipsoup

🍎
Getting healthier
View GitHub Profile
@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 / 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 / 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 / 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 / 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 / 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 / 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 / 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 / gameval.py
Last active January 10, 2021 19:40
Get current prices for games from pricecharting.com and return updated CSV
#!/usr/bin/env python3
# This script will read my games CSV list and update the current
# price of the games in the sheet
import pandas as pd
import requests
import bs4 as bs
from tabulate import tabulate
@turnipsoup
turnipsoup / us_and_wa_state_vote_ratio_2020.ipynb
Created November 16, 2020 03:24
Comparing just how blue/red states were in the 2020 Presidential election. Also has data for WA State by county. Storing here to save code for later.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.