

def GetVSSStoreIdentifiers(self, volume_system, volume_identifiers):
    'Retrieves VSS store identifiers.\n\n    This method can be used to prompt the user to provide VSS store identifiers.\n\n    Args:\n      volume_system: the volume system (instance of dfvfs.VShadowVolumeSystem).\n      volume_identifiers: a list of strings containing the volume identifiers.\n\n    Returns:\n      A list of integers containing the selected VSS store identifiers or None.\n\n    Raises:\n      ScannerError: if the source cannot be processed.\n    '
    normalized_volume_identifiers = []
    for volume_identifier in volume_identifiers:
        volume = volume_system.GetVolumeByIdentifier(volume_identifier)
        if (not volume):
            raise errors.ScannerError('Volume missing for identifier: {0:s}.'.format(volume_identifier))
        try:
            volume_identifier = int(volume.identifier[3:], 10)
            normalized_volume_identifiers.append(volume_identifier)
        except ValueError:
            pass
    print_header = True
    while True:
        if print_header:
            print('The following Volume Shadow Snapshots (VSS) were found:')
            print('Identifier\tVSS store identifier')
            for volume_identifier in volume_identifiers:
                volume = vss_identifier.GetVolumeByIdentifier(volume_identifier)
                if (not volume):
                    raise errors.ScannerError('Volume missing for identifier: {0:s}.'.format(volume_identifier))
                vss_identifier = volume.GetAttribute('identifier')
                print('{0:s}\t\t{1:s}'.format(volume.identifier, vss_identifier.value))
            print('')
            print_header = False
        print('Please specify the identifier(s) of the VSS that should be processed:')
        print('Note that a range of stores can be defined as: 3..5. Multiple stores can')
        print('be defined as: 1,3,5 (a list of comma separated values). Ranges and lists can')
        print('also be combined as: 1,3..5. The first store is 1. All stores can be defined')
        print('as "all". If no stores are specified none will be processed. You')
        print('can abort with Ctrl^C.')
        selected_vss_stores = sys.stdin.readline()
        selected_vss_stores = selected_vss_stores.strip()
        if (not selected_vss_stores):
            break
        try:
            selected_vss_stores = self._ParseVSSStoresString(selected_vss_stores)
        except ValueError:
            selected_vss_stores = []
        if (selected_vss_stores == ['all']):
            selected_vss_stores = range(1, (volume_system.number_of_volumes + 1))
        if (not set(selected_vss_stores).difference(normalized_volume_identifiers)):
            break
        print('')
        print('Unsupported VSS identifier(s), please try again or abort with Ctrl^C.')
        print('')
    return selected_vss_stores

dataset/ETHPy150Open log2timeline/dfvfs/examples/recursive_hasher.py RecursiveHasherVolumeScannerMediator.GetVSSStoreIdentifiers/VarMisuse@128/386 `volume_system`->`vss_identifier`