#582·Havoc

[File a bug report for the Demon Implant]: 'if A {...} else if A {...}' pattern was detected

Author: GoshyaCreated Feb 12, 2026Updated Feb 12, 2026
Labelsbug

What happened?

I found a 'if A {...} else if A {...}' pattern inside 'demons.go' file on line 3637:

if Status == INJECT_ERROR_SUCCESS {
  Message["Type"] = "Good"
  Message["Message"] = "Successful injected shellcode"
} else if Status == INJECT_ERROR_FAILED {               // <=
  Message["Type"] = "Error"
  Message["Message"] = "Failed to inject shellcode"
} else if Status == INJECT_ERROR_INVALID_PARAM {
  Message["Type"] = "Error"
  Message["Message"] = "Invalid parameter specified"
} else if Status == INJECT_ERROR_PROCESS_ARCH_MISMATCH {
  Message["Type"] = "Error"
  Message["Message"] = "Process architecture mismatch"
} else if Status == INJECT_ERROR_FAILED {               // <=
  Message["Type"] = "Error"
  Message["Message"] = "Failed to inject shellcode"
}

There are 2 identical conditions Status == INJECT_ERROR_FAILED. This means that the second 'then' branch will never be executed.

Did You Try With the Dev Branch?

Yes (You tried using the dev branch but the problem persists)

Relevant log output

bash

Did You Read Over Your Issue First?

  • I declare I made an effort and provided the necessary information for replication of the issue.