Python Forum

Full Version: Brute force for CTF (easy one)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi Guys !

So I m learing python and I found this website "hackthissite.org" and I decided to make some exercises. One of them was to write a python script that takes a list of passwords from a file and compare it to a password given by the site. Becouse hackthisstie is down , I've randomly chosen a password "maniek". I managed to write the script and it works !! But I want only to see the massage " Password Found : <passw>" and not every try to find it.

I will show you the code :

import time

passw = "maniek" 

with open("wordlist.txt", "r") as inside:
    for line in inside:
        line = line.replace("\n", "")
        line = line.replace("\r", "")
        if line == passw:
            print("Password Found : "+ passw)
        else:
            print("Password not found !")
Sorry for my poor english skills. I want to see only the massage "Pass found : " or if its not in there "Password not found !".

Thank you !
stupid question sry guys pls delete this ... what a shame ...