Skip to content

Instantly share code, notes, and snippets.

View ajmeese7's full-sized avatar
🥤
drinkin the Kool-Aid

Aaron Meese ajmeese7

🥤
drinkin the Kool-Aid
View GitHub Profile
@ajmeese7
ajmeese7 / kill_keybase.sh
Created November 20, 2022 13:22
Kills the Keybase application and all associated services
run_keybase -k
@ajmeese7
ajmeese7 / kill_keybase.sh
Created November 20, 2022 13:22
Kills the Keybase application and all associated services
run_keybase -k
@ajmeese7
ajmeese7 / menu.svelte
Last active November 18, 2022 01:40
Svelte collapsible menu
<script>
import { slide } from "svelte/transition";
import { page } from "$app/stores";
let isExpanded = false;
const toggleCollapse = () => {
isExpanded = !isExpanded;
};
</script>
@ajmeese7
ajmeese7 / dns-query-data-extraction.sh
Last active October 28, 2022 12:51
"Trick or Breach" Hack the Boo 2022 solution
# Extract the DNS query data from the pcap
tshark -r ./capture.pcap -T fields -e dns.qry.name -Y 'dns.flags.response == 0' > raw_exfil.txt
@ajmeese7
ajmeese7 / api_request_processing.py
Last active June 2, 2023 03:18
Hack The Boo 2022 Evaluation Deck code
from flask import Blueprint, render_template, request
from application.util import response
web = Blueprint('web', __name__)
api = Blueprint('api', __name__)
@web.route('/')
def index():
return render_template('index.html')
@ajmeese7
ajmeese7 / kill-app-using-port.sh
Last active September 14, 2022 23:35
Kills whatever application is currently using a port in Unix.
# Source: https://stackoverflow.com/questions/11583562/how-to-kill-a-process-running-on-particular-port-in-linux#comment71450805_11596144
fuser -k -n tcp 8080
@ajmeese7
ajmeese7 / mass-rename.sh
Created September 4, 2022 16:58
Mass rename files on Unix
sudo apt install rename
# NOTE: The `-n` means it will be a dry run, remove that to go through with the action.
# Source: https://askubuntu.com/a/283146/1071040
rename -v -n 's/-symbolic.svg/.svg/' */*/*.svg
@ajmeese7
ajmeese7 / remove_uppercase.sh
Created September 3, 2022 20:21
Remove uppercase file duplicates before git commit
find . | sort -r | uniq -di | xargs rm -f
@ajmeese7
ajmeese7 / dotenv.sh
Created June 9, 2022 18:31
Used to source `.env` files in Bash to be used as variables.
#!/bin/bash
export $(sed 's/#.*//g' .env | xargs)
@ajmeese7
ajmeese7 / base_url.js
Created May 24, 2022 01:14
Gets the root of a domain from a URL in JavaScript
const baseURL = (url) => url.split("//")[1].split("/")[0];