Skip to content

Commit

Permalink
将ISP和所在地回程路由节点添加至英文版
Browse files Browse the repository at this point in the history
  • Loading branch information
beststarry committed Jul 31, 2018
1 parent de8b6bb commit c513474
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
2 changes: 0 additions & 2 deletions ZBench-CN.sh
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,8 @@ chmod a+rx /tmp/ZPing-CN.py
/tmp/besttrace 211.136.192.6 > /tmp/gdm.txt 2>&1 &
#"TraceRoute to Guangdong Unicom"
/tmp/besttrace 221.5.88.88 > /tmp/gdu.txt 2>&1 &
if [[ ! ${OwnerIP} ]]; then
#"TraceRoute to Owner's Network"
/tmp/besttrace ${OwnerIP} > /tmp/own.txt 2>&1 &
fi



Expand Down
25 changes: 24 additions & 1 deletion ZBench.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,27 @@ if [ ! -e '/usr/bin/wget' ]; then
fi
read -p "Please Enter Your Host Provider: " Provider

# Get IP
OwnerIP=$(who am i | awk '{print $NF}' | sed -e 's/[()]//g')
while :; do echo
read -p "Please Confirm Your Client IP:${OwnerIP} [y/n]: " ifOwnerIP
if [[ ! ${ifOwnerIP} =~ ^[y,n]$ ]]; then
echo "Input error! Please only input 'y' or 'n'"
else
break
fi
done
if [[ ${ifOwnerIP} == "n" ]]; then
while :; do echo
read -p "Please Enter Your Client IP: " OwnerIP
if [[ ! ${OwnerIP} ]]; then
echo "Input error! Cannot be void!"
else
break
fi
done
fi

# Check release
if [ -f /etc/redhat-release ]; then
release="centos"
Expand Down Expand Up @@ -123,6 +144,8 @@ chmod a+rx /tmp/ZPing.py
/tmp/besttrace 211.136.192.6 > /tmp/gdm.txt 2>&1 &
#"TraceRoute to Guangdong Unicom"
/tmp/besttrace 221.5.88.88 > /tmp/gdu.txt 2>&1 &
#"TraceRoute to Owner's Network"
/tmp/besttrace ${OwnerIP} > /tmp/own.txt 2>&1 &



Expand Down Expand Up @@ -372,7 +395,7 @@ NetUPCM=$( sed -n "25p" /tmp/speed_cn.txt )
NetDWCM=$( sed -n "26p" /tmp/speed_cn.txt )
NetPiCM=$( sed -n "27p" /tmp/speed_cn.txt )
wget -N --no-check-certificate https://raw.githubusercontent.com/FunctionClub/ZBench/master/Generate.py >> /dev/null 2>&1
wget -N --no-check-certificate https://raw.githubusercontent.com/FunctionClub/ZBench/dev/Generate.py >> /dev/null 2>&1
python Generate.py && rm -rf Generate.py && cp /root/report.html /tmp/report/index.html
TSM=$( cat /tmp/shm.txt_table )
TST=$( cat /tmp/sht.txt_table )
Expand Down

0 comments on commit c513474

Please sign in to comment.