#!/bin/bashUSER="customer"PASS="20210312"DEFAULT_DOWNLOAD_URL="https://111.207.198.201:8082/customer"function download() {unset DOWNLOAD_URLunset inputif [ -n "1ドル" ] && [ "$#" == 1 ]; thenDOWNLOAD_URL=$DEFAULT_DOWNLOAD_URL/1ドルelif [ -n "1ドル" ] && [ "$#" != 1 ]; thenDOWNLOAD_URL=$DEFAULT_DOWNLOAD_URLfor url in "$@";doDOWNLOAD_URL=$DOWNLOAD_URL/$urldoneelseDOWNLOAD_URL=$DEFAULT_DOWNLOAD_URLfiwhile true; doclearsize=($(curl -s -k -u $USER:$PASS $DOWNLOAD_URL/ | grep -E '^<a\s+|^<h1' | awk '{print $NF}' ))size[0]="-"menu=($(curl -s -k -u $USER:$PASS $DOWNLOAD_URL/ | grep -E '^<a|^<h1' | awk -F '">' '{print 1ドル}' | awk -F '"' '{print 2ドル}'))if [ ${#size[@]} == ${#menu[@]} ];thenfor ((i=0;i<"${#menu[@]}";i++));dosize[$i]=$(echo ${size[$i]} | tr -d '\r')if [ ${size[$i]} == '-' ] && [ $i == 0 ];thentype="[Previous level direction]"elif [ ${size[$i]} == "-" ];thentype="[Direction]"elif [[ ${size[$i]} =~ G$|M$ ]] || [[ ${size[$i]} =~ [1-9]+ ]]; thentype="[File]"fiecho -e "0円33[34m $i${type}0円33[0m ${menu[$i]}"doneelif [ ${#menu[@]} == 0 ] || [ ${#size[@]} != ${#menu[@]} ]; thenread -p "$(echo -e "0円33[34m No data available, press Enter to return to the default list 0円33[0m")"DOWNLOAD_URL=$DEFAULT_DOWNLOAD_URLcontinuefiread -p "Enter content: " inputif [ -n "$input" ] && [ $input == 0 ];thenif [[ $DOWNLOAD_URL =~ /$ ]];thenlocal NF_PATH=$(echo $DOWNLOAD_URL | awk -F '/' '{print $(NF - 1)}') # 结尾路径elselocal NF_PATH=$(echo $DOWNLOAD_URL | awk -F '/' '{print $NF}') # 结尾路径fiDOWNLOAD_URL=$(echo $DOWNLOAD_URL | awk -F "$NF_PATH" '{print 1ドル}')continueelif [ -n "$input" ] && [ ${#input} -lt 10 ] && [[ $input =~ [1-9]+ ]] && [ -n "${menu[$input]}" ]; thenDOWNLOAD_URL="$DOWNLOAD_URL/${menu[$input]}"if [ "${size[$input]}" == '-' ]; thencontinueelif [ "${size[$input]}" != '-' ];thenlocal HTTP=$(echo $DEFAULT_DOWNLOAD_URL | awk -F ':' '{print 1ドル}')local ADDRESS=$(echo $DEFAULT_DOWNLOAD_URL | awk -F ':' '{print 2ドル}' | awk -F '//' '{print 2ドル}')local PORT_URL=$(echo $DOWNLOAD_URL | awk -F ':' '{print $NF}')DOWNLOAD_URL="$HTTP://${USER}:${PASS}@$ADDRESS:$PORT_URL"wget -q --show-progress --no-check-certificate $DOWNLOAD_URLif [ $? -eq 0 ]; thenecho -e "[Download successful]"elseecho -e "[Download failed]"fiexitfielif [ -n "$input" ] && [[ ! $input =~ [1-9]+ ]]; thenif [ "$input" != 0 ] && [[ $input =~ \.* ]]; thenDOWNLOAD_URL="$DOWNLOAD_URL/$input"continueelseDOWNLOAD_URL="$DOWNLOAD_URL/$input"local HTTP=$(echo $DEFAULT_DOWNLOAD_URL | awk -F ':' '{print 1ドル}')local ADDRESS=$(echo $DEFAULT_DOWNLOAD_URL | awk -F ':' '{print 2ドル}' | awk -F '//' '{print 2ドル}')local PORT_URL=$(echo $DOWNLOAD_URL | awk -F ':' '{print $NF}')DOWNLOAD_URL="$HTTP://${USER}:${PASS}@$ADDRESS:$PORT_URL"wget -q --show-progress --no-check-certificate $DOWNLOAD_URLif [ $? -eq 0 ]; thenecho -e "[Download successful]"elseecho -e "[Download failed]"fiexitfielseread -p "$(echo -e "0円33[34m No data available, press Enter to return to the default list 0円33[0m")"DOWNLOAD_URL=$DEFAULT_DOWNLOAD_URLcontinuefidone}case 1ドル in*)download "$@";;esac
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。