Writing a brute force script