发布时间:2019-08-28 09:10:29编辑:auto阅读(2472)
#-*- coding:utf-8 -*- import os import sys if len(sys.argv) == 2: filename=sys.argv[1] if not os.path.isfile(filename): print '[-]' + filename + 'does not exist.' exit(0) if not os.access(filename, os.R_OK): print '[-]' + filename + 'access denied.' exit(0) print '[+] reading vulnerabilities from : ' + filename
执行结果:第一个是不存在的文件,第二个是存在且有权限的文件
上一篇: python学习:Indentation
下一篇: CentOS 6.4 安装python2
54956
41751
36337
31770
26670
26363
24886
20492
16434
15853
2981°
2708°
2808°
2954°
2889°
3152°
3043°
2888°
2879°
2857°