on-internet
← Community

Automate input to brute-force a program running in cli with Python

Stack Overflow ·

I'm currently trying to complete all levels on Over the Wire's Bandit 'wargame'. One of the levels (level 24), requires that I connect to a port, on which a daemon is running. This daemon asks to input a password and a 4-digit pin. The password is already known (it is provided at the end of the previous level), the pin is unknown. The indication is that it's necessary to 'brute-force' it. Entering a wrong pin results in this message: "Wrong! Please enter the correct pincode. Try again.". I decided to write a python script that automates the process. The script would: 1) Connect to the port via

Comments

Sign in or sign up to comment and upvote.

No comments yet.