Home > other >  Python climb B station CSRF verification failure, have a great god can dispel doubts?
Python climb B station CSRF verification failure, have a great god can dispel doubts?

Time:09-15

Small white one test station comments sent B
Found that no matter how make are check failure


Directly on the code, hope to have a great god gives directions


 

The import requests
The import time
Import the random

The class SendDate:
Def __init__ (self) :
The self. The url='https://api.bilibili.com/x/v2/reply/add'
The self. The cookie={' cookies' : "_uuid=18 b49ef2-6260-3 b62 A2B4-3 ceaa20b45fc43463infoc; Buvid3=76 b9c6cb d30-9028-248 - f - 4 - D0B5B6E9DBF3155834infoc; LIVE_BUVID=AUTO1415743181463309; Sid=j8opiv58; CURRENT_FNVAL=16; Stardustvideo=1; Rpdid=| (J ~ R ~ | m ~ mml0J 'ul ~ llulYRY; Im_notify_type_483881790=0; Im_notify_type_483899016=0; Im_notify_type_501743820=0; CURRENT_QUALITY=64; DedeUserID=370642657; DedeUserID__ckMd5=d9343ff9801f4069; SESSDATA=https://bbs.csdn.net/topics/a8454499%2C1583397856%2C7412c021; Bili_jct=a9c61e9f957cc34271b86c75cc0f8cf5; Im_notify_type_370642657=0}
"The self. The header={' the user-agent ':' Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.87 Safari/537.36 '}
Def Send (self, dat) :

Self. HTML=requests. Post (self. Url, json=dat, headers=self. The headers, cookies=self. The cookie)

Print (self. HTML. Status_code)
Print (self) HTML) text)






The send=SendDate ()

Dat={
'the oid', '22119850',
'type' : '1',
'message' : 'stick',
'platt,' : '1',
'the json' : 'the json,
'CSRF' : 'a9c61e9f957cc34271b86c75cc0f8cf5'}

Send. Send (dat)


CodePudding user response:

With q, code and the others, others will be a problem, to me it's CSRF check failure
  • Related