lisa icon indicating copy to clipboard operation
lisa copied to clipboard

Consistently getting KeyError: 'minopsz'

Open xxdesmus opened this issue 3 years ago • 9 comments

Hi there,

Thank you for sharing this amazing project. I set things up, and when I try to analyze any sample I always get the same KeyError: 'minopsz' error.

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/celery/app/trace.py", line 405, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/celery/app/trace.py", line 697, in __protected_call__
    return self.run(*args, **kwargs)
  File "/home/lisa/lisa/web_api/tasks.py", line 80, in full_analysis
    master.run()
  File "/home/lisa/lisa/analysis/top_level.py", line 69, in run
    sub_output = analyzer.run_analysis()
  File "/home/lisa/lisa/analysis/static_analysis.py", line 34, in run_analysis
    self._r2_info()
  File "/home/lisa/lisa/analysis/static_analysis.py", line 62, in _r2_info
    'min_opsize': info['bin']['minopsz'],
KeyError: 'minopsz'

am I missing something obvious?

xxdesmus avatar Jul 01 '21 17:07 xxdesmus

Hi, I think that's because r2 last version has change the data structure of the command.

In the next photo you can see that "minopsz" is now part of 'core' and not 'bin': screen1

One possible solution inside lisa/analysis/static_analysis.py (I don't know 100% if works 😊): screen2

AlbertoFDR avatar Aug 28 '21 09:08 AlbertoFDR

currently having the same issue. I tried the solution mentioned here but its not working. The "Key Error: minopsz" is gone but I see no analysis on the web interface and no report is generated for the sample.

inshaltahir avatar Nov 02 '21 09:11 inshaltahir

Yep same here

evlp avatar Nov 27 '21 04:11 evlp

https://github.com/danieluhricek/LiSa/blob/897fc5133e368273f5fd78339f72a5c3c1e490ce/lisa/analysis/static_analysis.py#L30 drop ["-2"] and with @AlbertoFDR solution.

it works. radare2 v5.5.0

xchaoinfo avatar Dec 02 '21 07:12 xchaoinfo

Oh this actually worked. Thank You so much.

inshaltahir avatar Dec 02 '21 11:12 inshaltahir

https://github.com/danieluhricek/LiSa/pull/30

jrespeto avatar Mar 03 '22 19:03 jrespeto

I'm still facing KeyError: 'minopsz' , after modifying the "static_analysis.py" with the mentioned changes. what else am I missing, can someone help me in resolving this issue? image image

cnagavenkat avatar Dec 16 '22 13:12 cnagavenkat

I'm still facing KeyError: 'minopsz' , after modifying the "static_analysis.py" with the mentioned changes. what else am I missing, can someone help me in resolving this issue? image image

Hi! Did you manage to fix this error?

marugish avatar Feb 22 '23 22:02 marugish