Explorar o código

drk: script kiddies be gone

skoupidi %!s(int64=2) %!d(string=hai) anos
pai
achega
8c8db819f2
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  1. 6 0
      bin/drk/src/main.rs

+ 6 - 0
bin/drk/src/main.rs

@@ -486,6 +486,12 @@ impl Drk {
         endpoint: Url,
         ex: Arc<smol::Executor<'static>>,
     ) -> Result<Self> {
+        // Script kiddies protection
+        if wallet_pass == "changeme" {
+            eprintln!("Please don't use default wallet password...");
+            exit(2);
+        }
+
         // Initialize wallet
         let wallet_path = expand_path(&wallet_path)?;
         if !wallet_path.exists() {