xiaomianao666

小程序:WiKiHowⓂ️

May 25th, 2022
346
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@WiKiHowⓂ️@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6IiIsInRpdGxlIjoiV2lLaUhvd+KTgu+4jyIsImF1dGhvciI6IiIsInVybCI6Imh0dHBzOi8vemgud2lraWhvdy5jb20vZnlBbGw/cGc9ZnlwYWdlIiwidmVyc2lvbiI6MSwiY29sX3R5cGUiOiJjYXJkX3BpY18xIiwiY2xhc3NfbmFtZSI6IuS4quS6uuW9ouixoeS4juaXtuWwmibkurrpmYXlhbPns7sm5YGH5pyf5LiO6IqC5pelJuWBpeW6tyblhbTotqPkuI7miYvoibom5a6X5pWZ5LiO5ZOy5a2mIiwidHlwZSI6Im90aGVyIiwiY2xhc3NfdXJsIjoiQ2F0ZWdvcnk6JUU0JUI4JUFBJUU0JUJBJUJBJUU1JUJEJUEyJUU4JUIxJUExJUU0JUI4JThFJUU2JTk3JUI2JUU1JUIwJTlBJkNhdGVnb3J5OiVFNCVCQSVCQSVFOSU5OSU4NSVFNSU4NSVCMyVFNyVCMyVCQiZDYXRlZ29yeTolRTUlODElODclRTYlOUMlOUYlRTQlQjglOEUlRTglOEElODIlRTYlOTclQTUmQ2F0ZWdvcnk6JUU1JTgxJUE1JUU1JUJBJUI3JkNhdGVnb3J5OiVFNSU4NSVCNCVFOCVCNiVBMyVFNCVCOCU4RSVFNiU4OSU4QiVFOCU4OSVCQSZDYXRlZ29yeTolRTUlQUUlOTclRTYlOTUlOTklRTQlQjglOEUlRTUlOTMlQjIlRTUlQUQlQTYiLCJhcmVhX25hbWUiOiLlrqDniankuI7liqjniakm5a625bGF5LiO5Zut6Im6JuWutuW6reeUn+a0uyblt6XkvZwm5pWZ6IKy5LiO5Lqk5rWBJuaXheihjCbmsb3ovabkuI7lhbbku5bkuqTpgJrlt6XlhbciLCJhcmVhX3Vyb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xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xpY2s6IHRydWVcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG5cdH0pO1xuXHRkLnB1c2goe3RpdGxlOiBnZXRTbWFsbFRleHQocmVhZGx5KSxcbiAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGV4dFNpemU6IHNpemUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsaWNrOiB0cnVlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfX0pO1xufVxuXG5pZih0aXBzICE9PSAnJyl7XG5cdC8vZC5wdXNoKHtjb2xfdHlwZTogJ2xpbmUnfSk7XG5cdGQucHVzaCh7XG5cdFx0dGl0bGU6ICAn4oCc4oCc4oCd4oCdPGI+5bCP5o+Q56S68J+Xr++4jzwvYj4nLFxuXHRcdHVybDpcImhpa2VyOi8vZW1wdHlcIixcblx0XHRjb2xfdHlwZTpcInRleHRfY2VudGVyXzFcIixcbiAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGV4dFNpemU6IHNpemUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsaWNrOiB0cnVlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuXHR9KTtcblx0ZC5wdXNoKHt0aXRsZTogZ2V0U21hbGxUZXh0KHRpcHMpLFxuICAgICAgICAgICAgICAgICAgICBleHRyYToge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZXh0U2l6ZTogc2l6ZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xpY2s6IHRydWVcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9fSk7XG59XG5cbmlmKHdhcm5pbmcgIT09ICcnKXtcblx0Ly9kLnB1c2goe2NvbF90eXBlOiAnbGluZSd9KTtcblx0ZC5wdXNoKHtcblx0XHR0aXRsZTogJ+KAnOKAnOKAneKAnTxiPuitpuWRiuKaoO+4jzwvYj4nLFxuXHRcdHVybDpcImhpa2VyOi8vZW1wdHlcIixcblx0XHRjb2xfdHlwZTpcInRleHRfY2VudGVyXzFcIixcbiAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGV4dFNpemU6IHNpemUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsaWNrOiB0cnVlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuXHR9KTtcblx0ZC5wdXNoKHt0aXRsZTogZ2V0U21hbGxUZXh0KHdhcm5pbmcpLFxuICAgICAgICAgICAgICAgICAgICBleHRyYToge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZXh0U2l6ZTogc2l6ZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xpY2s6IHRydWVcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9fSk7XG59XG5cbmxldCB0aXBzQnV0dG9tID0gJ+ivpeaWh+eroOadpea6kOS6jldpS2lIb3fvvIzlpoLmgqjllpzmrKLvvIzor7fov5vlhaXlrpjnvZHmtY/op4gnO1xubGV0IHdhcm5pbmdCdXR0b20gPSAn5q2k6KeE5YiZ5LuF5L6b5Liq5Lq65a2m5Lmg5Lqk5rWB5L2/55SoLOivt+S9v+eUqOWQjjI05bCP5pe25YaF5Yig6ZmkJztcbmQucHVzaCh7Y29sX3R5cGU6ICdsaW5lX2JsYW5rJ30pO1xuZC5wdXNoKHtcbiAgIHRpdGxlOiAn4oCc4oCc4oCd4oCdJytHZXRUaXBzKHRpcHNCdXR0b20sd2FybmluZ0J1dHRvbSksXG4gICB1cmw6IE1ZX1VSTCxcbiAgIGNvbF90eXBlOiAndGV4dF9jZW50ZXJfMSdcbn0pO1xuZC5wdXNoKHtjb2xfdHlwZTogJ2xpbmVfYmxhb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