xiaomianao666

小程序:FreeOK

Dec 21st, 2022
278
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@FreeOK@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6IiIsInRpdGxlIjoiRnJlZU9LIiwiYXV0aG9yIjoi5a625aiDIiwidXJsIjoiaGlrZXI6Ly9lbXB0eSMjaHR0cHM6Ly93d3cuZnJlZW9rLnZpcC92b2RzaG93LzEtLS0tLS0tLWZ5cGFnZS0tLS5odG1sIiwidmVyc2lvbiI6MjAyMjEyMDksImNvbF90eXBlIjoibW92aWVfMyIsImNsYXNzX25hbWUiOiIiLCJ0eXBlIjoidG9vbCIsImNsYXNzX3VybCI6IiIsImFyZWFfbmFtZSI6IiIsImFyZWFfdXJsIjoiIiwic29ydF9uYW1lIjoiIiwieWVhcl9uYW1lIjoiIiwic29ydF91cmwiOiIiLCJ5ZWFyX3VybCI6IiIsImZpbmRfcnVsZSI6ImpzOlxudmFyIGQgPSBbXTtcbnZhciBnZXRSYW5nZUNvbG9ycyA9IGZ1bmN0aW9uKCkge1xuICAgIHJldHVybiAnIycgKyAoJzAwMDAwJyArIChNYXRoLnJhbmRvbSgpICogMHgxMDAwMDAwIDw8IDApLnRvU3RyaW5nKDE2KSkuc3Vic3RyKC02KTtcbn1cblxuY29uc3Qg5YiG57G76aKc6ImyID0gZ2V0UmFuZ2VDb2xvcnMoKVxuY29uc3Qg5aSn57G75a6a5L2NID0gJ2JvZHkmJi5uYXZiYXItaXRlbXMnXG5jb25zdCDmi7zmjqXliIbnsbsgPSAnYm9keSYmLnNjcm9sbC1ib3gnXG5jb25zdCDlsI/nsbvlrprkvY0gPSAnYm9keSYmYTpub3QoOm1hdGNoZXMo6aaW6aG1fOS7iuaXpeabtOaWsHzng63mppx8QVBQfOeVmeiogOaxgueJhykpJ1xuY29uc3Qg5YiG57G75qCH6aKYID0gJ2EmJlRleHQnXG5jb25zdCDliIbnsb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xlPScgKyBwZGZoKGh0bWwsIFwidGl0bGUmJlRleHRcIikuc3BsaXQoXCItXCIpWzBdO1xuICAgICAgICAgICAgICAgIHZhciBqeEh0bWwgPSByZXF1ZXN0KGp4VXJsLCB7XG4gICAgICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIFwiVXNlci1BZ2VudFwiOiBcIk1vemlsbGEvNS4wIChXaW5kb3dzIE5UIDEwLjApXCJcbiAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgbWV0aG9kOiBcIkdFVFwiXG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAvL2xvZyhqeEh0bWwpXG4gICAgICAgICAgICAgICAgZXZhbChqeEh0bWwubWF0Y2goL3ZhciBjb25maWcgPSB7W1xcc1xcU10qP30vKVswXSArIFwiXCIpO1xuICAgICAgICAgICAgICAgIHZhciBhcGlVcmwgPSAnaHR0cHM6Ly9wbGF5LmZyZWVvay52aXAvQVBJLnBocCc7XG4gICAgICAgICAgICAgICAgdmFyIGFwaUh0bWwgPSByZXF1ZXN0KGFwaVVybCwge1xuICAgICAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBcIlVzZXItQWdlbnRcIjogXCJNb3ppbGxhLzUuMCAoV2luZG93cyBOVCAxMC4wKVwiXG4gICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgIGJvZHk6IFwidXJsPVwiICsgY29uZmlnLnVybCArIFwiJnRpbWU9XCIgKyBjb25maWcudGltZSArIFwiJmtleT1cIiArIGNvbmZpZy5rZXksXG4gICAgICAgICAgICAgICAgICAgIG1ldGhvZDogXCJQT1NUXCJcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB2YXIganNvbiA9IEpTT04ucGFyc2UoYXBpSHRtbCk7XG4gICAgICAgICAgICAgICAgaWYgKGpzb24uY29kZSA9PSAyMDApIHtcbiAgICAgICAgICAgICAgICAgICAgcGxheVVybCA9IGpzb24udXJsO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdG9VcmwocGxheVVybCk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovLycgKyBqc29uLm1zZztcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuICd2aWRlbzovLycgKyBpbnB1dFxuICAgICAgICAgICAgfVxuXG4gICAgICAgIH1cbiAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgIHNldEVycm9yKGUpO1xuICAgICAgICAvL3JldHVybiAndmlkZW86Ly8nICsgaW5wdXRcbiAgICB9XG59KTtcblxuLy/nur/ot6/lkI3liJfooajnmoTlrprkvY1cbnZhciBhcnRzID0gcGFyc2VEb21Gb3JBcnJheShodG1sLCAnYm9keSYmLnRhYi1pdGVtJyk7XG5cbi8v57q/6Lev5ZCN5YiX6KGo5ZCN56ew55qE5a6a5L2NXG52YXIgdGFicyA9IFtdO1xuZm9yICh2YXIgaSBpbiBhcnRzKSB7XG4gICAgdGFicy5wdXNoKHBhcnNlRG9tRm9ySHRtbChhcnRzW2ldLCAnc3BhbiYmVGV4dCcpKVxufVxuXG4vL+aSreaUvuWIl+ihqOeahOWIl+ihqOeahOWumuS9jVxudmFyIGNvbnRzID0gcGFyc2VEb21Gb3JBcnJheShodG1sLCAnYm9keSYmLm1vZHVsZS1wbGF5LWxpc3QtY29udGVudHx8Lm1vZHVsZS1zb3J0dGFiJyk7XG52YXIgbGlzdHMgPSBbXTtcbmZvciAodmFyIGkgaW4gY29udHMpIHtcbiAgICB2YXIgdGVtcCA9IHBhcnNlRG9tRm9yQXJyYXkoY29udHNbaV0sICdib2R5JiZhOm5vdCg6Y29udGFpbnMo5o6S5bqPKSknKVxuICAgIGxpc3RzLnB1c2godGVtcClcbn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Z2V0UGFnZVRpdGxlKCkgKyBwYXJzZURvbUZvckh0bWwobGlzdFtqXSwgJ2EmJlRleHQnKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIFwicGljXCI6IHBhcnNlRG9tKGh0bWwsICcubGF6eWxvYWQmJmRhdGEtc3JjfHxkYXRhLW9yaWdpbmFsJyksXG4gICAgICAgICAgICAgICAgICAgICAgICBcImNvbnRlbnRcIjogcGFyc2VEb21Gb3JIdG1sKGh0bWwsICcubW9kdWxlLWluZm8taW50cm9kdWN0aW9uLWNvbnRlbnQmJlRleHQnKS5yZXBsYWNlKCfmlLbotbcnLCAnJyksXG4gICAgICAgICAgICAgICAgICAgICAgICBcImZyb21cIjogZ2V0UGFnZVRpdGxlKCkgKyBwYXJzZURvbUZvckh0bWwobGlzdFtqXSwgJ2EmJlRleHQnKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIFwidXJsXCI6IHBhcnNlRG9tKGxpc3Rbal0sICdhJiZocmVmJylcbiAgICAgICAgICAgICAgICAgICAgfSkpO1xuICAgICAgICAgICAgICAgICAgICB2YXIgZXh0cmF4ID0ge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWQ6IHBhcnNlRG9tKGxpc3Rbal0sICdhJiZocmVmJylcbiAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBwYXJzZURvbUZvckh0bWwobGlzdFtqXSwgJ2EmJlRleHQnKS5yZXBsYWNlKC/nrKx86ZuGfOivnXzmnJ8vZywgJycpLFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiB1cmx4LFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IGxpc3QubGVuZ3RoID4gNCA/ICd0ZXh0XzUnIDogJ3RleHRfMicsXG4gICAgICAgICAgICAgICAgICAgICAgICBleHRyYTogZXh0cmF4XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgfVxuICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgICBkLnB1c2goe1xuICAgICAgICAgICAgICAgIHRpdGxlOiAn5rKh5pyJ6YCJ6ZuG5ZOf77yM5LiN5L+h54K55Zu+54mH5Y6755yL55yL8J+RgCcsXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6ICd0ZXh0X2NlbnRlcl8xJ1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICB9IGVsc2Uge1xuICAgICAgICB0cnkge1xuICAgICAgICAgICAgZm9yICh2YXIgaiA9IDA7IGogPCBsaXN0Lmxlbmd0aDsgaisrKSB7XG4gICAgICAgICAgICAgICAgaWYgKHRmcHVzaCA9PSAnMCcpIHtcbiAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBwYXJzZURvbUZvckh0bWwobGlzdFtqXSwgJ2EmJlRleHQnKS5yZXBsYWNlKC/nrKx86ZuGfOivnXzmnJ8vZywgJycpLFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiBwYXJzZURvbShsaXN0W2pdLCAnYSYmaHJlZicpICsgbGF6eSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBsaXN0Lmxlbmd0aCA+IDQgPyAndGV4dF81JyA6ICd0ZXh0XzInXG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciB1cmx4ID0gJ2hpa2VyOi8vcGFnZS9wdXNoP3B1c2h1cmw9JyArIGVuY29kZVVSSUNvbXBvbmVudChKU09OLnN0cmluZ2lmeSh7XG4gICAgICAgICAgICAgICAgICAgICAgICBcIm5hbWVcIjogZ2V0UGFnZVRpdGxlKCkgKyBwYXJzZURvbUZvckh0bWwobGlzdFtqXSwgJ2EmJlRleHQnKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIFwicGljXCI6IHBhcnNlRG9tKGh0bWwsICcubGF6eWxvYWQmJmRhdGEtc3JjfHxkYXRhLW9yaWdpbmFsJyksXG4gICAgICAgICAgICAgICAgICAgICAgICBcImNvbnRlbnRcIjogcGFyc2VEb21Gb3JIdG1sKGh0bWwsICcubW9kdWxlLWluZm8taW50cm9kdWN0aW9uLWNvbnRlbnQmJlRleHQnKS5yZXBsYWNlKCfmlLbotbcnLCAnJyksXG4gICAgICAgICAgICAgICAgICAgICAgICBcImZyb21cIjogZ2V0UGFnZVRpdGxlKCkgKyBwYXJzZURvbUZvckh0bWwobGlzdFtqXSwgJ2EmJlRleHQnKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIFwidXJsXCI6IHBhcnNlRG9tKGxpc3Rbal0sICdhJiZocmVmJylcbiAgICAgICAgICAgICAgICAgICAgfSkpO1xuICAgICAgICAgICAgICAgICAgICB2YXIgZXh0cmF4ID0ge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWQ6IHBhcnNlRG9tKGxpc3Rbal0sICdhJiZocmVmJylcbiAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBwYXJzZURvbUZvckh0bWwobGlzdFtqXSwgJ2EmJlRleHQnKS5yZXBsYWNlKC/nrKx86ZuGfOivnXzmnJ8vZywgJycpLFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiB1cmx4LFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IGxpc3QubGVuZ3RoID4gNCA/ICd0ZXh0XzUnIDogJ3RleHRfMicsXG4gICAgICAgICAgICAgICAgICAgICAgICBleHRyYTogZXh0cmF4XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgICAgZC5w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KSA9PiB7XFxuICAgICAgICBsZXQgc3ViX2NhdGVnb3JpZXMgPSBwZGZhKGNhdGVnb3J5LCDlsI/nsbvlrprkvY0pO1xcbiAgICAgICAgaWYgKGluZGV4ID09PSAwKSB7XFxuICAgICAgICAgICAgc3ViX2NhdGVnb3JpZXMuZm9yRWFjaCgoaXRlbSwga2V5KSA9PiB7XFxuICAgICAgICAgICAgICAgIGxldCB0aXRsZSA9IHBkZmgoaXRlbSwg5YiG57G75qCH6aKYKVxcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGtleS50b1N0cmluZygpID09PSBjYXRlX3RlbXBbaW5kZXhdID8gJ+KAnOKAnOKAneKAnTxiPjxzcGFuIHN0eWxlPVxcXCJjb2xvcjogJyArIOWIhuexu+minOiJsiArICdcXFwiPicgKyB0aXRsZSArICc8L3NwYW4+PC9iPicgOiB0aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogJChwZChpdGVtLCDliIbnsbvpk77mjqUpICsgJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKHBhcmFtcykgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBuZXdfY2F0ZSA9IFtdXFxuICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1zLmNhdGVfdGVtcC5mb3JFYWNoKChjYXRlLCBpbmRleCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdfY2F0ZS5wdXNoKGluZGV4ID09PSAwID8gcGFyYW1zLmtleS50b1N0cmluZygpIDogXFxcIjBcXFwiKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0VmFyKE1ZX1JVTEUudGl0bGUsIEpTT04uc3RyaW5naWZ5KG5ld19jYXRlKSlcXG4gICAgICAgICAgICAgICAgICAgICAgICBwdXRWYXIoTVlfUlVMRS51cmwsIGlucHV0KVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIlxcbiAgICAgICAgICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhdGVfdGVtcDogY2F0ZV90ZW1wLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGtleToga2V5LFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhZ2U6IHBhZ2UsXFxuICAgICAgICAgICAgICAgICAgICB9KSxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbicsXFxuICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcImJsYW5rX2Jsb2NrXFxcIlxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgfSBlbHNlIGlmIChmb2xkID09PSAnMScpIHtcXG4gICAgICAgICAgICBzdWJfY2F0ZWdvcmllcy5mb3JFYWNoKChpdGVtLCBrZXkpID0+IHtcXG4gICAgICAgICAgICAgICAgbGV0IHRpdGxlID0gcGRmaChpdGVtLCDliIbnsbvmoIfpopgpXFxuICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZToga2V5LnRvU3RyaW5nKCkgPT09IGNhdGVfdGVtcFtpbmRleF0gPyAn4oCc4oCc4oCd4oCdPGI+PHNwYW4gc3R5bGU9XFxcImNvbG9yOiAnICsg5YiG57G76aKc6ImyICsgJ1xcXCI+JyArIHRpdGxlICsgJzwvc3Bhbj48L2I+JyA6IHRpdGxlLFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiAkKHBkKGl0ZW0sIOWIhuexu+mTvuaOpSkgKyAnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgocGFyYW1zKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1zLmNhdGVfdGVtcFtwYXJhbXMuaW5kZXhdID0gcGFyYW1zLmtleS50b1N0cmluZygpXFxuXFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0VmFyKE1ZX1JVTEUudGl0bGUsIEpTT04uc3RyaW5naWZ5KHBhcmFtcy5jYXRlX3RlbXApKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHB1dFZhcihNWV9SVUxFLnVybCwgaW5wdXQpXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSlcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiXFxuICAgICAgICAgICAgICAgICAgICB9LCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2F0ZV90ZW1wOiBjYXRlX3RlbXAsXFxuICAgICAgICAgICAgICAgICAgICAgICAgaW5kZXg6IGluZGV4LFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGtleToga2V5LFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhZ2U6IHBhZ2UsXFxuICAgICAgICAgICAgICAgICAgICB9KSxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbicsXFxuICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcImJsYW5rX2Jsb2NrXFxcIlxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgfVxcbiAgICB9KVxcbn1cXG5cIn0se1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcIuaOqOmAgVwiLFwicGF0aFwiOlwicHVzaFwiLFwicnVsZVwiOlwianM6XFxubGV0IGl0ZW1zID0gW107XFxubGV0IHB1c2hpbiA9IGRlY29kZVVSSUNvbXBvbmVudChnZ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