diff --git a/v2rayL-GUI/sub2conf_api.py b/v2rayL-GUI/sub2conf_api.py index b785e1b..105219e 100755 --- a/v2rayL-GUI/sub2conf_api.py +++ b/v2rayL-GUI/sub2conf_api.py @@ -50,7 +50,7 @@ def b642conf(self, prot, tp, b64str): :return: """ if prot == "vmess": - ret = ast.literal_eval(parse.unquote(base64.b64decode(b64str).decode())) + ret = json.loads(parse.unquote(base64.b64decode(b64str).decode()).replace("\'", "\"")) region = ret['ps'] elif prot == "shadowsocks": @@ -318,4 +318,4 @@ def __init__(self, *args): # # t = base64.b64decode("ewoidiI6ICIyIiwKInBzIjogIjIzM3YyLmNvbV8xNDIuOTMuNTAuNzgiLAoiYWRkIjogIjE0Mi45My41MC43OCIsCiJwb3J0IjogIjM5Mzk4IiwKImlkIjogIjc1Y2JmYzI0LTZhNjAtNDBmMC05Yjc2LTUyMTlmNTIwYTJlMCIsCiJhaWQiOiAiMjMzIiwKIm5ldCI6ICJrY3AiLAoidHlwZSI6ICJ1dHAiLAoiaG9zdCI6ICIiLAoicGF0aCI6ICIiLAoidGxzIjogIiIKfQo=").decode().strip() # # print(t) # -# b642conf("ss", "YWVzLTI1Ni1jZmI6NTQxNjAzNDY2QDE0Mi45My41MC43ODo5ODk4#ss") \ No newline at end of file +# b642conf("ss", "YWVzLTI1Ni1jZmI6NTQxNjAzNDY2QDE0Mi45My41MC43ODo5ODk4#ss")