Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Commit

Permalink
Merge branch 'main' of https://github.com/BCACTF/bcactf-5.0 into fore…
Browse files Browse the repository at this point in the history
…n/sea-scavenger
  • Loading branch information
pinuna27 committed May 31, 2024
2 parents 782f682 + 9041932 commit 4c51549
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 0 deletions.
15 changes: 15 additions & 0 deletions my-brain-hurts/chall.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: My Brain Hurts
categories:
- rev
value: 25
flag: bcactf{Br41n_fcK-1s-fUn}
description: |-
My friend sent me a weird string and a "program" they wrote, although it doesn't seem anything interpretable to me. Can you help me find out what they put through their program?
hints:
- If you don't know where to start, look into an esoteric coding language called "Brain F*ck"
files:
- src: ./script.txt
- src: ./string.txt
authors:
- Kai Lindemer
visible: true
1 change: 1 addition & 0 deletions my-brain-hurts/script.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
,>,>,>,>,>,>,>,>,>,>,>,>,>,>,>,>,>,>,>,>,>,>,>,<----<++++++<---------<++<-<+++++<-------<+++++++++<-------<----<---<++++<--<+++<+++++++<+++<+<++<---------------<+++++<-------<---<----.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.
4 changes: 4 additions & 0 deletions my-brain-hurts/solve.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Brainfuck uses + and - to adjust the value of the char at the currently selected position, so all you have to do is swap all the + and -'s to get the flag.
Here is the code that does that:
,>,>,>,>,>,>,>,>,>,>,>,>,>,>,>,>,>,>,>,>,>,>,>,<++++<------<+++++++++<--<+<-----<+++++++<---------<+++++++<++++<+++<----<++<---<-------<---<-<--<+++++++++++++++<-----<+++++++<+++<++++.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.
On a brainfuck compiler, put this as the code and ^`Zheh|Ey7/r\b\T&6r/][j} as the input.
1 change: 1 addition & 0 deletions my-brain-hurts/string.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
^`Zheh|Ey7/r\b\T&6r/][j}

0 comments on commit 4c51549

Please sign in to comment.