The thread class which stores the constants for each thread.
| 390 | |
| 391 | |
| 392 | class ZgrabThread(threading.Thread): |
| 393 | """ |
| 394 | The thread class which stores the constants for each thread. |
| 395 | """ |
| 396 | |
| 397 | def __init__(self, thread_id, q, port, command, zones_struct, zgrab_collection): |
| 398 | threading.Thread.__init__(self) |
| 399 | self.thread_id = thread_id |
| 400 | self.port = port |
| 401 | self.zones_struct = zones_struct |
| 402 | self.zgrab_collection = zgrab_collection |
| 403 | self.run_command = command |
| 404 | self.q = q |
| 405 | self.logger = LoggingUtil.create_log(__name__) |
| 406 | |
| 407 | def run(self): |
| 408 | self.logger.debug("Starting Thread-" + str(self.thread_id)) |
| 409 | process_data( |
| 410 | self.logger, |
| 411 | self.thread_id, |
| 412 | self.q, |
| 413 | self.port, |
| 414 | self.run_command, |
| 415 | self.zones_struct, |
| 416 | self.zgrab_collection, |
| 417 | ) |
| 418 | self.logger.debug("Exiting Thread-" + str(self.thread_id)) |
| 419 | |
| 420 | |
| 421 | def check_save_location(save_location): |