How username and password are extracted from password file
Course:- Programming Languages
Reference No.:- EM132281368

Assignment Help
Expertsmind Rated 4.9 / 5 based on 47215 reviews.
Review Site
Assignment Help >> Programming Languages

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

You have been hired by a company to provide consultation on security and provide recommendations. Using Microsoft® Word, write a 1-page document explaining how the username and password are extracted from the password file. Describe what would happen if the script fails to open the password file.

Recommend and provide additional code that would better handle cases where the password file might not open.

Submit your assignment using the Assignment Files tab.

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:


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 of this assignment, you can assume the password is already unencrypted.

Review the bruteLogin function program on pp. 58 through 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"

Capture screenshots of your code and output for each conversion. Paste the screenshot in a Word document.

Put your comment

Ask Question & Get Answers from Experts
Browse some more (Programming Languages) Materials
Write a 100- to 200-word short-answer response for the following: Supporting Activity: Security Personnel. Do you think that security personnel require specific skills. Shou
Interpreted code executes much more slowly than compiled code, yet several systems use them extensively. The most well known are Visual Basic (it has two modes: interpreter
Your employer, SGA (Secretive government Agency) wants you to develop an encryption program. After doing some research you have two candidate algorithms.
Create XML document to mark up the nutrition facts for a package of Grandma White's cookies. A package of cookies has a serving size of 1 package and the following nutrition
This assignment requires you to rewrite your HW2 (Online Car Rental) based on RWD techniques to make your website can dynamically change its layout and styles according to dev
Create an interface DisplayCharacters and another class ShapeCharacter. ShapeCharacter contains a method for displaying either the default alphabet or the user's selected c
Formulate a linear program that can be used to determine the optimal product mix for the chemical company. Specifically, do the following: Identify the decision variables (m
Create a file called lab1.html which contains the HTML of a blog page. Create another filelab1.css which is linked from lab1.html , and which contains all the style formatting