Skip to content

Instantly share code, notes, and snippets.

View ay0ks's full-sized avatar

Dymitr ay0ks

View GitHub Profile
@ay0ks
ay0ks / otp.py
Last active March 25, 2025 10:30
PoC One-Time Pad encryption in Python
otp = lambda *args: [a ^ b for a, b in zip(*args)]
@ay0ks
ay0ks / structure.py
Last active March 25, 2025 10:26
PoC Python dataclasses.dataclass reimplementation
import contextlib
import copy
import types
class structure:
def __init__(self, _class):
self.__class = _class
self.annotations: list = list(_class.__annotations__.items())
_class.__class = self.__class
@ay0ks
ay0ks / loading_spinner.py
Last active March 25, 2025 10:25
Loading spinner in python
import sys
import time
from itertools import cycle
from multiprocessing import Process
class UnixLoading:
def __enter__(self):
def thread(self):
@ay0ks
ay0ks / memory_manipulation.py
Last active March 25, 2025 10:26
PoC Python virtual memory manipulation utility classes
from ctypes import *
class memaddr:
def __init__(self, address):
self.address = address
def write(self, data):
a = {
int: c_int,
float: c_float,