
Research
/Security News
Toptal’s GitHub Organization Hijacked: 10 Malicious Packages Published
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
Project name is a Database in JSON on directory.
No prerequisites
To install PyDirDbJson, follow these steps:
Windows, Linux and macOS:
pip install pydirdbjson
To use pydirdbjson, follow these steps:
from pydirdbjson import Pydirdbjson
db = Pydirdbjson(db_path='my_database')
db.create_table(table_name='users')
db.insert(table_name='users',
record_id='1',
record={'name': 'John', 'age': 30, 'city': 'São Paulo'})
db.insert(table_name='users',
record_id='2',
record={'name': 'Mary', 'age': 25, 'city': 'Rio de Janeiro'})
db.create_table(table_name='customers')
db.insert(table_name='customers',
record_id='1',
record={'name': 'ABC'})
db.insert(table_name='customers',
record_id='2',
record={'name': 'XWZ'})
db.create_table(table_name='permissions')
db.insert(table_name='permissions',
record_id='1',
record={'user': '1', 'customer': '1'})
db.insert(table_name='permissions',
record_id='2',
record={'user': '1', 'customer': '2'})
db.insert(table_name='permissions',
record_id='3',
record={'user': '2', 'customer': '2'})
print(db.query(table_name='users', record_id='1'))
>>> {'name': 'John', 'age': 30, 'city': 'São Paulo'}
print(db.query_by_key_value(table_name='permissions',
key='customer',
value='1',
keys_to_return=['user']))
>>> [{'user': '1'}]
db.delete(table_name='users', record_id='1')
|-- my_database
| |-- users
| | |-- 1.json
| | |-- 2.json
| |-- customers
| | |-- 1.json
| | |-- 2.json
| |-- permissions
| | |-- 1.json
| | |-- 2.json
| | |-- 3.json
File: my_database/users/2.json
{"name": "Mary", "age": 25, "city": "Rio de Janeiro"}
To contribute to PyDirDbJson, follow these steps:
git checkout -b <branch_name>
.git commit -m '<commit_message>'
git push origin <project_name>/<location>
Alternatively see the GitHub documentation on creating a pull request.
Thanks to the following people who have contributed to this project:
You might want to consider using something like the All Contributors specification and its emoji key.
If you want to contact me you can reach me at ricardo(dot)ferreras(at)gmail(dot)com.
This project uses the following license: MIT.
FAQs
A Database in JSON on directory
We found that pydirdbjson 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.
Research
/Security News
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
Research
/Security News
Socket researchers investigate 4 malicious npm and PyPI packages with 56,000+ downloads that install surveillance malware.
Security News
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.