A BrainFuck debugger and scanner for CTF flags
Example code from the Hackappatoi 2022:
>--------[<+++++++++++++++++++++++>-]<>>++++++++[<++++++++>-]<+++>>---------[<+++++++++++++++++++>-]<->>--------[<+++++++++++++++++++++++>-]<-->>+++++++++++[<+++++++++++>-]<++>>++++++++[<++++++++>-]<++++>>++++++[<++++++++>-]<>>++++++++++[<+++++++++++>-]<>>----------[<++++++++++++++>-]<>>---------[<+++++++++++++++++>-]<-------->>+++++++++[<+++++++++++>-]<>>------[<++++++++++++++++++++++++++++++++++>-]<---->>++++++++++[<++++++++++>-]<>>-------[<+++++++++++++++++++++++++++++>-]<-->>---------[<+++++++++++++++++>-].<-------->>-------[<+++++++++++++++++++++++++++++>-].<---->>----------[<+++++++++++++++>-].<---->>---------[<+++++++++++++++++>-].<-------->>-----------[<++++++++++++>-].<--->>------[<++++++++++++++++++++++++++++++++++>-].<---->>----------[<+++++++++++++>-].<--------->>+++++++++[<++++++++++>-].<+++++>>+++++++[<+++++++>-].<+++>>---------[<+++++++++++++++++++>-].<--->>+++++++[<+++++++>-].<++>>+++++++++[<++++++++++>-].<+++++>>----------[<++++++++++++++>-].<->>------[<++++++++++++++++++++++++++++++++++>-].<---->>+++++++++[<++++++++++>-].<++++++++>>-------[<+++++++++++++++++++++++++++++>-].<-->>++++++++++[<+++++++++++>-].<++++>>+++++++++++[<+++++++++++>-].<++++><>++++++++++++++[<++++++++++++++>-].<+++.<>>+++++++++++++++[<<++++++++++++++++>>-].<<+++++++++++++.<>>>+++++++++++++++[<<<+++++++++++++++>>>-].<<<++++++++++++.<>>>>----[<<<<++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>>>>-].<<<<-.<>>>>>+++++++[<<<<<+++++++++>>>>>-].<<<<<.<>>>>>>+[<<<<<<++>>>>>>-].<<<<<<.<>>>>>>>+++++++++++++[<<<<<<<++++++++++++++>>>>>>>-].<<<<<<<+++++++++++.<>>>>>>>>--------[<<<<<<<<+++++++++++++++++++++++>>>>>>>>-].<<<<<<<<----.<>>>>>>>>>+++[<<<<<<<<<+++++>>>>>>>>>-].<<<<<<<<<.<>>>>>>>>>>+++++++[<<<<<<<<<<++++++++>>>>>>>>>>-].<<<<<<<<<<++.<>>>>>>>>>>>++++[<<<<<<<<<<<+++++>>>>>>>>>>>-].<<<<<<<<<<<+.<>>>>>>>>>>>>-------------[<<<<<<<<<<<<++++++>>>>>>>>>>>>-].<<<<<<<<<<<<-------.<>>>>>>>>>>>>>+++++++[<<<<<<<<<<<<<+++++++>>>>>>>>>>>>>-].<<<<<<<<<<<<<.<>>>>>>>>>>>>>>------------[<<<<<<<<<<<<<<+++++++>>>>>>>>>>>>>>-].<<<<<<<<<<<<<<-----.<>>>>>>>>>>>>>>>++[<<<<<<<<<<<<<<<++>>>>>>>>>>>>>>>-].<<<<<<<<<<<<<<<+.<>>>>>>>>>>>>>>>>+++[<<<<<<<<<<<<<<<<++++>>>>>>>>>>>>>>>>-].<<<<<<<<<<<<<<<<.<>>>>>>>>>>>>>>>>>+++++++[<<<<<<<<<<<<<<<<<++++++++>>>>>>>>>>>>>>>>>-].<<<<<<<<<<<<<<<<<.<>>>>>>>>>>>>>>>>>>+++[<<<<<<<<<<<<<<<<<<+++++>>>>>>>>>>>>>>>>>>-].<<<<<<<<<<<<<<<<<<.<>>>>>>>>>>>>>>>>>>>-------[<<<<<<<<<<<<<<<<<<<++++++++++++++++++++++++++++>>>>>>>>>>>>>>>>>>>-].<<<<<<<<<<<<<<<<<<<----.<>>>>>>>>>>>>>>>>>>>>+++++++++++++[<<<<<<<<<<<<<<<<<<<<++++++++++++++>>>>>>>>>>>>>>>>>>>>-].<<<<<<<<<<<<<<<<<<<<++++++.<>>>>>>>>>>>>>>>>>>>>>---[<<<<<<<<<<<<<<<<<<<<<++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>>>>>>>>>>>>>>>>>>>>>-].<<<<<<<<<<<<<<<<<<<<<-.<>>>>>>>>>>>>>>>>>>>>>>------------[<<<<<<<<<<<<<<<<<<<<<<+++++++>>>>>>>>>>>>>>>>>>>>>>-].<<<<<<<<<<<<<<<<<<<<<<-----.<
Flag retrieved from scanning the data memory durring execution:
HCTF{D0nt_c0d3_1f_y0u_4R3_s0b3r}
Example from Tenable CTF 2021:
--[----->+<]>.++++++.-----------.++++++.[----->+<]>.----.---.+++[->+++<]>+.-------.++++++++++.++++++++++.++[->+++<]>.+++.[--->+<]>----.+++[->+++<]>++.++++++++.+++++.--------.-[--->+<]>--.+[->+++<]>+.++++++++.>--[-->+++<]>.
Flag retrieved from output:
flag{wtf_is_brainfuck}
Example from the Codefest CTF 2020:
++++++++[>+>++>+++>++++>+++++>++++++>+++++++>++++++++>+++++++++>++++++++++>+++++++++++>++++++++++++>+++++++++++++>++++++++++++++>+++++++++++++++>++++++++++++++++<<<<<<<<<<<<<<<<-]>>>>>>>>>>>>+++.---<<<<<<<<<<<<>>>>>>>>>>>>>>-.+<<<<<<<<<<<<<<>>>>>>>>>>>>>----.++++<<<<<<<<<<<<<>>>>>>>>>>>>>---.+++<<<<<<<<<<<<<>>>>>>>>>>>>>--.++<<<<<<<<<<<<<>>>>>>>>>>>>>---.+++<<<<<<<<<<<<<>>>>>>>>>>>>>>+++.---<<<<<<<<<<<<<<>>>>>>>>>>>>>>>----.++++<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>+++.---<<<<<<<<<<<<<<<>>>>>>>>>>>>>>--.++<<<<<<<<<<<<<<>>>>>>.<<<<<<>>>>>>>>>>>>>>>----.++++<<<<<<<<<<<<<<<>>>>>>>>>>>>-.+<<<<<<<<<<<<>>>>>>>>>>>>>>>----.++++<<<<<<<<<<<<<<<>>>>>>>>>>>>>.<<<<<<<<<<<<<>>>>>>+++.---<<<<<<>>>>>>>>>>>>-.+<<<<<<<<<<<<>>>>>>>>>>>>>--.++<<<<<<<<<<<<<>>>>>>+.-<<<<<<>>>>>>>----.++++<<<<<<<>>>>>>>>>>>>>-.+<<<<<<<<<<<<<>>>>>>>>>>>>-.+<<<<<<<<<<<<>>>>>>>>>>>>>+++.---<<<<<<<<<<<<<>>>>>>+++.---<<<<<<>>>>>>+++.---<<<<<<>>>>>>>>>>>>>>.<<<<<<<<<<<<<<>>>>>>>>>>>>-.+<<<<<<<<<<<<>>>>>>>>>>>>>----.++++<<<<<<<<<<<<<>>>>>>+.-<<<<<<>>>>>>>>>>>>>-.+<<<<<<<<<<<<<>>>>>>>>>>>>>-.+<<<<<<<<<<<<<>>>>>>+.-<<<<<<>>>>>>>>>>>>>>--.++<<<<<<<<<<<<<<>>>>>>>---.+++<<<<<<<>>>>>>>>>>>>>>>>---.+++<<<<<<<<<<<<<<<<>++.--<>>>>>>>+.-<<<<<<<>>>>>>>--.++<<<<<<<>>>>>>>++.--<<<<<<<>>>>>>>.<<<<<<<>>>>>>>---.+++<<<<<<<>>>>>>>----.++++<<<<<<<>>>>>>>-.+<<<<<<<>>>>>>>+.-<<<<<<<>>>>>>+++.---<<<<<<>>>>>>>--.++<<<<<<<>>>>>>>---.+++<<<<<<<>>>>>>>----.++++<<<<<<<>>>>>>>-.+<<<<<<<>>>>>>>.<<<<<<<>>>>>>>>>>>>+++.---<<<<<<<<<<<<>>>>>>>>>>>>>--.++<<<<<<<<<<<<<>>>>>>++.--<<<<<<>>>>>>.<<<<<<.
Flag retrieved from output:
codefest{n0t_th3_f14g_k33p_d1gg1n5}
Example from the SunshineCTF 2019:
+[--------->++<]>+.++.-------.[--->+<]>+.[->+++++<]>-.-[--->+<]>--.+[->+++<]>+.++++++++.------------.[--->+<]>-.------------.---.[->+++<]>--.-[--->+<]>--.[--->+<]>----.+++[->+++<]>++.++++++++.+++++.[++>---<]>--.-[-->+++++++<]>.[->+++<]>.--[--->+<]>.+[->+++<]>+.++++++++.+++++.[->+++<]>++.++++.+++..+.>--[-->+++<]>.
Flag retrieved from output:
sun{fuck_the-brain#we!got^beef}