当前位置:网站首页>Use the cloud code to crack the problem of authentication code encountered during login
Use the cloud code to crack the problem of authentication code encountered during login
2022-07-29 07:59:00 【Zhao [email protected]】
Cloud code address :
Crawl the target website , It is an ancient poetry website https://so.gushiwen.org/user/login.aspx?from=http://so.gushiwen.org/user/collect.aspx
Yunda code is a coding platform ,
Yunda code usage process
- register : Ordinary developers and users
- Sign in :
1 . Normal user login : Query whether the user has any remaining points
2 . Developer login :
- Create a software ,: My documents –》 Add software first –》 Enter the software name –》 Submit (appid and appkey)
- Download sample code ,: Developing documents –》 Click to download : Cloud coding interface DLL–》PythonHTTP Sample download
Custom functions in code blocksloginInsideemailandpwdIs the login account and password , You can log in to your own user account , To climb , Be careful :: Certain points will be deducted for each crawl , How much to deduct There are certain regulations :http://www.yundama.com/price.htmlThis is the link to the price list of points , You can get to know !
by the way ! The other thing is that , When logging in again, you must create a session , Otherwise, the code will be written again No Problem**! All are single , Be sure to carry cookie To visit ,
# -*- coding = utf-8 -*-
#@time :2020/5/18 13:39
#Author :Song
#@file Ancient poetry network verification code identification .py
#@Software: PyCharm
# Download the verification code image to the local
import requests
from fake_useragent import UserAgent
from lxml import etree
from webspider.day18.verification_code import get_code
def indexHTML(s):
url ="https://so.gushiwen.org/user/login.aspx?from="
r =s.get(url=url,headers={
"User-Agent":UserAgent().chrome})
return r.text
def download_image(html,s):
tree = etree.HTML(html)
# Gets the captcha image
image_src =tree.xpath('//*[@id="imgCode"]/@src')[0]
# A complete mosaic image url
image_url ="https://so.gushiwen.org" + image_src
r =s.get(url=image_url,headers={
"User-Agent":UserAgent().random})
with open("yzm.png","wb")as fp:
fp.write(r.content)
code =get_code("yzm.png",1004)
print(code)
# print(code)
# Command parsing
viewstate = __VIEWSTATE = tree.xpath('//*[@id="aspnetForm"]/div[1]/input/@value')[0]
viewstategenerator = __VIEWSTATEGENERATOR =tree.xpath('//*[@id="aspnetForm"]/div[2]/input/@value')[0]
# print(viewstategenerator)
# print(viewstate)
return code,viewstate,viewstategenerator
def login(code,viewstate,viewstategenerator,s):
post_url="https://so.gushiwen.org/user/login.aspx?from="
formdata={
"__VIEWSTATE":viewstate,
"__VIEWSTATEGENERATOR":viewstategenerator,
"from":"",
"email":"**********",
"pwd":"**********",
"wasd":"",
"code":code,
"denglu":" Sign in ",
}
r =s.post(url=post_url,headers={
"User-Agent":UserAgent().chrome},data=formdata)
# print(r.text)
with open("gs.html","w",encoding="utf8")as fp:
fp.write(r.text)
def main():
# Create a session , To log in
s =requests.Session()
# The ancient poetry website did not log on to the previous page , Get page information , To download the verification code image
html = indexHTML(s)
# Download verification code ,
code,viewstate,viewstategenerator = download_image(html,s)
# Sign in
login(code,viewstate,viewstategenerator,s)
if __name__ == '__main__':
main()
版权声明
本文为[Zhao [email protected]]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/210/202207290520357902.html
边栏推荐
- Very practical shell and shellcheck
- CentOS deploy PostgreSQL 13
- Sqlmap (SQL injection automation tool)
- Vmstat memory consumption query
- IonIcons图标大全
- [note] the art of research (understand the importance of the problem)
- Pytorch's skill record
- Ionicons icon Encyclopedia
- [paper reading | cryoelectron microscope] interpretation of the new subtomogram averaging method in relion 4.0
- The new generation of public chain attacks the "Impossible Triangle"
猜你喜欢

Compare three clock circuit schemes of single chip microcomputer
![[WPF] realize language switching through dynamic / static resources](/img/23/1e089ce4a07128323824b25897a8c4.png)
[WPF] realize language switching through dynamic / static resources
![[introduction to cryoelectron microscopy] Caltech open class course notes part 3:image formation](/img/7b/cbd9e3b6d72155613e53ffdd06c5cd.png)
[introduction to cryoelectron microscopy] Caltech open class course notes part 3:image formation

技术分享| 快对讲综合调度系统
![[cryoelectron microscope | paper reading] a feature guided, focused 3D signal permutation method for subtogram averaging](/img/50/594dfc9affbcca97166d475fe09ad3.png)
[cryoelectron microscope | paper reading] a feature guided, focused 3D signal permutation method for subtogram averaging

10 practical uses of NFT

Dynamic thresholds buffer management in a shared buffer packet switch paper summary

MySQL uses date_ FORMAT(date,'%Y-%m')

How to connect VMware virtual machine to external network under physical machine win10 system

How to draw an excellent architecture diagram
随机推荐
Ionicons icon Encyclopedia
Exercise: store department information
输出1234无重复的三位数
Useful websites
Implementation of simple cubecap+fresnel shader in unity
State machine DP 3D
[cryoelectron microscope | paper reading] emclarity: software for high-resolution cryoelectron tomography and sub fault averaging
Data unit: bit, byte, word, word length
[experience] relevant configuration of remote connection to intranet server through springboard machine
Day 014 二维数组练习
Output 1234 three digits without repetition
Amaze UI 图标查询
Mutationobserver document learning
UE4 highlight official reference value
Vmstat memory consumption query
[paper reading | cryoet] gum net: fast and accurate 3D subtomo image alignment and average unsupervised geometric matching
How to draw an excellent architecture diagram
In the MySQL connector of flynk CDC, the MySQL field is varbinary, which is officially
Better performance and simpler lazy loading of intersectionobserverentry (observer)
[cryptography experiment] 0x00 install NTL Library