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