ManualMode Department - TomLatin/Defense_Lab_Cyber_Ex1_MonitorServices GitHub Wiki
In this situation we would like to use the serviceList file in order to load 2 samples from different time frames and make a comparison. The program will get a date and time for 2 events, load the 2 samples from the file, and display changes similar to the monitor state (a new process created in the latest sample, a process that no longer runs in the more recent sample, etc.).
The class contains the following functions:
Manual: This is our main function in this class where basically everything is done by auxiliary functions.
-
input:
- Date and time (datetime)
- Date and time (datetime)
- A string that represents the file name of the serviceList
-
output: If there were changes between the samples they would be printed to a screen otherwise it would be printed that there were no changes. If the date and time were not found in the serviceList file, the customer was told that we did not find a sample on that date and time in the serviceList file. If the serviceList file does not exist the customer is told that the system has no information to work on.
findDateWTimeInServiceList: Auxiliary function to the Manual function, its function is to find the date that received exactly the best in the serviceList file.
-
input:
- Date and time (datetime)
- A string that represents the file name of the serviceList
-
output: The function returns a list that contains a sample from the exact date and time of the second second it could find, if the function did not find the date and time in the function file it returns an empty list.
notAnEmptyList: Auxiliary function to the Manual function, its function is to check whether the list returned from the findDateWTimeInServiceList function is not empty, if so the customer is told that we did not find a sample on the date and time in the serviceList file.
- input:
- List
- Date and time (datetime)
- output: If the list is found to be blank, screen printing is performed on the customer for which no samples were found on the date and time and False is returned otherwise True is returned.
listTodict: Auxiliary function to the Manual function, its function is to convert the lists obtained from the findDateWTimeInServiceList function into dictionaries in order to make it more convenient to look for the changes between the samples.
- Input: List
- Output: Dictionary
printAllModificationsBetweenTwoDates: Auxiliary function to the Manual function, its function is to print all the changes between the 2 samples.
- Input: 2 dictionaries and 2 dates (datetime)
- Output: Print