Skip to content

Instantly share code, notes, and snippets.

@sin3point14
sin3point14 / download_reddit_account.py
Created October 10, 2024 18:58
Download a reddit account content. Saves comments and posts but doesn't download all assets to render the page properly
import sys
import os
import requests
from bs4 import BeautifulSoup
def dump_stuff(base, output_dir):
os.makedirs(output_dir, exist_ok=True)
user_agent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36"
url = base
i = 0
@sin3point14
sin3point14 / wsl-hax.ps1
Created June 22, 2022 22:23
Bypass the WSL EOL check for 31-10-2021 using a small powershell wrapper that changes dates
# TODO: Currently I need to spawn 2 Admin Powershells, they can probably be reduced to 1
$run = wsl -l --running
$run = [string]::join("",($run.Split("`n")))
$running = $false
function Run-Elevated ($scriptblock1, $scriptblock2)
{
# Wait on this powershell instance to finish changing the time
@sin3point14
sin3point14 / window.py
Created June 22, 2022 19:13
Gives you the information about the process present under your cursor
# almost entirely based of https://stackoverflow.com/a/56175816 :p
from ctypes import windll, Structure, c_long, byref, create_string_buffer
import time
class POINT(Structure):
_fields_ = [("x", c_long)]
pt = None
while True: