Skip to content

Commit 00c97b7

Browse files
committed
Metasploit Framework 6 Update
1 parent f282101 commit 00c97b7

File tree

2 files changed

+45
-47
lines changed

2 files changed

+45
-47
lines changed

README.md

+3-6
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Metasploit Framework 5 in Termux
1+
# Metasploit Framework 6 in Termux
22

33
**How to install:**
44
```bash
5-
bash <(curl -s https://raw.githubusercontent.com/gushmazuko/metasploit_in_termux/master/metasploit.sh)
5+
source <(curl -s https://raw.githubusercontent.com/gushmazuko/metasploit_in_termux/master/metasploit.sh)
66
```
77
OR
88
```bash
@@ -15,11 +15,8 @@ chmod +x metasploit.sh
1515
**After install, run from terminal**
1616
```bash
1717
# Start postgresql
18-
./postgresql_ctl.sh restart
18+
./postgresql_ctl.sh start
1919

2020
# And run msfconsole
2121
msfconsole
2222
```
23-
24-
25-
> Original source: https://github.com/Hax4us/Metasploit_termux

metasploit.sh

+42-41
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,56 @@
11
#!/data/data/com.termux/files/usr/bin/bash
2-
echo "##############################################"
3-
echo " "
4-
echo "Original source: https://github.com/Hax4us/Metasploit_termux"
5-
echo "##############################################"
2+
# Forked from: https://github.com/Hax4us/Metasploit_termux
3+
clear
4+
echo "
5+
+-+-+-+-+-+-+-+-+-+-+ +-+-+ +-+-+-+-+-+-+
6+
|M|e|t|a|s|p|l|o|i|t| |i|n| |T|e|r|m|u|x|
7+
+-+-+-+-+-+-+-+-+-+-+ +-+-+ +-+-+-+-+-+-+
8+
+-+-+ +-+-+-+-+-+-+-+-+-+-+
9+
|b|y| |G|u|s|h|m|a|z|u|k|o|
10+
+-+-+ +-+-+-+-+-+-+-+-+-+-+
11+
"
612

7-
# Metasploit version
8-
msf_ver=5.0.40
13+
center() {
14+
termwidth=$(stty size | cut -d" " -f2)
15+
padding="$(printf '%0.1s' ={1..500})"
16+
printf '%*.*s %s %*.*s\n' 0 "$(((termwidth-2-${#1})/2))" "$padding" "$1" 0 "$(((termwidth-1-${#1})/2))" "$padding"
17+
}
918

10-
echo "WAIT UNTIL INSTALLING............"
19+
# Loading spinner
20+
center " Loading..."
21+
source <(echo "c3Bpbm5lcj0oICd8JyAnLycgJy0nICdcJyApOwoKY291bnQoKXsKICBzcGluICYKICBwaWQ9JCEKICBmb3IgaSBpbiBgc2VxIDEgMTBgCiAgZG8KICAgIHNsZWVwIDE7CiAgZG9uZQoKICBraWxsICRwaWQgIAp9CgpzcGluKCl7CiAgd2hpbGUgWyAxIF0KICBkbyAKICAgIGZvciBpIGluICR7c3Bpbm5lcltAXX07IAogICAgZG8gCiAgICAgIGVjaG8gLW5lICJcciRpIjsKICAgICAgc2xlZXAgMC4yOwogICAgZG9uZTsKICBkb25lCn0KCmNvdW50" | base64 -d)
1122

12-
echo "####################################"
13-
pkg install -y autoconf bison clang coreutils curl findutils apr apr-util postgresql openssl readline libffi libgmp libpcap libsqlite libgrpc libtool libxml2 libxslt ncurses make ruby ncurses-utils ncurses git wget unzip zip tar termux-tools termux-elf-cleaner pkg-config
14-
pkg upgrade
15-
echo "####################################"
23+
echo
24+
center "*** Dependencies installation..."
25+
pkg upgrade -y -o Dpkg::Options::="--force-confnew"
26+
pkg install -y autoconf bison clang coreutils curl findutils apr apr-util postgresql openssl readline libffi libgmp libpcap libsqlite libgrpc libtool libxml2 libxslt ncurses make ruby ncurses-utils ncurses git wget unzip zip tar termux-tools termux-elf-cleaner pkg-config git -o Dpkg::Options::="--force-confnew"
1627

17-
echo "Fix ruby BigDecimal....."
18-
source <(curl -L https://github.com/termux/termux-packages/files/2912002/fix-ruby-bigdecimal.sh.txt)
28+
echo
29+
center "*** Fix ruby BigDecimal"
30+
source <(curl -sL https://github.com/termux/termux-packages/files/2912002/fix-ruby-bigdecimal.sh.txt)
1931

20-
echo -e "\nDownloading & Extracting....."
32+
echo
33+
center "*** Erasing old metasploit folder..."
34+
rm -rf $HOME/metasploit-framework
2135

36+
echo
37+
center "*** Downloading..."
2238
cd $HOME
23-
curl -LO https://github.com/rapid7/metasploit-framework/archive/$msf_ver.tar.gz
24-
tar -xf $HOME/$msf_ver.tar.gz
39+
git clone https://github.com/rapid7/metasploit-framework.git
2540

26-
echo "Erasing old metasploit folder....."
27-
rm -rf $HOME/metasploit-framework
28-
mv $HOME/metasploit-framework-$msf_ver $HOME/metasploit-framework
29-
rm $HOME/$msf_ver.tar.gz
41+
echo
42+
center "*** Installation..."
3043
cd $HOME/metasploit-framework
3144
sed '/rbnacl/d' -i Gemfile.lock
3245
sed '/rbnacl/d' -i metasploit-framework.gemspec
3346
gem install bundler
3447
sed 's|nokogiri (1.*)|nokogiri (1.8.0)|g' -i Gemfile.lock
3548

3649
gem install nokogiri -v 1.8.0 -- --use-system-libraries
37-
38-
#sed 's|grpc (.*|grpc (1.4.1)|g' -i $HOME/metasploit-framework/Gemfile.lock
39-
#gem unpack grpc -v 1.4.1
40-
#cd grpc-1.4.1
41-
#curl -LO https://raw.githubusercontent.com/grpc/grpc/v1.4.1/grpc.gemspec
42-
#curl -L https://raw.githubusercontent.com/Hax4us/Hax4us.github.io/master/extconf.patch
43-
#patch -p1 < extconf.patch
44-
#gem build grpc.gemspec
45-
#gem install grpc-1.4.1.gem
46-
#cd ..
47-
#rm -r grpc-1.4.1
4850

49-
50-
cd $HOME/metasploit-framework
5151
gem install actionpack
5252
bundle update activesupport
53+
bundle update --bundler
5354
bundle install -j5
5455
$PREFIX/bin/find -type f -executable -exec termux-fix-shebang \{\} \;
5556
rm ./modules/auxiliary/gather/http_pdf_authors.rb
@@ -62,10 +63,11 @@ fi
6263
ln -s $HOME/metasploit-framework/msfconsole /data/data/com.termux/files/usr/bin/
6364
ln -s $HOME/metasploit-framework/msfvenom /data/data/com.termux/files/usr/bin/
6465
termux-elf-cleaner /data/data/com.termux/files/usr/lib/ruby/gems/2.4.0/gems/pg-0.20.0/lib/pg_ext.so
65-
echo "Creating database"
6666

67+
echo
68+
center "*** Database configuration..."
6769
cd $HOME/metasploit-framework/config
68-
curl -LO https://raw.githubusercontent.com/gushmazuko/metasploit_in_termux/master/database.yml
70+
curl -sLO https://raw.githubusercontent.com/gushmazuko/metasploit_in_termux/master/database.yml
6971

7072
mkdir -p $PREFIX/var/lib/postgresql
7173
initdb $PREFIX/var/lib/postgresql
@@ -75,11 +77,10 @@ createuser msf
7577
createdb msf_database
7678

7779
cd $HOME
78-
curl -LO https://raw.githubusercontent.com/gushmazuko/metasploit_in_termux/master/postgresql_ctl.sh
80+
curl -sLO https://raw.githubusercontent.com/gushmazuko/metasploit_in_termux/master/postgresql_ctl.sh
7981
chmod +x postgresql_ctl.sh
8082

81-
echo "####################################"
82-
echo "Thanx To Hax4us"
83-
echo "####################################"
84-
echo " NOW YOU CAN LAUNCH METASPLOIT BY JUST EXECUTE THE COMMAND :=> msfconsole"
85-
echo "####################################"
83+
echo
84+
center "*"
85+
echo -e "\033[32m Installation complete. \n To start msf database use: ./postgresql_ctl.sh start \n Launch metasploit by executing: msfconsole\033[0m"
86+
center "*"

0 commit comments

Comments
 (0)