Skip to content

Commit 1caff31

Browse files
committed
Export zphisher in DEB Format
1 parent c7fd291 commit 1caff31

File tree

5 files changed

+81
-62
lines changed

5 files changed

+81
-62
lines changed

.package/DEBIAN/control

Lines changed: 0 additions & 8 deletions
This file was deleted.

.package/TERMUX/control

Lines changed: 0 additions & 8 deletions
This file was deleted.

.package/launch.sh

Lines changed: 0 additions & 12 deletions
This file was deleted.

make-deb.sh

100644100755
Lines changed: 49 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,50 @@
11
#!/bin/bash
2-
PACKAGE_NAME=zphisher
3-
ZPHISHER_VERSION=2.2
4-
PACKAGE_ARCH=all
5-
DISTRO=$(uname -o)
6-
7-
8-
build_package() {
9-
# define variables depending on detected platform
10-
distr_name=$1
11-
if [ "$distr_name" == "Android" ]; then
12-
platform="Termux"
13-
path_part="data/data/com.termux/files/"
14-
else
15-
platform="Debian"
16-
path_part=""
17-
fi
18-
# print out message with detected platform
19-
echo "Building .deb package for: $platform"
20-
# run preparations and build package
21-
platform=${platform^^}
22-
mkdir -p ./package/DEBIAN
23-
mkdir -p ./package/"$path_part"usr/bin
24-
mkdir -p ./package/"$path_part"usr/opt
25-
cp -rf ./.package/"$platform"/control ./package/DEBIAN/control
26-
mkdir -p package/"$path_part"usr/opt/$PACKAGE_NAME
27-
cp -rf ./LICENSE ./.sites ./.imgs ./zphisher.sh ./package/"$path_part"usr/opt/$PACKAGE_NAME
28-
cp -rf ./.package/launch.sh ./package/"$path_part"usr/bin/$PACKAGE_NAME
29-
chmod 755 ./package/DEBIAN
30-
dpkg-deb --build ./package $PACKAGE_NAME\_$ZPHISHER_VERSION\_$PACKAGE_ARCH.deb
31-
}
32-
33-
34-
# launch the build
35-
build_package $DISTRO
2+
3+
# Make Deb Package for Zphisher (^.^)
4+
_PACKAGE=zphisher
5+
_VERSION=2.3.0
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/{control,prerm}
46+
cp -fr scripts/launch.sh ./build_env/$_bin_dir/$_PACKAGE
47+
chmod 755 ./build_env/$_bin_dir/$_PACKAGE
48+
cp -fr .github/ .sites/ LICENSE README.md zphisher.sh ./build_env/$_opt_dir
49+
dpkg-deb --build ./build_env ${#PKG_NAME}
50+
rm -fr ./build_env

scripts/launch.sh

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/bin/bash
2+
3+
# https://github.com/htr-tech/zphisher
4+
5+
if [[ $(uname -o) == *'Android'* ]];then
6+
ZPHISHER_ROOT="/data/data/com.termux/files/usr/opt/zphisher"
7+
else
8+
export ZPHISHER_ROOT="/opt/zphisher"
9+
fi
10+
11+
if [[ $1 == '-h' || $1 == 'help' ]]; then
12+
echo "To run Zphisher type \`zphisher\` in your cmd"
13+
echo
14+
echo "Help:"
15+
echo " -h | help : Print this menu & Exit"
16+
echo " -c | auth : View Saved Credentials"
17+
echo " -i | ip : View Saved Victim IP"
18+
echo
19+
elif [[ $1 == '-c' || $1 == 'auth' ]]; then
20+
cat $ZPHISHER_ROOT/auth/usernames.dat 2> /dev/null || {
21+
echo "No Credentials Found !"
22+
exit 1
23+
}
24+
elif [[ $1 == '-i' || $1 == 'ip' ]]; then
25+
cat $ZPHISHER_ROOT/auth/ip.txt 2> /dev/null || {
26+
echo "No Saved IP Found !"
27+
exit 1
28+
}
29+
else
30+
cd $ZPHISHER_ROOT
31+
bash ./zphisher.sh
32+
fi

0 commit comments

Comments
 (0)