@@ -13,7 +13,7 @@ grn="033円[92m"
1313blu=" 033円[34m"
1414mob=$( uname -o)
1515arc=$( dpkg --print-architecture)
16- str=$( du -hs)
16+ # str=$(du -hs)
1717krn=$( uname -s)
1818ip=$( curl -s https://api.ipify.org)
1919# AVL=`df -h /storage/emulated | awk '{ print 4ドル }' | tail -1`
@@ -35,6 +35,7 @@ echo -e "
3535 ╰━━━━━━━━━━━━━╯ $blu INSTALLATION MAY TAKE ($o 40 MINUTES$blu )$grn
3636"
3737sleep 5.0
38+ cd $HOME
3839if [ -d $HOME /metasploit-framework ];
3940then
4041center " CHEKING OLD METASPLOIT"
@@ -54,112 +55,122 @@ echo -e "\e[34mPACKAGES BEING INSTALLED WAIT....\e[0m"
5455# ##############################
5556# #### MAIN EXECUTION CODE #####
5657# ##############################
57- # # Remove non working packages
58- rm $PREFIX /etc/apt/sources.list.d/*
59- # # Purging Ruby
60- apt purge ruby -y
61- # # remove old gems
62- rm -fr $PREFIX /lib/ruby/gems
63- # #
64- pkg upgrade -y -o Dpkg::Options::=" --force-confnew"
65- # # upgrade dpkg
58+ 59+ cd $HOME
60+ 6661pkg install -y python python3 python2 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"
67- # python3 -m pip install --upgrade pip
68- # python3 -m pip install requests
62+ 63+ python3 -m pip install --upgrade pip
64+ 65+ python3 -m pip install requests
6966# Home directory
67+ 7068cd $HOME
69+ 70+ sleep 10
71+ 7172git clone https://github.com/rapid7/metasploit-framework.git --depth=1
73+ 74+ sleep 10
75+ 7276cd $HOME /metasploit-framework
77+ 7378source <( curl -sL https://github.com/termux/termux-packages/files/2912002/fix-ruby-bigdecimal.sh.txt)
74- sed -i " 277,\$ s/2.8.0/2.2.0/" Gemfile.lock
79+ 80+ cd $HOME /metasploit-framework
81+ 7582gem install bundler
83+ 84+ cd $HOME /metasploit-framework
85+ 7686declare NOKOGIRI_VERSION=$( cat Gemfile.lock | grep -i nokogiri | sed ' s/nokogiri [\(\)]/(/g' | cut -d ' ' -f 5 | grep -oP " (.).[[:digit:]][\w+]?[.]." )
87+ 88+ cd $HOME /metasploit-framework
89+ 7790gem install nokogiri -v $NOKOGIRI_VERSION -- --use-system-libraries
91+ 92+ cd $HOME /metasploit-framework
93+ 7894bundle config build.nokogiri " --use-system-libraries --with-xml2-include=$PREFIX /include/libxml2" ; bundle install
95+ 96+ cd $HOME /metasploit-framework
97+ 7998gem install actionpack
99+ 100+ cd $HOME /metasploit-framework
101+ 80102bundle update activesupport
103+ 104+ cd $HOME /metasploit-framework
105+ 81106bundle update --bundler
107+ 108+ cd $HOME /metasploit-framework
109+ 82110bundle install -j$( nproc --all)
83- if [ -e $PREFIX /bin/msfconsole ]; then
84- rm $PREFIX /bin/msfconsole
85- fi
86- if [ -e $PREFIX /bin/msfvenom ]; then
87- rm $PREFIX /bin/msfvenom
88- fi
89- if [ -e $PREFIX /bin/msfrpcd ]; then
90- rm $PREFIX /bin/msfrpcd
91- fi
92- ln -s $PREFIX /opt/metasploit-framework/msfconsole $PREFIX /bin/
93- ln -s $PREFIX /opt/metasploit-framework/msfvenom $PREFIX /bin/
94- ln -s $PREFIX /opt/metasploit-framework/msfrpcd $PREFIX /bin/
95- termux-elf-cleaner $PREFIX /lib/ruby/gems/* /gems/pg-* /lib/pg_ext.so
96- sed -i ' 86 {s/^/#/};96 {s/^/#/}' $PREFIX /lib/ruby/gems/3.1.0/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/ruby_thread_local_var.rb
97- sed -i ' 442, 476 {s/^/#/};436, 438 {s/^/#/}' $PREFIX /lib/ruby/gems/3.1.0/gems/logging-2.3.1/lib/logging/diagnostic_context.rb
111+ 112+ cd $HOME /metasploit-framework
113+ 98114echo -e " \e[34mPACKAGES INSTALLED SUCCESSFULLY....[\e[92m✓\e[34m]\e[0m"
99115echo -e " 033円[92m"
100116center " INSTALLING METASPLOIT"
101117echo -e " \e[34mINSTALLING METASPLOIT....\e[0m"
102- cd $HOME
118+ 103119elif [[ $arc = " aarch64" ]];
104120then
105121# ##############################
106122# #### MAIN EXECUTION CODE #####
107123# ##############################
108- # # Remove non working packages
109- rm $PREFIX /etc/apt/sources.list.d/*
110- # # Purging Ruby
111- apt purge ruby -y
112- # # remove old gems
113- rm -fr $PREFIX /lib/ruby/gems
114- # #
115- pkg upgrade -y -o Dpkg::Options::=" --force-confnew"
116- # # upgrade dpkg
117124pkg install -y python python3 python2 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"
118- # python3 -m pip install --upgrade pip
119- # python3 -m pip install requests
125+ 126+ python3 -m pip install --upgrade pip
127+ 128+ python3 -m pip install requests
120129# Home directory
130+ 121131cd $HOME
122132git clone https://github.com/rapid7/metasploit-framework.git --depth=1
123133cd $HOME /metasploit-framework
124134source <( curl -sL https://github.com/termux/termux-packages/files/2912002/fix-ruby-bigdecimal.sh.txt)
125- sed -i " 277, \$ s/2.8.0/2.2.0/ " Gemfile.lock
135+ 126136gem install bundler
137+ 127138declare NOKOGIRI_VERSION=$( cat Gemfile.lock | grep -i nokogiri | sed ' s/nokogiri [\(\)]/(/g' | cut -d ' ' -f 5 | grep -oP " (.).[[:digit:]][\w+]?[.]." )
139+ 128140gem install nokogiri -v $NOKOGIRI_VERSION -- --use-system-libraries
141+ 129142bundle config build.nokogiri " --use-system-libraries --with-xml2-include=$PREFIX /include/libxml2" ; bundle install
143+ 130144gem install actionpack
145+ 131146bundle update activesupport
147+ 132148bundle update --bundler
149+ 133150bundle install -j$( nproc --all)
134- if [ -e $PREFIX /bin/msfconsole ]; then
135- rm $PREFIX /bin/msfconsole
136- fi
137- if [ -e $PREFIX /bin/msfvenom ]; then
138- rm $PREFIX /bin/msfvenom
139- fi
140- if [ -e $PREFIX /bin/msfrpcd ]; then
141- rm $PREFIX /bin/msfrpcd
142- fi
143- ln -s $PREFIX /opt/metasploit-framework/msfconsole $PREFIX /bin/
144- ln -s $PREFIX /opt/metasploit-framework/msfvenom $PREFIX /bin/
145- ln -s $PREFIX /opt/metasploit-framework/msfrpcd $PREFIX /bin/
146- termux-elf-cleaner $PREFIX /lib/ruby/gems/* /gems/pg-* /lib/pg_ext.so
147- sed -i ' 86 {s/^/#/};96 {s/^/#/}' $PREFIX /lib/ruby/gems/3.1.0/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/ruby_thread_local_var.rb
148- sed -i ' 442, 476 {s/^/#/};436, 438 {s/^/#/}' $PREFIX /lib/ruby/gems/3.1.0/gems/logging-2.3.1/lib/logging/diagnostic_context.rb
151+ 149152echo -e " \e[34mPACKAGES INSTALLED SUCCESSFULLY....[\e[92m✓\e[34m]\e[0m"
150153echo -e " 033円[92m"
151154center " INSTALLING METASPLOIT"
152155echo -e " \e[34mINSTALLING METASPLOIT....\e[0m"
153- cd $HOME
156+ 154157# ######################################################
155158else
156159echo
157160fi
158- cd $HOME /metasploit-framework
159- bash fix-ruby-bigdecimal.sh.txt > /dev/null 2>&1
161+ # issue fix paygen
162+ 163+ # sed -i '86 {s/^/#/};96 {s/^/#/}' $PREFIX/lib/ruby/gems/3.1.0/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/ruby_thread_local_var.rb
164+ # sed -i '442, 476 {s/^/#/};436, 438 {s/^/#/}' $PREFIX/lib/ruby/gems/3.1.0/gems/logging-2.3.1/lib/logging/diagnostic_context.rb
165+ 166+ # bash fix-ruby-bigdecimal.sh.txt >/dev/null 2>&1
167+ 160168cd $HOME
169+ 161170mkdir -p $PREFIX /var/lib/postgresql > /dev/null 2>&1
171+ 162172initdb $PREFIX /var/lib/postgresql > /dev/null 2>&1
173+ 163174echo -e " \e[34mMETASPLOIT \e[92m$ver \e[34m INSTALLED SUCCESSFULLY....[\e[92m✓\e[34m]\e[92m"
164175center " COMPLETING ALL PROCESS"
165176echo -e " \e[34mCOMPLETING WAIT.....\e[0m"
@@ -168,7 +179,14 @@ center "STARTING METASPLOIT"
168179echo -e " \e[34mBOOTING UP WAIT.....\e[0m"
169180echo -e " \e[34mTO START METASPLOIT TYPE (./msfconsole) INSIDE METASPLOIT FRAMEWORK\e[0m"
170181sleep 8.0
171- cd $loc /metasploit-framework
182+ 183+ cd $HOME /metasploit-framework
172184clear
173- bundle install --gemfile /data/data/com.termux/files/home/metasploit-framework/Gemfile
185+ 186+ sleep 30
187+ 188+ pwd
189+ 190+ sleep 30
191+ # bundle install --gemfile /data/data/com.termux/files/home/metasploit-framework/Gemfile
174192./msfconsole
0 commit comments