Skip to content

Instantly share code, notes, and snippets.

intmax = 0xffffffff
def ror(v, n):
return (v >> n) | ((v << (32-n)) & intmax)
def op1(a, b, c):
a ^= intmax
c |= 0x8FD6F5D4
a = ror(a, 10)
import socket, struct, os, binascii, base64, random, time, itertools
import telnetlib
def readline(sc, show = True):
res = ""
while len(res) == 0 or res[-1] != "\n":
data = sc.recv(1)
if len(data) == 0:
print repr(res)
raise Exception("Server disconnected")
import angr
data = open("sakura-fdb3c896d8a3029f40a38150b2e30a79", "rb").read()
findseq = []
avoid = []
index = 0
count = 0
while True:
res = data.find("\xC6\x85\xB7\xE1\xFF\xFF\x00", index)
if res == -1:
import sys, struct
def s2n(s):
if s.startswith("0x"):
if s.endswith("L"):
s = s[:-1]
n = int(s[2:], 16)
else:
n = int(s)
import angr
proj = angr.Project('./vgaloader.elf')
state = proj.factory.entry_state()
simgr = proj.factory.simgr(state)
simgr.explore(find=0x000B8F9F)
print repr(simgr.found[0].posix.dumps(0))
import struct
f = open("onlyscanner.pcap", "rb")
of = open("packetdata.raw", "wb")
header = f.read(24)
while True:
pheader = f.read(16)
C:\Users\ymgve\Documents\Visual Studio 2015\Projects\bugtest\bugtest>nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2017 NVIDIA Corporation
Built on Fri_Nov__3_21:08:12_Central_Daylight_Time_2017
Cuda compilation tools, release 9.1, V9.1.85
C:\Users\ymgve\Documents\Visual Studio 2015\Projects\bugtest\bugtest>nvcc kernel.cu
kernel.cu
Creating library a.lib and object a.exp
import hashlib, os, struct, sys, socket, time
N = 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2fL
R = 0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141L
A = 0L
B = 7L
gx = 0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798L
gy = 0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8L
b58ab = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"
@ymgve
ymgve / b2xtest.py
Last active January 21, 2018 08:20
import hashlib, os, struct, sys, socket, time
N = 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2fL
R = 0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141L
A = 0L
B = 7L
gx = 0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798L
gy = 0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8L
b58ab = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"
@ymgve
ymgve / btftest.py
Last active January 21, 2018 14:49
import hashlib, os, struct, sys, socket, time
N = 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2fL
R = 0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141L
A = 0L
B = 7L
gx = 0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798L
gy = 0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8L
b58ab = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"