from pwn import *


os.system("wget http://pwnable.kr/bin/flag")
os.system('upx -d flag')
log.info('unpack finish!')
e = ELF('./flag')
main_addr = e.symbols[b'main']
log.info("main is : " + hex(main_addr))
rodata_addr = e.get_section_by_name('.rodata').header.sh_addr
flag = e.read(rodata_addr, 49).decode()
log.info('FLAG IS : ' + flag[8:])


