Convert Figma logo to code with AI

dmpayton logodjango-admin-honeypot

:honey_pot: A fake Django admin login screen page.

1,009
186
1,009
19

Top Related Projects

:superhero: :zap: django's default admin interface with superpowers - customizable themes, popup windows replaced by modals and many other features.

A jazzy skin for the Django Admin-Interface (official repository).

Modern theme for Django admin interface

Quick Overview

Django Admin Honeypot is a fake Django admin login screen to log and notify admins of attempted unauthorized access. It creates a decoy admin interface that looks and feels like the real Django admin but actually traps potential attackers, logging their attempts and optionally sending notifications to the real administrators.

Pros

  • Enhances security by diverting potential attackers away from the real admin interface
  • Provides valuable insights into attempted unauthorized access
  • Easy to set up and integrate with existing Django projects
  • Customizable notification system for real-time alerts

Cons

  • May give a false sense of security if relied upon too heavily
  • Requires additional server resources to run the honeypot
  • Could potentially confuse legitimate users if not implemented carefully
  • Limited effectiveness against sophisticated attackers who may recognize the honeypot

Code Examples

  1. Basic setup in urls.py:
from django.urls import path, include

urlpatterns = [
    path('admin/', include('admin_honeypot.urls', namespace='admin_honeypot')),
    path('secret-admin/', admin.site.urls),  # Your real admin URL
]
  1. Customizing the admin template:
# settings.py
ADMIN_HONEYPOT_TEMPLATE = 'my_custom_admin_template.html'
  1. Configuring email notifications:
# settings.py
ADMINS = [('John', 'john@example.com'), ('Jane', 'jane@example.com')]
EMAIL_HOST = 'smtp.example.com'
EMAIL_PORT = 587
EMAIL_USE_TLS = True
EMAIL_HOST_USER = 'your_email@example.com'
EMAIL_HOST_PASSWORD = 'your_password'

Getting Started

  1. Install the package:

    pip install django-admin-honeypot
    
  2. Add admin_honeypot to your INSTALLED_APPS in settings.py:

    INSTALLED_APPS = [
        ...
        'admin_honeypot',
        ...
    ]
    
  3. Update your urls.py as shown in the code examples above.

  4. Run migrations:

    python manage.py migrate
    
  5. Start your Django server and navigate to /admin/ to see the honeypot in action.

Competitor Comparisons

:superhero: :zap: django's default admin interface with superpowers - customizable themes, popup windows replaced by modals and many other features.

Pros of django-admin-interface

  • Offers extensive customization options for the Django admin interface, including themes, logo, and layout
  • Provides a user-friendly interface for non-technical users to customize the admin panel
  • Includes responsive design features for better mobile compatibility

Cons of django-admin-interface

  • More complex setup and configuration compared to django-admin-honeypot
  • May introduce additional overhead due to its extensive features
  • Requires more maintenance and updates to keep up with Django versions

Code Comparison

django-admin-interface:

from admin_interface.models import Theme

Theme.objects.update_or_create(
    name='MyTheme',
    defaults={
        'active': True,
        'title': 'My Custom Admin',
        'logo': 'path/to/logo.png',
    }
)

django-admin-honeypot:

INSTALLED_APPS = (
    ...
    'admin_honeypot',
    ...
)

urlpatterns = [
    path('admin/', include('admin_honeypot.urls', namespace='admin_honeypot')),
    path('secret/', admin.site.urls),
]

The code comparison shows that django-admin-interface focuses on customizing the admin interface, while django-admin-honeypot is primarily used for creating a fake admin login page to enhance security. django-admin-interface requires more configuration to set up themes and customizations, whereas django-admin-honeypot has a simpler setup process focused on redirecting potential attackers.

A jazzy skin for the Django Admin-Interface (official repository).

Pros of django-grappelli

  • Provides a modern, customizable UI for the Django admin interface
  • Offers advanced features like autocomplete, inline sortables, and customizable dashboards
  • Actively maintained with regular updates and improvements

Cons of django-grappelli

  • Steeper learning curve due to additional features and customization options
  • May introduce compatibility issues with some third-party Django apps
  • Requires additional setup and configuration compared to the default Django admin

Code comparison

django-grappelli:

INSTALLED_APPS = (
    'grappelli',
    'django.contrib.admin',
    # ...
)

GRAPPELLI_ADMIN_TITLE = 'My Custom Admin'

django-admin-honeypot:

INSTALLED_APPS = (
    'admin_honeypot',
    'django.contrib.admin',
    # ...
)

ADMIN_HONEYPOT_EMAIL_ADMINS = True

django-grappelli focuses on enhancing the admin interface with advanced features and customization options, while django-admin-honeypot is designed to create a fake admin interface for security purposes. The code examples show the basic setup for each project in the Django settings file.

Modern theme for Django admin interface

Pros of Django Suit

  • Provides a modern and customizable admin interface with a sleek design
  • Offers additional features like improved widgets, sortable inlines, and responsive layout
  • Enhances user experience with better navigation and visual appeal

Cons of Django Suit

  • Requires more setup and configuration compared to the simpler Django Admin Honeypot
  • May introduce compatibility issues with other Django admin customizations or third-party packages
  • Potentially steeper learning curve for developers unfamiliar with advanced admin customizations

Code Comparison

Django Suit configuration:

INSTALLED_APPS = (
    'suit',
    'django.contrib.admin',
    # ...
)

SUIT_CONFIG = {
    'ADMIN_NAME': 'My Admin Panel',
    'MENU': (
        {'app': 'auth', 'label': 'Authorization', 'icon': 'icon-lock'},
        # ...
    ),
}

Django Admin Honeypot configuration:

INSTALLED_APPS = (
    'admin_honeypot',
    'django.contrib.admin',
    # ...
)

urlpatterns = [
    path('admin/', include('admin_honeypot.urls', namespace='admin_honeypot')),
    path('secret/', admin.site.urls),
]

While Django Suit focuses on enhancing the admin interface's appearance and functionality, Django Admin Honeypot is primarily a security tool designed to trap potential attackers by providing a fake admin interface.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

===================== django-admin-honeypot

.. image:: https://travis-ci.org/dmpayton/django-admin-honeypot.svg?branch=develop :target: https://travis-ci.org/dmpayton/django-admin-honeypot :alt: Travis-CI

.. image:: https://coveralls.io/repos/dmpayton/django-admin-honeypot/badge.svg?branch=develop :target: https://coveralls.io/r/dmpayton/django-admin-honeypot :alt: Coverage

.. image:: https://codeclimate.com/github/dmpayton/django-admin-honeypot/badges/gpa.svg?branch=develop :target: https://codeclimate.com/github/dmpayton/django-admin-honeypot :alt: Code Climate

django-admin-honeypot is a fake Django admin login screen to log and notify admins of attempted unauthorized access. This app was inspired by discussion in and around Paul McMillan's security talk at DjangoCon 2011.

  • Author: Derek Payton <http://dmpayton.com/>_
  • Version: 1.1.0
  • License: MIT

Documentation

http://django-admin-honeypot.readthedocs.io

tl;dr

  • Install django-admin-honeypot from PyPI::

      pip install django-admin-honeypot
    
  • Add admin_honeypot to INSTALLED_APPS

  • Update your urls.py:

    ::

      urlpatterns = [
          ...
          path('admin/', include('admin_honeypot.urls', namespace='admin_honeypot')),
          path('secret/', admin.site.urls),
      ]
    
  • Run python manage.py migrate

NOTE: replace secret in the url above with your own secret url prefix