Automatic submission of forms with VB

zhaozj2021-02-16  53

【sequence】

Taking Motorola's September Grand Prix as an example, the following describes the automatic submission of web forms with VB to implement the verification code. We now look at Motorola's voting page: http://www.motorola.com.cn/news/925/photo.asp? Id = {525147E1-C4A7-41EE-9190-95800AC81E29}

If you want to vote for the user, you must fill in the verification code! Since the verification code is a picture, it is then, it has increased a lot of difficulty for automatic submission data. Therefore, if you want to submit a vote, you must get the verification code first!

Difficulties: (1) obtain the verification code image and identify the corresponding data; (2) Submit the data form.

First let's analyze the HTML source code on this page, the code is as follows:

...

Please enter the four digit verification code:

...

In order to ensure the readability of the code, the corresponding processing is performed, and some useless code is omitted! It is not difficult to see:

(1) The name of the form is: Form1; submitted page is: Photo_vote.asp; Submit mode: POST (2) form submitted data is: ID and Checkcode. Where id is a hidden field, the content is: {525147E1-C4A7-41EE-9190-95800AC81E29} (3) codes the image file: count.asp sksid = 624BE861D1FF9641DE7F1D1FF967C1E711D1FF95CD5E9B1D1FF9 | 3812D0 | 1AF2D7 which is dynamically generated by Count.asp then? , There is uncertainty! (4) Press the right button on the image of the validation code of the web page to save the picture as: count.xbm is the format of the image: XBM

With the above analysis, the problem can be solved one. [Submission of forms]

There are several ways to submit the form, there are two commonly used: First, the URL directly submitted to the form of the form; the other is to modify the original form, then submit new data! For the first, we can send this later after getting the verification code: http://www.motorola.com.cn/news/925/photo_vote.asp? Id = {525147E1-C4A7-41EE-9190-95800AC81E29} & checkcode = 6793 However, because Motorola's website is working on cookies, it is not very good, and it is difficult to succeed, so we directly switch to the second method to modify the original form. First, use the WebBrowers control to get a web source code (for specific methods, please refer to: http://www.cndevx.com/tips/showdoc.asp? Detail_ID = 1337) Modify the original form page code using the Replace function in the VB : ...

Please enter 4 digit verification code: