Special offer for new customers: 5% OFF your first order! Use coupon: GWRITERSclose

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

You can leave a response, or trackback from your own site.
Powered by WordPress | Designed by: Premium WordPress Themes | Thanks to Themes Gallery, Bromoney and Wordpress Themes