最美情侣中文字幕电影,在线麻豆精品传媒,在线网站高清黄,久久黄色视频

歡迎光臨散文網(wǎng) 會(huì)員登陸 & 注冊(cè)

網(wǎng)心云容器魔方一鍵掃碼工具(圖形化)

2023-06-23 22:04 作者:蔡丨徐丨坤  | 我要投稿

此腳本利用網(wǎng)心云公開的容器魔方的http接口,并使用時(shí)腳本進(jìn)行判斷是否有所需依賴。且為用戶提供圖形交互 網(wǎng)心云sn wget -cq http://$(ifconfig eth0 | grep "inet " | awk '{print $2}' | cut -c 1-):18888/docker/data -O - | jq -r '.data.device.sn' 網(wǎng)心云acode wget -cq http://$(ifconfig eth0 | grep "inet " | awk '{print $2}' | cut -c 1-):18888/docker/data -O - | jq -r '.data.device.acode' 二維碼掃碼 qrencode -l M -t UTF8 -k "https://www.onethingcloud.com/download-center/?activecode=$(wget -cq http://$(ifconfig eth0 | grep "inet " | awk '{print $2}' | cut -c 1-):18888/docker/data -O - | jq -r '.data.device.acode')&sn=$(wget -cq http://$(ifconfig eth0 | grep "inet " | awk '{print $2}' | cut -c 1-):18888/docker/data -O - | jq -r '.data.device.sn')" #!/bin/bash #必須為bash #字符串定義 str5=$(ifconfig eth0 | grep "inet " | awk '{print $2}' | cut -c 1-) #本機(jī)IP str6=wget str7=-cq str8=https://www.onethingcloud.com/download-center #網(wǎng)心云下載地址/二維碼生成一鍵掃碼 #本地查詢模組(模塊側(cè)) function wxedge1() { dir1=$($str6 $str7 http://$str5:$str2/docker/data -O - | jq -r '.data.device.sn') #本機(jī)容器魔方接口,調(diào)用sn dir2=$($str6 $str7 http://$str5:$str2/docker/data -O - | jq -r '.data.device.acode') #本機(jī)容器魔方接口,調(diào)用acode if [ ! -n "$dir1" ]; then #判定本機(jī)是否正確輸入端口號(hào),錯(cuò)誤將循環(huán)。按esc將結(jié)束本程序! if [ $exitstatus = 0 ]; then whiptail --msgbox --title "網(wǎng)心云容器魔方信息搜尋工具(錯(cuò)誤)" "該端口號(hào)沒有相關(guān)信息!請(qǐng)重新輸入" --ok-button "確認(rèn)" 10 60 str2=$(whiptail --title "網(wǎng)心云容器魔方信息搜尋工具(本機(jī)搜索)" --inputbox "請(qǐng)輸入本機(jī)端口" --ok-button "確認(rèn)" --cancel-button "退出" 10 60 "18888" 3>&1 1>&2 2>&3) exitstatus=$? #判斷二次輸入是否正確,否則繼續(xù)該循環(huán)! wxedge1 #循環(huán)該參數(shù)! else echo "stop" fi else { for ((i = 0; i <= 100; i += 10)); do sleep 0.05 echo $i done } | whiptail --gauge "請(qǐng)稍后,數(shù)據(jù)回傳中......" 6 60 0 echo "---------------------------------------------------" echo -e "當(dāng)前主機(jī)$str2端口的網(wǎng)心云SN:\e[33m $dir1 \e[0m" echo "---------------------------------------------------" echo -e "當(dāng)前主機(jī)$str2端口的網(wǎng)心云AC:\e[33m $dir2 \e[0m" echo "---------------------------------------------------" qrencode -l M -t UTF8 -k "$str8/?activecode=$dir2&sn=$dir1" #二維碼生成傳入sn&acode輸出utf8字符串 fi } #遠(yuǎn)程查詢模組(模塊側(cè)) function wxedge2() { dir3=$($str6 $str7 http://$str3:$str4/docker/data -O - | jq -r '.data.device.sn') dir4=$($str6 $str7 http://$str3:$str4/docker/data -O - | jq -r '.data.device.acode') if [ ! -n "$dir3" ]; then whiptail --msgbox --title "網(wǎng)心云容器魔方信息搜尋工具(錯(cuò)誤)" "請(qǐng)重新輸入" --ok-button "確認(rèn)" 10 60 str3=$(whiptail --title "網(wǎng)心云容器魔方信息搜尋工具(高級(jí)搜索)" --inputbox "請(qǐng)重新輸入目標(biāo)IP" --ok-button "確認(rèn)" --cancel-button "退出" 10 60 "" 3>&1 1>&2 2>&3) exitstatus=$? if [ ! $exitstatus = 0 ]; then echo "stop" exit 1 fi str4=$(whiptail --title "網(wǎng)心云容器魔方信息搜尋工具(高級(jí)搜索)" --inputbox "請(qǐng)重新輸入目標(biāo)PORT" --ok-button "確認(rèn)" --cancel-button "退出" 10 60 "" 3>&1 1>&2 2>&3) exitstatus=$? if [ ! $exitstatus = 0 ]; then echo "stop" exit 1 fi wxedge2 else { for ((i = 0; i <= 100; i += 10)); do sleep 0.05 echo $i done } | whiptail --gauge "請(qǐng)稍后,數(shù)據(jù)回傳中......" 6 60 0 echo "---------------------------------------------------" echo -e "$str3:$str4的網(wǎng)心云SN:\e[33m $dir3 \e[0m" echo "---------------------------------------------------" echo -e "$str3:$str4的網(wǎng)心云AC:\e[33m $dir4 \e[0m" echo "---------------------------------------------------" qrencode -l M -t UTF8 -k "$str8/?activecode=$dir4&sn=$dir3" fi } #提示頁面(交互側(cè)) whiptail --msgbox --title "網(wǎng)心云容器魔方信息搜尋工具" "歡迎使用容器魔方信息搜尋工具,嚴(yán)禁用于非法用途!" --ok-button "確認(rèn)" 10 60 #使用前判斷是否滿足條件 if ! type qrencode jq >/dev/null 2>&1; then whiptail --msgbox --title "網(wǎng)心云容器魔方信息搜尋工具" "缺少運(yùn)行依賴,按確認(rèn)鍵安裝!" --ok-button "確認(rèn)" 10 60 echo "缺少運(yùn)行依賴,正在安裝!" apt update apt install -y qrencode jq whiptail fi #主頁面(交互側(cè)) OPTION=$(whiptail --title "網(wǎng)心云容器魔方信息搜尋工具" --menu "請(qǐng)選擇查詢方式" --notags --ok-button "確認(rèn)" --cancel-button "退出" 15 60 4 \ "a" "本機(jī)搜索" \ "b" "高級(jí)搜索" 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ $OPTION = "a" ]; then #子窗口1 str2=$(whiptail --title "網(wǎng)心云容器魔方信息搜尋工具(本機(jī)搜索)" --inputbox "請(qǐng)輸入本機(jī)端口" --ok-button "確認(rèn)" --cancel-button "退出" 10 60 "18888" 3>&1 1>&2 2>&3) #默認(rèn)為18888 exitstatus=$? if [ $exitstatus = 0 ]; then wxedge1 else echo "stop" fi elif [ $OPTION = "b" ]; then #子窗口2 str3=$(whiptail --title "網(wǎng)心云容器魔方信息搜尋工具(高級(jí)搜索)" --inputbox "請(qǐng)輸入目標(biāo)IP" --ok-button "確認(rèn)" --cancel-button "退出" 10 60 "" 3>&1 1>&2 2>&3) exitstatus=$? if [ ! $exitstatus = 0 ]; then echo "stop" exit 1 fi str4=$(whiptail --title "高級(jí)搜索" --inputbox "請(qǐng)輸入目標(biāo)PORT" --ok-button "確認(rèn)" --cancel-button "退出" 10 60 "" 3>&1 1>&2 2>&3) exitstatus=$? if [ ! $exitstatus = 0 ]; then echo "stop" exit 1 fi wxedge2 else echo "stop" fi else echo "stop" fi

網(wǎng)心云容器魔方一鍵掃碼工具(圖形化)的評(píng)論 (共 條)

分享到微博請(qǐng)遵守國家法律
双桥区| 太白县| 上思县| 武陟县| 大城县| 六安市| 包头市| 巴彦淖尔市| 敖汉旗| 甘孜县| 晴隆县| 襄垣县| 广东省| 长丰县| 安康市| 石台县| 广河县| 花莲县| 越西县| 兰考县| 桦南县| 洛扎县| 乌苏市| 德清县| 滦平县| 无极县| 晋中市| 道真| 台中县| 淅川县| 宁波市| 青岛市| 璧山县| 崇礼县| 弋阳县| 武汉市| 易门县| 徐水县| 宁海县| 镇平县| 塔城市|