aHref 值是可以使用 TripAdvisor asdf() Javascript 函数解密的加密 URL。例如,使用 Firefox 中的 Javascript 控制台,在 www.tripadvisor.com 上键入以下内容:
console.log(asdf('加密的 URL'));
一个例子:
console.log(asdf('LqMWJQzZYUWJQpEcYGII26XombQQoqnQQQQoqnqgoqnQQQQoqnQQQQoqnQQQQoqnqgoqnQQQQoqnQQuuuQQoqnQQQQoqnxioqnQQQQoqnQQEitVuiiMqxQQoqnQQQQoqnxioqnQQQQoqnQQniaQQoqnQQQQoqnqgoqnQQQQoqnQQVCQQoqnQQQQoqnqgoqnQQQQoqnQQIGVQQoqnQQQQoqnqHoqnQQQQoqnQQnJEcgcVQQoqnQQQQoqnqHoqnQQQQoqnQQCVuQQoqnQQQQoqnqHoqnQQQQoqnQQgiE9QQoqnQQQQoqnqgoqnQQQQoqnQQMSCSCyQQoqnQQQQoqnqgoqnQQQQoqnQQHVaVcaJCtQQoqnQQQQoqnqHoqnQQQQoqnQQHJEWJQzhYUMo3JKHkmKnVmJVdUB'));
给出以下内容(附加到http://tripadvisor.com):
/ShowUrl-a_partnerKey.1-a_url.http%253A__5F____5F__2F__5F____5F____5F____5F__2F__5F____5F__www__5F____5F__2E__5F____5F__rosewoodhotels__5F____5F__2E__5F____5F__com__5F____5F__2F__5F____5F__en__5F____5F__2F__5F____5F__the__5F____5F__2D__5F____5F__carlyle__5F____5F__2D__5F____5F__new__5F____5F__2D__5F____5F__york__5F____5F__2F__5F____5F__dining__5F____5F__2F__5F____5F__bemelmans__5F____5F__2D__5F____5F__bar-a_urlKey.1d56a0b730ce3ae41.html
TripAdvisor asdf() 函数的来源:
function asdf(d) {
var h = {
"": ["&", "=", "p", "6", "?", "H", "%", "B", ".com", "k", "9", ".html", "n", "M", "r", "www.", "h", "b", "t", "a", "0", "/", "d", "O", "j", "http://", "_", "L", "i", "f", "1", "e", "-", "2", ".", "N", "m", "A", "l", "4", "R", "C", "y", "S", "o", "+", "7", "I", "3", "c", "5", "u", 0, "T", "v", "s", "w", "8", "P", 0, "g", 0],
q: [0, "__3F__", 0, "Photos", 0, "https://", ".edu", "*", "Y", ">", 0, 0, 0, 0, 0, 0, "`", "__2D__", "X", "<", "slot", 0, "ShowUrl", "Owners", 0, "[", "q", 0, "MemberProfile", 0, "ShowUserReviews", '"', "Hotel", 0, 0, "Expedia", "Vacation", "Discount", 0, "UserReview", "Thumbnail", 0, "__2F__", "Inspiration", "V", "Map", ":", "@", 0, "F", "help", 0, 0, "Rental", 0, "Picture", 0, 0, 0, "hotels", 0, "ftp://"],
x: [0, 0, "J", 0, 0, "Z", 0, 0, 0, ";", 0, "Text", 0, "(", "x", "GenericAds", "U", 0, "careers", 0, 0, 0, "D", 0, "members", "Search", 0, 0, 0, "Post", 0, 0, 0, "Q", 0, "$", 0, "K", 0, "W", 0, "Reviews", 0, ",", "__2E__", 0, 0, 0, 0, 0, 0, 0, "{", "}", 0, "Cheap", ")", 0, 0, 0, "#", ".org"],
z: [0, "Hotels", 0, 0, "Icon", 0, 0, 0, 0, ".net", 0, 0, "z", 0, 0, "pages", 0, "geo", 0, 0, 0, "cnt", "~", 0, 0, "]", "|", 0, "tripadvisor", "Images", "BookingBuddy", 0, "Commerce", 0, 0, "partnerKey", 0, "area", 0, "Deals", "from", "\\", 0, "urlKey", 0, "'", 0, "WeatherUnderground", 0, "MemberSign", "Maps", 0, "matchID", "Packages", "E", "Amenities", "Travel", ".htm", 0, "!", "^", "G"]
};
var b = "";
for (var a = 0; a < d.length; a++) {
var j = d.charAt(a);
var f = j;
if (h[j] && a + 1 < d.length) {
a++;
f += d.charAt(a)
} else {
j = ""
}
var g = getOffset(d.charCodeAt(a));
if (g < 0 || typeof h[j][g] == "String") {
b += f
} else {
b += h[j][g]
}
}
return b}
以及从 asdf() 引用的 getOffset() 函数的来源:
function getOffset(a) {
if (a >= 97 && a <= 122) {
return a - 61
}
if (a >= 65 && a <= 90) {
return a - 55
}
if (a >= 48 && a <= 71) {
return a - 48
}
return -1}