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 4404238

Browse files
Update metanew.sh
1 parent 382f601 commit 4404238

File tree

1 file changed

+79
-61
lines changed

1 file changed

+79
-61
lines changed

‎core/min/metanew.sh‎

Lines changed: 79 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ grn="033円[92m"
1313
blu="033円[34m"
1414
mob=$(uname -o)
1515
arc=$(dpkg --print-architecture)
16-
str=$(du -hs)
16+
#str=$(du -hs)
1717
krn=$(uname -s)
1818
ip=$(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
"
3737
sleep 5.0
38+
cd $HOME
3839
if [ -d $HOME/metasploit-framework ];
3940
then
4041
center "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+
6661
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
62+
63+
python3 -m pip install --upgrade pip
64+
65+
python3 -m pip install requests
6966
# Home directory
67+
7068
cd $HOME
69+
70+
sleep 10
71+
7172
git clone https://github.com/rapid7/metasploit-framework.git --depth=1
73+
74+
sleep 10
75+
7276
cd $HOME/metasploit-framework
77+
7378
source <(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+
7582
gem install bundler
83+
84+
cd $HOME/metasploit-framework
85+
7686
declare 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+
7790
gem install nokogiri -v $NOKOGIRI_VERSION -- --use-system-libraries
91+
92+
cd $HOME/metasploit-framework
93+
7894
bundle config build.nokogiri "--use-system-libraries --with-xml2-include=$PREFIX/include/libxml2"; bundle install
95+
96+
cd $HOME/metasploit-framework
97+
7998
gem install actionpack
99+
100+
cd $HOME/metasploit-framework
101+
80102
bundle update activesupport
103+
104+
cd $HOME/metasploit-framework
105+
81106
bundle update --bundler
107+
108+
cd $HOME/metasploit-framework
109+
82110
bundle 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+
98114
echo -e "\e[34mPACKAGES INSTALLED SUCCESSFULLY....[\e[92m✓\e[34m]\e[0m"
99115
echo -e "033円[92m"
100116
center "INSTALLING METASPLOIT"
101117
echo -e "\e[34mINSTALLING METASPLOIT....\e[0m"
102-
cd$HOME
118+
103119
elif [[ $arc = "aarch64" ]];
104120
then
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
117124
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
125+
126+
python3 -m pip install --upgrade pip
127+
128+
python3 -m pip install requests
120129
# Home directory
130+
121131
cd $HOME
122132
git clone https://github.com/rapid7/metasploit-framework.git --depth=1
123133
cd $HOME/metasploit-framework
124134
source <(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+
126136
gem install bundler
137+
127138
declare NOKOGIRI_VERSION=$(cat Gemfile.lock | grep -i nokogiri | sed 's/nokogiri [\(\)]/(/g' | cut -d ' ' -f 5 | grep -oP "(.).[[:digit:]][\w+]?[.].")
139+
128140
gem install nokogiri -v $NOKOGIRI_VERSION -- --use-system-libraries
141+
129142
bundle config build.nokogiri "--use-system-libraries --with-xml2-include=$PREFIX/include/libxml2"; bundle install
143+
130144
gem install actionpack
145+
131146
bundle update activesupport
147+
132148
bundle update --bundler
149+
133150
bundle 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+
149152
echo -e "\e[34mPACKAGES INSTALLED SUCCESSFULLY....[\e[92m✓\e[34m]\e[0m"
150153
echo -e "033円[92m"
151154
center "INSTALLING METASPLOIT"
152155
echo -e "\e[34mINSTALLING METASPLOIT....\e[0m"
153-
cd$HOME
156+
154157
#######################################################
155158
else
156159
echo
157160
fi
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+
160168
cd $HOME
169+
161170
mkdir -p $PREFIX/var/lib/postgresql >/dev/null 2>&1
171+
162172
initdb $PREFIX/var/lib/postgresql >/dev/null 2>&1
173+
163174
echo -e "\e[34mMETASPLOIT \e[92m$ver\e[34m INSTALLED SUCCESSFULLY....[\e[92m✓\e[34m]\e[92m"
164175
center "COMPLETING ALL PROCESS"
165176
echo -e "\e[34mCOMPLETING WAIT.....\e[0m"
@@ -168,7 +179,14 @@ center "STARTING METASPLOIT"
168179
echo -e "\e[34mBOOTING UP WAIT.....\e[0m"
169180
echo -e "\e[34mTO START METASPLOIT TYPE (./msfconsole) INSIDE METASPLOIT FRAMEWORK\e[0m"
170181
sleep 8.0
171-
cd $loc/metasploit-framework
182+
183+
cd $HOME/metasploit-framework
172184
clear
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

Comments
(0)

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