Skip to content

Instantly share code, notes, and snippets.

@vgmoose
Created January 21, 2022 22:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vgmoose/caecf2d03becc41dba82bc530a92e5cb to your computer and use it in GitHub Desktop.
Save vgmoose/caecf2d03becc41dba82bc530a92e5cb to your computer and use it in GitHub Desktop.
Multithreaded luks bruteforcing based on newline separated word list
import os, time, random
from collections import deque
import threading
words = deque([])
f1 = open("words.txt", "r")
for word in reversed(f1.readlines()):
word = word.strip()
words.append(word)
def consume():
id = random.randint(0, 10000)
while True:
word = words.pop()
print(f"{id} -- Trying {word}: ")
os.system(f"echo -n {word} | cryptsetup luksOpen /dev/nvme3n1p3 drive3")
print(f"{id} -- Moving on")
for x in range(60):
t1 = threading.Thread(target=consume)
t1.start()
while True:
time.sleep(30)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment