파이썬에서 urllib2, CookieJar을 이용하여 구현.


그리고 여기 패킷 데이터.


내 요청


POST /block/block/ HTTP/1.1

Origin: gall.dcinside.com

Content-Length: 244

Accept-Language: ko-KR,ko;q=0.8,en-US;q=0.6,en;q=0.4

Accept-Encoding: gzip, deflate

Host: gall.dcinside.com

Accept: */*

User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36

Connection: close

X-Requested-With: XMLHttpRequest

Referer: http://gall.dcinside.com/board/write/?id=anigallers_new

Cookie: PHPSESSID=3ntjmpc8edthmmp2bhghpuuk05; ci_c=7ce61f825920cbfd9923352d657b3141

Content-Type: application/x-www-form-urlencoded; charset=UTF-8


block_key=7fbed275e18b6af76bebd2b04585256e489631990288a65110db969b4a87e49f9688227587323dde92fccf87852038f4c610ce45538cb5d52a1f6e7da65af7b273e673fc6c35c2553e1e3f9b950f778e590379893adaf88888&ci_t=7ce61f825920cbfd9923352d657b3141&id=anigallers_new


응답

HTTP/1.1 200 OK

Date: Tue, 06 Jan 2015 13:56:26 GMT

Server: Apache

Set-Cookie: ci_c=7ce61f825920cbfd9923352d657b3141; expires=Tue, 06-Jan-2015 15:56:26 GMT; path=/

Vary: Accept-Encoding,User-Agent

Content-Encoding: gzip

Content-Length: 20

Connection: close

Content-Type: text/html; charset=UTF-8


....................




실제 요청


POST /block/block/ HTTP/1.1

Host: gall.dcinside.com

Connection: keep-alive

Content-Length: 244

Accept: */*

Origin: http://gall.dcinside.com

X-Requested-With: XMLHttpRequest

User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36

Content-Type: application/x-www-form-urlencoded; charset=UTF-8

Referer: http://gall.dcinside.com/board/write/?id=anigallers_new

Accept-Encoding: gzip, deflate

Accept-Language: ko-KR,ko;q=0.8,en-US;q=0.6,en;q=0.4

Cookie: semanticrep_ctorta=; PHPSESSID=kcefije7nio3o1araesp4u0cs7; notice_no=12083; __utmt=1; ci_c=a418743dbce21bc8d046390b6024a918; lately_cookie=anigallers_new|%uB514%uC2DC%uC560%uAC24%uB7EC%uC2A4|8@@idolmaster|%uC544%uC774%uB3CC%uB9C8%uC2A4%uD130|18; __utma=118540316.280915939.1420385148.1420453708.1420552631.5; __utmb=118540316.4.10.1420552631; __utmc=118540316; __utmz=118540316.1420392648.3.2.utmcsr=gall.dcinside.com|utmccn=(referral)|utmcmd=referral|utmcct=/board/view/


ci_t=a418743dbce21bc8d046390b6024a918&id=anigallers_new&block_key=7fbed275e18b6af76bebd2b04585256e489631990288a65110db969b4a87e49f9688227587323dde92fccf87852038f4c610ce45538cb5d52a1f6e7da65af7b273e673fc6c35c2553e1e3f9b950f778e590379893adaf98b8f


응답


HTTP/1.1 200 OK

Date: Tue, 06 Jan 2015 14:03:04 GMT

Server: Apache

Set-Cookie: ci_c=a418743dbce21bc8d046390b6024a918; expires=Tue, 06-Jan-2015 16:03:04 GMT; path=/

Vary: Accept-Encoding,User-Agent

Content-Encoding: gzip

Content-Length: 249

Connection: close

Content-Type: text/html; charset=UTF-8


..........

P.

.@.[.v.q...#..%w......t..f|..> ...z{.....7I.....Q..;<..

_L..D.l.4......+./.Cd.

..l,w.).z..~4c.W#<.<@.V..T....s....

.%......a.......+.q..^.....F.7...^yB...g...UmSD..>.,.4N..n7....$..A....x..H~;. ..|.+!6..pz..R..y.T.L...w..!4>..K.......





내 요청에는 정상적으로 리퀘스트가 돌아오지 않는데, 왜 요지경인지 모르겠다 ㅡㅡ