代理PAC 脚本

function FindProxyForURL(url, host){
	if (isInNet(host, "10.245.5.0", "255.255.255.0") ||
            isInNet(host, "10.245.4.0",  "255.255.255.0") ||
            isInNet(host, "192.168.72.0", "255.255.255.0")) {
	return "PROXY proxy.jx.cn:8080";
}
else
	return "PROXY proxy.jx.cn:8080; DIRECT";
}

H3C交换机启用HTTP服务

  1. 开启服务
[H3C]ip http enable

[H3C]ip https enable

2.创建用户名、密码,并赋予HTTP HTTPS的权限

[H3C]local-user admin

New local user added.

[H3C-luser-manage-admin]password simple admin

[H3C-luser-manage-admin]service-type http https

[H3C-luser-manage-admin]authorization-attribute user-role network-admin

[H3C-luser-manage-admin]quit


python-批量重命名文件

工作需要批量修改图片文件名,但是保留文件的前几位名字,写了个简单的python 脚本,内容如下:

#-*-coding:GBK -*- 
# ---------------by  Terry.Gu  2021.6.30
import os

import time
from time import sleep
from tqdm import tqdm
start = time.process_time()
localtime = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
print("=================================================================")
print("                现在时间 :", localtime)
print("=================================================================")
print(" 本脚本功能: 将当前目录下的所有文件重新命名")
print(" 请确保,文件名以17位车架号开头,如:")                         
print("          例:          LDP31B964MG876283_XXX.jpg") 
print("          输出格式为:  LDP31B964MG876283_sss.jpg")   
print("=================================================================")
input("按回车继续...")
print(" ")
print("=================================================================")
print("输入证件类型(如: 网约车证_1 或者 行驶证_2...)")
print("=================================================================")
print(" ")
nname= input("请输入:")
print(" ")
n=0
file_name = os.listdir('./')  #获取当前文件夹内的文件名,列表 file_name 
pbar = tqdm(file_name)
for file in file_name:
    #print(file)
    (file,tempfilename) = os.path.split(file)     #分离文件后缀名
    (filename1, extension) = os.path.splitext(tempfilename) #filename1 为文件名字,extension为文件后缀名
    for i in pbar:
        pbar.set_description('进度:')
    if len(filename1) >= 17:  #判断文件名是否符合要求,车架号为17为,过滤小于17位的文件
        vname = filename1[0:17]
        newname = str(vname) + "_" + str(nname) + str(extension)  #设置新的文件名
        #print(newname)
        os.rename(file_name[n], newname)
        
    else:
        print(str(filename1) + str(extension) +  "文件名不符合要求")
    n+=1
    
print(" ")   

print("重名名完成!")
print("=================================================================")
end = time.process_time()
print("耗时:" + str(end-start) + "s")
print("=================================================================")
input("按回车键盘退出!")

# ---------------by  Terry.Gu  2021.6.30