Martin Carter (Carribean Litterature)
June 24, 2020
Project IV-Nonlinear Model/Other Models and Analyses
June 24, 2020
Show all

Python Host Scripting

Write a python script that meets the following criteria: (Please NOTE:  For FULL credit these objectives must be accomplished in the context of completing the assigned task of searching a log file for invalid logins.  Creating a random array, variable, loop, etc. for no other purpose than to demonstrate it will only count for 80% of that element);

    successfully create file and save in VIM (40 points) — include screenshots to demonstrate
    includes a comment with your name and date (10 points)
    Includes descriptive commenting throughout the script (20 points)
    Utilizes a Debugging method we discussed (10 points)
    loads the os module (20 points)
    Demonstrates the proper declaration and use of at least one variable. (20 points)
    Demonstrates the proper declaration and use of at least one list or dictionary. (20 points)
    Demonstrates the proper use of a for loop. (30 points)
    Demonstrates the proper use of an if-else statement  (30 points)
    Demonstrate proper use of a function ( 30 points)
    Reads the log file provided below  (you can upload it or copy and paste into a file on pythonanywhere) (20 points)
    Uses a regular expression to look for “Failed password for invalid user” and return the usernames for all failed logins in the file. (20 points)
    Raise an alert of some kind if more than 3 failed passwords are found (10 points)
    writes the usernames of the failed logins to a file (20 points)
extra credit given for any other worthy demonstrations of your knowledge (extra modules, routines, etc.)
    ex: output to a JSON or CSV file
    300 points total for this script

Leave a Reply

Your email address will not be published. Required fields are marked *