Advertisement
xiaomianao666

邀您一起看:神秘海域

Mar 18th, 2022
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 海阔视界规则分享,当前分享的是:二级页面详情¥page_detail¥神秘海域@@eyJkYXRhIjoie1wiYXNzb2NpYXRlZE1vZGVsc01hcEZvckpvaW5UYWJsZVwiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhGS1wiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhvdXRGS1wiOnt9LFwiZmllbGRzVG9TZXRUb0RlZmF1bHRcIjpbXSxcImlkXCI6MCxcImxhc3RfY2hhcHRlcl9ydWxlXCI6XCJqczooXFxuZnVuY3Rpb24gKGFwcHR5cGUsIGFwcFVybCkge1xcbiAgICBsZXQgY2hwID0gW107XFxuICAgIHRyeSB7XFxuICAgICAgICBsZXQgY29udHMgPSBbXSwgaHRtbCA9IEpTT04ucGFyc2UoZmV0Y2goTVlfVVJMLnNwbGl0KFxcXCIjI1xcXCIpWzFdLCB7aGVhZGVyczoge1xcXCJVc2VyLUFnZW50XFxcIjogXFxcIkRhcnQvMi4xMyAoZGFydDppbylcXFwifX0pKTtcXG4gICAgICAgIGlmIChhcHB0eXBlLmluY2x1ZGVzKFxcXCJUVlxcXCIpKSB7XFxuICAgICAgICAgICAgY29udHMgPSBPYmplY3Qua2V5cyhodG1sLnZpZGVvbGlzdCk7XFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIGlmIChhcHBVcmwuaW5jbHVkZXMoXFxcImFwaS5waHAvYXBwL1xcXCIpKSB7XFxuICAgICAgICAgICAgICAgIGNvbnRzID0gaHRtbC5kYXRhLnZvZF91cmxfd2l0aF9wbGF5ZXI7XFxuICAgICAgICAgICAgICAgIGlmIChjb250cy5sZW5ndGggPCAxKSB7XFxuICAgICAgICAgICAgICAgICAgICBjb250cyA9IGh0bWwuZGF0YS52b2RfcGxheV91cmwuc3BsaXQoXFxcIiQkJFxcXCIpO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgaWYgKGFwcFVybC5pbmNsdWRlcyhcXFwieGdhcHAucGhwL3YxL1xcXCIpKSB7XFxuICAgICAgICAgICAgICAgICAgICBjb250cyA9IGh0bWwuZGF0YS52b2RfaW5mby52b2RfdXJsX3dpdGhfcGxheWVyO1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKGNvbnRzLmxlbmd0aCA8IDEpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb250cyA9IGh0bWwuZGF0YS52b2RfaW5mby52b2RfcGxheV91cmwuc3BsaXQoXFxcIiQkJFxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgY29udHMgPSBodG1sLmRhdGEudm9kX3BsYXlfbGlzdDtcXG4gICAgICAgICAgICAgICAgICAgIGlmIChjb250cy5sZW5ndGggPCAxKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY29udHMgPSBodG1sLmRhdGEudm9kX3BsYXlfdXJsLnNwbGl0KFxcXCIkJCRcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH1cXG4gICAgICAgIGxldCBsaXN0ID0gW107XFxuICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGNvbnRzLmxlbmd0aDsgaSsrKSB7XFxuICAgICAgICAgICAgaWYgKGFwcHR5cGUuaW5jbHVkZXMoXFxcIlRWXFxcIikpIHtcXG4gICAgICAgICAgICAgICAgbGlzdCA9IGh0bWwudmlkZW9saXN0W2NvbnRzW2ldXTtcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICBpZiAoY29udHNbaV0udXJscykge1xcbiAgICAgICAgICAgICAgICAgICAgbGlzdCA9IGNvbnRzW2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GFuZ2J1LmNvbS9ydWlmZW5nbGJfYXBpLnBocC92MS52b2RcXFwiKVwifSx7XCJuYW1lXCI6XCLop4bpopHop6PmnpBcIixcInBhdGhcIjpcImxhenlQYXJzZVwiLFwicnVsZVwiOlwiKFxcbmZ1bmN0aW9uICgpIHtcXG4gICAgcmV0dXJuICQoXFxcIlxcXCIpLmxhenlSdWxlKChwdGFiLCB2bGluaywganhVcmwsIGFwcFVybCkgPT4ge1xcbiAgICAgICAgbG9nKFxcXCJcXFxcdTg5YzZcXFxcdTk4OTFcXFxcdTk0ZmVcXFxcdTYzYTU6XFxcIiArIHZsaW5rKTtcXG4gICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgZnVuY3Rpb24gY2hhbmdlVmlkZW9VcmwodXJsKSB7XFxuICAgICAgICAgICAgICAgIGlmICh1cmwuaW5jbHVkZXMoXFxcIndrZmlsZVxcXCIpKSB7XFxuICAgICAgICAgICAgICAgICAgICB1cmwgPSB1cmwgKyBcXFwiO3tSZWZlcmVyQGh0dHBzOi8vZmFudHVhbi53a2ZpbGUuY29tL31cXFwiO1xcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKHB0YWIgPT0gXFxcImJpbGliaWxpXFxcIikge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybCA9IHVybCArIFxcXCI7e1JlZmVyZXJAaHR0cHM6Ly93d3cuYmlsaWJpbGkuY29tLyYmVXNlci1BZ2VudEBNb3ppbGxhLzUuMH1cXFwiO1xcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAocHRhYiA9PSBcXFwibWd0dlxcXCIpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsID0gdXJsICsgXFxcIjt7UmVmZXJlckB3d3cubWd0di5jb20mJlVzZXItQWdlbnRATW96aWxsYS81LjB9XFxcIjtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodXJsLmluY2x1ZGVzKFxcXCJvamJrXFxcIikpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybCA9IHVybCArIFxcXCI7e1JlZmVyZXJAaHR0cHM6Ly9iYWsub2pia2p4LmNvbS99XFxcIjtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICBpZiAoIXVybC5pbmNsdWRlcyhcXFwiaHR0cFxcXCIpKSB7XFxuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXFxcIlxcXFx1OTRmZVxcXFx1NjNhNVxcXFx1NGUwZFxcXFx1NjYyZlxcXFx1NGVlNWh0dHBcXFxcdTVmMDBcXFxcdTU5MzRcXFwiKTtcXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgIGlmICgvXFxcXC5tM3U4Ly50ZXN0KHVybCkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gY2FjaGVNM3U4KHVybCk7XFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB1cmwgKyBcXFwiI2lzVmlkZW89dHJ1ZSNcXFwiO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGlmICgvXFxcXC5tM3U4fFxcXFwubXA0fG9ialxcXFwvdG9zfG5ldGVhc2VcXFxcLmNvbS8udGVzdCh2bGluaykgJiYgL2h0dHAvLnRlc3QodmxpbmspICYmICEvXFxcXC5odG1sLy50ZXN0KHZsaW5rKSkge1xcbiAgICAgICAgICAgICAgICBsZXQgcHVybCA9IHZsaW5rO1xcbiAgICAgICAgICAgICAgICBpZiAocHRhYi5pbmNsdWRlcyhcXFwiZHVvZHVvenlcXFwiKSB8fCB2bGluay5pbmNsdWRlcyhcXFwibTN1OC5jYWNoZS5zdW95by5jY1xcXCIpKSB7XFxuICAgICAgICAgICAgICAgICAgICBldmFsKGdldENyeXB0b0pTKCkpO1xcbiAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gRGUod29yZCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBhID0gQ3J5cHRvSlMuZW5jLlV0ZjgucGFyc2UobWQ1KFxcXCJyWGpXdlhsNlxcXCIpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgdCA9IENyeXB0b0pTLmVuYy5VdGY4LnBhcnNlKFxcXCJOWGJIb1dKYnBzRU9pbjhiXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIENyeXB0b0pTLkFFUy5kZWNyeXB0KHdvcmQsIGEsIHtpdjogdCwgbW9kZTogQ3J5cHRvSlMubW9kZS5DQkMsIHBhZGRpbmc6IENyeXB0b0pTLnBhZC5Qa2NzN30pLnRvU3RyaW5nKENyeXB0b0pTLmVuYy5VdGY4KTtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIHB1cmwgPSBEZShKU09OLnBhcnNlKGZldGNoKFxcXCJodHRwczovL2pocGMubWFuZHVodS5jb20vZHVvZHVvL2FwaS5waHA/dXJsPVxcXCIgKyB2bGluaykpLnVybCk7XFxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICBpZiAocHRhYi5pbmNsdWRlcyhcXFwiQ0w0S1xcXCIpIHx8IHZsaW5rLmluY2x1ZGVzKFxcXCJydWlmZW5nbGJcXFwiKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBodG1sID0gZmV0Y2goXFxcImh0dHBzOi8vdHYueWpoYW4uY29tOjQ0MzMvQ0w0Sy8/dXJsPVxcXCIgKyB2bGluayksIHRva2VuID0gaHRtbC5tYXRjaCgvbGVfdG9rZW4uKj0uKlxcXCIoLiopXFxcIi8pWzFdLCB1cmwgPSBodG1sLm1hdGNoKC9cXFwidXJsXFxcIi4qOi4qXFxcIiguKilcXFwiLylbMV07XFxuICAgICAgICAgICAgICAgICAgICAgICAgZXZhbChnZXRDcnlwdG9KUygpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiBEZSh3b3JkKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBrZXkgPSBDcnlwdG9KUy5lbmMuVXRmOC5wYXJzZShcXFwiQTQyRUFDMEMyQjQwODQ3MlxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgaXYgPSBDcnlwdG9KUy5lbmMuVXRmOC5wYXJzZSh0b2tlbik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBDcnlwdG9KUy5BRVMuZGVjcnlwdCh3b3JkLCBrZXksIHtpdjogaXYsIG1vZGU6IENyeXB0b0pTLm1vZGUuQ0JDLCBwYWRkaW5nOiBDcnlwdG9KUy5wYWQuUGtjczd9KS50b1N0cmluZyhDcnlwdG9KUy5lbmMuVXRmOCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHB1cmwgPSBEZSh1cmwpO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIHJldHVybiBjaGFuZ2VWaWRlb1VybChwdXJsKTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgaWYgKHB0YWIuaW5jbHVkZXMoXFxcIm5ldGZsaXhtb21cXFwiKSB8fCAvXm5ldGZsaXhtb20vLnRlc3QodmxpbmspKSB7XFxuICAgICAgICAgICAgICAgIGp4VXJsID0gXFxcImh0dHBzOi8vZHAua29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GVzdChyZWR1cmwpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcHVybCA9IHJlZHVybC5zdWJzdHJpbmcocmVkdXJsLmluZGV4T2YoXFxcIj1odHRwXFxcIikgKyAxKTtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICByZXR1cm4gY2hhbmdlVmlkZW9VcmwocHVybCk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGxldCBodG1sID0gc2NvZGUuYm9keTtcXG4gICAgICAgICAgICBpZiAoLzQwNCBOb3QgRm91bmR85aSH5qGI5ZCO5Y+v57un57ut6K6/6ZeuLy50ZXN0KGh0bWwpKSB7XFxuICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcXFwiNDA0XFxcXHU0ZTg2XFxcIik7XFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgaWYgKC9cXFxcPGJvZHkvLnRlc3QoaHRtbCkpIHtcXG4gICAgICAgICAgICAgICAgICAgIGxvZyhcXFwiXFxcXHU1YzFkXFxcXHU4YmQ1XFxcXHU0ZWNlXFxcXHU3ZjUxXFxcXHU5ODc1XFxcXHU1NWM1XFxcXHU2M2EyXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICByZXF1aXJlQ2FjaGUoXFxcImh0dHBzOi8vY29kZS5hbGl5dW4uY29tL2x6azIzNTU5L1B1YmxpY1J1bGUvcmF3L21hc3Rlci94NXJ1bGUuanNcXFwiLCAyNCk7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4geDVydWxlKGxpbmssIGxpbmspO1xcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgbG9nKFxcXCJcXFxcdTVjMWRcXFxcdThiZDVcXFxcdTRlY2VcXFxcdTk3NWVcXFxcdTdmNTFcXFxcdTk4NzVcXFxcdTU1YzVcXFxcdTYzYTJcXFwiKTtcXG4gICA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gICAgICAgICAgICAgICAgICAgICB1cmwgPSB1cmwgKyBcXFxcXFxcIjt7UmVmZXJlckB3d3cubWd0di5jb20mJlVzZXItQWdlbnRATW96aWxsYS81LjB9XFxcXFxcXCI7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICh1cmwuaW5jbHVkZXMoXFxcXFxcXCJvamJrXFxcXFxcXCIpKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybCA9IHVybCArIFxcXFxcXFwiO3tSZWZlcmVyQGh0dHBzOi8vYmFrLm9qYmtqeC5jb20vfVxcXFxcXFwiO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICBpZiAoIXVybC5pbmNsdWRlcyhcXFxcXFxcImh0dHBcXFxcXFxcIikpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFxcXFxcXFwiXFxcXFxcXFx1OTRmZVxcXFxcXFxcdTYzYTVcXFxcXFxcXHU0ZTBkXFxcXFxcXFx1NjYyZlxcXFxcXFxcdTRlZTVodHRwXFxcXFxcXFx1NWYwMFxcXFxcXFxcdTU5MzRcXFxcXFxcIik7XFxcXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgaWYgKC9cXFxcXFxcXC5tM3U4Ly50ZXN0KHVybCkpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBjYWNoZU0zdTgodXJsKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB1cmwgKyBcXFxcXFxcIiNpc1ZpZ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ICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgcHVybCA9IERlKEpTT04ucGFyc2UoZmV0Y2goXFxcXFxcXCJodHRwczovL2pocGMubWFuZHVodS5jb20vZHVvZHVvL2FwaS5waHA/dXJsPVxcXFxcXFwiICsgdmxpbmspKS51cmwpO1xcXFxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIGlmIChwdGFiLmluY2x1ZGVzKFxcXFxcXFwiQ0w0S1xcXFxcXFwiKSB8fCB2bGluay5pbmNsdWRlcyhcXFxcXFxcInJ1aWZlbmdsYlxcXFxcXFwiKSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGh0bWwgPSBmZXRjaChcXFxcXFxcImh0dHBzOi8vdHYueWpoYW4uY29tOjQ0MzMvQ0w0Sy8/dXJsPVxcXFxcXFwiICsgdmxpbmspLCB0b2tlbiA9IGh0bWwubWF0Y2goL2xlX3Rva2VuLio9LipcXFxcXFxcIiguKilcXFxcXFxcIi8pWzFdLCB1cmwgPSBodG1sLm1hdGNoKC9cXFxcXFxcInVybFxcXFxcXFwiLio6LipcXFxcXFxcIiguKilcXFxcXFxcIi8pWzFdO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgZXZhbChnZXRDcnlwdG9KUygpKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIERlKHdvcmQpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIga2V5ID0gQ3J5cHRvSlMuZW5jLlV0ZjgucGFyc2UoXFxcXFxcXCJBNDJFQUMwQzJCNDA4NDcyXFxcXFxcXCIpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBpdiA9IENyeXB0b0pTLmVuYy5VdGY4LnBhcnNlKHRva2VuKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gQ3J5cHRvSlMuQUVTLmRlY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Gl0bGUiOiLnpZ7np5jmtbfln58ifQ==
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement