Cainiao use C # to log on to srun3000

Source: Internet
Author: User

First, you need a packet capture tool.

I am using Firefox firebug.

With the packet capture tool, We can click srun3000,

Open your firebug tool and click "network" and "all"

Of course, if there is something in the blank area below, click "clear ".

Enter your username and password, and click log on. A request is displayed in the blank area.

This is the request we want to simulate. Click it,

The source code is a string consisting

Username = "input username" & Password = "MD5 encrypted 16-bit password" & Drop = 0 & type = 1 & n = 100

For example

The user name you entered is 110110, And the password is 000000

Source code is

username=110110&password=8ad9902aecba32e2&drop=0&type=1&n=100

000000 after encryption, it is 8ad9902aecba32e2.

Then copy your source code, called data

Next, run the code, and then follow the comments in the code.

Using system; using system. collections. generic; using system. LINQ; using system. text; using system. threading. tasks; using system. io; using system. net; namespace for everyone to play srun3000 {class program {static void main (string [] ARGs) {httpwebrequest myreq = (httpwebrequest) webrequest. create ("http: // 10.0.0.55/cgi-bin/do_login"); myreq. method = "Post"; stream mystream = myreq. getrequeststream (); string data = "xxxxxxxxxxxxxxxxxx"; // copy your data to the preceding string byte [] bytedata = encoding. default. getbytes (data); mystream. write (bytedata, 0, bytedata. length); mystream. close (); httpwebresponse myresponse = (httpwebresponse) myreq. getresponse (); streamreader myreader = new streamreader (myresponse. getresponsestream (); string ret = myreader. readtoend ();}}}

Compile the file in Vs, put the generated EXE executable file into the startup Item, find the Startup folder in the Start menu, and enter the EXE shortcut to start the file on your own.
Used by cainiao

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.