Skip to content

Commit

Permalink
add oraclejdk17(2023/08/08)
Browse files Browse the repository at this point in the history
  • Loading branch information
No-Github committed Aug 8, 2023
1 parent 6d62e63 commit 94a5527
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 6 deletions.
77 changes: 73 additions & 4 deletions f8x
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Proxy_OK=
Docker_OK=
error=0
Linux_architecture_Name=
F8x_Version="1.6.7 Dev(2023/08/02)"
F8x_Version="1.6.7 Dev(2023/08/08)"
wget_option="-q --show-progress"

# ===================== Software version variable setting (dev) =====================
Expand Down Expand Up @@ -158,8 +158,8 @@ bettercap_Ver="v2.31.1"
bettercap_bin_amd64="bettercap_linux_amd64_v2.31.1.zip"
bettercap_bin_arm64="bettercap_linux_aarch64_v2.31.1.zip"
# https://github.com/mitmproxy/mitmproxy/releases
mitmproxy_Ver="9.0.1"
mitmproxy_bin="mitmproxy-9.0.1-linux.tar.gz"
mitmproxy_Ver="10.0.0"
mitmproxy_bin="mitmproxy-10.0.0-linux.tar.gz"
# https://github.com/projectdiscovery/naabu/releases
naabu_Ver="v2.1.5"
naabu_bin="naabu_2.1.5_linux_amd64.zip"
Expand Down Expand Up @@ -413,6 +413,9 @@ orclejdk8_bin_arm64="jdk-8u321-linux-aarch64.tar.gz"
jdk11_Version="jdk-11.0.15"
orclejdk11_bin_amd64="jdk-11.0.15_linux-x64_bin.tar.gz"
orclejdk11_bin_arm64="jdk-11.0.15_linux-aarch64_bin.tar.gz"
jdk17_Version="jdk-17.0.8"
orclejdk17_bin_amd64="jdk-17.0.8_linux-x64_bin.tar.gz"
orclejdk17_bin_arm64="jdk-17.0.8_linux-aarch64_bin.tar.gz"
CS_File="CobaltStrike4.3.zip"
CS_Version="CobaltStrike4.3"
CS45_File="CobaltStrike4.5.zip"
Expand Down Expand Up @@ -7040,6 +7043,9 @@ Oraclejdk_Install(){
oraclejdk11)
Oraclejdk11_Install
;;
oraclejdk17)
Oraclejdk17_Install
;;
*)
Oraclejdk8_Install
;;
Expand Down Expand Up @@ -7160,6 +7166,63 @@ Oraclejdk11_Install(){

}

# -oraclejdk17
Oraclejdk17_Install(){

case $Linux_architecture_Name in
*"linux-x86_64"*)
orclejdk17_bin=$orclejdk17_bin_amd64
;;
*"linux-arm64"*)
orclejdk17_bin=$orclejdk17_bin_arm64
;;
esac

name="oraclejdk17"
dir="/usr/local/java/$jdk17_Version"

if test -d $dir
then
Echo_INFOR "java17 installed"
else
echo -e "\033[1;33m\n>> Installing Java environment(oraclejdk17)\n\033[0m"

cd $T_Dir && rm -f $orclejdk17_bin > /dev/null 2>&1 && $Proxy_OK wget ${GitProxy2}https://github.com/No-Github/Archive/releases/download/$orclejdk_tmp_ver/$orclejdk17_bin ${wget_option} || Echo_ERROR "download failed, please check if the network is reachable, proxychains4 configuration is correct"

tar -xzvf $orclejdk17_bin > /dev/null 2>&1
# rm -rf /usr/local/java/ > /dev/null 2>&1
mkdir -p /usr/local/java/
mv --force $jdk17_Version/ /usr/local/java

ln -s /usr/local/java/$jdk17_Version/bin/java /usr/bin/java > /dev/null 2>&1
ln -s /usr/local/java/$jdk17_Version/bin/keytool /usr/bin/keytool > /dev/null 2>&1

#case $Linux_Version in
#*"CentOS"*|*"RedHat"*|*"Fedora"*|*"AlmaLinux"*|*"VzLinux"*|*"Rocky"*)
#echo "JAVA_HOME=/usr/local/java/$jdk17_Version" >> /etc/bashrc
#echo "JRE_HOME=\$JAVA_HOME/jre" >> /etc/bashrc
#echo "CLASSPATH=.:\$JAVA_HOME/lib:\$JRE_HOME/lib" >> /etc/bashrc
#echo "PATH=\$PATH:\$JAVA_HOME/bin" >> /etc/bashrc
#/usr/bin/java -version && Echo_INFOR "Successfully installed java environment, environment variables may need to be re-entered in bash to take effect" || Echo_ERROR "java installation failed (Maybe a false positive, execute the following command and re-enter bash\nexport JAVA_HOME=/usr/local/java/$jdk11_Version\nexport JRE_HOME=\$JAVA_HOME/jre\nexport CLASSPATH=.:\$JAVA_HOME/lib:\$JRE_HOME/lib\nexport PATH=\$JAVA_HOME/bin:\$PATH)"
#;;
#*"Kali"*|*"Ubuntu"*|*"Debian"*)
#echo "JAVA_HOME=/usr/local/java/$jdk17_Version" >> /etc/bash.bashrc
#echo "JRE_HOME=\$JAVA_HOME/jre" >> /etc/bash.bashrc
#echo "CLASSPATH=.:\$JAVA_HOME/lib:\$JRE_HOME/lib" >> /etc/bash.bashrc
#echo "PATH=\$JAVA_HOME/bin:\$PATH" >> /etc/bash.bashrc
#/usr/bin/java -version && Echo_INFOR "Successfully installed java environment, environment variables may need to be re-entered in bash to take effect\nexport JAVA_HOME=/usr/local/java/$jdk11_Version\nexport JRE_HOME=\$JAVA_HOME/jre\nexport CLASSPATH=.:\$JAVA_HOME/lib:\$JRE_HOME/lib\nexport PATH=\$JAVA_HOME/bin:\$PATH" || Echo_ERROR3
#;;
#*) ;;
#esac

rm -f $orclejdk17_bin > /dev/null 2>&1
fi

jenv_config "/usr/local/java/$jdk17_Version"
jenv global 17 && jenv local 17 && echo -e "" && Echo_INFOR "Successfully installed java, Please run the following command:\njenv global 17 && jenv local 17"

}

jenv_Install(){

name="jenv"
Expand Down Expand Up @@ -9506,7 +9569,7 @@ Help(){
echo -e " \033[1;34m-lua\033[0m \033[0;34m : install lua\033[0m"
echo -e " \033[1;34m-nn\033[0m \033[0;34m : install npm & NodeJs\033[0m"
echo -e " \033[1;34m-go\033[0m\033[0;34m : install golang\033[0m"
echo -e " \033[1;34m-oraclejdk(8/11)\033[0m\033[0;34m : install oraclejdk\033[0m"
echo -e " \033[1;34m-oraclejdk(8/11/17)\033[0m\033[0;34m install oraclejdk\033[0m"
echo -e " \033[1;34m-openjdk\033[0m \033[0;34m : install openjdk\033[0m"
echo -e " \033[1;34m-py3(7/8/9/10)\033[0m\033[0;34m : install python3\033[0m \033[1;33m(Based on package manager)\033[0m"
echo -e " \033[1;34m-py2\033[0m \033[0;34m : install python2\033[0m \033[1;33m(Based on package manager)\033[0m"
Expand Down Expand Up @@ -9833,6 +9896,12 @@ do
Base_Check
Oraclejdk_Install "oraclejdk11"
;;
-oraclejdk17)
mac_Check || exit 1
Proxy_Switch
Base_Check
Oraclejdk_Install "oraclejdk17"
;;
-py3 | py3)
mac_Check || exit 1
Python3_Install
Expand Down
4 changes: 2 additions & 2 deletions f8x_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ bettercap_Ver="v2.31.1"
bettercap_bin_amd64="bettercap_linux_amd64_v2.31.1.zip"
bettercap_bin_arm64="bettercap_linux_aarch64_v2.31.1.zip"
# https://github.com/mitmproxy/mitmproxy/releases
mitmproxy_Ver="9.0.1"
mitmproxy_bin="mitmproxy-9.0.1-linux.tar.gz"
mitmproxy_Ver="10.0.0"
mitmproxy_bin="mitmproxy-10.0.0-linux.tar.gz"
# https://github.com/projectdiscovery/naabu/releases
naabu_Ver="v2.1.5"
naabu_bin="naabu_2.1.5_linux_amd64.zip"
Expand Down

0 comments on commit 94a5527

Please sign in to comment.