Skip to content

Commit

Permalink
Update shadowrocket_merge.py
Browse files Browse the repository at this point in the history
  • Loading branch information
mareep authored Sep 8, 2023
1 parent 1681342 commit b13322b
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion shadowrocket_merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,4 +187,17 @@
for proxy in merged_proxies:
file.write(proxy + "\n")
except Exception as e:
print(f"Error writing to file: {e}")
print(f"Error writing to file: {e}")


try:
with open("./sub/shadowrocket.txt", "r") as file:
content = file.read()
encoded_content = base64.b64encode(content.encode("utf-8")).decode("utf-8")

with open("./sub/shadowrocket_base64.txt", "w") as encoded_file:
encoded_file.write(encoded_content)

print("Content successfully encoded and written to file.")
except Exception as e:
print(f"Error encoding file content: {e}")

0 comments on commit b13322b

Please sign in to comment.