Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

list index out of range: self.NAMES[index] #962

Closed
williballenthin opened this issue Apr 5, 2022 · 1 comment · Fixed by #961
Closed

list index out of range: self.NAMES[index] #962

williballenthin opened this issue Apr 5, 2022 · 1 comment · Fixed by #961
Assignees
Labels
bug Something isn't working
Milestone

Comments

@williballenthin
Copy link
Collaborator

ERROR:lint:failed to extract capabilities: packed with GoPacker /Volumes/local-data/code/capa/scripts/../tests/data/4122acca2f9ea98fc3f3ad040688e4ce.exe_ list index out of range                                                                                                    
Traceback (most recent call last):
  File "/Volumes/local-data/code/capa/scripts/lint.py", line 342, in check_rule
    capabilities = get_sample_capabilities(ctx, path)
  File "/Volumes/local-data/code/capa/scripts/lint.py", line 301, in get_sample_capabilities
    capabilities, _ = capa.main.find_capabilities(ctx.rules, extractor, disable_progress=True)
  File "/Volumes/local-data/code/capa/capa/main.py", line 250, in find_capabilities
    function_matches, bb_matches, insn_matches, feature_count = find_code_capabilities(ruleset, extractor, f)
  File "/Volumes/local-data/code/capa/capa/main.py", line 176, in find_code_capabilities
    features, bmatches, imatches = find_basic_block_capabilities(ruleset, extractor, f, bb)
  File "/Volumes/local-data/code/capa/capa/main.py", line 132, in find_basic_block_capabilities
    ifeatures, imatches = find_instruction_capabilities(ruleset, extractor, f, bb, insn)
  File "/Volumes/local-data/code/capa/capa/main.py", line 99, in find_instruction_capabilities
    for feature, va in itertools.chain(
  File "/Volumes/local-data/code/capa/capa/features/extractors/viv/extractor.py", line 78, in extract_insn_features
    yield from capa.features.extractors.viv.insn.extract_features(f, bb, insn)
  File "/Volumes/local-data/code/capa/capa/features/extractors/viv/insn.py", line 637, in extract_features
    for feature, va in insn_handler(f, bb, insn):
  File "/Volumes/local-data/code/capa/capa/features/extractors/viv/insn.py", line 613, in extract_operand_features
    for feature, va in op_handler(f, bb, insn, i, oper):
  File "/Volumes/local-data/code/capa/capa/features/extractors/viv/insn.py", line 540, in extract_op_number_features
    yield OperandNumber(i, v), insn.va
  File "/Volumes/local-data/code/capa/capa/features/insn.py", line 72, in __init__
    self.name = self.NAMES[index]
IndexError: list index out of range
@williballenthin williballenthin added the bug Something isn't working label Apr 5, 2022
@williballenthin williballenthin added this to the 4.0.0 milestone Apr 5, 2022
@williballenthin williballenthin self-assigned this Apr 5, 2022
@williballenthin
Copy link
Collaborator Author

fixed in 58acc9c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant