This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"errors" | |
"io" | |
"log" | |
"net/http" | |
"time" | |
"github.com/sony/gobreaker" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
// input | |
// process(input) = result | |
// expected | |
// result == expected | |
// 90 | |
// B |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Given array representing a digit (123 = [1, 2, 3]) write a function to increment the number by 1 digit | |
def incr(a): | |
l = 8 | |
for i in range(len(a) - 1, -1, -1): | |
a[i] += l | |
l = a[i] / 10 | |
a[i] = a[i] % 10 | |
if l == 0: | |
break |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a = [0x6E, 0x69, 0x64, 0x73, 0x61, 0x7C, 0x53, 0x6F, 0x36,0x74, 0x58, 0x26, 0x74, 0x58, 0x6D, 0x52, 0x74, 0x73, 0x58, 0x73, 0x6F, 0x34, 0x58, 0x45, 0x34, 0x60, 0x6E,0x69, 0x49, 0x6E, 0x69, 0x60, 0x7A] | |
print "".join(chr(i ^ 7) for i in a) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from pwn import * | |
a = process('./warm_heap', env = {'LD_PRELOAD':'./libc.so.6'}) | |
libc = ELF('./libc.so.6') | |
def add(index, size, input): | |
a.recvuntil('>>') | |
a.sendline('1') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from pwn import * | |
a = remote('cupheap01.3dsctf.org', 8007) | |
a.recvuntil(' Give up') | |
a.sendline('1') | |
a.recv() | |
a.recv() | |
hasil = a.recv() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from pwn import * | |
import sys | |
LOCAL = 1 | |
if LOCAL: | |
a = process('./stupidrop') | |
if len(sys.argv) == 2: | |
gdb.attach(a, 'b *0x0000000000400637') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from pwn import * | |
import sys | |
LOCAL = 1 | |
libc = ELF('./libc.so.6') | |
if LOCAL: | |
a = process('./warmup', env={"LD_PRELOAD":"./libc.so.6"}) |