Skip to content

Instantly share code, notes, and snippets.

@sueszli
sueszli / reading.md
Last active May 2, 2024 07:06
mlsec reading list (2nd may)

james mickens' talk: https://www.youtube.com/watch?v=ajGX7odA87k&t=241s

overview

why a security focus?

@sueszli
sueszli / settings.json
Created April 20, 2024 14:18
vscode config
{
"[latex]": {
"editor.defaultFormatter": "James-Yu.latex-workshop"
},
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter"
},
"debug.terminal.clearBeforeReusing": true,
"editor.accessibilitySupport": "off",
"editor.defaultFormatter": "esbenp.prettier-vscode",
@sueszli
sueszli / git-lfs-exploit.py
Last active April 19, 2024 13:44
bypassing github storage service
import hashlib
import sys
import pathlib
import subprocess
"""
github commits are restricted to 25-50 MiB, varying based on the push method [^1].
to handle files beyond this limit, git lfs (large file storage) pointers are necessary, referencing an external lfs server [^2].
however, this method incurs a monthly cloud storage fee to github [^3].
@sueszli
sueszli / obsidian-snippet.css
Last active April 18, 2024 22:49
my obsidian theme
/* -------------------------------------------------------------------------------------------------------------- default obsidian color palette */
/*
.theme-dark {
color-scheme: dark;
--highlight-mix-blend-mode: lighten;
--mono-rgb-0: 0, 0, 0;
--mono-rgb-100: 255, 255, 255;
--color-red-rgb: 251, 70, 76;
--color-red: #fb464c;
--color-orange-rgb: 233, 151, 63;
@sueszli
sueszli / tcp dump analysis.ipynb
Last active January 26, 2024 14:14
network traffic analysis
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import webbrowser
import time
from playwright.sync_api import sync_playwright
URL = "https://www.amazon.jobs/en/search?___________INSERT YOUR URL HERE___________"
page = sync_playwright().start().chromium.launch().new_page()
page.goto(URL)
import { assert, log } from 'console'
import fs from 'fs'
import playwright from 'playwright'
const DOWNLOAD_PATH = 'downloads'
const main = async () => {
console.clear()
// init download dir
@sueszli
sueszli / puppeteer.config.cjs
Last active January 12, 2024 14:23
rentals.com scraper
const { join } = require("path");
module.exports = {
cacheDirectory: join(__dirname, ".cache", "puppeteer"),
};
@sueszli
sueszli / kijiji.js
Last active January 12, 2024 14:22
kijiji.com scraper
import axios from 'axios'
import * as cheerio from 'cheerio'
import { assert } from 'console'
import open from 'open'
const main = async () => {
let url = process.argv[2]
assert(process.argv.length !== 2, 'illegal number of arguments')
assert(url, 'missing url as argument')
@sueszli
sueszli / extractPages.py
Created August 8, 2023 23:53
limit pdf files to specific pages
from PyPDF2 import PdfFileReader, PdfFileWriter
import os
inputPath = "./solutions"
outputPath = "./extractedPages"
chosenPages = [1]
if not os.path.exists(outputPath):
os.makedirs(outputPath)