2019-08-04 05:58:56 +00:00
|
|
|
#!/bin/sh
|
2015-12-04 14:47:52 +00:00
|
|
|
|
|
|
|
##
|
2016-09-11 20:20:15 +00:00
|
|
|
## Author......: See docs/credits.txt
|
2015-12-04 14:47:52 +00:00
|
|
|
## License.....: MIT
|
|
|
|
##
|
|
|
|
|
2016-05-10 17:07:07 +00:00
|
|
|
export IN=$HOME/hashcat
|
2022-09-02 14:58:13 +00:00
|
|
|
export OUT=$HOME/xy/hashcat-6.2.6
|
2015-12-04 14:47:52 +00:00
|
|
|
|
|
|
|
rm -rf $OUT
|
|
|
|
rm -rf $OUT.7z
|
|
|
|
|
2016-01-03 12:49:07 +00:00
|
|
|
mkdir -p $OUT
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2022-05-21 09:52:21 +00:00
|
|
|
mkdir -p $OUT/tools
|
|
|
|
|
2019-02-22 20:36:02 +00:00
|
|
|
cp $IN/hashcat.exe $OUT/
|
|
|
|
cp $IN/hashcat.bin $OUT/
|
2017-06-24 08:50:39 +00:00
|
|
|
cp $IN/hashcat.hcstat2 $OUT/
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-05-10 17:07:07 +00:00
|
|
|
cp -r $IN/docs $OUT/
|
|
|
|
cp -r $IN/charsets $OUT/
|
2018-11-26 08:17:24 +00:00
|
|
|
cp -r $IN/layouts $OUT/
|
2016-05-10 17:07:07 +00:00
|
|
|
cp -r $IN/masks $OUT/
|
2019-01-13 18:16:00 +00:00
|
|
|
cp -r $IN/modules $OUT/
|
2016-05-10 17:07:07 +00:00
|
|
|
cp -r $IN/rules $OUT/
|
|
|
|
cp -r $IN/extra $OUT/
|
2022-08-08 11:09:04 +00:00
|
|
|
cp -r $IN/tunings $OUT/
|
2016-05-10 17:07:07 +00:00
|
|
|
cp $IN/example.dict $OUT/
|
2017-08-14 07:04:37 +00:00
|
|
|
cp $IN/example[0123456789]*.hash $OUT/
|
|
|
|
cp $IN/example[0123456789]*.cmd $OUT/
|
2016-05-10 17:07:07 +00:00
|
|
|
cp -r $IN/OpenCL $OUT/
|
2022-08-08 11:09:04 +00:00
|
|
|
cp $IN/tools/*hashcat.pl $OUT/tools/
|
|
|
|
cp $IN/tools/*hashcat.py $OUT/tools/
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-01-03 17:34:38 +00:00
|
|
|
# since for the binary distribution we still use .bin, we need to rewrite the commands
|
|
|
|
# within the example*.sh files
|
|
|
|
|
|
|
|
for example in example[0123456789]*.sh; do
|
|
|
|
|
2019-02-22 20:36:02 +00:00
|
|
|
sed 's!./hashcat !./hashcat.bin !' $IN/${example} > $OUT/${example}
|
2016-01-03 17:34:38 +00:00
|
|
|
|
|
|
|
done
|
|
|
|
|
2018-11-26 08:17:24 +00:00
|
|
|
dos2unix $OUT/layouts/*.hckmap
|
2016-05-10 17:07:07 +00:00
|
|
|
dos2unix $OUT/masks/*.hcmask
|
2015-12-04 14:47:52 +00:00
|
|
|
dos2unix $OUT/rules/*.rule
|
|
|
|
dos2unix $OUT/rules/hybrid/*.rule
|
|
|
|
dos2unix $OUT/docs/*
|
2020-09-26 14:24:49 +00:00
|
|
|
dos2unix $OUT/docs/license_libs/*
|
2015-12-04 14:47:52 +00:00
|
|
|
dos2unix $OUT/example*
|
2022-05-21 09:52:21 +00:00
|
|
|
dos2unix $OUT/tools/*
|
2022-08-08 11:09:04 +00:00
|
|
|
dos2unix $OUT/tunings/*
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2018-11-26 08:17:24 +00:00
|
|
|
unix2dos $OUT/layouts/*.hckmap
|
2015-12-04 14:47:52 +00:00
|
|
|
unix2dos $OUT/masks/*.hcmask
|
|
|
|
unix2dos $OUT/rules/*.rule
|
|
|
|
unix2dos $OUT/rules/hybrid/*.rule
|
|
|
|
unix2dos $OUT/docs/*
|
2020-09-26 14:24:49 +00:00
|
|
|
unix2dos $OUT/docs/license_libs/*
|
2015-12-15 18:28:27 +00:00
|
|
|
unix2dos $OUT/example*.cmd
|
2016-05-10 17:07:07 +00:00
|
|
|
unix2dos $OUT/OpenCL/*
|
2022-05-21 09:52:21 +00:00
|
|
|
unix2dos $OUT/tools/*
|
2022-08-08 11:09:04 +00:00
|
|
|
unix2dos $OUT/tunings/*
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-05-10 17:07:07 +00:00
|
|
|
chmod 755 $OUT
|
|
|
|
chmod 755 $OUT/rules
|
|
|
|
chmod 644 $OUT/rules/*
|
2023-02-16 07:36:12 +00:00
|
|
|
chmod 755 $OUT/rules/hybrid
|
|
|
|
chmod 644 $OUT/rules/hybrid/*
|
2016-05-10 17:07:07 +00:00
|
|
|
chmod 755 $OUT/docs
|
|
|
|
chmod 644 $OUT/docs/*
|
2023-02-16 07:36:12 +00:00
|
|
|
chmod 755 $OUT/docs/license_libs
|
2020-09-26 14:24:49 +00:00
|
|
|
chmod 644 $OUT/docs/license_libs/*
|
2016-05-10 17:07:07 +00:00
|
|
|
chmod 755 $OUT/charsets
|
|
|
|
chmod 755 $OUT/charsets/*
|
2018-11-26 08:17:24 +00:00
|
|
|
chmod 755 $OUT/layouts
|
|
|
|
chmod 644 $OUT/layouts/*
|
2016-05-10 17:07:07 +00:00
|
|
|
chmod 755 $OUT/masks
|
|
|
|
chmod 644 $OUT/masks/*
|
2019-01-13 18:16:00 +00:00
|
|
|
chmod 755 $OUT/modules
|
|
|
|
chmod 644 $OUT/modules/*
|
2016-05-10 17:07:07 +00:00
|
|
|
chmod 644 $OUT/example*
|
|
|
|
chmod 755 $OUT/example*.sh
|
|
|
|
chmod 755 $OUT/extra
|
|
|
|
chmod 755 $OUT/extra/tab_completion/*.sh
|
|
|
|
chmod 755 $OUT/extra/tab_completion/install
|
|
|
|
chmod 755 $OUT/OpenCL
|
|
|
|
chmod 644 $OUT/OpenCL/*
|
2022-08-08 11:09:04 +00:00
|
|
|
chmod 755 $OUT/tunings
|
|
|
|
chmod 644 $OUT/tunings/*
|
2016-05-10 17:07:07 +00:00
|
|
|
chmod 644 $OUT/*.exe
|
|
|
|
chmod 755 $OUT/*.bin
|
2017-06-24 08:50:39 +00:00
|
|
|
chmod 644 $OUT/hashcat.hcstat2
|
2022-08-08 11:09:04 +00:00
|
|
|
chmod 755 $OUT/tools/*hashcat.pl
|
|
|
|
chmod 755 $OUT/tools/*hashcat.py
|
2015-12-04 14:47:52 +00:00
|
|
|
|
|
|
|
time 7z a -t7z -m0=lzma2:d31 -mx=9 -mmt=8 -ms=on $OUT.7z $OUT
|