obsidianforensics / hindsight

Web browser forensics for Google Chrome/Chromium
https://dfir.blog/hindsight/
Apache License 2.0
1.1k stars 146 forks source link

gui version vail with error 500 UnboundLocalError #16

Closed joecondo closed 5 years ago

joecondo commented 7 years ago

Hi, I get this error after a while that it's processing, any hint ? Thanks Lorenzo

Error: 500 Internal Server Error

Sorry, the requested URL 'http://localhost:8080/run' caused an error:

Internal Server Error

Exception:

UnboundLocalError("local variable 'entry' referenced before assignment",)

Traceback:

Traceback (most recent call last): File "bottle.py", line 862, in _handle File "bottle.py", line 1732, in wrapper File "hindsight_gui.py", line 161, in do_run File "pyhindsight\analysis.py", line 127, in run File "pyhindsight\browsers\chrome.py", line 1380, in process File "pyhindsight\browsers\chrome.py", line 1057, in get_cache UnboundLocalError: local variable 'entry' referenced before assignment

joecondo commented 7 years ago

ERROR:root: - Error parsing cache entry 2548142867: [Errno 2] No such file or di

obsidianforensics commented 7 years ago

Hi Joe,

Sorry for the time lag here. I've just put out a new release that fixes some problems with cache parsing (which is what your error looks like it was). Can you give it a try and let me know if it fixes your problem? https://github.com/obsidianforensics/hindsight/releases/tag/v2.1.1

Thanks, Ryan

joecondo commented 7 years ago

Hi, i tried the new version, running the gui on windows and i get

                 Detected Chrome version:            [  44-52 ]
                             URL records:            [   1375 ]
                        Download records:            [     55 ]
                           Cache records:            [  32533 ]

ERROR:root: - Error parsing cache entry 1283502486: 'Uninitialized Address'

Error: 500 Internal Server Error

Sorry, the requested URL 'http://localhost:8080/run' caused an error:

Internal Server Error

Exception:

UnboundLocalError("local variable 'entry' referenced before assignment",)

Traceback:

Traceback (most recent call last): File "bottle.py", line 862, in _handle File "bottle.py", line 1732, in wrapper File "hindsight_gui.py", line 161, in do_run File "pyhindsight\analysis.py", line 127, in run File "pyhindsight\browsers\chrome.py", line 1388, in process File "pyhindsight\browsers\chrome.py", line 1065, in get_cache UnboundLocalError: local variable 'entry' referenced before assignment Hopes may help

Thanks

Lorenzo

joecondo commented 7 years ago

or in another test

127.0.0.1 - - [09/Sep/2017 18:53:31] "GET /favicon.ico HTTP/1.1" 404 742 Detected Chrome version: [ 44-52 ] URL records: [ 600 ] Download records: [ 46 ] Cache records: [ 18388 ] ERROR:root: - Error parsing cache entry 2548142867: [Errno 2] No such file or di rectory: '.....\Impostazioni locali\Dati applicazioni\Google\Chrome\User Data\ \Default\GPUCache\data_225' Traceback (most recent call last): File "bottle.py", line 862, in _handle File "bottle.py", line 1732, in wrapper File "hindsight_gui.py", line 161, in do_run File "pyhindsight\analysis.py", line 127, in run File "pyhindsight\browsers\chrome.py", line 1388, in process File "pyhindsight\browsers\chrome.py", line 1065, in get_cache UnboundLocalError: local variable 'entry' referenced before assignment 127.0.0.1 - - [09/Sep/2017 19:02:46] "POST /run HTTP/1.1" 500 1442

joecondo commented 7 years ago

An useful feature should be something llike skip that bogus records, in some cases I see a recurrent crash when cache records are more than 32533

CollinChaffin commented 6 years ago

Same here:

Error: 500 Internal Server Error

Sorry, the requested URL 'http://localhost:8080/run' caused an error:
Internal Server Error

Exception:
UnboundLocalError("local variable 'cacheBlock' referenced before assignment",)

Traceback:
Traceback (most recent call last):
  File "site-packages\bottle.py", line 862, in _handle
  File "site-packages\bottle.py", line 1732, in wrapper
  File "hindsight_gui.py", line 163, in do_run
  File "pyhindsight\analysis.py", line 129, in run
  File "pyhindsight\browsers\chrome.py", line 1716, in process
  File "pyhindsight\browsers\chrome.py", line 1312, in get_cache
UnboundLocalError: local variable 'cacheBlock' referenced before assignment
obsidianforensics commented 5 years ago

I've added error handling around this so it shouldn't crash anymore at least. I'm working on redoing this whole section of code as part of moving to Python 3.