Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change install.sh to auto update config #49

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 0 additions & 35 deletions cfg/crackq.conf
Original file line number Diff line number Diff line change
@@ -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
Expand Down
32 changes: 30 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,46 @@ 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/
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
Expand Down