(self, shared_data)
| 74 | Class to manage the connection attempts and store the results. |
| 75 | """ |
| 76 | def __init__(self, shared_data): |
| 77 | self.shared_data = shared_data |
| 78 | self.load_scan_file() |
| 79 | self.users = open(shared_data.usersfile, "r").read().splitlines() |
| 80 | self.passwords = open(shared_data.passwordsfile, "r").read().splitlines() |
| 81 | |
| 82 | self.lock = threading.Lock() |
| 83 | self.sqlfile = shared_data.sqlfile |
| 84 | if not os.path.exists(self.sqlfile): |
| 85 | with open(self.sqlfile, "w") as f: |
| 86 | f.write("IP Address,User,Password,Port,Database\n") |
| 87 | self.results = [] |
| 88 | self.queue = Queue() |
| 89 | self.console = Console() |
| 90 | |
| 91 | def load_scan_file(self): |
| 92 | """ |
nothing calls this directly
no test coverage detected