Tags: miscellaneous
Rating:
# Journey
We're given a server and port to connect to, and when we do, we're told to enter a given word. The catch is that this goes on for a really long time, so it'd take a really long time to do it by hand.
This is a script that I wrote to solve this level:
```python
#!/usr/bin/env python3
import socket
def main():
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(("p1.tjctf.org", 8009))
while True:
incoming = s.recv(128).decode("utf-8")
print(incoming)
outgoing = incoming.split("'")[1] + "\n"
print(outgoing)
s.send(outgoing.encode())
if __name__ == "__main__":
main()
```
![](https://raw.githubusercontent.com/shawnduong/ctf-writeups/master/2019-TJ/images/journey.png)
```
tjctf{an_38720_step_journey}
```