Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
django-scooby-profiler
Advanced tools
A debugging tool for Django applications which works for all HTTP requests including AJAX. Using this, you can profile Django views. It shows you all SQL, Memcache queries with proper stacktrace happening in app while serving a request, with the help of 'Scooby profiler' chrome extension.
This is a developer tool package to debug Django applications. The aim of this package is more or less same as of Django debug toolbar, but I made it because of these shortcomings of django-debug-toolbar package:
Here's how the issues are mitigated in django-scooby-profiler. All the profiled data collected is dumped to a backend (E.g. Redis) where the data resides temporarily. The chrome extension collects those data and renders it to you for different HTTP requests.
Currently plugins for these type of queries are supported by this package:
SQL:
Debug SQL queries happening inside the app, while serving a request. It shows all SQL queries with proper stacktrace.
You can group together similar queries at front-end, so that you would know what queries you can optimize.
This is what generally happens in case of for
loops.
Memcache: It shows different operations on memcache with stacktraces.
Scooby logs: Instead of debugging/printing on console, you can log things directly to extension. Do it by putting following anywhere in you code where you want to log.
import scooby
scooby.log("foo", "bar")
# or
scooby.log() # It works without giving any argument too.
If you don't find a plugin here which you think should be here, you are most welcome to contribute it to this package.
# Use pip in case of Python 2
pip3 install django-scooby-profiler
INSTALLED_APPS
setting.INSTALLED_APPS = [
...,
'scooby',
]
MIDDLEWARE
/MIDDLEWARE_CLASSES
setting:MIDDLEWARE = [
'scooby.middleware.ScoobyMiddleware',
...,
]
You can generate a secret key by
>>> import os
>>> import binascii
>>> print(binascii.hexlify(os.urandom(24)))
0ccd512f8c3493797a23557c32db38e7d51ed74f14fa758
This is not required if SCOOBY_BACKEND is set as some other backend. The setting would look like
SCOOBY_REDIS_BACKEND_CONFIG = {
'host': 'localhost',
'port': 6379
}
with Django 2.x.x:
urlpatterns = [
...,
path('scooby/', include('scooby.urls')),
]
with lower versions of Django:
urlpatterns = [
...,
url(r'^scooby/', include('scooby.urls')),
]
SCOOBY_DEBUG (type: boolean, default: DEBUG) Whether to debug or not regarding this package.
SCOOBY_BACKEND (type: string, path to the class which acts as backend, default: 'scooby.backends.RedisBackend')
You can specify your own backend if you don't want to use Redis.
You need to create a class similar to RedisBackend
defined in scooby/backends.py
Install the chrome extension from https://chrome.google.com/webstore/detail/scooby-profiler/kicgfdanpohconjegfkojbpceodecjad
Open the developer tools in your browser, you will see a section named "Scooby". It will ask for the secret key, which you need to put as same you have put in the backend. Reload your page, you will start seeing HTTP requests with profiled data for all supported plugins.
MIT
FAQs
A debugging tool for Django applications which works for all HTTP requests including AJAX. Using this, you can profile Django views. It shows you all SQL, Memcache queries with proper stacktrace happening in app while serving a request, with the help of 'Scooby profiler' chrome extension.
We found that django-scooby-profiler 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
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.