验证中...
私信发送成功
检测J2EE应用lib目录下不包含tld定义的文件
原始数据 复制代码
#DetectTlds.py
import os,os.path, zipfile
basepath = r"D:\Tools\apache-tomcat-8.5.24\webapps\ROOT\WEB-INF\lib"
fline = ""
for f in os.listdir(basepath):
fpath = os.path.join(basepath, f)
exists = False
if os.path.isfile(fpath):
pname,ename = os.path.splitext(f)
if ename == '.zip' or ename == '.jar':
azip = zipfile.ZipFile(fpath)
for zf in azip.namelist():
if zf.endswith(".tld"):
exists = True
break
if not exists:
fline = fline + f + ","
if len(fline) >= 120:
print(fline + '\\')
fline = ""
print(fline)

评论列表( 0 )

你可以在登录后,对此项目发表评论

4_float_left_people 4_float_left_close