This is called at the end of packet capture. It will go through the plugins and attempt to cleanup any connections that were not yet closed.
(plugin_index)
| 81 | |
| 82 | |
| 83 | def clean_plugin_chain(plugin_index): |
| 84 | """ |
| 85 | This is called at the end of packet capture. |
| 86 | It will go through the plugins and attempt to cleanup any connections |
| 87 | that were not yet closed. |
| 88 | """ |
| 89 | if plugin_index >= len(plugin_chain): |
| 90 | # We are at the end of the chain |
| 91 | return |
| 92 | |
| 93 | current_plugin = plugin_chain[plugin_index] |
| 94 | |
| 95 | # need to flush even if there are no more plugins in the chain to ensure all packets are processed. |
| 96 | current_plugin.flush() |
| 97 | |
| 98 | # Feed plugin chain with lingering packets released by flush. |
| 99 | for _packet in current_plugin.produce_packets(): |
| 100 | feed_plugin_chain(plugin_index + 1, _packet) |
| 101 | |
| 102 | clean_plugin_chain(plugin_index + 1) |
| 103 | |
| 104 | |
| 105 | def decompress_file(filepath, extension, unzipdir): |
no test coverage detected