今天你吹牛逼了吗------cookie 怎么获取?
当然这个cookie是经过加密的数据,网上已经有解密算法,自行搜索,如果这个cookie被人劫持是不是很刺激?
Python.Execute(
"import sqlite3,win32crypt
fp= 'C:/Users/Administrator/AppData/Local/Google/Chrome/User Data/Default/Cookies'
con = sqlite3.connect(fp)
cursor = con.cursor()
sql = 'SELECT host_key, name,value,encrypted_value FROM cookies WHERE host_key="".qq.com"";'
a=[]
try:
if cursor.execute(sql):
for en_value in cursor:
pwdHash = en_value[3]
if pwdHash:
ret = win32crypt.CryptUnprotectData(pwdHash, None, None, None, 0)
a+=[bytes.decode(ret[1])]
except Exception as e:
print(e)
M=pandas.DataFrame(a)
")
from selenium import webdriver
driver = webdriver.Chrome()
driver.get('https://baidu.com')
cookie = driver.get_cookies()
driver.quit()
道高一尺 魔高一丈
https://pbihub.cn/users/44
自由转载-非商用-非衍生-保持署名(创意共享3.0许可证)