Question

I need help with my homework assignment Linux systems keep user account information in the passwd...

I need help with my homework assignment

Linux systems keep user account information in the passwd file and the encrypted password in the shadow file.

The passwd file containing account information might look like this:

smithj:x:1001:1001:John Smith:/home/smithj:/bin/bash

The shadow file containing password and account expiration information for users might look like this:

smithj:KJDKKkkLLjjwlnttqoiybnm.:10063:0:99999:7:::

The fields in the shadow file are separated by a colon, with the first field being the username and the second being the password.

Under normal circumstances, the password is encrypted. But for the purpose of this assignment, you can assume the password is already unencrypted.

Review the bruteLogin function program on pp. 58–59 of Ch. 2, "Penetration Testing with Python," of Violent Python: A Cookbook for Hackers, Forensic Analysts, Penetration Testers and Security Engineers.

Make the following changes/additions to the function:

  • Modify the bruteLogin function to use both the passwd and shadow files. Assume your passwd and shadow files include two accounts.  
  • Change the bruteLogin to extract the username and full name from the passwd file and the password from the shadow file
  • Change the output to display the full name when confirming successful FTP Login; e.g., "Myhostname FTP Logon Succeeded: John Smith/ KJDKKkkLLjjwlnttqoiybnm"

Copy the source code of your Python .py file into a Word document. Include screen shots showing your code in execution in the same Word document, and submit the single Word document.

Do I need to create an FTP site in order for this code to work?

0 0
Add a comment Improve this question Transcribed image text
Answer #2

Based on the description of your homework assignment, it appears that you are working on a Python script to perform brute-force login attempts using information from the passwd and shadow files on a Linux system. The goal is to modify the existing bruteLogin function to extract the username and full name from the passwd file and the password from the shadow file. Additionally, you need to change the output to display the full name when confirming successful FTP login.

Regarding your question about creating an FTP site, it is not explicitly mentioned in the assignment requirements that you need to create an FTP site. The code seems to focus on extracting information from the passwd and shadow files and simulating FTP login attempts. Therefore, you should not need to create an actual FTP site for the code to work as intended.

Instead, you should focus on modifying the existing Python script to read information from the passwd and shadow files, extract the relevant data (username, full name, and password), and then use that data to perform the brute-force login attempts.

Remember to test your modified code with the provided passwd and shadow files containing the two accounts. Use appropriate error handling and make sure to display the full name in the output when a successful FTP login is confirmed.

Once you have made the necessary modifications to the Python script and tested it successfully, you can copy the source code along with the required screenshots into a Word document and submit it as per the assignment instructions.

Keep in mind that if you encounter any specific issues or errors while working on the assignment, it's a good idea to seek help from your instructor or teaching assistant. They will be able to provide guidance and clarification on the assignment requirements and help you with any technical challenges you may encounter.

answered by: Hydra Master
Add a comment
Answer #3

Based on the description of your homework assignment, it appears that you are working on a Python script to perform brute-force login attempts using information from the passwd and shadow files on a Linux system. The goal is to modify the existing bruteLogin function to extract the username and full name from the passwd file and the password from the shadow file. Additionally, you need to change the output to display the full name when confirming successful FTP login.

Regarding your question about creating an FTP site, it is not explicitly mentioned in the assignment requirements that you need to create an FTP site. The code seems to focus on extracting information from the passwd and shadow files and simulating FTP login attempts. Therefore, you should not need to create an actual FTP site for the code to work as intended.

Instead, you should focus on modifying the existing Python script to read information from the passwd and shadow files, extract the relevant data (username, full name, and password), and then use that data to perform the brute-force login attempts.

Remember to test your modified code with the provided passwd and shadow files containing the two accounts. Use appropriate error handling and make sure to display the full name in the output when a successful FTP login is confirmed.

Once you have made the necessary modifications to the Python script and tested it successfully, you can copy the source code along with the required screenshots into a Word document and submit it as per the assignment instructions.

Keep in mind that if you encounter any specific issues or errors while working on the assignment, it's a good idea to seek help from your instructor or teaching assistant. They will be able to provide guidance and clarification on the assignment requirements and help you with any technical challenges you may encounter.

answered by: Hydra Master
Add a comment
Know the answer?
Add Answer to:
I need help with my homework assignment Linux systems keep user account information in the passwd...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Linux systems keep user account information in the passwd file and the encrypted password in the...

    Linux systems keep user account information in the passwd file and the encrypted password in the shadow file. The passwd file containing account information might look like this: smithj:x:1001:1001:John Smith:/home/smithj:/bin/bash The shadow file containing password and account expiration information for users might look like this: smithj:KJDKKkkLLjjwlnttqoiybnm.:10063:0:99999:7::: The fields in the shadow file are separated by a colon, with the first field being the username and the second the password. Under normal circumstances, the password is encrypted but for the purpose...

  • NEED HELP with HTML with Javascript embedding for form validation project below. I have my code...

    NEED HELP with HTML with Javascript embedding for form validation project below. I have my code below but I'm stuck with validation. If anyone can fix it, I'd really appreciate. ****************************************************************************** CODE: <!DOCTYPE html> <!-- To change this license header, choose License Headers in Project Properties. To change this template file, choose Tools | Templates and open the template in the editor. --> <html> <head> <title>Nice</title> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <script> var textFromTextArea; function getWords(){ var text =...

  • i need help with this python assignment asking for creating a simple database (client application )...

    i need help with this python assignment asking for creating a simple database (client application ) そ归乔 Assignment rh ENCS-393-2174-WW: Tset5.pdf A2.pdf textbook.pdf Department of ComputV ← → O仚 file:///C 18/comp%20348/A2.pdf 5. Print Report: This will print the contents of the database, sorted by name. Note that the sorted contents should be sent by the server back to the client and then displayed by the client app. The Print Report function is r because it is the primary way for...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT