
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Django Access Logger is a middleware for logging HTTP requests and responses in Django applications. It supports logging to files, SQL databases, and NoSQL databases.
Install the package using pip:
pip install dj-access-logger
Add the middleware to your Django settings:
# settings.py
INSTALLED_APPS = [
...
'dj_access_logger'
...
]
MIDDLEWARE = [
...
'dj_access_logger.middleware.AccessLoggerMiddleware',
...
]
# Logging configuration
DJ_ACCESS_LOGGER = {
'method': 'file', # 'file' or 'sql' or 'nosql'
'separated_logging_db': True,
'obfuscate_secrets': True,
'logging_db_parameters': {
'ENGINE': 'django.db.backends.mysql', # Use 'djongo' for MongoDB
'NAME': 'logging_db',
'USER': 'logging_user',
'PASSWORD': 'logging_password',
'HOST': 'localhost',
'PORT': '3306',
'NOSQL_HOST': 'mongodb://localhost:27017', # NoSQL specific parameter
}
}
# If using a separate logging database, add this to your DATABASE_ROUTERS
DATABASE_ROUTERS = [
...,
'dj_access_logger.db_router.LoggingDBRouter',
...
]
After changing your settings.py you need to run the following commands to create the necessary tables in the logging database:
python manage.py setup_dj_access_logger
The middleware will automatically log HTTP requests and responses based on the configuration.
For detailed documentation, visit Read the Docs.
This project is licensed under the MIT License.
FAQs
A Django middleware for logging HTTP requests and responses.
We found that dj-access-logger 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
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.