Comments (4)
Thanks for the detailed bug report! I'll take a look.
from hindsight.
This bug can be fixed by changing the format of artifact_url
and artifact.url
. in webbrowser.py and chrome.py:
In webbrowser.py:
def build_md5_hash_list_of_origins(self):
for artifact in self.parsed_artifacts:
if isinstance(artifact, self.HistoryItem):
# Bug here - does not work due to URL parsing - PATCHED
if type(artifact.url) is not str:
return
domain = urllib.parse.urlparse(artifact.url).hostname
# Some URLs don't have a domain, like local PDF files
if domain:
self.origin_hashes[hashlib.md5(domain.encode()).hexdigest()] = domain
In chrome.py:
def build_hsts_domain_hashes(self):
domains = set()
for artifact in self.parsed_artifacts:
if isinstance(artifact, self.HistoryItem):
artifact_url = artifact.url
if not artifact_url:
continue
# Cookie artifact's "URLs" will be in the form ".example.com",
# which won't parse, so modify it so it will
if artifact_url and artifact_url.startswith('.'):
for i in range(len(artifact_url)):
if artifact_url[i] == '*':
artifact_url[i] = ''
artifact_url = 'http://' + artifact_url[1:]
if type(artifact_url) == str:
artifact_url_cleaned = artifact_url.split('*')
#domain = urllib.parse.urlparse(url_list, scheme='https').hostname
# Same URL problem - PATCHED
# Some URLs don't have a domain, like local PDF files
if artifact_url_cleaned:
#domains.add(artifact_url_cleaned)
for url in artifact_url_cleaned:
domains.add(url)
I am not sure if this fix retains all functionality, but it at least lets it run and produces correct output on my end.
from hindsight.
Thanks again for the report and the comments! Should be fixed now.
from hindsight.
Related Issues (20)
- Feature Request link on readme.md doesn't work HOT 1
- Feature Request: Add "Referrer" to csv output
- skip unfurl plugin? HOT 2
- Protobuf Breaking Change
- Disk Cache Format changed to V3 HOT 1
- Opening Spreadsheet Causing Error with MS Excel 2021 HOT 1
- List index out of range HOT 7
- Update social icons
- Update requirements to use pip extras
- Version Numbers Need Updated in Dist Releases HOT 6
- Errors while running hindsight against MacOS artifacts HOT 1
- Datetime comparison error HOT 1
- Cannot find package "esinstall" during installation attempt HOT 3
- Error encountered: JSONDecodeError('Expecting value: line 1 column 1 (char 0)') HOT 2
- "no such table: downloads" HOT 1
- Parse "Cache records" is slower compared to Nirsoft ChromeCacheView.exe HOT 1
- Update version detection to account for recent Chrome versions (up to 122)
- ccl_chrome_indexeddb version outdated HOT 2
- Execution failed due to unhandled exception HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hindsight.