Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@Unicom@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6IiIsInRpdGxlIjoiVW5pY29tIiwiYXV0aG9yIjoiUngmUmVib3JuIiwidXJsIjoiaGlrZXI6Ly9lbXB0eSIsInZlcnNpb24iOjIyMDkwMzAyLCJjb2xfdHlwZSI6Im1vdmllXzMiLCJjbGFzc19uYW1lIjoiIiwidHlwZSI6InRvb2wiLCJjbGFzc191cmwiOiIiLCJhcmVhX25hbWUiOiIiLCJhcmVhX3VybCI6IiIsInNvcnRfbmFtZSI6IiIsInllYXJfbmFtZSI6IiIsInNvcnRfdXJsIjoiIiwieWVhcl91cmwiOiIiLCJmaW5kX3J1bGUiOiJqczpcbnZhciByZXMgPSB7fTtcbnZhciBkID0gW107XG5jb25zdCB7XG4gICAgaGVhZGVyXG59ID0gJC5yZXF1aXJlKFwiaGlrZXI6Ly9wYWdlL2NsYXNzaWNIZWFkZXJcIik7XG5cbmFkZExpc3RlbmVyKCdvbkNsb3NlJywgJC50b1N0cmluZygoaGVhZGVyKSA9PiB7XG4gICAgY2xlYXJWYXIoXCJja19jb29raWVcIilcbiAgICBjbGVhclZhcihcImNrX2luZm9cIilcbiAgICBoZWFkZXIub25DbG9zZSgpO1xufSwgaGVhZGVyKSlcblxubGV0IGNvbW1vbkZ1bmMgPSBKU09OLnBhcnNlKHJlcXVlc3QoJ2hpa2VyOi8vcGFnZS9jb21tb24/cnVsZT0nICsgTVlfUlVMRS50aXRsZSkpLnJ1bGVcbmV2YWwoY29tbW9uRnVuYylcblxubGV0IGNrbGlzdCA9IFt7XG4gICAgXCJjb29raWVcIjogZmV0Y2goJ2hpa2VyOi8vZmlsZXMvY2FjaGUvY2sxLnR4dCcpLFxuICAgIFwiaW5mb1wiOiBmZXRjaCgnaGlrZXI6Ly9maWxlcy9jYWNoZS90YzEudHh0JyksXG4gICAgXCJpZFwiOiAxXG59LCB7XG4gICAgXCJjb29raWVcIjogZmV0Y2goJ2hpa2VyOi8vZmlsZXMvY2FjaGUvY2syLnR4dCcpLFxuICAgIFwiaW5mb1wiOiBmZXRjaCgnaGlrZXI6Ly9maWxlcy9jYWNoZS90YzIudHh0JyksXG4gICAgXCJpZFwiOiAyXG59LCBdXG50cnkge1xuICAgIGZvciAobGV0IGNrIG9mIGNrbGlzdCkge1xuICAgICAgICBpZiAoY2suY29va2llKSB7XG4gICAgICAgICAgICBkLnB1c2goe1xuICAgICAgICAgICAgICAgIHRpdGxlOiBjay5pbmZvID09PSBnZXRWYXIoJ2NrX2luZm8nLCBja2xpc3RbMF0uaW5mbykgPyBnZXRIZWFkMihjay5pbmZvKSA6IGNrLmluZm8sXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6ICdzY3JvbGxfYnV0dG9uJyxcbiAgICAgICAgICAgICAgICB1cmw6ICQoKS5sYXp5UnVsZShjayA9PiB7XG4gICAgICAgICAgICAgICAgICAgIHB1dFZhcignY2tfY29va2llJywgY2suY29va2llKVxuICAgICAgICAgICAgICAgICAgICBwdXRWYXIoJ2NrX2luZm8nLCBjay5pbmZvKVxuICAgICAgICAgICAgICAgICAgICBwdXRWYXIoJ2lkJywgY2suaWQpXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5YiH5o2i5oiQ5YqfJ1xuICAgICAgICAgICAgICAgIH0sIGNrKVxuICAgICAgICAgICAgfSlcbiAgICAgICAgfVxuICAgIH1cbiAgICBkLnB1c2goe1xuICAgICAgICAgICAgdGl0bGU6IFwiK1wiLFxuICAgICAgICAgICAgY29sX3R5cGU6ICdzY3JvbGxfYnV0dG9uJyxcbiAgICAgICAgICAgIHVybDogXCJoaWtlcjovL3BhZ2UvbG9naW5cIlxuICAgICAgICB9KVxuICAgIGQucHVzaCh7XG4gICAgICAgICAgICB0aXRsZTogXCItX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3LjM2XFxcIixcXG4gICAgICAgICAgICAgICAgJ0NvbnRlbnQtVHlwZSc6IFxcXCJhcHBsaWNhdGlvbi94LXd3dy1mb3JtLXVybGVuY29kZWQ7IGNoYXJzZXQ9VVRGLThcXFwiLFxcbiAgICAgICAgICAgICAgICAvLyAnQWNjZXB0LUVuY29kaW5nJzogJ2d6aXAsZGVmbGF0ZSdcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgbGV0IFBhcmFtcyA9IHtcXG4gICAgICAgICAgICAgICAgYXBpVHlwZTogXFxcIlxcXCIsXFxuICAgICAgICAgICAgICAgIG9ialRvRm9ybTogKG9iaikgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IHJlc3VsdCA9IFxcXCJcXFwiO1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IGtleXMgPSBPYmplY3Qua2V5cyhvYmopO1xcbiAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBrZXlzLmxlbmd0aDsgaSsrKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVzdWx0ICs9IChrZXlzW2ldICsgJz0nICsgb2JqW2tleXNbaV1dKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpIDwga2V5cy5sZW5ndGggLSAxKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc3VsdCArPSBcXFwiJlxcXCJcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmVzdWx0O1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGxldCBwYXJhbXMgPSB7XFxuICAgICAgICAgICAgICAgICdzaW1Db3VudCc6IDAsXFxuICAgICAgICAgICAgICAgICd5d19jb2RlJzogJycsXFxuICAgICAgICAgICAgICAgICdtb2JpbGUnOiBhY2MsXFxuICAgICAgICAgICAgICAgICdpc1JlbWJlclB3ZCc6ICd0cnVlJyxcXG4gICAgICAgICAgICAgICAgJ3Bhc3N3b3JkJzogcHdkLFxcbiAgICAgICAgICAgICAgICAna2V5VmVyc2lvbic6ICcnLFxcbiAgICAgICAgICAgICAgICAncGlwJzogJzEwLjEuMTAuMScsXFxuICAgICAgICAgICAgICAgICd0aW1lc3RhbXAnOiBOdW1iZXIodGltZSksXFxuICAgICAgICAgICAgICAgICdkZXZpY2VPUyc6ICdhbmRyb2lkMTEnLFxcbiAgICAgICAgICAgICAgICAncHJvdmluY2VDaGFuZWwnOiAnZ2VuZXJhbCcsXFxuICAgICAgICAgICAgICAgICdkZXZpY2VDb2RlJzogJ2YwOWFlYmRmMDFlNWIzNzNkMzVlNjdhN2NjNDQwYWI3JyxcXG4gICAgICAgICAgICAgICAgJ2FwcGlkJzogYXBwaWQsXFxuICAgICAgICAgICAgICAgICduZXRXYXknOiAnNUcnLFxcbiAgICAgICAgICAgICAgICAndmVyc2lvbic6ICdhbmRyb2lkQDguMDcwNCcsXFxuICAgICAgICAgICAgICAgICdkZXZpY2VJZCc6ICdmMDlhZWJkZjAxZTViMzczZDM1ZTY3YTdjYzQ0MGFiNycsXFxuICAgICAgICAgICAgICAgICdkZXZpY2VCcmFuZCc6ICd2aXZvJyxcXG4gICAgICAgICAgICAgICAgJ2RldmljZU1vZGVsJzogJ1YxOTE2QScsXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGxldCBwYXlsb2FkID0gUGFyYW1zLm9ialRvRm9ybShwYXJhbXMpO1xcbiAgICAgICAgICAgIHBhcmFtc1sncGFzc3dvcmQnXSA9IGVuY29kZVVSSUNvbXBvbmVudChwd2QpO1xcbiAgICAgICAgICAgIC8v566A5L6/Y29va2llXFxuICAgICAgICAgICAgbGV0IHJlc3VsdCA9IHJlcXVlc3QoXFxcImh0dHBzOi8vbS5jbGllbnQuMTAwMTAuY29tL21vYmlsZVNlcnZpY2UvbG9naW4uaHRtXFxcIiwge1xcbiAgICAgICAgICAgICAgICBoZWFkZXJzOiBoZWFkZXJzLFxcbiAgICAgICAgICAgICAgICBib2R5OiBwYXlsb2FkLFxcbiAgICAgICAgICAgICAgICBtZXRob2Q6IFxcXCJwb3N0XFxcIlxcbiAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgLy9sb2coZ2V0Q29va2llKFxcXCJodHRwczovL20uY2xpZW50LjEwMDEwLmNvbS9tb2JpbGVTZXJ2aWNlL2xvZ2luLmh0bVxcXCIpKVxcbiAgICAgICAgICAgIC8vdmFyIGVjc190b2tlbiA9IEpTT04ucGFyc2UocmVzdWx0KS5lY3NfdG9rZW47XFxuICAgICAgICAgICAgLy92YXIgY29va2llID0gXFxcImVjc19hY2M9XFxcIiArIGFjYyArIFxcXCI7ZWNzX3Rva2VuPVxcXCIgKyBlY3NfdG9rZW47XFxuICAgICAgICAgICAgdmFyIGNvb2tpZSA9IGdldENvb2tpZShcXFwiaHR0cHM6Ly9tLmNsaWVudC4xMDAxMC5jb20vbW9iaWxlU2VydmljZS9sb2dpbi5odG1cXFwiKTtcXG4gICAgICAgICAgICB3cml0ZUZpbGUoJ2hpa2VyOi8vZmlsZXMvY2FjaGUvY2snICsgZ2V0VmFyKCdpZCcpICsgJy50eHQnLCBjb29raWUpO1xcbiAgICAgICAgICAgIC8v566A5L6/Y29va2llXFxuICAgICAgICAgICAgXFxuICAgICAgICAgICAgLy/lrozmlbRjb29raWVcXG4gICAgICAgICAgICAvKlxcbiAgICAgICAgICAgIGxldCByZXN1bHRzID0gSlNPTi5wYXJzZShyZXF1ZXN0KFxcXCJodHRwczovL20uY2xpZW50LjEwMDEwLmNvbS9tb2JpbGVTZXJ2aWNlL2xvZ2luLmh0bVxcXCIsIHtcXG4gICAgICAgICAgICAgICAgaGVhZGVyczogaGVhZGVycyxcXG4gICAgICAgICAgICAgICAgYm9keTogcGF5bG9hZCxcXG4gICAgICAgICAgICAgICAgbWV0aG9kOiBcXFwicG9zdFxcXCIsXFxuICAgICAgICAgICAgICAg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A9IF9jb2RlW1xcXCJkYXRhXFxcIl1bXFxcImZsb3dDaGFuZ2VMaXN0XFxcIl07XFxuICAgICAgICBmb3IgKHZhciB4IGluIF9saXN0KSB7XFxuICAgICAgICAgICAgdmFyIHVybCA9IFxcXCJodHRwczovL20uY2xpZW50LjEwMDEwLmNvbS9tYWN0aXZpdHkvZmxvd0RhdGEvdGFrZUZsb3cuaHRtP2Zsb3dJZD1cXFwiICsgX2xpc3RbeF0uaWQ7XFxuICAgICAgICAgICAgdmFyIGNvZGUgPSBKU09OLnBhcnNlKHJlcXVlc3QodXJsLCB7XFxuICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJDb29raWVcXFwiOiBjb29raWVcXG4gICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAgdGltZW91dDozMDAwLFxcbiAgICAgICAgICAgICAgICBtZXRob2Q6ICdHRVQnXFxuICAgICAgICAgICAgfSkpO1xcbiAgICAgICAgICAgIFxcbiAgICAgICAgICAgIC8vbG9nKGNvZGUpXFxuICAgICAgICAgICAgaWYgKGNvZGUuY29kZSA9PSBcXFwiMDAwMFxcXCIpIHtcXG4gICAgICAgICAgICAgICAgbG9nKFxcXCLjgJDmsoPkuYvmoJEt6aKG5rWB6YeP44CROiA0Tea1gemHjyB4IDFcXFwiKTtcXG4gICAgICAgICAgICB9IGVsc2UgaWYgKGNvZGUuY29kZSA9PSBcXFwiOTk5OVxcXCIpIHtcXG4gICAgICAgICAgICAgICAgbG9nKFxcXCLlt7Lnu4/pooblj5bov4fkuoZcXFwiKTtcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICBsb2coXFxcIuWksei0peS6hlxcXCIpO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBcXG4gICAgICAgIH1cXG4gICAgICAgIHJlZnJlc2hQYWdlKCk7XFxuICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v55yLbG9nX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