Skip to content

Commit

Permalink
Inverted app.xml bytes to try to avoid triggering windows virus compl…
Browse files Browse the repository at this point in the history
  • Loading branch information
shannah committed Feb 18, 2023
1 parent 2644ddd commit 712a1ba
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ private void writeLauncher(AppDescription app, File destFile) throws Exception {
try (FileInputStream fis = new FileInputStream(appXml)) {
IOUtil.copy(fis, fos);
}
byte[] bytes = String.valueOf(origSize).getBytes("UTF-8");
byte[] bytes = invertBytes(String.valueOf(origSize).getBytes("UTF-8"));


// Record the position of the start of the data file
// As a UTF-8 string
Expand All @@ -86,6 +87,18 @@ private void writeLauncher(AppDescription app, File destFile) throws Exception {
destFile.setExecutable(true, false);

}

// Because windows and chrome think that exes with base64 appended is a virus,
// trying to make the bytes not base64.
private byte[] invertBytes(byte[] bytes) {
int len = bytes.length;
byte[] out = new byte[len];
for (int i=0; i<len; i++) {
out[i] = (byte) (255 - bytes[i]);
}

return out;
}

private static void processAppXml(AppDescription app, File dest) throws Exception {
p("Processing the app.xml file");
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit 712a1ba

Please sign in to comment.