@ChatGPT 淘宝网network抓包
for culture
-
本社区终于可以向 @ChatGPT 提问了! -
本社区终于可以向 @ChatGPT 提问了!@ChatGPT python input键入值怎么判断是否为空
-
本社区终于可以向 @ChatGPT 提问了!@ChatGPT ddt的@unpack作用
-
本社区终于可以向 @ChatGPT 提问了!@ChatGPT
def getTxt(file_name):
rows = []
path = os.path.abspath('..')
with open(path + file_name, 'rt', encoding='utf-8') as f:
readers = csv.reader(f, delimiter=",", quotechar="|")
next(readers, None)
for row in readers:
temprows = []
for i in row:
temprows.append(i)
rows.append(temprows)
print(rows)
return rows
为每行代码加上注释 -
本社区终于可以向 @ChatGPT 提问了!@ChatGPT 苹果手机微信怎么双开
-
本社区终于可以向 @ChatGPT 提问了!@ChatGPT 抖音账号被封禁无法登录,该怎么解除实名认证
-
本社区终于可以向 @ChatGPT 提问了!@ChatGPT 有哪些免费看书的app推荐一下看
-
本社区终于可以向 @ChatGPT 提问了!@ChatGPT 有什么改善社交能力的书推荐一下看
-
本社区终于可以向 @ChatGPT 提问了!@ChatGPT 宝马在上海车展期间,展台提供的免费冰淇淋中国人询问对方就说发完了,没了!而外国人来了又免费发放,造成恶劣影响,请帮助宝马写一份公关声明!
-
本社区终于可以向 @ChatGPT 提问了!@ChatGPT Benz E300L 国内落地价
-
本社区终于可以向 @ChatGPT 提问了!@ChatGPT Audi A7 国内落地价
-
本社区终于可以向 @ChatGPT 提问了!@ChatGPT 爬虫练习题
-
本社区终于可以向 @ChatGPT 提问了!@ChatGPT 抖音一天中 哪几个时段的流量最好
-
本社区终于可以向 @ChatGPT 提问了!@ChatGPT 伤口结痂是怎么个过程
-
本社区终于可以向 @ChatGPT 提问了!@ChatGPT 可乐杀精否
-
本社区终于可以向 @ChatGPT 提问了!@ChatGPT 喝碳酸饮料的危害有哪些
-
本社区终于可以向 @ChatGPT 提问了!@ChatGPT python脚本中怎么调用test.sh脚本,给出示例代码
-
本社区终于可以向 @ChatGPT 提问了!@ChatGPT python中怎么调用base脚本,给出示例代码
-
本社区终于可以向 @ChatGPT 提问了!@ChatGPT 用python重写下列base脚本
#!/bin/bash
argv=$1
#deploy=$1
count=0
filename=()
isTar=1
if [ $isTar == "1" ]
thenpath=
cd $(dirname $0);pwd -P
#echo the current path is:$path
for i inls
do
filegz="tar.gz"
if [[ $i == $filegz ]]
then
#echo $i
filename[count]=$i
count=expr $count + 1
fi
done#echo $count
#echo ${filename[@]}
for((n=0;n<${#filename[@]};n++)){
echo -e "\033[40;35m"$n"\033[0m \033[40;32m"${filename[n]}"\033[0m"
}if (("$count" <= "0"));
then
echo "请下载部署包"
exit
elif (("$count" == "1"));
then
if [ $argv == "PBox" ];
then
tar zxvf ${filename[0]} -C /pbox
else
tar zxvf ${filename[0]} -C /mnt
fi
else
echo -e "\033[40;36m 请选择部署包:\033[0m"
read inNum
if (("$inNum" < "0")) || (("$inNum" >= "$count"))
then
echo "索引错误"
exit
else
if [ $argv == "PBox" ];
then
tar zxvf ${filename[0]} -C /pbox
else
tar zxvf ${filename[0]} -C /mnt
fi
fi
fi
fi#echo "解压部署包"
#echo $deploy
#tar -zxvf $deploy
#echo "解压部署包完成"inspect(){
if [ $argv != "PBox16.04" ];
then
cp -rf /mnt/profile /etc/
fi
if [ ! -d "/mnt/FCloudComm" ]
then
echo "1"
exit
fi
if [ ! -f "/mnt/run.sh" ]
then
echo "2"
exit
fiif [ ! -f "/usr/lib/libiconv.so.2.6.1" ]; then cp -rf /mnt/FCloudComm/bin/libiconv.so.2.6.1 /usr/lib/ ln -sf /usr/lib/libiconv.so.2.6.1 /usr/lib/libiconv.so ln -sf /usr/lib/libiconv.so.2.6.1 /usr/lib/libiconv.so.2 fi sed -i '/source/d' /etc/init.d/rc.local sed -i '$a source /mnt/run.sh' /etc/init.d/rc.local #taosd &>/dev/null echo "历史数据库安装完成"
}
inspectPBox(){
if [ ! -d "/pbox/FCloudComm" ]
then
echo "1"
exit
fi
if [ ! -f "/pbox/run.sh" ]
then
echo "2"
exit
fiif [ ! -f "/usr/lib/libiconv.so.2.6.1" ]; then cp -rf /pbox/FCloudComm/bin/libiconv.so.2.6.1 /usr/lib/ ln -sf /usr/lib/libiconv.so.2.6.1 /usr/lib/libiconv.so ln -sf /usr/lib/libiconv.so.2.6.1 /usr/lib/libiconv.so.2 fi #taosd &>/dev/null echo "历史数据库安装完成"
}
echo "拷贝系统文件"
if [ $argv == "8401d" ];
then
cp -rf ./libstdc++.so.6 /usr/lib/arm-linux-gnueabihf/
cp -rf ./libstdc++.so.6.0.21 /usr/lib/arm-linux-gnueabihf/
fiif [ $argv == "ISG" ];
then
cp -rf ./libstdc++.so.6.0.21 /usr/lib/arm-linux-gnueabihf/
ln -sf /usr/lib/arm-linux-gnueabihf/libstdc++.so.6.0.21 /usr/lib/arm-linux-gnueabihf/libstdc++.so.6if [ ! -f "/usr/lib/libatomic.so.1.0.0" ];
then
cp -rf /mnt/FCloudComm/bin/libatomic.so.1.0.0 /usr/lib/
ln -sf /usr/lib/libatomic.so.1.0.0 /usr/lib/libatomic.so.1
ln -sf /usr/lib/libatomic.so.1.0.0 /usr/lib/libatomic.so
fi
fiecho "拷贝系统文件完成"
echo -e "\033[40;36m 网口选择 单网(1)双网(2) \033[0m"
read input
#echo $input
if [ $input == "1" ];
then
sed -i 's/NetCardCount = "2"/NetCardCount = "1"/g' /mnt/FCloudComm/bin/pSL_Setting.xml
sed -i '/sleep 1/d' /mnt/FCloudComm/tools/IPCfg
sed -i '/ifconfig eth1 192.168.20.101 netmask 255.255.255.0 up/d' /mnt/FCloudComm/tools/IPCfg
sed -i '/route add default gw 192.168.20.1 dev eth1/d' /mnt/FCloudComm/tools/IPCfg
fi
echo "网口配置完成"#4G函数
echo -e "\033[40;36m 是否支持4G? 否(0)是(1) \033[0m"read -p "" number
if [ $number -eq 0 ];
then
if [ $argv == "8401d" ];
then
sed -i '/active4g.sh/d' /mnt/run.sh
fiif [ $argv == "PBox" ]; then sed -i '/quectel-pppd.sh/d' /pbox/run.sh fi if [ $argv == "PBox16.04" ]; then sed -i '/quectel-pppd.sh/d' /mnt/run.sh fi
fi
if [ $number -eq 1 ];
then
if [ $argv == "8401d" ];
then
sed -i '/active4g.sh/d' /mnt/run.sh
sed -i '/sleep 10/i\sh ./active4g.sh &' /mnt/run.sh
fiif [ $argv == "PBox" ]; then sed -i '/quectel-pppd.sh/d' /pbox/run.sh sed -i '/sleep 10/i\sh ./quectel-pppd.sh &' /pbox/run.sh fi if [ $argv == "PBox16.04" ]; then sed -i '/quectel-pppd.sh/d' /mnt/run.sh sed -i '/sleep 10/i\sh ./quectel-pppd.sh &' /mnt/run.sh fi
fi
if [ $number -ne 1 ] && [ $number -ne 0 ];
then
echo "输入错误"
fiecho "配置开机启动"
if [ $argv == "8401d" ];
then
sed -i '1c #! /bin/bash' /etc/init.d/rc.local
fiif [ $argv == "PBox16.04" ];
then
sed -i '1c #! /bin/bash' /etc/rc.local
fiif [ $argv == "ISG" ];
then
sed -i '1c #! /bin/bash' /etc/init.d/rocktech.sh
sed -i '/source/d' /etc/init.d/rocktech.sh
sed -i '$a source /mnt/run.sh' /etc/init.d/rocktech.sh
sed -i '/source/d' /etc/init.d/rc.local
sed -i "114s:#::g" /etc/init.d/rocktech.sh
fiecho "配置开机启动完成"
echo "初始化本地ip地址"
sed -i 's/address 190.5.20.171/address 192.168.10.101/g' /etc/network/interfaces
sed -i 's/gateway 190.5.200.11/gateway 192.168.10.1/g' /etc/network/interfaces
sed -i 's/address 192.168.1.100/address 192.168.20.101/g' /etc/network/interfaces
sed -i 's/gateway 192.168.1.1/gateway 192.168.20.1/g' /etc/network/interfaces
echo "初始化本地ip地址结束"echo "配置历史数据库"
#td库ISG网关配置
td(){
cd /mnt/TDengine-server-2.0.10.0/
./install.sh &>/dev/null
sed -i 's/firstEp/#firstEp/g' /etc/taos/taos.cfg
sed -i 's/# fqdn/fqdn/g' /etc/taos/taos.cfg
sed -i 's/hostname/localhost/g' /etc/taos/taos.cfg
}#PBox网关配置
PB(){
if [ ! -f "/usr/lib/libatomic.so.1.0.0" ];
then
cp -rf /pbox/FCloudComm/bin/libatomic.so.1.0.0 /usr/lib/
ln -sf /usr/lib/libatomic.so.1.0.0 /usr/lib/libatomic.so.1
ln -sf /usr/lib/libatomic.so.1.0.0 /usr/lib/libatomic.so
fised -i '1c #! /bin/bash' /etc/init.d/rc.local cd /pbox/TDengine-server-2.0.10.0 ./install.sh &>/dev/null sed -i 's/firstEp/#firstEp/g' /etc/taos/taos.cfg sed -i 's/# logDir/ logDir/g' /etc/taos/taos.cfg sed -i 's/# dataDir/ dataDir/g' /etc/taos/taos.cfg sed -i 's#/var/log/taos#/pbox/log#g' /etc/taos/taos.cfg sed -i 's#/var/lib/taos#/pbox/lib#g' /etc/taos/taos.cfg sed -i '/run.sh/d' /etc/rc5.d/S99rmnologin.sh sed -i '$a source /pbox/run.sh' /etc/rc5.d/S99rmnologin.sh
}
power(){
source /mnt/FCloudComm/tools/setEnv.sh
if [ -d "/mnt/config" ];then
#echo "文件夹存在"if [ -f "/mnt/config/hardwareinfo.HID" ];then #echo "文件存在" cp -rf /mnt/config/hardwareinfo.HID /mnt/FCloudComm else #echo "文件不存在" echo "配置完成 请放入HID 和 授权文件" /mnt/FCloudComm/bin/getID fi if [ -f "/mnt/config/"*".lic" ];then #echo "文件存在" cp -rf /mnt/config/*.lic /mnt/FCloudComm/bin else #echo "文件不存在" echo "配置完成 请放入HID 和 授权文件" /mnt/FCloudComm/bin/getID fi else #echo "文件夹不存在" echo "配置完成 请放入HID 和 授权文件" /mnt/FCloudComm/bin/getID fi #echo "配置完成 请放入HID 和 授权文件" #/mnt/FCloudComm/bin/getID
}
powerPBox(){
source /pbox/FCloudComm/tools/setEnv.sh
if [ -d "/pbox/config" ];then
#echo "文件夹存在"if [ -f "/pbox/config/hardwareinfo.HID" ];then #echo "文件存在" cp -rf /pbox/config/hardwareinfo.HID /pbox/FCloudComm else #echo "文件不存在" echo "配置完成 请放入HID 和 授权文件" /pbox/FCloudComm/bin/getID fi if [ -f "/pbox/config/"*".lic" ];then #echo "文件存在" cp -rf /pbox/config/*.lic /pbox/FCloudComm/bin else #echo "文件不存在" echo "配置完成 请放入HID 和 授权文件" /pbox/FCloudComm/bin/getID fi else #echo "文件夹不存在" echo "配置完成 请放入HID 和 授权文件" /pbox/FCloudComm/bin/getID fi #echo "配置完成 请放入HID 和 授权文件" #/pbox/FCloudComm/bin/getID
}
case "$1" in
8401d)
cd /mnt/TDengine-server-2.0.10.0
./install.sh &>/dev/null
sed -i 's#/third/log#log#g' /etc/taos/taos.cfg
sed -i 's#/third/data#data#g' /etc/taos/taos.cfg
sed -i 's/firstEp/#firstEp/g' /etc/taos/taos.cfg
inspect
power
;;
8316)
i="0"
while read path
do
if [ "$path" == "127.0.0.1 GEA-8316-DLK" ];
then
i="1"
fi
done < /etc/hostsif [ "$i" != "1" ]; then sed -i '$a\127.0.0.1 GEA-8316-DLK' /etc/hosts fi cd /mnt/TDengine-server-2.0.10.0 ./install.sh &>/dev/null sed -i 's/firstEp/#firstEp/g' /etc/taos/taos.cfg inspect power ;; ISG) i="0" while read path do if [ "$path" == "127.0.0.1 localhost" ]; then i="1" fi done < /etc/hosts if [ "$i" != "1" ]; then echo "127.0.0.1 localhost"> /etc/hosts fi td inspect power ;; PBox) i="0" while read path do if [ "$path" == "127.0.0.1 imx6ull14x14evk" ]; then i="1" fi done < /etc/hosts if [ "$i" != "1" ]; then echo "127.0.0.1 imx6ull14x14evk"> /etc/hosts fi PB inspectPBox powerPBox ;; PBox16.04) pkexec chown root:root /etc/sudoers /etc/sudoers.d -R td inspect power sed -i '/source/d' /etc/init.d/rc.local sed -i '/source/d' /etc/rc.local sed -i '/sleep 1/isource /mnt/run.sh' /etc/rc.local ;;
esac
-
本社区终于可以向 @ChatGPT 提问了!@ChatGPT iPhone11 跟 iPhone14的充电头能通用吗