def set_imageinfo( memoryFilePath ):
path = r'{}'.format( memoryFilePath )
path = os.path.abspath( path )
try:
if os.access( path, os.F_OK):
if os.access( path, os.R_OK ):
cwd = os.getcwd()
imageinfo = [ 'vol.py', '-f', '{}'.format( path ), 'imageinfo', \
'--output=text', \
'--output-file={}'.format( os.path.join( cwd, 'imageinfo.text' ))]
return imageinfo
else:
print '\n[!] Error File Permissions: No Read Access for {}\n'.format( path )
else:
print '\n[!] Error FilePath: Does not exist {}\n'.format( path )
except Exception as set_imageinfo_error:
print '[!] EXCEPTION ERROR: < set_imageinfo > function'
print set_imageinfo_error
评论列表
文章目录