@@ -11,16 +11,15 @@ cod="033円[0m"
1111o=" 033円[91m"
1212grn=" 033円[92m"
1313blu=" 033円[34m"
14- msf=" 6.0.27"
1514mob=$( uname -o)
1615arc=$( dpkg --print-architecture)
1716str=$( du -hs)
1817krn=$( uname -s)
1918ip=$( curl -s https://api.ipify.org)
20- AVL=` df -h /storage/emulated | awk ' { print 4ドル }' | tail -1`
19+ # AVL=`df -h /storage/emulated | awk '{ print 4ドル }' | tail -1`
2120echo -e "
2221 ╭━━━━━━━━━━━━━╮
23- ┃━━━━$blu ● くろまる $grn ━══━━━━━┃ $grn$cod STORAGE=$o " $AVL " $grn
22+ ┃━━━━$blu ● くろまる $grn ━══━━━━━┃ $grn$cod STORAGE=$o " STRG " $grn
2423 ┃SUBSCRIBE ┃ $grn$cod ARCHITECTURE=$o " $arc " $grn
2524 ┃LIKE ┃ $grn$cod OS=$o " $mob " $grn
2625 ┃SHARE ┃ $grn$cod KERNEL=$o " $krn " $grn
@@ -52,129 +51,118 @@ then
5251echo -e " 033円[92m"
5352center " INSTALLING REQUIREED PACKAGES"
5453echo -e " \e[34mPACKAGES BEING INSTALLED WAIT....\e[0m"
54+ # ##############################
55+ # #### MAIN EXECUTION CODE #####
56+ # ##############################
57+ # # Remove non working packages
5558rm $PREFIX /etc/apt/sources.list.d/*
59+ # # Purging Ruby
5660apt purge ruby -y
61+ # # remove old gems
5762rm -fr $PREFIX /lib/ruby/gems
63+ # #
5864pkg upgrade -y -o Dpkg::Options::=" --force-confnew"
59- 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"
60- python3 -m pip install --upgrade pip
61- python3 -m pip install requests
65+ # # upgrade dpkg
66+ pkg 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
69+ # Home directory
6270cd $HOME
6371git clone https://github.com/rapid7/metasploit-framework.git --depth=1
6472cd $HOME /metasploit-framework
6573source <( curl -sL https://github.com/termux/termux-packages/files/2912002/fix-ruby-bigdecimal.sh.txt)
6674sed -i " 277,\$ s/2.8.0/2.2.0/" Gemfile.lock
6775gem install bundler
68- sed ' s|nokogiri (1.*)|nokogiri (1.8.0)|g' -i Gemfile.lock
69- gem install nokogiri -v 1.8.0 -- --use-system-libraries
76+ declare NOKOGIRI_VERSION=$( cat Gemfile.lock | grep -i nokogiri | sed ' s/nokogiri [\(\)]/(/g' | cut -d ' ' -f 5 | grep -oP " (.).[[:digit:]][\w+]?[.]." )
77+ gem install nokogiri -v $NOKOGIRI_VERSION -- --use-system-libraries
78+ bundle config build.nokogiri " --use-system-libraries --with-xml2-include=$PREFIX /include/libxml2" ; bundle install
7079gem install actionpack
7180bundle update activesupport
7281bundle update --bundler
7382bundle install -j$( nproc --all)
74- $PREFIX /bin/find -type f -executable -exec termux-fix-shebang \{\} \;
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
7592ln -s $PREFIX /opt/metasploit-framework/msfconsole $PREFIX /bin/
7693ln -s $PREFIX /opt/metasploit-framework/msfvenom $PREFIX /bin/
94+ ln -s $PREFIX /opt/metasploit-framework/msfrpcd $PREFIX /bin/
7795termux-elf-cleaner $PREFIX /lib/ruby/gems/* /gems/pg-* /lib/pg_ext.so
7896sed -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
79- sed -i ' 13,15 {s/^/#/}' $PREFIX /lib/ruby/gems/3.1.0/gems/hrr_rb_ssh-0.4.2/lib/hrr_rb_ssh/transport/encryption_algorithm/functionable.rb
80- sed -i ' 14 {s/^/#/}' $PREFIX /lib/ruby/gems/3.1.0/gems/hrr_rb_ssh-0.4.2/lib/hrr_rb_ssh/transport/server_host_key_algorithm/ecdsa_sha2_nistp256.rb
81- sed -i ' 14 {s/^/#/}' $PREFIX /lib/ruby/gems/3.1.0/gems/hrr_rb_ssh-0.4.2/lib/hrr_rb_ssh/transport/server_host_key_algorithm/ecdsa_sha2_nistp384.rb
82- sed -i ' 14 {s/^/#/}' $PREFIX /lib/ruby/gems/3.1.0/gems/hrr_rb_ssh-0.4.2/lib/hrr_rb_ssh/transport/server_host_key_algorithm/ecdsa_sha2_nistp521.rb
83- # apt remove -y ruby >/dev/null 2>&1
84- # apt install -y libiconv zlib autoconf bison clang coreutils curl findutils git apr apr-util libffi libgmp libpcap postgresql readline libsqlite openssl libtool libxml2 libxslt ncurses pkg-config wget make libgrpc termux-tools ncurses-utils ncurses unzip zip tar termux-elf-cleaner > /dev/null 2>&1
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
8598echo -e " \e[34mPACKAGES INSTALLED SUCCESSFULLY....[\e[92m✓\e[34m]\e[0m"
8699echo -e " 033円[92m"
87100center " INSTALLING METASPLOIT"
88101echo -e " \e[34mINSTALLING METASPLOIT....\e[0m"
89102cd $HOME
90- # ln -sf $PREFIX/include/libxml2/libxml $PREFIX/include/
91- # loc='/data/data/com.termux/files/home'
92- # ver='6.0.27'
93- # cd $loc
94- # apt-mark unhold ruby >/dev/null 2>&1
95- # curl -LO https://github.com/rapid7/metasploit-framework/archive/$ver.tar.gz >/dev/null 2>&1
96- # cd $loc
97- # tar -xf $ver.tar.gz >/dev/null 2>&1
98- # mv $loc/metasploit-framework-$ver $loc/metasploit-framework >/dev/null 2>&1
99- # cd $loc/m-wiz/core/rb/arm
100- # cp ruby.deb $loc >/dev/null 2>&1
101- # cd $loc
102- # apt install -y ./ruby.deb >/dev/null 2>&1
103- apt-mark hold ruby > /dev/null 2>&1
104- # cd $loc/metasploit-framework
105- # bundle config build.nokogiri --use-system-libraries >/dev/null 2>&1
106- # bundle update >/dev/null 2>&1
107103elif [[ $arc = " aarch64" ]];
108104then
109- center " INSTALLING REQUIREED PACKAGES"
110- echo -e " \e[34mPACKAGES BEING INSTALLED WAIT....\e[0m"
111- # apt remove -y ruby >/dev/null 2>&1
112- # apt install -y libiconv zlib autoconf bison clang coreutils curl findutils git apr apr-util libffi libgmp libpcap postgresql readline libsqlite openssl libtool libxml2 libxslt ncurses pkg-config wget make libgrpc termux-tools ncurses-utils ncurses unzip zip tar termux-elf-cleaner > /dev/null 2>&1
113- echo -e " \e[34mPACKAGES INSTALLED SUCCESSFULLY....[\e[92m✓\e[34m]\e[0m"
105+ # ##############################
106+ # #### MAIN EXECUTION CODE #####
107+ # ##############################
108+ # # Remove non working packages
114109rm $PREFIX /etc/apt/sources.list.d/*
110+ # # Purging Ruby
115111apt purge ruby -y
112+ # # remove old gems
116113rm -fr $PREFIX /lib/ruby/gems
114+ # #
117115pkg upgrade -y -o Dpkg::Options::=" --force-confnew"
118- 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"
119- python3 -m pip install --upgrade pip
120- python3 -m pip install requests
116+ # # upgrade dpkg
117+ pkg 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
120+ # Home directory
121121cd $HOME
122122git clone https://github.com/rapid7/metasploit-framework.git --depth=1
123123cd $HOME /metasploit-framework
124124source <( curl -sL https://github.com/termux/termux-packages/files/2912002/fix-ruby-bigdecimal.sh.txt)
125125sed -i " 277,\$ s/2.8.0/2.2.0/" Gemfile.lock
126126gem install bundler
127- sed ' s|nokogiri (1.*)|nokogiri (1.8.0)|g' -i Gemfile.lock
128- gem install nokogiri -v 1.8.0 -- --use-system-libraries
127+ declare NOKOGIRI_VERSION=$( cat Gemfile.lock | grep -i nokogiri | sed ' s/nokogiri [\(\)]/(/g' | cut -d ' ' -f 5 | grep -oP " (.).[[:digit:]][\w+]?[.]." )
128+ gem install nokogiri -v $NOKOGIRI_VERSION -- --use-system-libraries
129+ bundle config build.nokogiri " --use-system-libraries --with-xml2-include=$PREFIX /include/libxml2" ; bundle install
129130gem install actionpack
130131bundle update activesupport
131132bundle update --bundler
132133bundle install -j$( nproc --all)
133- $PREFIX /bin/find -type f -executable -exec termux-fix-shebang \{\} \;
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
134143ln -s $PREFIX /opt/metasploit-framework/msfconsole $PREFIX /bin/
135144ln -s $PREFIX /opt/metasploit-framework/msfvenom $PREFIX /bin/
145+ ln -s $PREFIX /opt/metasploit-framework/msfrpcd $PREFIX /bin/
136146termux-elf-cleaner $PREFIX /lib/ruby/gems/* /gems/pg-* /lib/pg_ext.so
137147sed -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
138- sed -i ' 13,15 {s/^/#/}' $PREFIX /lib/ruby/gems/3.1.0/gems/hrr_rb_ssh-0.4.2/lib/hrr_rb_ssh/transport/encryption_algorithm/functionable.rb
139- sed -i ' 14 {s/^/#/}' $PREFIX /lib/ruby/gems/3.1.0/gems/hrr_rb_ssh-0.4.2/lib/hrr_rb_ssh/transport/server_host_key_algorithm/ecdsa_sha2_nistp256.rb
140- sed -i ' 14 {s/^/#/}' $PREFIX /lib/ruby/gems/3.1.0/gems/hrr_rb_ssh-0.4.2/lib/hrr_rb_ssh/transport/server_host_key_algorithm/ecdsa_sha2_nistp384.rb
141- sed -i ' 14 {s/^/#/}' $PREFIX /lib/ruby/gems/3.1.0/gems/hrr_rb_ssh-0.4.2/lib/hrr_rb_ssh/transport/server_host_key_algorithm/ecdsa_sha2_nistp521.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
149+ echo -e " \e[34mPACKAGES INSTALLED SUCCESSFULLY....[\e[92m✓\e[34m]\e[0m"
142150echo -e " 033円[92m"
143151center " INSTALLING METASPLOIT"
144152echo -e " \e[34mINSTALLING METASPLOIT....\e[0m"
145153cd $HOME
146- # ln -sf $PREFIX/include/libxml2/libxml $PREFIX/include/
147- # loc='/data/data/com.termux/files/home'
148- # ver='6.0.27'
149- # cd $loc
150- # apt-mark unhold ruby >/dev/null 2>&1
151- # curl -LO https://github.com/rapid7/metasploit-framework/archive/$ver.tar.gz >/dev/null 2>&1
152- # cd $loc
153- # tar -xf $ver.tar.gz >/dev/null 2>&1
154- # mv $loc/metasploit-framework-$ver $loc/metasploit-framework >/dev/null 2>&1
155- # cd $loc/m-wiz/core/rb/aarch64
156- # cp ruby.deb $loc >/dev/null 2>&1
157- # cd $loc
158- # apt install -y ./ruby.deb >/dev/null 2>&1
159- apt-mark hold ruby > /dev/null 2>&1
160- # cd $loc/metasploit-framework
161- # bundle config build.nokogiri --use-system-libraries >/dev/null 2>&1
162- # bundle update >/dev/null 2>&1
154+ # ######################################################
163155else
164156echo
165157fi
166- # wget https://github.com/termux/termux-packages/files/2912002/fix-ruby-bigdecimal.sh.txt >/dev/null 2>&1
167158cd $HOME /metasploit-framework
168159bash fix-ruby-bigdecimal.sh.txt > /dev/null 2>&1
169160cd $HOME
170161mkdir -p $PREFIX /var/lib/postgresql > /dev/null 2>&1
171162initdb $PREFIX /var/lib/postgresql > /dev/null 2>&1
172163echo -e " \e[34mMETASPLOIT \e[92m$ver \e[34m INSTALLED SUCCESSFULLY....[\e[92m✓\e[34m]\e[92m"
173164center " COMPLETING ALL PROCESS"
174- # cd $loc
175165echo -e " \e[34mCOMPLETING WAIT.....\e[0m"
176- # rm $ver.tar.gz >/dev/null 2>&1
177- # rm ruby.deb >/dev/null 2>&1
178166echo -e " \e[34mCOMPLETED SUCCESSFULLY....[\e[92m✓\e[34m]\e[92m"
179167center " STARTING METASPLOIT"
180168echo -e " \e[34mBOOTING UP WAIT.....\e[0m"
0 commit comments