CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
htr-tech

CoCalc is a real-time collaborative commercial alternative to JupyterHub and Overleaf that provides Jupyter Notebooks, LaTeX documents, and SageMath.

GitHub Repository: htr-tech/zphisher
Path: blob/master/make-deb.sh
Views: 3095
1
#!/bin/bash
2
3
# Make Deb Package for Zphisher (^.^)
4
_PACKAGE=zphisher
5
_VERSION=2.3.5
6
_ARCH="all"
7
PKG_NAME="${_PACKAGE}_${_VERSION}_${_ARCH}.deb"
8
9
if [[ ! -e "scripts/launch.sh" ]]; then
10
echo "lauch.sh should be in the \`scripts\` Directory. Exiting..."
11
exit 1
12
fi
13
14
if [[ ${1,,} == "termux" || $(uname -o) == *'Android'* ]];then
15
_depend="ncurses-utils, proot, resolv-conf, "
16
_bin_dir="data/data/com.termux/files/"
17
_opt_dir="data/data/com.termux/files/usr/"
18
#PKG_NAME=${_PACKAGE}_${_VERSION}_${_ARCH}_termux.deb
19
fi
20
21
_depend+="curl, php, unzip"
22
_bin_dir+="usr/bin"
23
_opt_dir+="opt/${_PACKAGE}"
24
25
if [[ -d "build_env" ]]; then rm -fr build_env; fi
26
mkdir -p build_env
27
mkdir -p ./build_env/${_bin_dir} ./build_env/$_opt_dir ./build_env/DEBIAN
28
29
cat <<- CONTROL_EOF > ./build_env/DEBIAN/control
30
Package: ${_PACKAGE}
31
Version: ${_VERSION}
32
Architecture: ${_ARCH}
33
Maintainer: @htr-tech
34
Depends: ${_depend}
35
Homepage: https://github.com/htr-tech/zphisher
36
Description: An automated phishing tool with 30+ templates. This Tool is made for educational purpose only !
37
CONTROL_EOF
38
39
cat <<- PRERM_EOF > ./build_env/DEBIAN/prerm
40
#!/bin/bash
41
rm -fr $_opt_dir
42
exit 0
43
PRERM_EOF
44
45
chmod 755 ./build_env/DEBIAN
46
chmod 755 ./build_env/DEBIAN/{control,prerm}
47
cp -fr scripts/launch.sh ./build_env/$_bin_dir/$_PACKAGE
48
chmod 755 ./build_env/$_bin_dir/$_PACKAGE
49
cp -fr .github/ .sites/ LICENSE README.md zphisher.sh ./build_env/$_opt_dir
50
dpkg-deb --build ./build_env ${PKG_NAME}
51
rm -fr ./build_env
52
53