Question: Lab 8 In python this is all i have if it cant be answered just say so and ill hope my code if right Using

Lab 8

In python

this is all i have if it cant be answered just say so and ill hope my code if right

Using Regular Expressions (Regex)

Objectives:

  • Demonstrate ability to formulate regular expressions (regex) for common system administration tasks
  • Demonstrate ability to search for texts/files using regex (application area IP address search, etc.)
  • Demonstrate ability to pass regex as arguments to functions/methods that perform file searches (content and filename)

Tasks:

  1. The file attached (empdata.csv) contains records of employees. Upon reviewing your log files as a system administrator, you realized some employees computers have been compromised. The compromised computers are in the 200.10.5.0/24 subnet. Implement a function that would print the names, department, and email address of employees using such machines to a file called compromised.csv .Please note that, certain IP addresses in the given address range cannot be assigned to end-user computers.

  1. Following up on 1 above, you also realized that the function to enforce password complexity did not work properly. Given that the password policy has the requirements below, implement a function to print out the names of all employees with weak passwords.
  • At least 8 characters and not more than 12 characters in length
  • Must have a combination of upper- and lower-case characters
  • Must have at least 1 non-alphanumeric character
  • Must have at least 1 digit

  1. Management of your organization has informed you that the name of the Accounting department has been changed to Finance. Write a function to create a new file (empdata-new.csv) containing information of all employees with the updated department names. Your program should display the names of employees from the Finance Department.
  2. Using the functions implemented above, implement a menu system that allows any of the functions above to be select by users and the corresponding tasks performed.

NB: Submit a single script that addresses all the requirements stated above.

empdata.csv sample

first_name last_name email ip_address department username Password
Aaron Stevens astevens1c@dailymotion.com 144.246.48.229 Product Management astevens1c IW8JT2R8
Amy King akingm@barnesandnoble.com 37.103.166.158 Human Resources akingm yH2gyDQZfjp
Andrew Bowman abowmane@bbb.org 194.147.141.95 Marketing abowmane dZfErQSdKFi
Beverly Perez bperez7@dailymotion.com 200.10.5.0 Product Management bperez7 lBSdzIds6QZ4
Billy Ramirez bramirez12@ameblo.jp 59.199.83.184 Engineering bramirez12 9cLR8rgBR1vM
Brandon Cook bcook4@umn.edu 234.228.150.168 Marketing bcook4 AN1xnOoEa
Brenda Brown bbrowng@squidoo.com 152.51.251.169 Human Resources bbrowng nobbp57gdbyr
Carol Ramos cramosi@amazon.co.jp 148.215.170.92 Business Development cramosi bPiECXyyttt
Carol White cwhiten@dot.gov 186.64.183.48 Engineering cwhiten GEGLcGC
Carolyn Torres ctorres1d@china.com.cn 200.10.5.255 Training ctorres1d H6MIi6#
Craig Stanley cstanley16@bluehost.com 132.26.39.116 Accounting cstanley16 mY4Gxv@FB5m
Donna Brooks dbrooks6@reference.com 12.201.173.235 Accounting dbrooks6 CCY2ROi
Earl Bradley ebradleyu@scribd.com 2.211.31.161 Research and Development ebradleyu 6tPJtQzagXB
Earl Peterson epeterson19@bigcartel.com 80.151.104.248 Engineering epeterson19 SZgcQviKSs

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!