Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@低端影视🐹@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6ImpzOk1ZX1VSTCA9IE1ZX1VSTC5zcGxpdCgnIyMnKVsxXTtcbnZhciBodG1sID0gZmV0Y2hQQyhNWV9VUkwpO1xudmFyIGxhc3QgPSBKU09OLnBhcnNlKHBkZmgoaHRtbCwnYm9keSYmLndwLXBsYXlsaXN0LXNjcmlwdCYmSHRtbCcpKS50cmFja3MucG9wKCkuY2FwdGlvbjtcbnNldFJlc3VsdChsYXN0KTsiLCJ0aXRsZSI6IuS9juerr+W9seinhvCfkLkiLCJhdXRob3IiOiJkeTIwMjAiLCJ1cmwiOiJoaWtlcjovL2VtcHR5IyNodHRwczovL2RkeXMucHJvLyMjZnlwYWdlIiwidmVyc2lvbiI6MjAyMzA2MTIsImNvbF90eXBlIjoibW92aWVfMyIsImNsYXNzX25hbWUiOiIiLCJ0eXBlIjoidmlkZW8iLCJjbGFzc191cmwiOiIiLCJhcmVhX25hbWUiOiIiLCJhcmVhX3VybCI6IiIsInNvcnRfbmFtZSI6IiIsInllYXJfbmFtZSI6IiIsInNvcnRfdXJsIjoiIiwieWVhcl91cmwiOiIiLCJmaW5kX3J1bGUiOiJqczpcbk1ZX1VSTCA9IE1ZX1VSTC5zcGxpdCgnIyMnKVsxXTtcbnZhciBkID0gW107XG5jb25zdCDliIbnsbvpopzoibIgPSAnRkY2Njk5JztcbmNvbnN0IOWkp+exu+WumuS9jSA9ICdib2R5JiYjcHJpbWFyeS1tZW51JztcbmNvbnN0IOaLvOaOpeWIhuexuyA9ICdib2R5JiYjcHJpbWFyeS1tZW51JiZ1bFtyb2xlXTpub3QoOm1hdGNoZXMo56uZ6ZW/KSknO1xuY29uc3Qg5bCP57G75a6a5L2NX+S4uyA9ICdib2R5JiZhOm1hdGNoZXMo5omA5pyJ55S15b2xfOi/nui9veWJp+mbhnzmnKz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cyMjk5NzcnKSA6IHN0cm9uZygn4oinJywgJ0NDMDAzMycpLFxuICAgIHVybDogJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgo566A5LuLKSA9PiB7XG4gICAgICAgIHJjKCdodHRwczovL2dpdGVlLmNvbS9taXN0eXdhdGVyL2hpa2VyX2luZm8vcmF3L21hc3Rlci9mJywgMjQpO1xuICAgICAgICB2YXIgaW50cm8gPSBnZXRNeVZhcignaW50cm8nLCAnMCcpO1xuICAgICAgICBpZiAoaW50cm8gPT0gJzAnKSB7XG4gICAgICAgICAgICB1cGRhdGVJdGVtKCdpbnRybycsIHtcbiAgICAgICAgICAgICAgICB0aXRsZTogc3NSKOeugOS7iywgJzk5NjZBQScpLFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiAncmljaF90ZXh0J1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB1cGRhdGVJdGVtKCdfaW50cm8nLCB7XG4gICAgICAgICAgICAgICAgdGl0bGU6IHN0cm9uZygn4oinJywgJ0NDMDAzMycpLFxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBwdXRNeVZhcignaW50cm8nLCAnMScpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdXBkYXRlSXRlbSgnaW50cm8nLCB7XG4gICAgICAgICAgICAgICAgdGl0bGU6IHNzKOeugOS7iywgJzk5NjZBQScpLnNsaWNlKDAsIDEwMCkgKyAn4oCmJyxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3RleHRfMSdcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgdXBkYXRlSXRlbSgnX2ludHJvJywge1xuICAgICAgICAgICAgICAgIHRpdGxlOiBzdHJvbmcoJ+KIqCcsICcyMjk5NzcnKVxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBwdXRNeVZhcignaW50cm8nLCAnMCcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSc7XG4gICA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WYXIoJ3Noc29ydCcsICcwJyk7XG4gICAgICAgICAgICBpZiAoY29uZiA9PSAnMScpIHtcbiAgICAgICAgICAgICAgICB2YXIgX2xpc3QgPSBsaXN0c1tnZXRNeVZhcihNWV9VUkwsICcwJyldO1xuICAgICAgICAgICAgICAgIHB1dE15VmFyKCdzaHNvcnQnLCAnMCcpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICB2YXIgX2xpc3QgPSBsaXN0c1tnZXRNeVZhcihNWV9VUkwsICcwJyldLnJldmVyc2UoKTtcbiAgICAgICAgICAgICAgICBwdXRNeVZhcignc2hzb3J0JywgJzEnKTtcblxuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIHVwZGF0ZUl0ZW0oJ3Noc29ydCcsIHtcbiAgICAgICAgICAgICAgICB0aXRsZTogZ2V0TXlWYXIoJ3Noc29ydCcsICcwJykgPT0gJzEnID8gc3Ryb25nKCfpgIbluo8nLCAnQ0MwMDMzJykgOiBzdHJvbmcoJ+ato+W6jycsICcyMjk5NzcnKVxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBldmFsKGdldE15VmFyKCd1cGRhdGVMaXN0JykpO1xuICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+WIh+aNouaOkuW6j+aIkOWKnyc7XG4gICAgICAgIH0pLFxuICAgICAgICBjb2xfdHlwZTogJ3Njcm9sbF9idXR0b24nLFxuICAgICAgICBleHRyYToge1xuICAgICAgICAgICAgaWQ6ICdzaHNvcnQnXG4gICAgICAgIH1cbiAgICB9KTtcbiAgICBmb3IgKHZhciBpID0gMDsgaSA8IHRhYnMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgZC5wdXNoKHtcbiAgICAgICAgICAgIHRpdGxlOiBnZXRNeVZhcihNWV9VUkwsICcwJykgPT0gaSA/IHN0cm9uZyh0YWJzW2ldLCAnZjY3MjgwJykgOiB0YWJzW2ldLFxuICAgICAgICAgICAgdXJsOiAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChpKSA9PiB7XG4gICAgICAgICAgICAgICAgcmMoJ2h0dHBzOi8vZ2l0ZWUuY29tL21pc3R5d2F0ZXIvaGlrZXJfaW5mby9yYXcvbWFzdGVyL2YnLCAyNCk7XG4gICAgICAgICAgICAgICAgcHV0TXlWYXIoTVlfVVJMLCBpKTtcbiAgICAgICAgICAgICAgICB2YXIgdGFicyA9IHN0b3JhZ2UwLmdldE15VmFyKCd0YWJzJyk7XG4gICAgICAgICAgICAgICAgdmFyIGxpc3RzID0gc3RvcmFnZTAuZ2V0TXlWYXIoJ2xpc3RzJyk7XG4gICAgICAgICAgICAgICAgZm9yICh2YXIgayBpbiB0YWJzKSB7XG4gICAgICAgICAgICAgICAgICAgIHVwZGF0ZUl0ZW0oJ3RhYnMnICsgaywge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGsgPT0gaSA/IHN0cm9uZyh0YWJzW2tdLCAnZjY3MjgwJykgOiB0YWJzW2tdXG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB2YXIgX2xpc3QgPSBnZXRNeVZhcignc2hzb3J0JywgJzAnKSA9PSAnMCcgPyBsaXN0c1tpXSA6IGxpc3RzW2ldLnJldmVyc2UoKTtcbiAgICAgICAgICAgICAgICBldmFsKGdldE15VmFyKCd1cGRhdGVMaXN0JykpO1xuICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSc7XG4gICAgICAgICAgICB9LCBpKSxcbiAgICAgICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbicsXG4gICAgICAgICAgICBleHRyYToge1xuICAgICAgICAgICAgICAgIGlkOiAndGFicycgKyBpXG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgIH1cbn1cblxuZnVuY3Rpb24gc2V0TGlzdHMobGlzdHMpIHtcbiAgICB2YXIgaW5kZXggPSBnZXRNeVZhcihNWV9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gICAgaWYgKGluZGV4ID09PSAwKSB7XFxuICAgICAgICAgICAgaWYgKHR5cGVvZijlsI/nsbvlrprkvY1f5Li7KSAhPSAndW5kZWZpbmVkJykge1xcbiAgICAgICAgICAgICAgICB2YXIgc3ViX2NhdGVnb3JpZXMgPSBwZGZhKGNhdGVnb3J5LCDlsI/nsbvlrprkvY1f5Li7KTtcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICB2YXIgc3ViX2NhdGVnb3JpZXMgPSBwZGZhKGNhdGVnb3J5LCDlsI/nsbvlrprkvY0pO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgdmFyIHN1Yl9jYXRlZ29yaWVzID0gcGRmYShjYXRlZ29yeSwg5bCP57G75a6a5L2NKTtcXG4gICAgICAgIH1cXG4gICAgICAgIGlmIChpbmRleCA9PT0gMCkge1xcbiAgICAgICAgICAgIHN1Yl9jYXRlZ29yaWVzLmZvckVhY2goKGl0ZW0sIGtleSkgPT4ge1xcbiAgICAgICAgICAgICAgICBsZXQgdGl0bGUgPSBwZGZoKGl0ZW0sIOWIhuexu+agh+mimCk7XFxuICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZToga2V5LnRvU3RyaW5nKCkgPT09IGNhdGVfdGVtcFtpbmRleF0gPyBzdHJvbmcodGl0bGUsIOWIhuexu+minOiJsikgOiB0aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogJChwZChpdGVtLCDliIbnsbvpk77mjqUpICsgJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKHBhcmFtcykgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBuZXdfY2F0ZSA9IFtdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhcmFtcy5jYXRlX3RlbXAuZm9yRWFjaCgoY2F0ZSwgaW5kZXgpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3X2NhdGUucHVzaChpbmRleCA9PT0gMCA/IHBhcmFtcy5rZXkudG9TdHJpbmcoKSA6ICcwJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcigndCcsIEpTT04uc3RyaW5naWZ5KG5ld19jYXRlKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoJ3VybCcsIGlucHV0KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknO1xcbiAgICAgICAgICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhdGVfdGVtcDogY2F0ZV90ZW1wLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGtleToga2V5LFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhZ2U6IE1ZX1BBR0UsXFxuICAgICAgICAgICAgICAgICAgICB9KSxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbicsXFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnYmxhbmtfYmxvY2snXFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICB9IGVsc2UgaWYgKGZvbGQgPT09ICcxJykge1xcbiAgICAgICAgICAgIHN1Yl9jYXRlZ29yaWVzLmZvckVhY2goKGl0ZW0sIGtleSkgPT4ge1xcbiAgICAgICAgICAgICAgICBsZXQgdGl0bGUgPSBwZGZoKGl0ZW0sIOWIhuexu+agh+mimCk7XFxuICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZToga2V5LnRvU3RyaW5nKCkgPT09IGNhdGVfdGVtcFtpbmRleF0gPyBzdHJvbmcodGl0bGUsIOWIhuexu+minOiJsikgOiB0aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogJChwZChpdGVtLCDliIbnsbvpk77mjqUpICsgJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKHBhcmFtcykgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhcmFtcy5jYXRlX3RlbXBbcGFyYW1zLmluZGV4XSA9IHBhcmFtcy5rZXkudG9TdHJpbmcoKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcigndCcsIEpTT04uc3RyaW5naWZ5KHBhcmFtcy5jYXRlX3RlbXApKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcigndXJsJywgaW5wdXQpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSc7XFxuICAgICAgICAgICAgICAgICAgICB9LCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2F0ZV90ZW1wOiBjYXRlX3RlbXAsXFxuICAgICAgICAgICAgICAgICAgICAgICAgaW5kZXg6IGluZGV4LFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGtleToga2V5LFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhZ2U6IE1ZX1BBR0UsXFxuICAgICAgICAgICAgICAgICAgICB9KSxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbicsXFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnYmxhbmtfYmxvY2snXFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICB9XFxuICAgIH0pO1xcbn1cIn0se1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcIuS6uuacuumqjOivgVwiLFwicGF0aFwiOlwi5Lq65py66aqM6K+BXCIsXCJydWxlXCI6XCJqczppZiAoL+mqjOivgS8udGVzdChodG1sKSkge1xcbiAgICBkLnB1c2goe1xcbiAgICAgICAgdGl0bGU6ICfkurrmnLrpqozor4EnLFxcbiAgICAgICAgdXJsOiAkKCdoaWtlcjovL2VtcHR5JykucnVsZSgoTVlfVVJMKSA9PiB7XFxuICAgICAgICAgICAgdmFyIGQgPSBbXTtcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3g1X3dlYnZpZXdfc2luZ2xlJyxcXG4gICAgICAgICAgICAgICAgdXJsOiBNWV9VUkwsXFxuICAgICAgICAgICAgICAgIGRlc2M6ICdsaXN0JiZzY3JlZW4nLFxcbiAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgdWE6IE1PQklMRV9VQSxcXG4gICAgICAgICAgICAgICAgICAgIHNob3dQcm9ncmVzczogZmFsc2UsXFxuICAgICAgICAgICAgICAgICAgICBqczogJC50b1N0cmluZygodSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGNoZWNrKCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoZmJhLmdldFZhcignY2snKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBub2RlcyA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoJy5wYWdlJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBjbyA9IGZiYS5nZXRDb29raWUodSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChub2RlcyAmJiBub2Rlcy5sZW5ndGggPiAwICYmIGNvKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL2ZiYS5sb2coJ2NvOjo6Ojo6JyArIGNvKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZiYS5wdXRWYXIoJ2NrJywgY28pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmJhLnBhcnNlTGF6eVJ1bGUoJCQkKCkubGF6eVJ1bGUoKCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJhY2soKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoY2hlY2ssIDUwMCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2hlY2soKTtcXG4gICAgICAgICAgICAgICAgICAgIH0sIE1ZX1VSTClcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIHJldHVybiBzZXRSZXN1bHQoZCk7XFxuICAgICAgICB9LCBNWV9VUkwpLFxcbiAgICAgICAgY29sX3R5cGU6ICd0ZXh0XzEnXFxuICAgIH0pO1xcbn1cIn1dIiwiaWNvbiI6Imh0dHBzOi8vYXBpLnhpbmFjLm5ldC9pY29uLz91cmw9aHR0cHM6Ly9kZHlzLnByby8iLCJwcm94eSI6IiJ9
Add Comment
Please, Sign In to add comment