MasterofProject

.Net achieve real download address with the thunder, QQ tornado download address conversion

523 people read comment(0) Collection Report
Classification:
String Index public ()
{
Sb StringBuilder = StringBuilder new ();
OrgStr= http://down.qq.com/ava/full/W_full/AVA_Client_Ver_1230_full.exe "string";
ThunderStr= thunder://QUFodHRwOi8vZG93bi5xcS5jb20vYXZhL2Z1bGwvV19mdWxsL0FWQV9DbGllbnRfVmVyXzEyMzBfZnVsbC5leGVaWg== "string";
QQdlStr= qqdl://aHR0cDovL2Rvd24ucXEuY29tL2F2YS9mdWxsL1dfZnVsbC9BVkFfQ2xpZW50X1Zlcl8xMjMwX2Z1bGwuZXhl "string";
FlashGetStr= flashget://W0ZMQVNIR0VUXWh0dHA6Ly9kb3duLnFxLmNvbS9hdmEvZnVsbC9XX2Z1bGwvQVZBX0NsaWVudF9WZXJfMTIzMF9mdWxsLmV4ZVtGTEFTSEdFVF0=& "string";
String orgAddr = GetOriginalString (QQdlStr); / /.
Sb.AppendFormat ("{0}<br>", orgAddr);
ThunderAddr string = "AA" + orgAddr + "ZZ";
ThunderAddr = "thunder://" + EncodeBase64 (thunderAddr);
Sb.AppendFormat ("{0}<br>", thunderAddr);
QqdlAddr string = "qqdl://" + EncodeBase64 (orgAddr);
Sb.AppendFormat ("{0}<br>", qqdlAddr);
FlashGetAddr string = string.Format ("{0}{1}{0}", "[FLASHGET]", orgAddr);
FlashGetAddr = "flashget://" + EncodeBase64 (flashGetAddr) + "&"";
Sb.AppendFormat ("{0}<br>", flashGetAddr);
Sb.ToString return ();
}
String EncodeBase64 public (orgStr string)
{
Try
{
Convert.ToBase64String return (Encoding.Default.GetBytes (orgStr));
}
Catch
{
Return"";
}
}
String DecodeBase64 public (encodeStr string)
{
Try
{
Encoding.Default.GetString return (Convert.FromBase64String (encodeStr));

}
Catch
{
Return"";
}
}

String GetOriginalString public (STR string)
{
ThunderPrefix= thunder:// "string";
QqdlPrefix string = "qqdl://";
FlashgetPrefix string = "flashget://";
If ("http://") ("str.StartsWith") ||str.StartsWith ("https://")
{
STR return;
}
If else (str.StartsWith (thunderPrefix))
{
String thunderAddr = str.Substring (thunderPrefix.Length); / / remove prefix
ThunderAddr = DecodeBase64 (thunderAddr); //base64 decoding
ThunderAddr = thunderAddr.Substring (2, thunderAddr.Length - 4); / / remove the first two A, two Z
ThunderAddr return;
}
If else (str.StartsWith (qqdlPrefix))
{
QqdlAddr string = str.Substring (qqdlPrefix.Length);
QqdlAddr = DecodeBase64 (qqdlAddr); //base64 decoding
QqdlAddr return;
}
If else (str.StartsWith (flashgetPrefix))
{
FlashgetAddr string = str.Substring (flashgetPrefix.Length);
FlashgetAddr = flashgetAddr.Substring (0, flashgetAddr.Length-1); / / remove the last & No.
FlashgetAddr = DecodeBase64 (flashgetAddr);
FlashgetAddr = flashgetAddr.Substring (10, flashgetAddr.Length-20); / / get rid of before and after [FLASHGET]
FlashgetAddr return;
}
Return"";
}


top
Zero
step on
Zero
Guess you're looking for
View comments
* the above user comments only represent their personal views, does not represent the views or position of the CSDN website
    personal data
    • Visit390742 times
    • Integral:Six thousand three hundred and four
    • Grade
    • Rank:2029th name
    • Original236
    • Reproduced:18
    • Translation:11
    • Comments:121
    Site search
    Latest comments