Skip to content

Instantly share code, notes, and snippets.

View nghiadt1098's full-sized avatar

Đào Trọng Nghĩa nghiadt1098

View GitHub Profile
@nghiadt1098
nghiadt1098 / rock.py
Last active October 11, 2020 11:34
rock_paper_scissors
from pwn import *
import time
context.log_level='debug'
context.arch='amd64'
context.bits=64
# r.send("scissors")
# r=process("./babeOverfl")
host="40.117.63.62"
host="40.121.22.147"
host="34.126.105.174"
from gpiozero import *
from time import sleep
import xbox
import code
A=14
B=2
D4=3
D3=4
D2=17
@nghiadt1098
nghiadt1098 / MicroServiceDaemonOS.py
Last active June 26, 2019 14:21
MicroServiceDaemonOS
from pwn import *
import time
from datetime import datetime, date
#datetime.combine(date.today(), exit) - datetime.combine(date.today(), enter)
#r=process("./MicroServiceDaemonOS",aslr=False)
#context.log_level='debug'
r = remote("microservicedaemonos.ctfcompetition.com",1337)
#
context.bits=64
@nghiadt1098
nghiadt1098 / mallocadium.py
Last active June 10, 2019 03:38
Solution of mallocadium challenge
from pwn import *
context.log_level='debug'
def alloc(id,size,data):
r.recvuntil("Enter choice: ")
r.sendline("1")
r.recvuntil("Enter id: ")
r.sendline(str(id))
r.recvuntil("Enter size of malloc: ")
r.sendline(str(size))
#Tested Win7
import socket, sys, struct, time
from OpenSSL import SSL, crypto
from impacket.structure import Structure
def hexdump(src, length=16):
FILTER = ''.join([(len(repr(chr(x))) == 3) and chr(x) or '.' for x in range(256)])
lines = []
for c in xrange(0, len(src), length):
chars = src[c:c+length]
@nghiadt1098
nghiadt1098 / poc.c
Last active April 8, 2019 11:10
poc.c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <stdbool.h>
#include "getopt.h"
#include "getarg.h"
#include "gif_lib.h"