Skip to main content

Django plugin that rickrolls bots and scanners by redirecting common malicious URLs

Project description

django-bot-rickroll

Story

Once upon a time I noticed my server log was filled with 404 errors for URL's like /wp-admin and so on. I figured redirecting them to this cool music video was one way I could get these errors out of my logs.

Also it means if my kids are snooping around they can get a laugh or two.

Installation

uv add django-bot-rickroll

Usage

Just add one line to urlpatterns:

from django.urls import path, include

urlpatterns = [
    # Your app URLs first ...
    path("", include("bot_rickroll.urls")),
]

You should add this as the last line, so that in the unlikely event one of the URL's in the blocklist is actually supposed to work, then yours take precedence.

You can customize the target URL in your settings.py:

RICKROLL_URL = "https://www.youtube.com/watch?v=dQw4w9WgXcQ"

URL's covered

  • /wp-admin/, /wp-content/, /wp-includes/, /wp-json/
  • /wordpress/, /wp/
  • /administrator/, /joomla/, /drupal/, /magento/, /cms/
  • /phpmyadmin/, /phpMyAdmin/, /pma/, /mysql/, /adminer/
  • /cpanel/, /webmail/, /plesk/
  • /file-manager/, /filemanager/, /laravel-file-manager/, /elfinder/
  • /upload/, /uploads/, /files/
  • /vendor/, /public/, /modules/, /node_modules/
  • /lib/, /libraries/, /includes/, /inc/
  • /.well-known/, /.git/, /.svn/, /.hg/
  • /.env, /.htaccess, /.htpasswd
  • /config/, /configuration/, /conf/, /settings/
  • /backup/, /backups/, /bak/
  • /old/, /temp/, /tmp/
  • /cgi-bin/, /cgi/, /bin/, /scripts/
  • /php/
  • /db/, /database/, /sql/
  • Any URL ending in .php
  • Any URL ending in .env
  • /blog-verify
  • Any URL ending in wlwmanifest.xml

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_bot_rickroll-0.3.1.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_bot_rickroll-0.3.1-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file django_bot_rickroll-0.3.1.tar.gz.

File metadata

  • Download URL: django_bot_rickroll-0.3.1.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for django_bot_rickroll-0.3.1.tar.gz
Algorithm Hash digest
SHA256 13909ce076cbda31babb2718505fdf61d0f366bd743246daaa0d1b2804247d92
MD5 5733e60faa2d20b5a5cc42bc06905760
BLAKE2b-256 2f2298f95b1b105723bed1dae8cc0801990e2be4952f455a81a499b1b38877f5

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_bot_rickroll-0.3.1.tar.gz:

Publisher: release.yml on vEnhance/django-bot-rickroll

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file django_bot_rickroll-0.3.1-py3-none-any.whl.

File metadata

File hashes

Hashes for django_bot_rickroll-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c733f095c382dc263dede366475103eb315dd5c3f468eb3a061753e7c2220359
MD5 eccf22c97643cc0cb3b6e7d7e687ecbd
BLAKE2b-256 55a088fe6d7a2ab77b0b65f9e2eaecef6382b4f2c788eef0a20ebfb9939b138e

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_bot_rickroll-0.3.1-py3-none-any.whl:

Publisher: release.yml on vEnhance/django-bot-rickroll

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page