xiaomianao666

小程序:厂长

Jul 13th, 2024
303
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@厂长@eyJmaXJzdEhlYWRlciI6ImNsYXNzIiwibGFzdF9jaGFwdGVyX3J1bGUiOiIiLCJ0aXRsZSI6IuWOgumVvyIsImF1dGhvciI6IuW/g+mtlCIsInVybCI6Imhpa2VyOi8vZW1wdHkjI2h0dHBzOi8vY3p6eS50b3AvZGJ0b3AyNTAvcGFnZS9meXBhZ2UiLCJ2ZXJzaW9uIjo3LCJjb2xfdHlwZSI6Im1vdmllXzMiLCJjbGFzc19uYW1lIjoiIiwidHlwZSI6InZpZGVvIiwiY2xhc3NfdXJsIjoiIiwiYXJlYV9uYW1lIjoiIiwiYXJlYV91cmwiOiIiLCJzb3J0X25hbWUiOiIiLCJ5ZWFyX25hbWUiOiIiLCJzb3J0X3VybCI6IiIsInllYXJfdXJsIjoiIiwiZmluZF9ydWxlIjoianM6XG52YXIgZCA9IFtdO1xudmFyIGdldFJhbmdlQ29sb3JzID0gZnVuY3Rpb24oKSB7XG4gICAgcmV0dXJuICcjJyArICgnMDAwMDAnICsgKE1hdGgucmFuZG9tKCkgKiAweDEwMDAwMDAgPDwgMCkudG9TdHJpbmcoMTYpKS5zdWJzdHIoLTYpO1xufVxuXG5jb25zdCDliIbnsbvpopzoibIgPSBnZXRSYW5nZUNvbG9ycygpXG5jb25zdCDlpKfnsbvlrprkvY0gPSAnYm9keSYmLm5hdmxpc3QnXG4vL2NvbnN0IOaLvOaOpeWIhuexuyA9ICdib2R5JiYuY3QuZm9sbG93LWFsaWduJ1xuY29uc3Qg5bCP57G75a6a5L2NID0gJ2JvZHkmJmE6bm90KDptYXRjaGVzKOmmlumhtXzku4rml6Xmm7TmlrB854Ot5qacfEFQUHznpo/liKl854Ot6ZeofOaOkuihjHzlhax85a6YfOWcsOWdgCkpJ1xuY29uc3Qg5YiG57G75qCH6aKYID0g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QoKSk7XG4gICAgbG9nKCfojrflj5bpqozor4HnoIE6JyArIHZjb2RlKTtcbiAgICBsZXQgcmV0ID0g5o+Q5Lqk6aqM6K+B56CBKCdodHRwczovL3d3dy42MDgweXkxLmNvbS9pbmRleC5waHAvYWpheC92ZXJpZnlfY2hlY2s/dHlwZT1zZWFyY2gmdmVyaWZ5PScgKyB2Y29kZSwgZmFsc2UsIGZhbHNlLCB7fSk7XG4gICAgaGlkZUxvYWRpbmcoKTtcbiAgICAvL2xvZyhyZXQpXG4gICAgaWYgKC9cIm1zZ1wiLy50ZXN0KHJldCkgJiYgL1wib2tcIi8udGVzdChyZXQpKSB7XG4gICAgICAgIC8vIHJlZnJlc2hQYWdlKHRydWUpO1xuICAgICAgICBodG1sID0g6I635Y+W5rqQ56CBKE1ZX1VSTCk7XG4gICAgICAgIC8vbG9nKGh0bWwpO1xuICAgICAgICBpZiAoL+ivt+S4jeimgemikee5geaTjeS9nC8udGVzdChodG1sKSkge1xuICAgICAgICAgICAgc2V0UmVzdWx0KFt7XG4gICAgICAgICAgICAgICAgdGl0bGU6ICfmkJzntKLpl7TpmpQ156eSJyxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3RleHRfMScsXG4gICAgICAgICAgICAgICAgdXJsOiAndG9hc3Q6Ly/nlrzvvIHliKvngrnvvIEnXG4gICAgICAgICAgICB9XSk7XG4gICAgICAgIH1cbiAgICB9IGVsc2Uge1xuICAgICAgICAvL2xvZygn6aqM6K+B5pyq6YCa6L+HOicrcmV0KTtcbiAgICAgICAgc2V0UmVzdWx0KFt7XG4gICAgICAgICAgICB0aXRsZTogJ+mqjOivgeacqumAmui/h++8jOivt+WwneivlemHjeaWsOaQnOe0oicsXG4gICAgICAgICAgICBjb2xfdHlwZTogJ3RleHRfMScsXG4gICAgICAgICAgICB1cmw6ICd0b2FzdDovL+eWvO+8geWIq+eCue+8gSdcbiAgICAgICAgfV0pO1xuICAgIH1cbn0iLCJkZXRhaWxfY29sX3R5cGUiO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vKVswXSArIFwiXCIpO1xuICAgICAgICB2YXIgYXBpVXJsID0gJyc7XG4gICAgICAgIHZhciBhcGlIdG1sID0gcmVxdWVzdChhcGlVcmwsIHtcbiAgICAgICAgICAgIGhlYWRlcnM6IHtcbiAgICAgICAgICAgICAgICBcIlVzZXItQWdlbnRcIjogXCJNb3ppbGxhLzUuMCAoV2luZG93cyBOVCAxMC4wKVwiXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgYm9keTogXCJ1cmw9XCIgKyBjb25maWcudXJsICsgXCImdGltZT1cIiArIGNvbmZpZy50aW1lICsgXCIma2V5PVwiICsgY29uZmlnLmtleSxcbiAgICAgICAgICAgIG1ldGhvZDogXCJQT1NUXCJcbiAgICAgICAgfSk7XG4gICAgICAgIHZhciBqc29uID0gSlNPTi5wYXJzZShhcGlIdG1sKTtcbiAgICAgICAgaWYgKGpzb24uY29kZSA9PSAyMDApIHtcbiAgICAgICAgICAgIHBsYXlVcmwgPSBqc29uLnVybDtcbiAgICAgICAgICAgIHJldHVybiB0b1VybChwbGF5VXJsKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly8nICsganNvbi5tc2c7XG4gICAgICAgIH1cblxuICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgLy9zZXRFcnJvcihlKTtcbiAgICAgICAgc2hvd0xvYWRpbmcoXCLmraPlnKjov5vooYzmo4DntKLvvIzor7fnqI3lgJkuLi5cIik7XG4gICAgICAgIHZhciB2aWRlbyA9ICd4NVJ1bGU6Ly8nICsgaW5wdXQgKyAnQCcgKyAkLnRvU3RyaW5nKCgpID0+IHtcbiAgICAgICAgICAgIC8vZmJhLmxvZyhmYmEuZ2V0VXJscygpKVxuICAgICAgICAgICAgdmFyIHVybHMgPSBfZ2V0VXJscygpXG4gICAgICAgICAgICB2YXIgZXhjbHVkZSA9IC9wbGF5bTN1OHxtM3U4XFwudHZ8bWluXFwuY3NzfDQwNFxcLm0zdTh8XFwuY3NzLztcbiAgICAgICAgICAgIHZhciBjb250YWluID0gL1xcLm1wNHxcXC5tM3U4fFxcLmZsdnxcXC5hdml8XFwubXBlZ3xcXC53bXZ8XFwubW92fFxcLnJtdmJ8XFwuZGF0fHFxQkZkb3dubG9hZHxtaW1lPXZpZGVvJTJGfHZpZGVvX21wNC87XG4gICAgICAgICAgICBmb3IgKHZhciBpIGluIHVybHMpIHtcbiAgICAgICAgICAgICAgICBpZiAoIWV4Y2x1ZGUudGVzdCh1cmxzW2ldKSAmJiBjb250YWluLnRlc3QodXJsc1tpXSkpIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gZnlfYnJpZGdlX2FwcC5sb2codXJsc1tpXSlcbiAgICAgICAgICAgICAgICAgICAgaWYgKC9tZ3R2fHNvaHUvLnRlc3QodXJsc1tpXSkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB1cmxzW2ldICsgXCI7e1VzZXItQWdlbnRATW96aWxsYS81LjAgKFdpbmRvd3MgTlQgMTAuMCl9XCI7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoL2JpbGkvLnRlc3QodXJsc1tpXSkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB1cmxzW2ldICsgXCI7e1VzZXItQWdlbnRATW96aWxsYS81LjAmJlJlZmVyZXJAaHR0cHM6Ly93d3cuYmlsaWJpbGkuY29tfVwiO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKC9peGlndWEvLnRlc3QodXJsc1tpXSkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB1cmxzW2ldICsgXCIjaXNWaWRlbz10cnVlI1wiICsgXCIjLm1wNDt7UmVmZXJlckBodHRwczovL3d3dy5peGlndWEuY29tLyYmVXNlci1BZ2VudEBNb3ppbGxhLzUuMH1cIjtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybi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PSBsaXN0Lmxlbmd0aCAtIDE7IGogPj0gMDsgai0tKSB7XG4gICAgICAgICAgICAgICAgaWYgKHRmcHVzaCA9PSAnMCcpIHtcbiAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBwYXJzZURvbUZvckh0bWwobGlzdFtqXSwgJ2EmJlRleHQnKS5yZXBsYWNlKC/nrKx86ZuGfOivnXzmnJ8vZywgJycpLFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiBwYXJzZURvbShsaXN0W2pdLCAnYSYmaHJlZicpICsgbGF6eSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBsaXN0Lmxlbmd0aCA+IDQgPyAndGV4dF81JyA6ICd0ZXh0XzInXG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciB1cmx4ID0gJ2hpa2VyOi8vcGFnZS9wdXNoP3B1c2h1cmw9JyArIGVuY29kZVVSSUNvbXBvbmVudChKU09OLnN0cmluZ2lmeSh7XG4gICAgICAgICAgICAgICAgICAgICAgICBcIm5hbWVcIjogZ2V0UGFnZVRpdGxlKCkgKyBwYXJzZURvbUZvckh0bWwobGlzdFtqXSwgJ2EmJlRleHQnKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIFwicGljXCI6IHBhcnNlRG9tKGh0bWwsICcubGF6eWxvYWQmJmRhdGEtc3JjfHxkYXRhLW9yaWdpbmFsJyksXG4gICAgICAgICAgICAgICAgICAgICAgICBcImNvbnRlbnRcIjogcGFyc2VEb21Gb3JIdG1sKGh0bWwsICcudmlkZW8taW5mby1jb250ZW50JiZUZXh0JykucmVwbGFjZSgn5pS26LW3JywgJycpLFxuICAgICAgICAgICAgICAgICAgICAgICAgXCJmcm9tXCI6IGdldFBhZ2VUaXRsZSgpICsgcGFyc2VEb21Gb3JIdG1sKGxpc3Rbal0sICdhJiZUZXh0JyksXG4gICAgICAgICAgICAgICAgICAgICAgICBcInVybFwiOiBwYXJzZURvbShsaXN0W2pdLCAnYSYmaHJlZicpXG4gICAgICAgICAgICAgICAgICAgIH0pKTtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGV4dHJheCA9IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlkOiBwYXJzZURvbShsaXN0W2pdLCAnYSYmaHJlZicpXG4gICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogcGFyc2VEb21Gb3JIdG1sKGxpc3Rbal0sICdhJiZUZXh0JykucmVwbGFjZSgv56ysfOmbhnzor5185pyfL2csICcnKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogdXJseCxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBsaXN0Lmxlbmd0aCA+IDQgPyAndGV4dF81JyA6ICd0ZXh0XzInLFxuICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmE6IGV4dHJheFxuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIH1cbiAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgICAgZC5wdXNoKHtcbiAgICAgICAgICAgICAgICB0aXRsZTogJ+ayoeaciemAiembhuWTn++8jOS4jeS/oeeCueWbvueJh+WOu+eci+eci/CfkYAnLFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiAndGV4dF9jZW50ZXJfMSdcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgfSBlbHNlIHtcbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgIGZvciAodmFyIGogPSAwOyBqIDwgbGlzdC5sZW5ndGg7IGorKykge1xuICAgICAgICAgICAgICAgIGlmICh0ZnB1c2ggPT0gJzAnKSB7XG4gICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogcGFyc2VEb21Gb3JIdG1sKGxpc3Rbal0sICdhJiZUZXh0JykucmVwbGFjZSgv56ysfOmbhnzor5185pyfL2csICcnKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogcGFyc2VEb20obGlzdFtqXSwgJ2EmJmhyZWYnKSArIGxhenksXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogbGlzdC5sZW5ndGggPiA0ID8gJ3RleHRfNScgOiAndGV4dF8yJ1xuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICB2YXIgdXJseCA9ICdoaWtlcjovL3BhZ2UvcHVzaD9wdXNodXJsPScgKyBlbmNvZGVVUklDb21wb25lbnQoSlNPTi5zdHJpbmdpZnkoe1xuICAgICAgICAgICAgICAgICAgICAgICAgXCJuYW1lXCI6IGdldFBhZ2VUaXRsZSgpICsgcGFyc2VEb21Gb3JIdG1sKGxpc3Rbal0sICdhJiZUZXh0JyksXG4gICAgICAgICAgICAgICAgICAgICAgICBcInBpY1wiOiBwYXJzZURvbShodG1sLCAnLmxhenlsb2FkJiZkYXRhLXNyY3x8ZGF0YS1vcmlnaW5hbCcpLFxuICAgICAgICAgICAgICAgICAgICAgICAgXCJjb250ZW50XCI6IHBhcnNlRG9tRm9ySHRtbChodG1sLCAnLnZpZGVvLWluZm8tY29udGVudCYmVGV4dCcpLnJlcGxhY2UoJ+aUtui1tycsICcnKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIFwiZnJvbVwiOiBnZXRQYWdlVGl0bGUoKSArIHBhcnNlRG9tRm9ySHRtbChsaXN0W2pdLCAnYSYmVGV4dCcpLFxuICAgICAgICAgICAgICAgICAgICAgICAgXCJ1cmxcIjogcGFyc2VEb20obGlzdFtqXSwgJ2EmJmhyZWYnKVxuICAgICAgICAgICAgICAgICAgICB9KSk7XG4gICAgICAgICAgICAgICAgICAgIHZhciBleHRyYXggPSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZDogcGFyc2VEb20obGlzdFtqXSwgJ2EmJmhyZWYnKVxuICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IHBhcnNlRG9tRm9ySHRtbChsaXN0W2pdLCAnYSYmVGV4dCcpLnJlcGxhY2UoL+esrHzpm4Z86K+dfOacny9nLCAnJyksXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6IHVybHgsXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogbGlzdC5sZW5ndGggPiA0ID8gJ3RleHRfNScgOiAndGV4dF8yJyxcbiAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhOiBleHRyYXhcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgICBkLnB1c2goe1xuICAgICAgICAgICAgICAgIHRpdGxlOiAn5rKh5pyJ6YCJ6ZuG5ZOf77yM5LiN5L+h54K55Zu+54mH5Y6755yL55yL8J+RgCcsXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6ICd0ZXh0X2NlbnRlcl8xJ1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cblxuICAgIH1cbn1cbnNldFRhYnModGFicywgTVlfVVJMKTtcbnNldExpc3RzKGxpc3RzLCBnZXRWYXIoTVlfVVJMLCAnMCcpKTtcbmQucHVzaCh7XG4gICAgdGl0bGU6ICc8YnI+JyxcbiAgICBjb2xfdHlwZTogJ3JpY2hfdGV4dCdcbn0pO1xuc2V0UmVzdWx0KGQpOyIsInNkZXRhaWxfY29sX3R5cGUiOiJtb3ZpZV8xIiwic2RldGFpbF9maW5kX3J1bGUiOiIqIiwidWEiOiJtb2JpbGUiLCJwcmVS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FxcXCJoaWtlcjovL2VtcHR5XFxcIlxcbiAgICAgICAgfSwgZm9sZCksXFxuICAgICAgICBjb2xfdHlwZTogJ3Njcm9sbF9idXR0b24nLFxcbiAgICB9KVxcblxcbmNhdGVnb3JpZXMuZm9yRWFjaCgoY2F0ZWdvcnksIGluZGV4KSA9PiB7XFxuICAgICAgICBsZXQgc3ViX2NhdGVnb3JpZXMgPSBwZGZhKGNhdGVnb3J5LCDlsI/nsbvlrprkvY0pO1xcbiAgICAgICAgaWYgKGluZGV4ID09PSAwKSB7XFxuICAgICAgICAgICAgc3ViX2NhdGVnb3JpZXMuZm9yRWFjaCgoaXRlbSwga2V5KSA9PiB7XFxuICAgICAgICAgICAgICAgIGxldCB0aXRsZSA9IHBkZmgoaXRlbSwg5YiG57G75qCH6aKYKVxcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGtleS50b1N0cmluZygpID09PSBjYXRlX3RlbXBbaW5kZXhdID8gJ+KAnOKAnOKAneKAnTxiPjxzcGFuIHN0eWxlPVxcXCJjb2xvcjogJyArIOWIhuexu+minOiJsiArICdcXFwiPicgKyB0aXRsZSArICc8L3NwYW4+PC9iPicgOiB0aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogJChwZChpdGVtLCDliIbnsbvpk77mjqUpICsgJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKHBhcmFtcykgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBuZXdfY2F0ZSA9IFtdXFxuICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1zLmNhdGVfdGVtcC5mb3JFYWNoKChjYXRlLCBpbmRleCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdfY2F0ZS5wdXNoKGluZGV4ID09PSAwID8gcGFyYW1zLmtleS50b1N0cmluZygpIDogXFxcIjBcXFwiKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0VmFyKE1ZX1JVTEUudGl0bGUsIEpTT04uc3RyaW5naWZ5KG5ld19jYXRlKSlcXG4gICAgICAgICAgICAgICAgICAgICAgICBwdXRWYXIoTVlfUlVMRS51cmwsIGlucHV0KVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIlxcbiAgICAgICAgICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhdGVfdGVtcDogY2F0ZV90ZW1wLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGtleToga2V5LFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhZ2U6IHBhZ2UsXFxuICAgICAgICAgICAgICAgICAgICB9KSxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbicsXFxuICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcImJsYW5rX2Jsb2NrXFxcIlxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgfSBlbHNlIGlmIChmb2xkID09PSAnMScpIHtcXG4gICAgICAgICAgICBzdWJfY2F0ZWdvcmllcy5mb3JFYWNoKChpdGVtLCBrZXkpID0+IHtcXG4gICAgICAgICAgICAgICAgbGV0IHRpdGxlID0gcGRmaChpdGVtLCDliIbnsbvmoIfpopgpXFxuICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZToga2V5LnRvU3RyaW5nKCkgPT09IGNhdGVfdGVtcFtpbmRleF0gPyAn4oCc4oCc4oCd4oCdPGI+PHNwYW4gc3R5bGU9XFxcImNvbG9yOiAnICsg5YiG57G76aKc6ImyICsgJ1xcXCI+JyArIHRpdGxlICsgJzwvc3Bhbj48L2I+JyA6IHRpdGxlLFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiAkKHBkKGl0ZW0sIOWIhuexu+mTvuaOpSkgKyAnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgocGFyYW1zKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1zLmNhdGVfdGVtcFtwYXJhbXMuaW5kZXhdID0gcGFyYW1zLmtleS50b1N0cmluZygpXFxuXFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0VmFyKE1ZX1JVTEUudGl0bGUsIEpTT04uc3RyaW5naWZ5KHBhcmFtcy5jYXRlX3RlbXApKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHB1dFZhcihNWV9SVUxFLnVybCwgaW5wdXQpXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSlcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiXFxuICAgICAgICAgICAgICAgICAgICB9LCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2F0ZV90ZW1wOiBjYXRlX3RlbXAsXFxuICAgICAgICAgICAgICAgICAgICAgICAgaW5kZXg6IGluZGV4LFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGtleToga2V5LFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhZ2U6IHBhZ2UsXFxuICAgICAgICAgICAgICAgICAgICB9KSxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbicsXFxuICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcImJsYW5rX2Jsb2NrXFxcIlxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgfVxcbiAgICB9KVxcbn1cXG5cIn1dIiwiaWNvbiI6Imh0dHBzOi8vaW1nLnB5MTA4MHAuY29tLy8yMDIxLzEwLzVjN2E2NzM1NmNlYzI4LmljbyIsInByb3h5IjoiIn0=
Add Comment
Please, Sign In to add comment