示例:
cpaccess
MPMS0>av_engine vd_info
vd name :/home/zhangm/av/trunk2/mpms/config/av_database/daily.cvd
time :04 Mar 2018 20-13 -0500
version :24364
sigs :1867256
fl :63
md5 :5b8932fbc0f3e27d2c568ce9a64e5c50
builder :neo
stime :1520212394
vd name :/home/zhangm/av/trunk2/mpms/config/av_database/bytecode.cvd
time :06 Dec 2017 21-17 -0500
version :319
sigs :75
fl :63
md5 :517816885b385380bc463dbf9612c880
builder :neo
stime :1512613031
vd name :/home/zhangm/av/trunk2/mpms/config/av_database/main.cvd
time :07 Jun 2017 17-38 -0400
version :58
sigs :4566249
fl :60
md5 :57462fd73f1cfdb356b9dca66da2b732
builder :sigmgr
stime :1496871490
检查下载的病毒库:
colin@U:~/下载$ python3 check_cvd_version.py bytecode.cvd
time :06 Dec 2017 21-17 -0500
version :319
sigs :75
fl :63
md5 :517816885b385380bc463dbf9612c880
key :F735lZFB6iE5FednwLWyGQ+4g9Fy83JKo2HSJlHTCJp7NKoI/XGpXj1/SiUMOY0dmT71HvDIwCw1IwzbE/Ob8V3rUlVAcwedf2xjB5/wpHl1sROBIMCvafYVsMtHGioIK3TydspOk1jpNBST09FtoJ4WIt+weDwoptLFR257Kmj
builder :neo
stime :1512613031
python 代码
#!/usr/bin/env python3
import sys
# _*_ coding:utf-8 _*_
'''
example:
#python3 version.py bytecode.cvd
'''
discrp = ["time", "version", "sigs", "fl", "md5", "key", "builder", "stime"]
def print_cvd_header(cvd_file_name):
with open(cvd_file_name, 'rb') as cvd_file:
b = cvd_file.read(512)
str = b.decode('utf-8')
l = str.rstrip().split(':')
for (d, i) in zip(discrp, l[1:]):
print("%-8s:%s"%(d, i))
if __name__=='__main__':
print_cvd_header(sys.argv[1])