Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit a85cbb1

Browse files
Update metanew.sh
1 parent 82cff8b commit a85cbb1

File tree

1 file changed

+56
-68
lines changed

1 file changed

+56
-68
lines changed

‎core/min/metanew.sh‎

Lines changed: 56 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,15 @@ cod="033円[0m"
1111
o="033円[91m"
1212
grn="033円[92m"
1313
blu="033円[34m"
14-
msf="6.0.27"
1514
mob=$(uname -o)
1615
arc=$(dpkg --print-architecture)
1716
str=$(du -hs)
1817
krn=$(uname -s)
1918
ip=$(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`
2120
echo -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
5251
echo -e "033円[92m"
5352
center "INSTALLING REQUIREED PACKAGES"
5453
echo -e "\e[34mPACKAGES BEING INSTALLED WAIT....\e[0m"
54+
###############################
55+
##### MAIN EXECUTION CODE #####
56+
###############################
57+
## Remove non working packages
5558
rm $PREFIX/etc/apt/sources.list.d/*
59+
## Purging Ruby
5660
apt purge ruby -y
61+
## remove old gems
5762
rm -fr $PREFIX/lib/ruby/gems
63+
##
5864
pkg 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
6270
cd $HOME
6371
git clone https://github.com/rapid7/metasploit-framework.git --depth=1
6472
cd $HOME/metasploit-framework
6573
source <(curl -sL https://github.com/termux/termux-packages/files/2912002/fix-ruby-bigdecimal.sh.txt)
6674
sed -i "277,\$ s/2.8.0/2.2.0/" Gemfile.lock
6775
gem 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
7079
gem install actionpack
7180
bundle update activesupport
7281
bundle update --bundler
7382
bundle 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
7592
ln -s $PREFIX/opt/metasploit-framework/msfconsole $PREFIX/bin/
7693
ln -s $PREFIX/opt/metasploit-framework/msfvenom $PREFIX/bin/
94+
ln -s $PREFIX/opt/metasploit-framework/msfrpcd $PREFIX/bin/
7795
termux-elf-cleaner $PREFIX/lib/ruby/gems/*/gems/pg-*/lib/pg_ext.so
7896
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
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
8598
echo -e "\e[34mPACKAGES INSTALLED SUCCESSFULLY....[\e[92m✓\e[34m]\e[0m"
8699
echo -e "033円[92m"
87100
center "INSTALLING METASPLOIT"
88101
echo -e "\e[34mINSTALLING METASPLOIT....\e[0m"
89102
cd $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
107103
elif [[ $arc = "aarch64" ]];
108104
then
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
114109
rm $PREFIX/etc/apt/sources.list.d/*
110+
## Purging Ruby
115111
apt purge ruby -y
112+
## remove old gems
116113
rm -fr $PREFIX/lib/ruby/gems
114+
##
117115
pkg 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
121121
cd $HOME
122122
git clone https://github.com/rapid7/metasploit-framework.git --depth=1
123123
cd $HOME/metasploit-framework
124124
source <(curl -sL https://github.com/termux/termux-packages/files/2912002/fix-ruby-bigdecimal.sh.txt)
125125
sed -i "277,\$ s/2.8.0/2.2.0/" Gemfile.lock
126126
gem 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
129130
gem install actionpack
130131
bundle update activesupport
131132
bundle update --bundler
132133
bundle 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
134143
ln -s $PREFIX/opt/metasploit-framework/msfconsole $PREFIX/bin/
135144
ln -s $PREFIX/opt/metasploit-framework/msfvenom $PREFIX/bin/
145+
ln -s $PREFIX/opt/metasploit-framework/msfrpcd $PREFIX/bin/
136146
termux-elf-cleaner $PREFIX/lib/ruby/gems/*/gems/pg-*/lib/pg_ext.so
137147
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
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"
142150
echo -e "033円[92m"
143151
center "INSTALLING METASPLOIT"
144152
echo -e "\e[34mINSTALLING METASPLOIT....\e[0m"
145153
cd $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+
#######################################################
163155
else
164156
echo
165157
fi
166-
#wget https://github.com/termux/termux-packages/files/2912002/fix-ruby-bigdecimal.sh.txt >/dev/null 2>&1
167158
cd $HOME/metasploit-framework
168159
bash fix-ruby-bigdecimal.sh.txt >/dev/null 2>&1
169160
cd $HOME
170161
mkdir -p $PREFIX/var/lib/postgresql >/dev/null 2>&1
171162
initdb $PREFIX/var/lib/postgresql >/dev/null 2>&1
172163
echo -e "\e[34mMETASPLOIT \e[92m$ver\e[34m INSTALLED SUCCESSFULLY....[\e[92m✓\e[34m]\e[92m"
173164
center "COMPLETING ALL PROCESS"
174-
#cd $loc
175165
echo -e "\e[34mCOMPLETING WAIT.....\e[0m"
176-
#rm $ver.tar.gz >/dev/null 2>&1
177-
#rm ruby.deb >/dev/null 2>&1
178166
echo -e "\e[34mCOMPLETED SUCCESSFULLY....[\e[92m✓\e[34m]\e[92m"
179167
center "STARTING METASPLOIT"
180168
echo -e "\e[34mBOOTING UP WAIT.....\e[0m"

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /