Skip to content

Instantly share code, notes, and snippets.

View jlsajfj's full-sized avatar
💭
Just vibin'

Joseph jlsajfj

💭
Just vibin'
View GitHub Profile
@jlsajfj
jlsajfj / screensaver.py
Last active June 28, 2021 14:32
Use a window as a screensaver on a second monitor
import win32gui, win32con, time
import tkinter as tk
import pywintypes
windowList = []
def winEnumHandler( hwnd, ctx ):
if win32gui.IsWindowVisible( hwnd ):
windowList.append((hwnd, win32gui.GetWindowText( hwnd )))
@jlsajfj
jlsajfj / cache.py
Last active March 28, 2021 21:22
Caching functions
#!/usr/bin/python3.9
cfd = dict()# cfd for cache_func_dict
def cache(func):
def wrapper(*args, **kwargs):
val = None
if func in cfd:
inner_dict = cfd[func]
if args in inner_dict:
val = inner_dict[args]
else:
@jlsajfj
jlsajfj / crypt.py
Last active May 7, 2021 17:19
Simple program to encrypt and decrypt images, through image manipulation. Seems secure enough.
from PIL import Image
import sys
import hashlib
from getpass import getpass
import random
swap = ((1, 2, 3, 0), (3, 2, 1, 0), (1, 3, 0, 2), (0, 3, 1, 2), (1, 2, 0, 3), (2, 0, 3, 1), (2, 1, 0, 3), (3, 1, 2, 0), (0, 1, 3, 2), (2, 3, 1, 0), (0, 3, 2, 1), (3, 1, 0, 2), (3, 0, 2, 1), (3, 2, 0, 1), (2, 1, 3, 0), (0, 2, 3, 1), (3, 0, 1, 2), (2, 3, 0, 1), (0, 2, 1, 3), (1, 3, 2, 0), (2, 0, 1, 3), (0, 1, 2, 3), (1, 0, 2, 3), (1, 0, 3, 2))
def encrypt(file, pword):
img = Image.open(file)

Tenable 2021 CTF Rabbit Hole

This was fun.

Basically you start by navigating to the start page. This has some text like shown below.

initial

You drop that code back into the url and it navigates to the next. This keeps going until eventually it just has end.

@jlsajfj
jlsajfj / Hashcat.md
Last active February 10, 2021 23:08

Hashcat

To start off with, the password to Welcome_To_The_Game.rar is hashcat, simply enough.

We pop open that folder to get to the next level with, what looks to be, Brainf*ck.

I dropped that into a compiler, but it didn't work. Notably the brackets are reversed, which prompted "why don't I reverse every symbol?" (This can be solved easier with this reverse f*ck tool)

Here it is reversed: