百度图片objURL解密vb.net版

时间:2024-07-20 22:36:08
     Function Baidtu_Uncomplie(k As String) As String
Dim c = {"_z2C$q", "_z&e3B", "AzdH3F"}
Dim d = New Dictionary(Of String, String) From {{"w", "a"}, {"k", "b"}, {"v", "c"}, {"", "d"}, {"j", "e"}, {"u", "f"}, {"", "g"}, {"i", "h"}, {"t", "i"}, {"", "j"}, {"h", "k"}, {"s", "l"}, {"", "m"}, {"g", "n"}, {"", "o"}, {"r", "p"}, {"q", "q"}, {"", "r"}, {"f", "s"}, {"p", "t"}, {"", "u"}, {"e", "v"}, {"o", "w"}, {"", ""}, {"d", ""}, {"n", ""}, {"", ""}, {"c", ""}, {"m", ""}, {"", ""}, {"b", ""}, {"l", ""}, {"a", ""}, {"_z2C$q", ":"}, {"_z&e3B", "."}, {"AzdH3F", "/"}}
If String.IsNullOrEmpty(k) AndAlso k.Contains("http") Then Return k
Dim j = k
For Each value In c
j = j.Replace(value, d(value))
Next
Dim arr = j.ToCharArray
Dim i =
For Each v In arr
If Regex.IsMatch(v, "^[a-w\d]+$") Then arr(i) = d(v)
i +=
Next
Return arr
End Function

调试

Debug.Print(Baidtu_uncomplie("ippr_z2C$qAzdH3FAzdH3Ft42f6v_z&e3Bkwt17_z&e3Bv54AzdH3Ft42w1AzdH3FrtvAzdH3Ftpj4AzdH3Ful1v18aakww8v188jvuccwankn8dvbuvvnvjd1cc_z&e3B3r2"))