Violent Python: A Cookbook for Hackers, Forensic Analysts, Penetration Testers and Security Engineers.

Brute Login function

Review the brute Login 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:

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 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 brute Login 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.

Submit your assignment using the Assignment Files tab.

Order a Unique Copy of this Paper

Essay Creek is an academic writing service provided to you by, a London-based company.

  • Experience
    Helping students successfully for 11 years.
  • Confidentiality & Security
    Be sure your information will be kept confidential due to our secure service.
  • Quality & Reliability
    8.5 out of 10 average quality score according to our customers' feedback. 97.45% of orders delivered on time.
  • Versatility
    478 active writers in 68 disciplines.
  • 100% money back guarantee
    You can always request a refund if you are not satisfied with the result.

Read more about us

Our team of writers is comprised of people with necessary academic writing skills and experience in various fields of study.

  • Skilled writers only
    We carefully choose writers to employ, paying attention to their skills and abilities.
  • Competence
    Your order will be assigned to a competent writer who specializes in your field of study.
  • In-depth knowledge
    Our writers know both peculiarities of academic writing and paper formatting rules.
  • Motivation
    We keep updated on results our writers show, motivating them to constantly improve their performance.

Read more about our writers

  • Testimonials
    Our clients' testimonials prove we're doing everything right.

Check for yourself

  • Sample essays
    The best way to understand how well our writers do their work is to view sample essays written by them.

View samples

  • Our Free Essay Tools
    Even more opportunities to improve your academic papers.


Bibliography Generator
Words to Pages Converter
Words to Minutes Converter
College GPA Calculator
Thesis statement generator