def app(app_settings, dbengine): return main({}, dbengine=dbengine, **app_settings)
#!/usr/bin/env python if __name__ == '__main__': import sys sys.path.insert(0, 'sa_migrate') import custom custom.main('cllct')
#!/usr/bin/env python if __name__ == '__main__': import sys sys.path.insert(0, 'sa_migrate') import custom custom.main('sa_topic')
def main(error): with open(sys.argv[1], 'r') as f: contents = f.readlines() if error == False: logo.main() else: print(Fore.RED + "\nIncorrect input! Please try agian.") #success catcher list alls = ["all", "All", "ALL"] custom_list = ["custom", "Custom", "CUSTOM"] #this print statement prompts the user to make a decision # print( "\nEnter a search parameter. (1) User account creation/deletion, (2) Incorrect password attempts, (3) Password Modifications (4) File permissions changes, (5) SSH activity, " "(6) New program installs, (7) Sudo usage\nTo search for custom input enter 'custom'\nTo search all test cases enter \'all\'." ) #this variable stores the user's test case specifier selection user_input = input() for elem in alls: if user_input == elem: # print( Fore.MAGENTA + "\n***The following log entries pertain to the creation/deletion of users***\n" ) users.main(False) print( Fore.MAGENTA + "***The following log entries pertain to incorrect password entries***\n" ) incorrect_password.main(False) print( Fore.MAGENTA + "***The following log entries pertain to the modification of passwords***\n" ) password_change.main(False) print( Fore.MAGENTA + "***The following log entries pertain to the modification of file permissions***\n" ) file_permissions.main(False) print(Fore.MAGENTA + "***The following log entries pertain to SSH activity***\n") ssh.main(False) print( Fore.MAGENTA + "***The following log entries pertain to newly installed programs***\n" ) newly_installed_programs.main(False) print(Fore.MAGENTA + "***The following log entries pertain to sudo usage***\n") sudo_usage.main(False) return None for elem in custom_list: if user_input == elem: return custom.main(False) if user_input.isdigit() == False: return main(True) # elif int(user_input) not in range(1, 8): return main(True) else: print("\n") # if user_input == "1": users.main(False) elif user_input == "2": incorrect_password.main(False) elif user_input == "3": password_change.main(False) elif user_input == "4": file_permissions.main(False) elif user_input == "5": ssh.main(False) elif user_input == "6": newly_installed_programs.main(False) elif user_input == "7": sudo_usage.main(False)
#!/usr/bin/env python if __name__ == '__main__': import sys, os sys.path.insert(0, 'sa_migrate') import custom custom.main(os.path.basename(os.path.dirname(__file__)))
#!/usr/bin/env python if __name__ == '__main__': import sys sys.path.insert(0, 'sa_migrate') import custom custom.main('todo')
#!/usr/bin/env python if __name__ == '__main__': import sys sys.path.insert(0, 'sa_migrate') import custom custom.main('bms')