Skip to content

Instantly share code, notes, and snippets.

View kokjo's full-sized avatar

Jonas Rudloff kokjo

View GitHub Profile
@kokjo
kokjo / lol.py
Created December 23, 2019 09:23
class LOL:
pass
assert LOL() != LOL()
assert LOL() is not LOL()
assert id(LOL()) != id(LOL())
from pwn import *
import base64
template = """
%%>
%%:pragma clang diagnostic ignored "-Wunused-local-typedef"
%%:pragma clang diagnostic ignored "-Wunused-variable"
%%:define str(x) %%:x
%%:define hxp str(
#!/usr/bin/env python
from pwn import *
from subprocess import Popen, PIPE
context(arch='amd64', os='linux', terminal=['sakura','-x'])
r = remote("78.46.163.223", 1336)
r.recvuntil('"')
hsh = r.recvuntil('"')[:-1]
r.recvuntil("ends with ")
num = r.recvuntil(' ')
class A(type):
def __new__(cls, clsname, bases, attrs):
print cls, clsname, bases, attrs
newclass = super(A, cls).__new__(cls, clsname, bases, attrs)
return newclass
class B(object):
__metaclass__ = A
class C(B): pass
jonas@x250:~/code/pysvd$ python stlink.py
Target voltage 3.19165580183
Target Coreid 0x0
Peripheral 'AES' - 0x400e0000
Register 'CTRL' DECRYPT=1 DATASTART=0 XORSTART=0 BYTEORDER=0
Register 'CMD' START=1 STOP=0
Register 'STATUS' RUNNING=1
Register 'IEN' DONE=1
Register 'IF' DONE=1
Register 'IFS' DONE=1