---
# System prepended metadata

title: bytemancy 0
tags: [CTF]

---

# Description
Can you conjure the right bytes? 
The program's source code can be downloaded [here](https://challenge-files.picoctf.net/c_candy_mountain/3bbe7f76772ee17090e5fa64685d4eebc59c44c65f8f181eab667aff96e3602a/app.py). 
Connect to the program with netcat: `$ nc candy-mountain.picoctf.net 63986`

# Hints
1. Solving this with a one-liner will help with the next challenge in this series

# Solution
下載檔案後，是一個名為 app.py 的檔案
```python
while(True):
  try:
    print('⊹──────[ BYTEMANCY-0 ]──────⊹')
    print("☍⟐☉⟊☽☈⟁⧋⟡☍⟐☉⟊☽☈⟁⧋⟡☍⟐☉⟊☽☈⟁⧋⟡☍⟐")
    print()
    print('Send me ASCII DECIMAL 101, 101, 101, side-by-side, no space.')
    print()
    print("☍⟐☉⟊☽☈⟁⧋⟡☍⟐☉⟊☽☈⟁⧋⟡☍⟐☉⟊☽☈⟁⧋⟡☍⟐")
    print('⊹─────────────⟡─────────────⊹')
    user_input = input('==> ')
    if user_input == "\x65\x65\x65":
      print(open("./flag.txt", "r").read())
      break
    else:
      print("That wasn't it. I got: " + str(user_input))
      print()
      print()
      print()
  except Exception as e:
    print(e)
    break
```

\x65 就是 e
我們需要輸入 3 個 e 就會拿到 flag
所以使用 echo 串 nc 就可以了
`echo eee | nc candy-mountain.picoctf.net 63986`