From 801714ef096d10297c09647e226eb22c5942dc80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andre=CC=81s=20Cecilia=20Luque?= Date: Wed, 2 Dec 2020 20:42:50 +0100 Subject: [PATCH] Fix https://github.com/acecilia/OpenWRTInvasion/issues/48 --- remote_command_execution_vulnerability.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/remote_command_execution_vulnerability.py b/remote_command_execution_vulnerability.py index 0f3c638..f41b89c 100644 --- a/remote_command_execution_vulnerability.py +++ b/remote_command_execution_vulnerability.py @@ -38,11 +38,11 @@ # make config file speed_test_filename = "speedtest_urls.xml" -with open("speedtest_urls_template.xml", "rt") as f: +with open("speedtest_urls_template.xml", "rt", encoding = "UTF-8") as f: template = f.read() data = template.format(router_ip_address=router_ip_address, command=command) # print(data) -with open("build/speedtest_urls.xml", 'wt') as f: +with open("build/speedtest_urls.xml", "wt", encoding = "UTF-8") as f: f.write(data) print("****************")