(path, tmp_dir)
| 157 | |
| 158 | |
| 159 | def process_tarfile(path, tmp_dir) -> AnalyzerReturnType: |
| 160 | with tarfile.open(name=path, mode="r:*") as fd: |
| 161 | for x in filter_tar(arch=fd, path=path): |
| 162 | if isinstance(x, tarfile.TarInfo): |
| 163 | fd.extract(member=x, path=tmp_dir, set_attrs=False) |
| 164 | else: |
| 165 | yield x |
| 166 | |
| 167 | |
| 168 | def extract(location: ScanLocation, destination) -> AnalyzerReturnType: |