C # written Sheng (Shanda company) Recharge Card Status Query instance

Source: Internet
Author: User

Today there is such a demand, request to be able to inquire Sheng card status, the official website below http://www.801335.com/status/index.htm

Just opened the URL, found two input box plus a verification code, the heart is not a small case verification code no paste and no how to deformation extremely easy, 352 under the recognition finished the correct rate is good, 90+%.

Verification code made, began to grasp the bag, and then Meng, found that his data seems to be encrypted, first on a picture

Looking back, carefully looked at his interface, found a trick, his card number and password entered the place is the Flash uestextinput-1.4.swf filename is this, and then looked, his JS code found a few key lines

Get encryption Key

var EncryptedKey = document.getElementById (Swfobjid). Getkey ($ ("#base64Cert"). Val ());

$ ("#" +keyeleid). Val (EncryptedKey);

Get Encrypted data

var EncryptedData = document.getElementById (Swfobjid). GetValue ();

$ ("#" +dataeleid). Val (EncryptedData);

It turns out that he encrypted the input text through flash and then assigns it to the input box. Now that I know his reality, I'm going to have a train of thought.

Programme I

C # calls Flash's COM component to implement, by simulating the keyboard to enter the card number and password to achieve encryption and bulk search. The concrete realization is not spoken here,

The program is running up, but there was a problem. In the case of multithreading, flash encryption There is a problem, can not sync, no way, you do not sync I give you sync it, add a synchronization mechanism, you can have no problem one is a Ishi, but after synchronization, the speed of the query down, almost 1-2 seconds to check a card, Grandma's unbearable, or I hand-check faster, no way is the revolution did not succeed, or continue

Programme II

You are not using the Flash encryption you add the password is not done in the client, as long as it is done on the client I do not believe I take you have no way, hehe, after several years of development accumulation, nothing, some is the accumulation of small tools,

Flash Yes, I have a few n years ago, some of the flash-elf use to try

A more ancient version, it doesn't matter, as long as you can send a field on the line ....

Oh, what came out, now to do is A3 code into our lovely C # code, it's all done

In fact, the need to rewrite the method is only two, just above is JS tune the two

Getkey GetValue on these two, rewrite the code will not be pasted, and finally the effect of the software on the picture

Open 10 threads, speed of the lever of .....

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.