Skip to content

Commit

Permalink
Enable login with phone number.
Browse files Browse the repository at this point in the history
  • Loading branch information
伪红学家 committed Jan 3, 2017
1 parent 8774b49 commit f08e9c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion BaiduOldDriver/NetDisk/Authentication.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public static LoginResult Login(string username, string password, LoginCheckResu
{
wc.Cookies.Add(checkResult.baiduid);
var ltoken = checkResult.ltoken;
var lstr = "token=" + ltoken + "&tpl=netdisk&username=" + Uri.EscapeDataString(username) + "&password=" + Uri.EscapeDataString(password);
var lstr = "loginmerge=true&token=" + ltoken + "&tpl=netdisk&username=" + Uri.EscapeDataString(username) + "&password=" + Uri.EscapeDataString(password);
if (checkResult.needVCode) lstr += "&codestring=" + checkResult.codeString + "&verifycode=" + Uri.EscapeDataString(checkResult.verifyCode);
wc.Headers.Add(HttpRequestHeader.ContentType, "application/x-www-form-urlencoded");
var str = Encoding.UTF8.GetString(wc.UploadData("https://passport.baidu.com/v2/api/?login", Encoding.UTF8.GetBytes(lstr)));
Expand Down

0 comments on commit f08e9c9

Please sign in to comment.