Advertisement
xiaomianao666

邀您一起看:特战荣耀

Apr 10th, 2022
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 海阔视界规则分享,当前分享的是:二级页面详情¥page_detail¥特战荣耀@@eyJkYXRhIjoie1wiYXNzb2NpYXRlZE1vZGVsc01hcEZvckpvaW5UYWJsZVwiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhGS1wiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhvdXRGS1wiOnt9LFwiZmllbGRzVG9TZXRUb0RlZmF1bHRcIjpbXSxcImlkXCI6MCxcImxhc3RfY2hhcHRlcl9ydWxlXCI6XCJqczooXFxuZnVuY3Rpb24gKGFwcHR5cGUsIGFwcFVybCwgYXBwVWEpIHtcXG4gICAgbGV0IGNocCA9IFtdO1xcbiAgICB0cnkge1xcbiAgICAgICAgbGV0IGNvbnRzID0gW10sIGh0bWwgPSBKU09OLnBhcnNlKGZldGNoKE1ZX1VSTC5zcGxpdChcXFwiIyNcXFwiKVsxXSwge2hlYWRlcnM6IHtcXFwiVXNlci1BZ2VudFxcXCI6IGFwcFVhfX0pKTtcXG4gICAgICAgIGlmICgv56We6amsfFRWLy50ZXN0KGFwcHR5cGUpKSB7XFxuICAgICAgICAgICAgY29udHMgPSBPYmplY3Qua2V5cyhodG1sLnZpZGVvbGlzdCk7XFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIGlmIChhcHBVcmwuaW5jbHVkZXMoXFxcImFwaS5waHAvYXBwXFxcIikpIHtcXG4gICAgICAgICAgICAgICAgY29udHMgPSBodG1sLmRhdGEudm9kX3VybF93aXRoX3BsYXllcjtcXG4gICAgICAgICAgICAgICAgaWYgKGNvbnRzLmxlbmd0aCA8IDEpIHtcXG4gICAgICAgICAgICAgICAgICAgIGNvbnRzID0gaHRtbC5kYXRhLnZvZF9wbGF5X3VybC5zcGxpdChcXFwiJCQkXFxcIik7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICBpZiAoYXBwVXJsLmluY2x1ZGVzKFxcXCJ4Z2FwcFxcXCIpKSB7XFxuICAgICAgICAgICAgICAgICAgICBjb250cyA9IGh0bWwuZGF0YS52b2RfaW5mby52b2RfdXJsX3dpdGhfcGxheWVyO1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKGNvbnRzLmxlbmd0aCA8IDEpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb250cyA9IGh0bWwuZGF0YS52b2RfaW5mby52b2RfcGxheV91cmwuc3BsaXQoXFxcIiQkJFxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgY29udHMgPSBodG1sLmRhdGEudm9kX3BsYXlfbGlzdDtcXG4gICAgICAgICAgICAgICAgICAgIGlmIChjb250cy5sZW5ndGggPCAxKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY29udHMgPSBodG1sLmRhdGEudm9kX3BsYXlfdXJsLnNwbGl0KFxcXCIkJCRcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH1cXG4gICAgICAgIGxldCBsaXN0ID0gW107XFxuICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGNvbnRzLmxlbmd0aDsgaSsrKSB7XFxuICAgICAgICAgICAgaWYgKC/npZ7pqax8VFYvLnRlc3QoYXBwdHlwZSkpIHtcXG4gICAgICAgICAgICAgICAgbGlzdCA9IGh0bWwudmlkZW9saXN0W2NvbnRzW2ldXTtcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICBpZiAoY29udHNbaV0udXJscykge1xcbiAgICAgICAgICAgICAgICAgICAgbGlzdCA9IGNvbnRzW2ldLnVybHM7XFxuICAgICAgICAgICAgICAgI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AgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgIGlmIChwdGFiID09IFxcXCJiaWxpYmlsaVxcXCIpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmwgPSB1cmwgKyBcXFwiO3tSZWZlcmVyQGh0dHBzOi8vd3d3LmJpbGliaWxpLmNvbS8mJlVzZXItQWdlbnRATW96aWxsYS81LjB9XFxcIjtcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHB0YWIgPT0gXFxcIm1ndHZcXFwiKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybCA9IHVybCArIFxcXCI7e1JlZmVyZXJAd3d3Lm1ndHYuY29tJiZVc2VyLUFnZW50QE1vemlsbGEvNS4wfVxcXCI7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHVybC5pbmNsdWRlcyhcXFwib2pia1xcXCIpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmwgPSB1cmwgKyBcXFwiO3tSZWZlcmVyQGh0dHBzOi8vYmFrLm9qYmtqeC5jb20vfVxcXCI7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgaWYgKCF1cmwuaW5jbHVkZXMoXFxcImh0dHBcXFwiKSkge1xcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFxcXCJcXFxcdTk0ZmVcXFxcdTYzYTVcXFxcdTRlMGRcXFxcdTY2MmZcXFxcdTRlZTVodHRwXFxcXHU1ZjAwXFxcXHU1OTM0KFxcXFx1NTNlZlxcXFx1ODBmZFxcXFx1NTJhMFxcXFx1NWJjNlxcXFx1NGU4NilcXFwiKTtcXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgIGlmICgvXFxcXC5tM3U4Ly50ZXN0KHVybCkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gY2FjaGVNM3U4KHVybCk7XFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB1cmwgKyBcXFwiI2lzVmlkZW89dHJ1ZSNcXFwiO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgICAgIGlmICgvXFxcXC5tM3U4fFxcXFwubXA0fG9ialxcXFwvdG9zfG5ldGVhc2VcXFxcLmNvbS8udGVzdCh2bGluaykgJiYgL2h0dHAvLnRlc3QodmxpbmspICYmICEvXFxcXC5odG1sLy50ZXN0KHZsaW5rKSkge1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKCEvZmVuXFxcXC5sYW9kaXxydWlmZW5nbGJ8c3VveW9cXFxcLmNjLy50ZXN0KHZsaW5rKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxvZyhcXFwiXFxcXHU2OGMwXFxcXHU2ZDRiXFxcXHU1MjMwXFxcXHU4ZDQ0XFxcXHU2ZTkwXFxcXHU1NzMwXFxcXHU1NzQwXFxcXHU1M2VmXFxcXHU4MGZkXFxcXHU2NjJmXFxcXHU4OWM2XFxcXHU5ODkxXFxcXHU5NGZlXFxcXHU2M2E1XFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGNoYW5nZVZpZGVvVXJsKHZsaW5rKTtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICBpZiAoIWp4VXJsIHx8IC94XFxcXC1uXFxcXC5jYy8udGVzd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5jb20vbHprMjM1NTkvUHVibGljUnVsZS9yYXcvbWFzdGVyL3g1cnVsZS5qc1xcXCIsIDI0KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB4NXJ1bGUobGluaywgbGluayk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoaW5wdXQgPT0gXFxcIlxcXFx1NjI1M1xcXFx1NWYwMFxcXFx1ODllM1xcXFx1Njc5MFxcXFx1N2Y1MVxcXFx1OTg3NVxcXCIpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcIndlYjovL1xcXCIgKyBsaW5rO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoaW5wdXQgPT0gXFxcIlxcXFx1NGY3ZlxcXFx1NzUyOFxcXFx1NTE4NVxcXFx1N2Y2ZVxcXFx1ODllM1xcXFx1Njc5MFxcXCIpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9nKFxcXCJcXFxcdTRmN2ZcXFxcdTc1MjhcXFxcdTUxODVcXFxcdTdmNmVcXFxcdTg5ZTNcXFxcdTY3OTBcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2hvd0xvYWRpbmcoXFxcIlxcXFx1NmI2M1xcXFx1NTcyOFxcXFx1OGZkYlxcXFx1ODg0Y1xcXFx1ODllM1xcXFx1Njc5MC4uLlxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZXZhbChKU09OLnBhcnNlKGZldGNoKFxcXCJoaWtlcjovL3BhZ2UvbXlQYXJzZVxcXCIpKS5ydWxlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgLCBsaW5rLCBwdGFiLCB2bGluaywgYXBwVXJsKTtcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHB1cmwgPSBKU09OLnBhcnNlKGh0bWwpLnVybDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGNoYW5nZVZpZGVvVXJsKHB1cmwpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXFxcIlxcXFx1ODllM1xcXFx1Njc5MFxcXFx1NTNlZlxcXFx1ODBmZFxcXFx1NTJhMFxcXFx1NWJjNlxcXFx1NGU4NlxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgICAgICBsb2coXFxcIlxcXFxuXFxcXHU2NzJhXFxcXHU4MGZkXFxcXHU2MjEwXFxcXHU1MjlmXFxcXHU4M2I3XFxcXHU1M2Q2XFxcXHU4OWM2XFxcXHU5ODkxXFxcXHU1NzMwXFxcXHU1NzQwOlxcXCIgKyBlLm1lc3NhZ2UgKyBcXFwiXFxcXG5cXFxcdTVjMWRcXFxcdThiZDVcXFxcdTRmN2ZcXFxcdTc1MjhcXFxcdTg5YzRcXFxcdTUyMTlcXFxcdTUxODV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cXFx1Njc5MCxcXFxcXFxcXHU4OWM2XFxcXFxcXFx1OTg5MVxcXFxcXFxcdTk0ZmVcXFxcXFxcXHU2M2E1OlxcXFxcXFwiICsgdmxpbmspO1xcXFxuICAgICAgICAgICAgZnVuY3Rpb24gY2hhbmdlVmlkZW9VcmwodXJsKSB7XFxcXG4gICAgICAgICAgICAgICAgaWYgKHVybC5pbmNsdWRlcyhcXFxcXFxcIndrZmlsZVxcXFxcXFwiKSkge1xcXFxuICAgICAgICAgICAgICAgICAgICB1cmwgPSB1cmwgKyBcXFxcXFxcIjt7UmVmZXJlckBodHRwczovL2ZhbnR1YW4ud2tmaWxlLmNvbS99XFxcXFxcXCI7XFxcXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgaWYgKHB0YWIgPT0gXFxcXFxcXCJiaWxpYmlsaVxcXFxcXFwiKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmwgPSB1cmwgKyBcXFxcXFxcIjt7UmVmZXJlckBodHRwczovL3d3dy5iaWxpYmlsaS5jb20vJiZVc2VyLUFnZW50QE1vemlsbGEvNS4wfVxcXFxcXFwiO1xcXFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHB0YWIgPT0gXFxcXFxcXCJtZ3R2XFxcXFxcXCIpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmwgPSB1cmwgKyBcXFxcXFxcIjt7UmVmZXJlckB3d3cubWd0di5jb20mJlVzZXItQWdlbnRATW96aWxsYS81LjB9XFxcXFxcXCI7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICh1cmwuaW5jbHVkZXMoXFxcXFxcXCJvamJrXFxcXFxcXCIpKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybCA9IHVybCArIFxcXFxcXFwiO3tSZWZlcmVyQGh0dHBzOi8vYmFrLm9qYmtqeC5jb20vfVxcXFxcXFwiO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICBpZiAoIXVybC5pbmNsdWRlcyhcXFxcXFxcImh0dHBcXFxcXFxcIikpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFxcXFxcXFwiXFxcXFxcXFx1OTRmZVxcXFxcXFxcdTYzYTVcXFxcXFxcXHU0ZTBkXFxcXFxcXFx1NjYyZlxcXFxcXFxcdTRlZTVodHRwXFxcXFxcXFx1NWYwMFxcXFxcXFxcdTU5MzQoXFxcXFxcXFx1NTNlZlxcXFxcXFxcdTgwZmRcXFxcXFxcXHU1MmEwXFxcXFxcXFx1NWJjNlxcXFxcXFxcdTRlODYpXFxcXFxcXCIpO1xcXFxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIGlmICgvXFxcXFxcXFwubTN1OC8udGVzdCh1cmwpKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gY2FjaGVNM3U4KHVybCk7XFxcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdXJsICsgXFxcXFxcXCIjaXNWaWRlbz10cnVlI1xcXFxcXFwiO1xcXFxuICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgdHJ5IHtcXFxcbiAgICAgICAgICAgICAgICBpZiAoL1xcXFxcXFxcLm0zdTh8XFxcXFxcXFwubXA0fG9ialxcXFxcXFxcL3R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jZlXFxcXFxcXFx1ODllM1xcXFxcXFxcdTY3OTBcXFxcXFxcIik7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2hvd0xvYWRpbmcoXFxcXFxcXCJcXFxcXFxcXHU2YjYzXFxcXFxcXFx1NTcyOFxcXFxcXFxcdThmZGJcXFxcXFxcXHU4ODRjXFxcXFxcXFx1ODllM1xcXFxcXFxcdTY3OTAuLi5cXFxcXFxcIik7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGV2YWwoSlNPTi5wYXJzZShmZXRjaChcXFxcXFxcImhpa2VyOi8vcGFnZS9teVBhcnNlXFxcXFxcXCIpKS5ydWxlKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICwgbGluaywgcHRhYiwgdmxpbmssIGFwcFVybCk7XFxcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB0cnkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBwdXJsID0gSlNPTi5wYXJzZShodG1sKS51cmw7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGNoYW5nZVZpZGVvVXJsKHB1cmwpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgY2F0Y2ggKGUpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXFxcXFxcXCJcXFxcXFxcXHU4OWUzXFxcXFxcXFx1Njc5MFxcXFxcXFxcdTUzZWZcXFx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AgICAgIHJldHVybiB2bGluaztcXFxcbiAgICB9XFxcXG59KSgpO1xcXCJ9XVwifSIsInBpY1VybCI6Imh0dHA6Ly9tLnlraW1nLmNvbS8wNTBFMDAwMDYyNDUyN0JEMjAzN0REMDkyRDNEQzJFMkBSZWZlcmVyPSIsInRpdGxlIjoi54m55oiY6I2j6ICAIn0=
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement