The thread class which stores the constants for each thread.
| 267 | |
| 268 | |
| 269 | class ZgrabThread(threading.Thread): |
| 270 | """ |
| 271 | The thread class which stores the constants for each thread. |
| 272 | """ |
| 273 | |
| 274 | def __init__(self, thread_id, q, port, command, zone, zgrab_collection): |
| 275 | threading.Thread.__init__(self) |
| 276 | self.thread_id = thread_id |
| 277 | self.port = port |
| 278 | self.zgrab_collection = zgrab_collection |
| 279 | self.zone = zone |
| 280 | self.run_command = command |
| 281 | self.q = q |
| 282 | self.logger = LoggingUtil.create_log(__name__) |
| 283 | |
| 284 | def run(self): |
| 285 | self.logger.debug("Starting Thread-" + str(self.thread_id)) |
| 286 | process_data( |
| 287 | self.logger, |
| 288 | self.thread_id, |
| 289 | self.q, |
| 290 | self.port, |
| 291 | self.run_command, |
| 292 | self.zone, |
| 293 | self.zgrab_collection, |
| 294 | ) |
| 295 | self.logger.debug("Exiting Thread-" + str(self.thread_id)) |
| 296 | |
| 297 | |
| 298 | def check_save_location(save_location): |