When Curl touches the SWF.

Source: Internet
Author: User
When curl bumps into SWF ...
This post was last edited by phpnewnew on 2012-11-24 17:27:31

Just came back, yesterday, called a friend to help deal with a simulated login to read the data things.

Of course grab the bag ... Code Curl ... Verification Code (recognition rate 70%, need to be improved) ... Submit data

Finally analyzing the page data discovery, the page reads a movie. That is SWF. The SWF then returns a new passwd to the verification page based on the form's username passwd validatecode (verification code). For example, what you entered in input passwd was 12345.
After treatment, it could be AABBCCDD.

So. When Curl meets SWF. I would like to ask if you have dealt with this situation? Or what method should be used to solve the better?
The page has to execute the following JS code

New String (Thismovie ("secrecy"). Str_encrypt (Username,passwd,validatecode)). Split (",");
...

document.form_login["passwd"].value=t_array[1];//here to rewrite the value of the page


Now that's the problem, how curl triggers the event and gets the t_array[1] data right.
Before you can post.

If not, you can only use the desktop tool to solve the problem ...


------Solution--------------------
It's too hard, I can't conquer
------Solution--------------------
1. Curl can specify a callback function to handle the dynamic data in the interactive process in an integrated way
2, the commonly used methods are:
A, for the verification code, in the premise of saving the other party's cookie, read the verification code image to be manually identified and carry cookies re-entered
B, the client to execute the JS script, get the results after carrying cookies re-entry
3. Although JS scripts may be executed on the server side, there is no guarantee that the SWF will be loaded and run
------Solution--------------------
Only when the soy sauce.
------Solution--------------------

Totally don't know ...
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.