From 5f907b236a9952fb308ef7d241e2ff0ce025ba8a Mon Sep 17 00:00:00 2001 From: jayofelony Date: Mon, 4 Mar 2024 15:39:24 +0100 Subject: [PATCH] Add a interactive configuration installer --- bin/pwnagotchi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/pwnagotchi b/bin/pwnagotchi index 5c860629..e9d46b32 100755 --- a/bin/pwnagotchi +++ b/bin/pwnagotchi @@ -171,6 +171,7 @@ if __name__ == '__main__': if pwn_check.lower() in ('y', 'yes'): os.system("mv -f /etc/pwnagotchi/config.toml /etc/pwnagotchi/config.toml.bak") with open("/etc/pwnagotchi/config.toml", "a+") as f: + f.write("# Do not edit this file if you do not know what you are doing!!!\n\n") # Set pwnagotchi name print("Welcome to the interactive installation of your personal Pwnagotchi configuration!\n" "My name is Jayofelony, how may I call you? ") @@ -178,8 +179,7 @@ if __name__ == '__main__': if pwn_name == "": pwn_name = "Pwnagotchi" print("I shall go by Pwnagotchi from now on!") - pwn_name = ("# Do not edit this file if you do not know what you are doing!!!\n\n" - "main.name = \"") + pwn_name + "\"\n" + pwn_name = "main.name = \"" + pwn_name + "\"\n" f.write(pwn_name) else: print("I shall go by %s from now on!", pwn_name)