diff --git a/src/main.rs b/src/main.rs index 8035452..947bcff 100644 --- a/src/main.rs +++ b/src/main.rs @@ -29,9 +29,10 @@ use rand::RngCore; use static_cell::StaticCell; use {defmt_rtt as _, panic_probe as _}; -// oh no, exposing my IoT WiFi credentials to the world ;) -const WIFI_NETWORK: &str = "bendybogalow"; -const WIFI_PASSWORD: &str = "parsnipcabbageonion"; +// ensure the network/password files have no trailing newline +// i.e. generate like: echo -n "password" > src/secrets/wifi-password +const WIFI_NETWORK: &str = include_str!("secrets/wifi-network"); +const WIFI_PASSWORD: &str = include_str!("secrets/wifi-password"); const INDEX: &str = include_str!("html/index.html"); const CSS: &str = include_str!("html/main.css"); diff --git a/src/secrets/wifi-network b/src/secrets/wifi-network new file mode 100644 index 0000000..07f8563 --- /dev/null +++ b/src/secrets/wifi-network @@ -0,0 +1 @@ +someessid \ No newline at end of file diff --git a/src/secrets/wifi-password b/src/secrets/wifi-password new file mode 100644 index 0000000..51a16b2 --- /dev/null +++ b/src/secrets/wifi-password @@ -0,0 +1 @@ +somewifipassword \ No newline at end of file