1
mirror of https://github.com/hashcat/hashcat synced 2024-12-12 17:13:55 +01:00
hashcat/tools/package_bin.sh

81 lines
2.2 KiB
Bash
Raw Normal View History

2015-12-04 15:47:52 +01:00
#!/bin/bash
##
## Author......: Jens Steube <jens.steube@gmail.com>
## License.....: MIT
##
export IN=$HOME/oclHashcat
2016-01-05 08:30:18 +01:00
export OUT=$HOME/xy/oclHashcat-2.10
2015-12-04 15:47:52 +01:00
rm -rf $OUT
rm -rf $OUT.7z
mkdir -p $OUT
2016-02-04 15:47:52 +01:00
mkdir -p $OUT/include
2015-12-04 15:47:52 +01:00
cp $IN/oclHashcat??.exe $OUT/
cp $IN/oclHashcat??.bin $OUT/
cp $IN/hashcat.hcstat $OUT/
cp $IN/hashcat_tuning.hctab $OUT/
2015-12-04 15:47:52 +01:00
cp -r $IN/docs $OUT/
cp -r $IN/charsets $OUT/
cp -r $IN/masks $OUT/
cp -r $IN/rules $OUT/
cp -r $IN/extra $OUT/
cp $IN/example.dict $OUT/
cp $IN/example[0123456789]*.hash $OUT/
cp $IN/example[0123456789]*.cmd $OUT/
2015-12-04 15:47:52 +01:00
2016-02-04 15:47:52 +01:00
cp -r $IN/include/constants.h $OUT/include
cp -r $IN/include/kernel_functions.c $OUT/include
cp -r $IN/include/kernel_vendor.h $OUT/include
cp -r $IN/include/rp_kernel.h $OUT/include
cp -r $IN/OpenCL $OUT/
2015-12-04 15:47:52 +01: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
sed 's!./oclHashcat !./oclHashcat64.bin !' $IN/${example} > $OUT/${example}
done
2015-12-04 15:47:52 +01:00
dos2unix $OUT/rules/*.rule
dos2unix $OUT/rules/hybrid/*.rule
dos2unix $OUT/docs/*
dos2unix $OUT/example*
unix2dos $OUT/masks/*.hcmask
unix2dos $OUT/rules/*.rule
unix2dos $OUT/rules/hybrid/*.rule
unix2dos $OUT/docs/*
unix2dos $OUT/example*.cmd
2015-12-04 15:47:52 +01:00
chmod 700 $OUT
chmod 700 $OUT/rules
chmod 600 $OUT/rules/*
chmod 700 $OUT/docs
chmod 600 $OUT/docs/*
chmod 700 $OUT/charsets
chmod 700 $OUT/charsets/*
chmod 700 $OUT/masks
chmod 600 $OUT/masks/*
chmod 600 $OUT/example*
chmod 700 $OUT/example*.sh
2015-12-04 15:47:52 +01:00
chmod 700 $OUT/extra
chmod 700 $OUT/extra/tab_completion/*.sh
chmod 700 $OUT/extra/tab_completion/install
chmod 700 $OUT/include
chmod 600 $OUT/include/*
chmod 700 $OUT/OpenCL
chmod 600 $OUT/OpenCL/*
2015-12-04 15:47:52 +01:00
chmod 600 $OUT/*.exe
chmod 700 $OUT/*.bin
chmod 600 $OUT/hashcat.hcstat
chmod 600 $OUT/hashcat_tuning.hctab
2015-12-04 15:47:52 +01:00
time 7z a -t7z -m0=lzma2:d31 -mx=9 -mmt=8 -ms=on $OUT.7z $OUT