Check whether the file is a standard executable. This will return true only if the file has the IMAGE_FILE_EXECUTABLE_IMAGE flag set and the IMAGE_FILE_DLL not set and the file does not appear to be a driver either.
(self)
| 7210 | return checksum + len(self.__data__) |
| 7211 | |
| 7212 | def is_exe(self): |
| 7213 | """Check whether the file is a standard executable. |
| 7214 | |
| 7215 | This will return true only if the file has the IMAGE_FILE_EXECUTABLE_IMAGE flag |
| 7216 | set and the IMAGE_FILE_DLL not set and the file does not appear to be a driver |
| 7217 | either. |
| 7218 | """ |
| 7219 | |
| 7220 | EXE_flag = IMAGE_CHARACTERISTICS["IMAGE_FILE_EXECUTABLE_IMAGE"] |
| 7221 | |
| 7222 | if ( |
| 7223 | (not self.is_dll()) |
| 7224 | and (not self.is_driver()) |
| 7225 | and (EXE_flag & self.FILE_HEADER.Characteristics) == EXE_flag |
| 7226 | ): |
| 7227 | return True |
| 7228 | |
| 7229 | return False |
| 7230 | |
| 7231 | def is_dll(self): |
| 7232 | """Check whether the file is a standard DLL. |
no test coverage detected