in jsign-core/src/main/java/net/jsign/pe/PEFile.java [90:106]
public static boolean isPEFile(File file) throws IOException {
if (!file.exists() || !file.isFile()) {
return false;
}
try {
PEFile peFile = new PEFile(file);
peFile.close();
return true;
} catch (IOException e) {
if (e.getMessage().contains("DOS header signature not found") || e.getMessage().contains("PE signature not found")) {
return false;
} else {
throw e;
}
}
}