From 30d40917c2c1c8be935861b95b0f67fca5388652 Mon Sep 17 00:00:00 2001 From: kiriknik Date: Thu, 26 Sep 2024 14:53:46 +0300 Subject: [PATCH] Change install.sh to auto update config Add to install.sh file part with auto update config with new wordlists,rules and masks --- cfg/crackq.conf | 35 ----------------------------------- install.sh | 32 ++++++++++++++++++++++++++++++-- 2 files changed, 30 insertions(+), 37 deletions(-) diff --git a/cfg/crackq.conf b/cfg/crackq.conf index ee928a9..a58096d 100644 --- a/cfg/crackq.conf +++ b/cfg/crackq.conf @@ -1,39 +1,4 @@ #CrackQ config file, enter wordlist locations and other file locations here -#Provide full filepaths for all files -[rules] -best64: /var/crackq/files/rules/best64.rule -combinator: /var/crackq/files/rules/combinator.rule -d3ad0ne: /var/crackq/files/rules/d3ad0ne.rule -dive: /var/crackq/files/rules/dive.rule -generated2: /var/crackq/files/rules/generated2.rule -generated: /var/crackq/files/rules/generated.rule -hybrid: /var/crackq/files/rules/hybrid -Incisive-leetspeak: /var/crackq/files/rules/Incisive-leetspeak.rule -InsidePro-HashManager: /var/crackq/files/rules/InsidePro-HashManager.rule -InsidePro-PasswordsPro: /var/crackq/files/rules/InsidePro-PasswordsPro.rule -leetspeak: /var/crackq/files/rules/leetspeak.rule -oscommerce: /var/crackq/files/rules/oscommerce.rule -rockyou-30000: /var/crackq/files/rules/rockyou-30000.rule -specific: /var/crackq/files/rules/specific.rule -T0XlC-insert_00-99_1950-2050_toprules_0_F: /var/crackq/files/rules/T0XlC-insert_00-99_1950-2050_toprules_0_F.rule -T0XlC-insert_space_and_special_0_F: /var/crackq/files/rules/T0XlC-insert_space_and_special_0_F.rule -T0XlC-insert_top_100_passwords_1_G: /var/crackq/files/rules/T0XlC-insert_top_100_passwords_1_G.rule -T0XlC: /var/crackq/files/rules/T0XlC.rule -T0XlCv1: /var/crackq/files/rules/T0XlCv1.rule -toggles1: /var/crackq/files/rules/toggles1.rule -toggles2: /var/crackq/files/rules/toggles2.rule -toggles3: /var/crackq/files/rules/toggles3.rule -toggles4: /var/crackq/files/rules/toggles4.rule -toggles5: /var/crackq/files/rules/toggles5.rule -unix-ninja-leetspeak: /var/crackq/files/rules/unix-ninja-leetspeak.rule - -[masks] -Hashes_org: /var/crackq/files/masks/hashes.org.masks.4hours -Hashes_org_adpolicy_4hours: /var/crackq/files/masks/hashes.org.ad_policy.4hour.masks -korelogic_pathwell100: /var/crackq/files/masks/korelogic_pathwell100.masks - -[wordlists] -rockyou: /var/crackq/files/rockyou.txt.gz [files] #Set the permissions correctly on this directory, this is where the sensitive data will go diff --git a/install.sh b/install.sh index 450174f..a40cce7 100755 --- a/install.sh +++ b/install.sh @@ -34,6 +34,7 @@ if [ ! -d /var/crackq/files/templates ] mkdir /var/crackq/files/saml/ mkdir /var/crackq/files/rules/ mkdir /var/crackq/files/masks/ + mkdir /var/crackq/files/wordlists/ fi cp ./cfg/nginx.conf /var/crackq/files/nginx/ @@ -41,11 +42,38 @@ cp ./cfg/crackq_nginx.conf /var/crackq/files/nginx/conf.d/ cp ./cfg/crackq.hcstat /var/crackq/files/crackq.hcstat cp ./masks/* /var/crackq/files/masks/ cp -r ./rules/ /var/crackq/files/ -if [ ! -f /var/crackq/files/rockyou.txt.gz ] +if [ ! -f /var/crackq/files/wordlists/rockyou.txt.gz ] then wget https://github.com/praetorian-inc/Hob0Rules/raw/master/wordlists/rockyou.txt.gz - mv rockyou.txt.gz /var/crackq/files/ + mv rockyou.txt.gz /var/crackq/files/wordlists/ fi + +echo "" >> ./cfg/crackq.conf +echo "[wordlists]" >> ./cfg/crackq.conf +for file in /var/crackq/files/wordlists/*; do + if [ -f "$file" ]; then + echo "$(basename "$file"): $file" + fi +done >> ./cfg/crackq.conf +echo "" >> ./cfg/crackq.conf + +echo "[rules]" >> ./cfg/crackq.conf +for file in /var/crackq/files/rules/*; do + if [ -f "$file" ]; then + echo "$(basename "$file"): $file" + fi +done >> ./cfg/crackq.conf + +echo "" >> ./cfg/crackq.conf + +echo "[masks]" >> ./cfg/crackq.conf +for file in /var/crackq/files/masks/*; do + if [ -f "$file" ]; then + echo "$(basename "$file"): $file" + fi +done >> ./cfg/crackq.conf + + # check if running tests if [ $TESTS ] then