pycurl2 [Python] 멀티 프로세스,멀티 쓰레드 예제코드 import struct import time import threading import pycurl import re import os from StringIO import StringIO from multiprocessing import Process,current_process,Pool,freeze_support up= lambda x:struct.unpack("L",x) #Little Endian class KMS(threading.Thread): def __init__(self): threading.Thread.__init__(self) def run(self): print "Call Thread" def mp(number): #proc_name = current_process().name re.. 2018. 7. 16. [Python] pycurl 예제 urllib , pycurl , requests로 벤치마킹한 결과 장점으로는 매우빠른 속도가 있다. #!/usr/bin/python from base64 import * import StringIO import pycurl import time print "Start!" curl = pycurl.Curl() attackurl="http://www.naver.com" SC = StringIO.StringIO() header= ["Cookie:data=1234"] curl.setopt(pycurl.URL, attackurl) curl.setopt(pycurl.HTTPHEADER, header) curl.setopt(pycurl.WRITEFUNCTION, SC.write) curl.setopt(pycurl.F.. 2015. 6. 4. 이전 1 다음 반응형