Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
BookmarksConverter is a package that converts browser bookmark files, usable as a module
or as a CLI.
BookmarksConverter supports the converters below:
The converters can import and export bookmarks from and to the formats listed below:
DB
, HTML
, JSON
HTML
, JSON
HTML
, JSON
Notes:
HTML
filesHTML
files are compatible with all browsers.DB
files are powered by SQLAlchemy ORM (see models.py
).JSON
files cannot be directly imported but can be placed in the appropriate location (see bookmarks_file_structure.md - Chrome/Chromium - b. JSON).DB
, HTML
, or JSON
structures and formats, refer to the test resources or bookmarks_file_structure.md.DB
and JSON
formats by BookmarksConverter are not browser-importable.The package has been tested on GitHub Actions with the following OSs and Python versions:
OS \ Python | 3.12 | 3.11 |
---|---|---|
macos-latest | ✓ | ✓ |
ubuntu-latest | ✓ | ✓ |
windows-latest | ✓ | ✓ |
The package relies on the following libraries:
Bookmarks Converter is available on PYPI
python -m pip install bookmarks-converter
To test the package you will need to clone the git repository.
# Cloning with HTTPS
git clone https://github.com/radam9/bookmarks-converter.git
# Cloning with SSH
git clone git@github.com:radam9/bookmarks-converter.git
then you create and install the dependencies using Poetry
.
# navigate to repo's folder
cd bookmarks-converter
# install the dependencies
poetry install
# run the tests
poetry run pytest
from pathlib import Path
from bookmarks_converter import Chrome, Firefox
from bookmarks_converter.formats import save_json
# initialize the converter
firefox = Firefox()
chrome = Chrome()
# import the bookmarks
input_file = Path("/path/to/input.html")
content = firefox.from_html(input_file)
# convert to desired format
output_file = Path("/path/to/output.json")
bookmarks = chrome.as_json(content)
# finally save the bookmarks
# there are some helper files that could be useful for saving to files
save_json(bookmarks, output_file)
bookmarks-converter
cli can be installed inside a virtual environment or using pipx.
# bookmarks-converter usages:
# example 1
bookmarks-converter -i ./input_bookmarks.db --input-format 'bookmarkie/db' --output-format 'chrome/html'
# example 2
bookmarks-converter -i ./some_bookmarks.html -I 'chrome/html' -o ./output_bookmarks.json -O 'firefox/json'
The help message:
# use -h for to show the help message (shown in the code block below)
$ bookmarks-converter --help
usage: bookmarks-converter [-h] [-V] -i INPUT -I INPUT_FORMAT [-o OUTPUT] -O OUTPUT_FORMAT
Convert your browser bookmarks file.
The bookmark format is composed of two parts separated by a slash: [CONVERTER]/[FORMAT], ex. 'firefox/html'
With the converter being one of the available converters: ('bookmarkie', 'chrome', 'firefox')
And the format being one of the available formats: ('db', 'html', 'json')
Example Usage:
bookmarks-converter -i ./input_bookmarks.db --input-format 'bookmarkie/db' --output-format 'chrome/html'
bookmarks-converter -i ./some_bookmarks.html -I 'chrome/html' -o ./output_bookmarks.json -O 'firefox/json'
options:
-h, --help show this help message and exit
-V, --version show program's version number and exit
-i INPUT, --input INPUT
Input bookmarks file
-I INPUT_FORMAT, --input-format INPUT_FORMAT
The bookmark format of the input bookmarks file
-o OUTPUT, --output OUTPUT
Output bookmarks file
-O OUTPUT_FORMAT, --output-format OUTPUT_FORMAT
The bookmark format of the output bookmarks file
FAQs
Convert browser bookmarks files.
We found that bookmarks-converter demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.