Home > Net >  Ask questions about c # simulation log in the website
Ask questions about c # simulation log in the website

Time:11-17

Because I recently in a small module, need data in the PC client display site (for safety management, computer banned on the Internet, so can't from the login page)
I have done a lot of way, can't test is complete, have come to the great god please help to look at, how do I use the program to achieve?
Normal landing to get 2 sets of data:
Get to the first group of data
 GET http://ling. * * * * *. Com/security/publicKey? HTTP/1.1 _=1561168711477 
Host: ling. * * * * * *. Com
Connection: keep alive -
Accept: application/json, text/javascript, */*; Q=0.01
X - Requested - With: XMLHttpRequest
The user-agent: Mozilla/5.0 (Windows NT 6.1; Win64. X64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3767.0 Safari/537.36
Token: 6 e4f2670 c53 - af0f - 290-66 - c7-4 ae45d82e5
Referer: http://ling. * * * * * t.com/
The Accept - Encoding: gzip, deflate
The Accept - Language: en - US, en; Q=0.9, useful - CN; Q=0.8, useful; Q=0.7, useful - TW; Q=0.6
Cookie: token=6 e4f2670 c53 - af0f - 290-66 - c7-4 ae45d82e5; Hm_lvt_39a4a93d9150c2e864125e74931e5107=1561104296156111, 362156115, 798156168, 711; Hm_lpvt_39a4a93d9150c2e864125e74931e5107=1561168711



Official POST login data
 POST http://ling. * * * * * *. Com/security/login HTTP/1.1 
Host: ling. * * * * * *. Com
Connection: keep alive -
The Content - Length: 243
Accept: application/json, text/javascript, */*; Q=0.01
Origin: http://ling. * * * * * *. Com
X - Requested - With: XMLHttpRequest
The user-agent: Mozilla/5.0 (Windows NT 6.1; Win64. X64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3767.0 Safari/537.36
Token: 6 e4f2670 c53 - af0f - 290-66 - c7-4 ae45d82e5
The content-type: application/x - WWW - form - urlencoded; Charset=utf-8
Referer: http://ling. * * * * * *. Com/
The Accept - Encoding: gzip, deflate
The Accept - Language: en - US, en; Q=0.9, useful - CN; Q=0.8, useful; Q=0.7, useful - TW; Q=0.6
Cookie: token=6 e4f2670 c53 - af0f - 290-66 - c7-4 ae45d82e5; Hm_lvt_39a4a93d9150c2e864125e74931e5107=1561104296156111, 362156115, 798156168, 711; Hm_lpvt_39a4a93d9150c2e864125e74931e5107=1561168711; F4f JSESSIONID=4745 c3 db1a - 93-4-8 f12-4 a5d55a47892

The userName=UserID& Password=sKqyBiivodUFxdnjJ7VE7RQZQXgkCKbb % 2 flssekka1inrk261qonxxwgxui4vqbgcgekrsonoe % 2 bvmwtmjuj8yzguxl2voc1j2wrolbxsx4uzundhepv2ofnrtmja % 3 d & amp; RememberMe=false& LoginType=PWD



My code
 long Untime=new DateTimeOffset (DateTime. UtcNow). ToUnixTimeSeconds ();//
String GEUrl="HTTP://http://ling. * * * * * *. Com/security/publicKey? _="+ Untime;
Label1. Text=GEUrl;
TextBox1. Text="UserID";
TextBox2. Text="sKqyBiivodUFxdnjJ7VE7RQZQXgkCKbb % 2 flssekka1inrk261qonxxwgxui4vqbgcgekrsonoe % 2 bvmwtmjuj8yzguxl2voc1j2wrolbxsx4uzundhepv2ofnrtmja % 3 d".

HttpHeader header=new HttpHeader ();
The header. The accept="application/json, text/javascript, */*; Q=0.01 ";
Header. The contentType="application/x - WWW - form - urlencoded";
The header. The method="POST";
The header. UserAgent="Mozilla/5.0 (Windows NT 6.1; Win64. X64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3767.0 Safari/537.36 ";
The header. MaxTry=300;

String HTML=HTMLHelper. GetHtml (HTMLHelper GetCooKie (" http://ling. * * * * * *. Com/security/login ", "userName=" + textBox1. Text + "& amp; Password="+ textBox2. Text +" & amp; RememberMe=false& LoginType=PWD ", the header), "http://ling. * * * * * *. Com/express/waybill/list", the header);

Console. WriteLine (HTML);
Console.ReadLine();
}

CookieContainer mycookie=new CookieContainer ();

CodePudding user response:

Because I recently in a small module, need data in the PC client display site (for safety management, computer banned on the Internet, so can't from the login page)

Closure of the port or IP,

CodePudding user response:

Computer is prohibited on the Internet, so can't from web log in??

Is not from the browser login
, and your code is from the login page,,,
See half a day I didn't understand what the problem now?
  • Related