Today there is a need to be able to query the status of Sheng card, the official website is as follows Http://www.801335.com/status/index.htm
Just opened the URL, found two input box plus a verification code, the heart is not small case verification code does not paste nor how deformation extremely easy, 352 under the recognition of the correct rate is good, 90+%.
Verification code to do the hair, start to grab the bag, a bit on the Meng, found that his data seems to be encrypted, first on a picture
After looking back, he carefully looked at his interface, found the trick, his card number and password input place is the Flash uestextinput-1.4.swf filename is this, and then looked at, his JS code found the key few 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);
Originally, he used flash to encrypt the input text and then assign it to 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 encryption and batch checking by simulating the keyboard to enter the card number and password. Concrete implementation here don't talk about that
The program was running up, but found a problem. In the case of multi-threaded, flash encryption There is a problem, can not sync, no way, you do not sync I sync it, add a synchronization mechanism, can be no problem one is a pull, but after synchronization, the speed of the query down, almost 1-2 seconds to check a card, Grandma can not stand, as I do Manual check fast, no way is the revolution did not succeed, or continue
Programme II
You do not use the Flash encryption you add the password again is not done in the client, as long as it is done on the client I do not believe I take you no way, hehe, after several years of development and accumulation, nothing, and some is the accumulation of small tools,
Flash Yes, I used to have some of the flashing elves I've been trying to do.
Compared to a version of the old, it doesn't matter, as long as you can send a field on the line ....
Oh, what's out, now to do is A3 code into our cute C # code, it's all done
Actually need to rewrite the method also only two, just above is JS tune of those two
GetKey GetValue on these two, rewrite the code will not post, and finally on the software
Open 10 threads, the speed of the lever .....
--Happy Sea
Blog Address: http://www.cnblogs.com/ningqhai/
C # Implementation of Shanda Sheng prepaid card status query