Skip to content

Instantly share code, notes, and snippets.

View 0xdeadbeer's full-sized avatar

Kevin J. 0xdeadbeer

View GitHub Profile
@0xdeadbeer
0xdeadbeer / anki-english-vocabulary.sh
Created June 29, 2023 20:53
Simple and efficient way to add vocabulary to Anki through AnkiConnect (using dmenu for input)
#!/usr/bin/sh
# CONSTANTS
deck_name="deck name"
card_type_name="card type name"
anki_server="http://localhost:8765/"
front_part=$(dmenu -p "Word: " < /dev/null)
front_part_escaped=$(printf '%s\n' "$front_part" | sed 's/"/\\"/g')
# if either of them is empty, exit
@0xdeadbeer
0xdeadbeer / vfs-mount.sh
Created April 26, 2023 16:08
Mount VirtioFS on Linux
#!/bin/sh
# scripted by: @0xdeadbeer
# parameters: ./vfs-mount.sh [mount_tag] [mount_path]
mount -t virtiofs $1 $2
@0xdeadbeer
0xdeadbeer / rclone-backup.py
Created April 16, 2023 14:16
Backup to Google Drive through rclone
#!/usr/bin/python3
import os, os.path
import sys
import time
from datetime import datetime
def help():
print("Data reaper!")
print("Written by: @0xdeadbeer")
print(" - first_param: list containing file locations to backup")
@0xdeadbeer
0xdeadbeer / new_backup_system.py
Last active April 29, 2024 20:58
Cronjob backup script
#!/usr/bin/python3
import os, os.path
import sys
import time
from datetime import datetime
def help():
print("Data reaper!")
print("Written by: @0xdeadbeer")
print(" - first_param: list containing file locations to backup")
@0xdeadbeer
0xdeadbeer / wiener_rsa.py
Last active March 12, 2023 13:53
Wiener's attack on RSA - Python3
#!/usr/bin/python3
import contfrac
import math
"""
Generously coded by me and my friend in the middle of a chill Sunday
Resources:
- https://crypto.stanford.edu/~dabo/pubs/papers/RSA-survey.pdf
- https://en.wikipedia.org/wiki/Wiener%27s_attack
- https://en.wikipedia.org/wiki/RSA_(cryptosystem)