Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@可可影视@eyJmaXJzdEhlYWRlciI6ImNsYXNzIiwibGFzdF9jaGFwdGVyX3J1bGUiOiIiLCJ0aXRsZSI6IuWPr+WPr+W9seinhiIsImF1dGhvciI6IuW/g+mtlCIsInVybCI6Imhpa2VyOi8vZW1wdHkjI2h0dHBzOi8vd3d3LmtreXMzLmNvbTo1MTExMS9zaG93LzEtLS0tLTMtZnlwYWdlLmh0bWwiLCJ2ZXJzaW9uIjo5LCJjb2xfdHlwZSI6Im1vdmllXzMiLCJjbGFzc19uYW1lIjoiIiwidHlwZSI6InZpZGVvIiwiY2xhc3NfdXJsIjoiIiwiYXJlYV9uYW1lIjoiIiwiYXJlYV91cmwiOiIiLCJzb3J0X25hbWUiOiIiLCJ5ZWFyX25hbWUiOiIiLCJzb3J0X3VybCI6IiIsInllYXJfdXJsIjoiIiwiZmluZF9ydWxlIjoianM6XG52YXIgZCA9IFtdO1xudmFyIGdldFJhbmdlQ29sb3JzID0gZnVuY3Rpb24oKSB7XG4gICAgcmV0dXJuICcjJyArICgnMDAwMDAnICsgKE1hdGgucmFuZG9tKCkgKiAweDEwMDAwMDAgPDwgMCkudG9TdHJpbmcoMTYpKS5zdWJzdHIoLTYpO1xufVxuXG5jb25zdCDliIbnsbvpopzoibIgPSBnZXRSYW5nZUNvbG9ycygpXG5jb25zdCDlpKfnsbvlrprkvY0gPSAnYm9keSYmLnN3aXBlci13cmFwcGVyJ1xuY29uc3Qg5ou85o6l5YiG57G7ID0gJ2JvZHkmJi5maWx0ZXItcm93J1xuY29uc3Qg5bCP57G75a6a5L2NID0gJ2JvZHkmJmE6bm90KDptYXRjaGVzKOmmlumhtXzku4rml6Xmm7TmlrB854Ot5qacfEFQUHznpo/liKl854Ot6ZeofOaOkuihjHzkuJN854mHfE4pKSdcbmNvbnN0IOWIhuexu+agh+mimCA9ICdhJiZUZXh0J1xuY29u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XG4gICAgICAgIHZhciBhcGlVcmwgPSAnJztcbiAgICAgICAgdmFyIGFwaUh0bWwgPSByZXF1ZXN0KGFwaVVybCwge1xuICAgICAgICAgICAgaGVhZGVyczoge1xuICAgICAgICAgICAgICAgIFwiVXNlci1BZ2VudFwiOiBcIk1vemlsbGEvNS4wIChXaW5kb3dzIE5UIDEwLjApXCJcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBib2R5OiBcInVybD1cIiArIGNvbmZpZy51cmwgKyBcIiZ0aW1lPVwiICsgY29uZmlnLnRpbWUgKyBcIiZrZXk9XCIgKyBjb25maWcua2V5LFxuICAgICAgICAgICAgbWV0aG9kOiBcIlBPU1RcIlxuICAgICAgICB9KTtcbiAgICAgICAgdmFyIGpzb24gPSBKU09OLnBhcnNlKGFwaUh0bWwpO1xuICAgICAgICBpZiAoanNvbi5jb2RlID09IDIwMCkge1xuICAgICAgICAgICAgcGxheVVybCA9IGpzb24udXJsO1xuICAgICAgICAgICAgcmV0dXJuIHRvVXJsKHBsYXlVcmwpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovLycgKyBqc29uLm1zZztcbiAgICAgICAgfVxuXG4gICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAvL3NldEVycm9yKGUpO1xuICAgICAgICBzaG93TG9hZGluZyhcIuato+WcqOi/m+ihjOajgOe0ou+8jOivt+eojeWAmS4uLlwiKTtcbiAgICAgICAgdmFyIHZpZGVvID0gJ3g1UnVsZTovLycgKyBpbnB1dCArICdAJyArICQudG9TdHJpbmcoKCkgPT4ge1xuICAgICAgICAgICAgLy9mYmEubG9nKGZiYS5nZXRVcmxzKCkpXG4gICAgICAgICAgICB2YXIgdXJscyA9IF9nZXRVcmxzKClcbiAgICAgICAgICAgIHZhciBleGNsdWRlID0gL3BsYXltM3U4fG0zdThcXC50dnxtaW5cXC5jc3N8NDA0XFwubTN1OHxcXC5jc3MvO1xuICAgICAgICAgICAgdmFyIGNvbnRhaW4gPSAvXFwubXA0fFxcLm0zdTh8XFwuZmx2fFxcLmF2aXxcXC5tcGVnfFxcLndtdnxcXC5tb3Z8XFwucm12YnxcXC5kYXR8cXFCRmRvd25sb2FkfG1pbWU9dmlkZW8lMkZ8dmlkZW9fbXA0LztcbiAgICAgICAgICAgIGZvciAodmFyIGkgaW4gdXJscykge1xuICAgICAgICAgICAgICAgIGlmICghZXhjbHVkZS50ZXN0KHVybHNbaV0pICYmIGNvbnRhaW4udGVzdCh1cmxzW2ldKSkge1xuICAgICAgICAgICAgICAgICAgICAvLyBmeV9icmlkZ2VfYXBwLmxvZyh1cmxzW2ldKVxuICAgICAgICAgICAgICAgICAgICBpZiAoL21ndHZ8c29odS8udGVzdCh1cmxzW2ldKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHVybHNbaV0gKyBcIjt7VXNlci1BZ2VudEBNb3ppbGxhLzUuMCAoV2luZG93cyBOVCAxMC4wKX1cIjtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICgvYmlsaS8udGVzdCh1cmxzW2ldKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHVybHNbaV0gKyBcIjt7VXNlci1BZ2VudEBNb3ppbGxhLzUuMCYmUmVmZXJlckBodHRwczovL3d3dy5iaWxpYmlsaS5jb219XCI7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoL2l4aWd1YS8udGVzdCh1cmxzW2ldKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHVybHNbaV0gKyBcIiNpc1ZpZGVvPXRydWUjXCIgKyBcIiMubXA0O3tSZWZlcmVyQGh0dHBzOi8vd3d3Lml4aWd1YS5jb20vJiZVc2VyLUFnZW50QE1vemlsbGEvNS4wfVwiO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHVybHNbaV1cbiAgICAgICAgICAgICAgIC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gICAgICAgICAgICBpZiAodGZwdXNoID09ICcwJykge1xuICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IHBhcnNlRG9tRm9ySHRtbChsaXN0W2pdLCAnYSYmVGV4dCcpLnJlcGxhY2UoL+esrHzpm4Z86K+dfOacny9nLCAnJyksXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6IHBhcnNlRG9tKGxpc3Rbal0sICdhJiZocmVmJykgKyBsYXp5LFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IGxpc3QubGVuZ3RoID4gNCA/ICd0ZXh0XzUnIDogJ3RleHRfMidcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHVybHggPSAnaGlrZXI6Ly9wYWdlL3B1c2g/cHVzaHVybD0nICsgZW5jb2RlVVJJQ29tcG9uZW50KEpTT04uc3RyaW5naWZ5KHtcbiAgICAgICAgICAgICAgICAgICAgICAgIFwibmFtZVwiOiBnZXRQYWdlVGl0bGUoKSArIHBhcnNlRG9tRm9ySHRtbChsaXN0W2pdLCAnYSYmVGV4dCcpLFxuICAgICAgICAgICAgICAgICAgICAgICAgXCJwaWNcIjogcGFyc2VEb20oaHRtbCwgJy5sYXp5bG9hZCYmZGF0YS1zcmN8fGRhdGEtb3JpZ2luYWwnKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIFwiY29udGVudFwiOiBwYXJzZURvbUZvckh0bWwoaHRtbCwgJy52aWRlby1pbmZvLWNvbnRlbnQmJlRleHQnKS5yZXBsYWNlKCfmlLbotbcnLCAnJyksXG4gICAgICAgICAgICAgICAgICAgICAgICBcImZyb21cIjogZ2V0UGFnZVRpdGxlKCkgKyBwYXJzZURvbUZvckh0bWwobGlzdFtqXSwgJ2EmJlRleHQnKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIFwidXJsXCI6IHBhcnNlRG9tKGxpc3Rbal0sICdhJiZocmVmJylcbiAgICAgICAgICAgICAgICAgICAgfSkpO1xuICAgICAgICAgICAgICAgICAgICB2YXIgZXh0cmF4ID0ge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWQ6IHBhcnNlRG9tKGxpc3Rbal0sICdhJiZocmVmJylcbiAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBwYXJzZURvbUZvckh0bWwobGlzdFtqXSwgJ2EmJlRleHQnKS5yZXBsYWNlKC/nrKx86ZuGfOivnXzmnJ8vZywgJycpLFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiB1cmx4LFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IGxpc3QubGVuZ3RoID4gNCA/ICd0ZXh0XzUnIDogJ3RleHRfMicsXG4gICAgICAgICAgICAgICAgICAgICAgICBleHRyYTogZXh0cmF4XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgfVxuICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgICBkLnB1c2goe1xuICAgICAgICAgICAgICAgIHRpdGxlOiAn5rKh5pyJ6YCJ6ZuG5ZOf77yM5LiN5L+h54K55Zu+54mH5Y6755yL55yL8J+RgCcsXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6ICd0ZXh0X2NlbnRlcl8xJ1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICB9IGVsc2Uge1xuICAgICAgICB0cnkge1xuICAgICAgICAgICAgZm9yICh2YXIgaiA9IDA7IGogPCBsaXN0Lmxlbmd0aDsgaisrKSB7XG4gICAgICAgICAgICAgICAgaWYgKHRmcHVzaCA9PSAnMCcpIHtcbiAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBwYXJzZURvbUZvckh0bWwobGlzdFtqXSwgJ2EmJlRleHQnKS5yZXBsYWNlKC/nrKx86ZuGfOivnXzmnJ8vZywgJycpLFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiBwYXJzZURvbShsaXN0W2pdLCAnYSYmaHJlZicpICsgbGF6eSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBsaXN0Lmxlbmd0aCA+IDQgPyAndGV4dF81JyA6ICd0ZXh0XzInXG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciB1cmx4ID0gJ2hpa2VyOi8vcGFnZS9wdXNoP3B1c2h1cmw9JyArIGVuY29kZVVSSUNvbXBvbmVudChKU09OLnN0cmluZ2lmeSh7XG4gICAgICAgICAgICAgICAgICAgICAgICBcIm5hbWVcIjogZ2V0UGFnZVRpdGxlKCkgKyBwYXJzZURvbUZvckh0bWwobGlzdFtqXSwgJ2EmJlRleHQnKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIFwicGljXCI6IHBhcnNlRG9tKGh0bWwsICcubGF6eWxvYWQmJmRhdGEtc3JjfHxkYXRhLW9yaWdpbmFsJyksXG4gICAgICAgICAgICAgICAgICAgICAgICBcImNvbnRlbnRcIjogcGFyc2VEb21Gb3JIdG1sKGh0bWwsICcudmlkZW8taW5mby1jb250ZW50JiZUZXh0JykucmVwbGFjZSgn5pS26LW3JywgJycpLFxuICAgICAgICAgICAgICAgICAgICAgICAgXCJmcm9tXCI6IGdldFBhZ2VUaXRsZSgpICsgcGFyc2VEb21Gb3JIdG1sKGxpc3Rbal0sICdhJiZUZXh0JyksXG4gICAgICAgICAgICAgICAgICAgICAgICBcInVybFwiOiBwYXJzZURvbShsaXN0W2pdLCAnYSYmaHJlZicpXG4gICAgICAgICAgICAgICAgICAgIH0pKTtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGV4dHJheCA9IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlkOiBwYXJzZURvbShsaXN0W2pdLCAnYSYmaHJlZicpXG4gICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogcGFyc2VEb21Gb3JIdG1sKGxpc3Rbal0sICdhJiZUZXh0JykucmVwbGFjZSgv56ysfOmbhnzor5185pyfL2csICcnKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogdXJseCxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBsaXN0Lmxlbmd0aCA+IDQgPyAndGV4dF81JyA6ICd0ZXh0XzInLFxuICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmE6IGV4dHJheFxuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICAgIGQucHVzaCh7XG4gICAgICAgICAgICAgICAgdGl0bGU6ICfmsqHmnInpgInpm4blk5/vvIzkuI3kv6Hngrnlm77niYfljrvnnIvnnIvwn5GAJyxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3RleHRfY2VudGVyXzEnXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuXG4gICAgfVxufVxuc2V0VGFicyh0YWJzLCBNWV9VUkwpO1xuc2V0TGlzdHMobGlzdHMsIGdldFZhcihNWV9VUkwsICcwJykpO1xuZC5wdXNoKHtcbiAgICB0aXRsZTogJzxicj4nLFxuICAgIGNvbF90eXBlOiAncmljaF90ZXh0J1xufSk7XG5zZXRSZXN1bHQoZCk7Iiwic2RldGFpbF9jb2xfdHlwZSI6Im1vdmllXzEiLCJzZGV0YWlsX2ZpbmRfcnVsZSI6IioiLCJ1YSI6Im1vYmlsZSIsInByZVJ1bGUiOiIiLCJwYWdlcyI6Ilt7XCJjb2xfdHlwZ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AgICAgbmV3X2NhdGUucHVzaChpbmRleCA9PT0gMCA/IHBhcmFtcy5rZXkudG9TdHJpbmcoKSA6IFxcXCIwXFxcIilcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHB1dFZhcihNWV9SVUxFLnRpdGxlLCBKU09OLnN0cmluZ2lmeShuZXdfY2F0ZSkpXFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0VmFyKE1ZX1JVTEUudXJsLCBpbnB1dClcXG4gICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCJcXG4gICAgICAgICAgICAgICAgICAgIH0sIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXRlX3RlbXA6IGNhdGVfdGVtcCxcXG4gICAgICAgICAgICAgICAgICAgICAgICBrZXk6IGtleSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBwYWdlOiBwYWdlLFxcbiAgICAgICAgICAgICAgICAgICAgfSksXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3Njcm9sbF9idXR0b24nLFxcbiAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJibGFua19ibG9ja1xcXCJcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH0gZWxzZSBpZiAoZm9sZCA9PT0gJzEnKSB7XFxuICAgICAgICAgICAgc3ViX2NhdGVnb3JpZXMuZm9yRWFjaCgoaXRlbSwga2V5KSA9PiB7XFxuICAgICAgICAgICAgICAgIGxldCB0aXRsZSA9IHBkZmgoaXRlbSwg5YiG57G75qCH6aKYKVxcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGtleS50b1N0cmluZygpID09PSBjYXRlX3RlbXBbaW5kZXhdID8gJ+KAnOKAnOKAneKAnTxiPjxzcGFuIHN0eWxlPVxcXCJjb2xvcjogJyArIOWIhuexu+minOiJsiArICdcXFwiPicgKyB0aXRsZSArICc8L3NwYW4+PC9iPicgOiB0aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogJChwZChpdGVtLCDliIbnsbvpk77mjqUpICsgJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKHBhcmFtcykgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhcmFtcy5jYXRlX3RlbXBbcGFyYW1zLmluZGV4XSA9IHBhcmFtcy5rZXkudG9TdHJpbmcoKVxcblxcbiAgICAgICAgICAgICAgICAgICAgICAgIHB1dFZhcihNWV9SVUxFLnRpdGxlLCBKU09OLnN0cmluZ2lmeShwYXJhbXMuY2F0ZV90ZW1wKSlcXG4gICAgICAgICAgICAgICAgICAgICAgICBwdXRWYXIoTVlfUlVMRS51cmwsIGlucHV0KVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIlxcbiAgICAgICAgICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhdGVfdGVtcDogY2F0ZV90ZW1wLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGluZGV4OiBpbmRleCxcXG4gICAgICAgICAgICAgICAgICAgICAgICBrZXk6IGtleSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBwYWdlOiBwYWdlLFxcbiAgICAgICAgICAgICAgICAgICAgfSksXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3Njcm9sbF9idXR0b24nLFxcbiAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJibGFua19ibG9ja1xcXCJcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH1cXG4gICAgfSlcXG59XFxuXCJ9XSIsImljb24iOiJodHRwczovLzYxLjE0Ny45My4yNTI6MTUwMDEvdm9kX3BjX3N0YXRpY19ra2R5L2ltYWdlcy9wL2xvZ28ucG5nP3Zlcj0yNDA0MjAiLCJwcm94eSI6IiJ9
Add Comment
Please, Sign In to add comment