def check_forhash(filename):
 if isinstance(filename, list):
  filename = filename[0]
 (path, name) = os.path.split(filename)
 if re.search(u'(_0x[a-z0-9]{32})', name):
  hashvalue = re.findall(u'(_0x[a-z0-9]{32})', name)
  return (True, hashvalue)
 else:
  return (False, None)

def check_forhash ( filename ) : if isinstance ( filename , list ) : filename = filename [ 0 ] ( path , name ) = os . path . split ( filename ) if re . search ( u'(_0x[a-z0-9]{32})' , name ) : hashvalue = re . findall ( u'(_0x[a-z0-9]{32})' , name ) return ( True , hashvalue ) else : return ( False , None )
checks if file has a hash in its filename .