Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
cracker911181
GitHub Repository: cracker911181/Cracker-Tool
Path: blob/main/meta.sh
482 views
1
#!/data/data/com.termux/files/usr/bin/bash
2
clear
3
echo "
4
+-+-+-+-+-+-+-+-+-+-+ +-+-+ +-+-+-+-+-+-+
5
|M|e|t|a|s|p|l|o|i|t| |i|n| |T|e|r|m|u|x|
6
+-+-+-+-+-+-+-+-+-+-+ +-+-+ +-+-+-+-+-+-+
7
+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+
8
|b|y| |C|R|A|C|K|E|R|9|1|1|1|8|1|
9
+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+
10
"
11
12
center() {
13
termwidth=$(stty size | cut -d" " -f2)
14
padding="$(printf '%0.1s' ={1..500})"
15
printf '%*.*s %s %*.*s\n' 0 "$(((termwidth-2-${#1})/2))" "$padding" "$1" 0 "$(((termwidth-1-${#1})/2))" "$padding"
16
}
17
18
# Loading spinner
19
center " Loading..."
20
source <(echo "c3Bpbm5lcj0oICd8JyAnLycgJy0nICdcJyApOwoKY291bnQoKXsKICBzcGluICYKICBwaWQ9JCEKICBmb3IgaSBpbiBgc2VxIDEgMTBgCiAgZG8KICAgIHNsZWVwIDE7CiAgZG9uZQoKICBraWxsICRwaWQgIAp9CgpzcGluKCl7CiAgd2hpbGUgWyAxIF0KICBkbyAKICAgIGZvciBpIGluICR7c3Bpbm5lcltAXX07IAogICAgZG8gCiAgICAgIGVjaG8gLW5lICJcciRpIjsKICAgICAgc2xlZXAgMC4yOwogICAgZG9uZTsKICBkb25lCn0KCmNvdW50" | base64 -d)
21
22
echo
23
center "*** Dependencies installation..."
24
25
# Remove not working repositories
26
rm $PREFIX/etc/apt/sources.list.d/*
27
28
# Add gushmazuko repository to install ruby 2.7.2 version
29
echo 'deb https://github.com/gushmazuko/metasploit_in_termux/raw/master gushmazuko main' | tee $PREFIX/etc/apt/sources.list.d/gushmazuko.list
30
31
pkg install -y gnupg
32
curl -fsSL https://raw.githubusercontent.com/gushmazuko/metasploit_in_termux/master/gushmazuko-gpg.pubkey | gpg --dearmor | tee $PREFIX/etc/apt/trusted.gpg.d/gushmazuko-repo.gpg
33
34
# Set low priority for all gushmazuko repository (for security purposes)
35
# Set highest priority for ruby package from gushmazuko repository
36
echo '## Set low priority for all gushmazuko repository (for security purposes)
37
Package: *
38
Pin: release gushmazuko
39
Pin-Priority: 100
40
41
## Set highest priority for ruby package from gushmazuko repository
42
Package: ruby
43
Pin: release gushmazuko
44
Pin-Priority: 1001' | tee $PREFIX/etc/apt/preferences.d/preferences
45
46
# Purge installed ruby
47
apt purge ruby -y
48
rm -fr $PREFIX/lib/ruby/gems
49
50
pkg upgrade -y -o Dpkg::Options::="--force-confnew"
51
pkg install -y python autoconf bison clang coreutils curl findutils apr apr-util postgresql openssl readline libffi libgmp libpcap libsqlite libgrpc libtool libxml2 libxslt ncurses make ncurses-utils ncurses git wget unzip zip tar termux-tools termux-elf-cleaner pkg-config git ruby -o Dpkg::Options::="--force-confnew"
52
53
python3 -m pip install --upgrade pip
54
python3 -m pip install requests
55
56
echo
57
center "*** Fix ruby BigDecimal"
58
source <(curl -sL https://github.com/termux/termux-packages/files/2912002/fix-ruby-bigdecimal.sh.txt)
59
60
echo
61
center "*** Erasing old metasploit folder..."
62
rm -rf $HOME/metasploit-framework
63
64
echo
65
center "*** Downloading..."
66
cd $HOME
67
git clone https://github.com/rapid7/metasploit-framework.git --depth=1
68
69
echo
70
center "*** Installation..."
71
cd $HOME/metasploit-framework
72
sed '/rbnacl/d' -i Gemfile.lock
73
sed '/rbnacl/d' -i metasploit-framework.gemspec
74
gem install bundler
75
sed 's|nokogiri (1.*)|nokogiri (1.8.0)|g' -i Gemfile.lock
76
77
gem install nokogiri -v 1.8.0 -- --use-system-libraries
78
79
gem install actionpack
80
bundle update activesupport
81
bundle update --bundler
82
bundle install -j$(nproc --all)
83
$PREFIX/bin/find -type f -executable -exec termux-fix-shebang \{\} \;
84
rm ./modules/auxiliary/gather/http_pdf_authors.rb
85
if [ -e $PREFIX/bin/msfconsole ];then
86
rm $PREFIX/bin/msfconsole
87
fi
88
if [ -e $PREFIX/bin/msfvenom ];then
89
rm $PREFIX/bin/msfvenom
90
fi
91
ln -s $HOME/metasploit-framework/msfconsole /data/data/com.termux/files/usr/bin/
92
ln -s $HOME/metasploit-framework/msfvenom /data/data/com.termux/files/usr/bin/
93
termux-elf-cleaner /data/data/com.termux/files/usr/lib/ruby/gems/2.4.0/gems/pg-0.20.0/lib/pg_ext.so
94
95
echo
96
center "*** Database configuration..."
97
cd $HOME/metasploit-framework/config
98
curl -sLO https://raw.githubusercontent.com/gushmazuko/metasploit_in_termux/master/database.yml
99
100
mkdir -p $PREFIX/var/lib/postgresql
101
initdb $PREFIX/var/lib/postgresql
102
103
pg_ctl -D $PREFIX/var/lib/postgresql start
104
createuser msf
105
createdb msf_database
106
107
cd $HOME
108
curl -sLO https://raw.githubusercontent.com/gushmazuko/metasploit_in_termux/master/postgresql_ctl.sh
109
chmod +x postgresql_ctl.sh
110
111
echo
112
center "*"
113
#echo -e "\033[32m Installation complete. \n To start msf database use: ./postgresql_ctl.sh start \n Launch metasploit by executing: msfconsole\033[0m"
114
center "*"
115
clear
116
117