Description
Write a program that first reads in the name of two input files; input1pass.txt and input1shadow.txt. These files will contain encrypted and non-encrypted passwords to simulate a Brute Force approach. Next the program will accept input of two strings representing a potential user name, and password. The files should be read using the file.readlines( ) method.
Your program should output the attempted login and password with a message that it was a successful or unsuccessful brute force attempt.
Ex: If the input is:
input1pass.txt
input1shadow.txt
bobpickle
pa$$w0rd
and the contents of input1pass.txt are:
user1:x:15:51:User One:/home/user1:nologin
user2:x:16:52:User One:/home/user1:nologin
user3:x:17:53:User One:/home/user1:nologin
and the contents of the input1shadow.txt are:
user1:XXPP192920r:15045:0:99999:7:::
user1:LLmm928393x:15046:0:99999:7:::
user1:&^334294kksri.:15047:0:99999:7:::
the output is:
Brute Force Attempt:
Login: user1
Password: XXPP192920r
Unsuccessful brute force attempt
Brute Force Attempt:
Login: user2
Password: LLmm928393x
Unsuccessful brute force attempt
Brute Force Attempt:
Login: user3
Password: &^334294kksri.
Unsuccessful brute force attempt
Ex: If the input is:
input2pass.txt
input2shadow.txt
demo123
password
and the contents of input1pass.txt are:
user1:x:15:51:User One:/home/user1:nologin
user2:x:16:52:User One:/home/user1:nologin
user3:x:17:53:User One:/home/user1:nologin
demo123:x:18:54:Demo User:/home/demo123:nologin
and the contents of the input1shadow.txt are:
user1:XXPP192920r:15045:0:99999:7:::
user1:LLmm928393x:15046:0:99999:7:::
user1:&^334294kksri.:15047:0:99999:7:::
demo123:password:15048:0:99999:7:::
the output is:
Brute Force Attempt:
Login: user1
Password: XXPP192920r
Unsuccessful brute force attempt
Brute Force Attempt:
Login: user2
Password: LLmm928393x
Unsuccessful brute force attempt
Brute Force Attempt:
Login: user3
Password: &^334294kksri.
Unsuccessful brute force attempt
Brute Force Attempt:
Login: demo123
Password: password
Successful brute force attempt
Downloadable files
input1pass.txt and input1shadow.txt
Raheel Rahman –
Incredibly concise, yet detailed, answer to the question that had me stumped. After receiving the help I so desperately needed, I was like, ‘oh my goodness, I’m an idiot!’ But I mean that as a compliment to my assigned answer specialist. I really really appreciated the prompt service and excellent breakdown of the solution. You really can’t put a price on that, but you guys did, and it was so very worth every penny.
Ed Selee –
The assignments I submit are always of great quality and completed on time.
Garfield Fabricius-Davies –
Like always, perfect score
Patrick Lorenz –
Although the price seems expensive, the solution worked very well. The communication and responses are quite fast. Thank you.