当前位置:网站首页>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
边栏推荐
- 下推分析的限制
- Solve the problem that CSDN cannot publish blog due to unknown copyright
- Cs61abc sharing session (VI) detailed explanation of program input and output - standard input and output, file, device, EOF, command line parameters
- 207.课程表
- Jianmu continuous integration platform v2.5.2 release
- Unity - default rendering pipeline - sculpt shader
- Resize2fs: bad magic number in super block
- Realize the effect of changing some colors of a paragraph of text
- Blue Bridge Cup group a selection XOR
- [freeze electron microscope] analysis of the source code of the subtomogram alignment function of relion4.0 (for self use)
猜你喜欢
![[cryptography experiment] 0x00 install NTL Library](/img/2a/03d95082a2a63238b475b3f7f3e13d.png)
[cryptography experiment] 0x00 install NTL Library

Amaze UI icon query

@Use of jsonserialize annotation

Compare three clock circuit schemes of single chip microcomputer
![[paper reading | cryoet] gum net: fast and accurate 3D subtomo image alignment and average unsupervised geometric matching](/img/dc/255bf122d5243f2a08ca0e03b53137.png)
[paper reading | cryoet] gum net: fast and accurate 3D subtomo image alignment and average unsupervised geometric matching

The new colleague wrote a few pieces of code, broke the system, and was blasted by the boss!

How to connect VMware virtual machine to external network under physical machine win10 system
![[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

Go 事,如何成为一个Gopher ,并在7天找到 Go 语言相关工作,第1篇

UE4 highlight official reference value
随机推荐
Output 1234 three digits without repetition
Explanation and closing method of server 135, 137, 138, 139, 445 and other ports
String class
Jiamusi Market Supervision Bureau carried out special food safety network training on epidemic and insect prevention
Unity beginner 4 - frame animation and protagonist attack (2D)
Better performance and simpler lazy loading of intersectionobserverentry (observer)
CDM - code division multiplexing (easy to understand)
Joseph Ring problem
C language interview preparation I (about understanding Department)
Blue Bridge Cup group a selection XOR
UE4 highlight official reference value
What is the use of chat robots? What type? After reading these, you will understand!
[cryoelectron microscope | paper reading] a feature guided, focused 3D signal permutation method for subtogram averaging
[flask introduction series] installation and configuration of flask Sqlalchemy
Do you want to meet all the needs of customers
Cs61abc sharing session (VI) detailed explanation of program input and output - standard input and output, file, device, EOF, command line parameters
Ansible (automation software)
黑盒测试常见错误类型说明及解决方法有哪些?
Unity beginner 3 - enemy movement control and setting of blood loss area (2D)
Convert source package to RPM package