Skip to main content
Add link to TIO which shows the input cause the program to halt (thanks Dennis!). Update reasoning to show how to get to this answer.
Source Link
KBRON111
  • 581
  • 3
  • 6

#Malbolge, Doorknob

Try it online (Thanks Dennis!)

Input for Windows: F_⌠1234567890

Input on Linux based system using ISO-8559-1: F_ô1234567890

Reasoning: I will be backThe heart of how the Malbolge program worked is that it depended on a behavior of the Malbolge interpreter which causes an infinite loop if it encounters any instruction which is not between 33 and 126. The program was constructed such that your input would allow you to explain this, maybemodify a single instruction.

Note: I couldn't getmodified the online interpreter to stop with this input, but I tested by buildingdump the interpreter with VS2017. This seemsprogram memory state at the beginning of execution and to also produce 'normalized' source code which takes the form of a list of op codes that will be what DoorKnob used to test it, sorun during the execution of the program. With that is also what I usedinformation you could (slowly) determine that even though the program took 13 inputs only the 1st and 3rd inputs actually mattered.

Edit: AddedLooking through the inputnormalized code and memory dump (and a touch of debugger help) I used on my raspberry pi to getdevised the following:

a = op(input 1, 29524)

b = op(input 3, a)

c = op(486, b)

d = op(c, 37)

e = d/4 + d%3 * 3^9

e must be between 33 and 126

Where op is the so called tritwise "op" that is described in the specification. Using this haltinformation you can write a simple program which iterates over the possible inputs (0 to 255) and finds all solutions which meet the above criteria. Looks like I was running into an encoding issuehad found 2219 possible solutions, some of which will probably not be working solutions (you can't input the required characters). Specifically the above inputs are based on the solution:

(Input 1 = 70, Input 3 = 244)

#Malbolge, Doorknob

Input for Windows: F_⌠1234567890

Input on Linux based system using ISO-8559-1: F_ô1234567890

Reasoning: I will be back to explain this, maybe.

Note: I couldn't get the online interpreter to stop with this input, but I tested by building the interpreter with VS2017. This seems to be what DoorKnob used to test it, so that is also what I used.

Edit: Added the input I used on my raspberry pi to get this halt. Looks like I was running into an encoding issue.

#Malbolge, Doorknob

Try it online (Thanks Dennis!)

Input for Windows: F_⌠1234567890

Input on Linux based system using ISO-8559-1: F_ô1234567890

The heart of how the Malbolge program worked is that it depended on a behavior of the Malbolge interpreter which causes an infinite loop if it encounters any instruction which is not between 33 and 126. The program was constructed such that your input would allow you to modify a single instruction.

I modified the interpreter to dump the program memory state at the beginning of execution and to also produce 'normalized' source code which takes the form of a list of op codes that will be run during the execution of the program. With that information you could (slowly) determine that even though the program took 13 inputs only the 1st and 3rd inputs actually mattered.

Looking through the normalized code and memory dump (and a touch of debugger help) I devised the following:

a = op(input 1, 29524)

b = op(input 3, a)

c = op(486, b)

d = op(c, 37)

e = d/4 + d%3 * 3^9

e must be between 33 and 126

Where op is the so called tritwise "op" that is described in the specification. Using this information you can write a simple program which iterates over the possible inputs (0 to 255) and finds all solutions which meet the above criteria. I had found 2219 possible solutions, some of which will probably not be working solutions (you can't input the required characters). Specifically the above inputs are based on the solution:

(Input 1 = 70, Input 3 = 244)

Added input and settings I used on my raspberry pi
Source Link
KBRON111
  • 581
  • 3
  • 6

#Malbolge, Doorknob

Input for Windows: F_⌠1234567890

Input on Linux based system using ISO-8559-1: F_ô1234567890

Reasoning: I will be back to explain this, maybe.

Note: I couldn't get the online interpreter to stop with this input, but I tested by building the interpreter with VS2017. This seems to be what DoorKnob used to test it, so that is also what I used.

Edit: Added the input I used on my raspberry pi to get this halt. Looks like I was running into an encoding issue.

#Malbolge, Doorknob

Input: F_⌠1234567890

Reasoning: I will be back to explain this, maybe.

Note: I couldn't get the online interpreter to stop with this input, but I tested by building the interpreter with VS2017. This seems to be what DoorKnob used to test it, so that is also what I used.

#Malbolge, Doorknob

Input for Windows: F_⌠1234567890

Input on Linux based system using ISO-8559-1: F_ô1234567890

Reasoning: I will be back to explain this, maybe.

Note: I couldn't get the online interpreter to stop with this input, but I tested by building the interpreter with VS2017. This seems to be what DoorKnob used to test it, so that is also what I used.

Edit: Added the input I used on my raspberry pi to get this halt. Looks like I was running into an encoding issue.

Source Link
KBRON111
  • 581
  • 3
  • 6

#Malbolge, Doorknob

Input: F_⌠1234567890

Reasoning: I will be back to explain this, maybe.

Note: I couldn't get the online interpreter to stop with this input, but I tested by building the interpreter with VS2017. This seems to be what DoorKnob used to test it, so that is also what I used.