Skip to content

Commit

Permalink
add file in to github
Browse files Browse the repository at this point in the history
  • Loading branch information
unknown committed Nov 17, 2024
1 parent 994e9b8 commit 7af0235
Show file tree
Hide file tree
Showing 149 changed files with 13,597 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .google-cookie
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#LWP-Cookies-2.0
Set-Cookie3: AEC="AZ6Zc-WthhZX5Bc5CSzrUHksLujVmgOR3T7ydYuZ6aSrG_rNy4W4c1DqgQ4"; path="/"; domain=".google.co.in"; path_spec; domain_dot; secure; expires="2025-04-21 06:48:02Z"; HttpOnly=None; SameSite=lax; version=0
Set-Cookie3: NID="518=O3VkznglaZNpsJTwOZyWThe6drIc_74l2AegKIssCruaW3H_pz_0Dgk15-b1-XKtwL92FJ59F4BqhgKLlsR3lnhfNdNOFnBJIN94nTWA8Ys_nt9MqogfbGrhv7z_l9CPW7Aih2LAkO-nf9qcZXuMFbs8jihyDM_8k2L5s0iSv8FhhU2qeBtH68sAsN-3erSEa_g"; path="/"; domain=".google.co.in"; path_spec; domain_dot; expires="2025-04-24 06:48:02Z"; HttpOnly=None; version=0
Empty file added duck_duck_leak/__init__.py
Empty file.
Binary file added duck_duck_leak/__pycache__/__init__.cpython-310.pyc
Binary file not shown.
Binary file not shown.
Binary file added duck_duck_leak/__pycache__/urls.cpython-310.pyc
Binary file not shown.
Binary file added duck_duck_leak/__pycache__/wsgi.cpython-310.pyc
Binary file not shown.
16 changes: 16 additions & 0 deletions duck_duck_leak/asgi.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
"""
ASGI config for duck_duck_leak project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/4.2/howto/deployment/asgi/
"""

import os

from django.core.asgi import get_asgi_application

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'duck_duck_leak.settings')

application = get_asgi_application()
127 changes: 127 additions & 0 deletions duck_duck_leak/settings.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
"""
Django settings for duck_duck_leak project.
Generated by 'django-admin startproject' using Django 4.2.16.
For more information on this file, see
https://docs.djangoproject.com/en/4.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/4.2/ref/settings/
"""

from pathlib import Path

# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent


# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/4.2/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'django-insecure-8)egv6p9l1#$#ppb7x-jqku%614dzv6z5&epxfo)z$0lt_b+6w'

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

ALLOWED_HOSTS = [
'192.168.8.100',
'127.0.0.1'
]


# Application definition

INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'myapp',
]

MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
]

ROOT_URLCONF = 'duck_duck_leak.urls'

TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
]

WSGI_APPLICATION = 'duck_duck_leak.wsgi.application'


# Database
# https://docs.djangoproject.com/en/4.2/ref/settings/#databases

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': BASE_DIR / 'db.sqlite3',
}
}


# Password validation
# https://docs.djangoproject.com/en/4.2/ref/settings/#auth-password-validators

AUTH_PASSWORD_VALIDATORS = [
{
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
},
]


# Internationalization
# https://docs.djangoproject.com/en/4.2/topics/i18n/

LANGUAGE_CODE = 'en-us'

TIME_ZONE = 'UTC'

USE_I18N = True

USE_TZ = True


# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/4.2/howto/static-files/

STATIC_URL = 'static/'

# Default primary key field type
# https://docs.djangoproject.com/en/4.2/ref/settings/#default-auto-field

DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
7 changes: 7 additions & 0 deletions duck_duck_leak/urls.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from django.contrib import admin
from django.urls import include, path

urlpatterns = [
path('', include('myapp.urls')),
path('admin/', admin.site.urls),
]
16 changes: 16 additions & 0 deletions duck_duck_leak/wsgi.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
"""
WSGI config for duck_duck_leak project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/4.2/howto/deployment/wsgi/
"""

import os

from django.core.wsgi import get_wsgi_application

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'duck_duck_leak.settings')

application = get_wsgi_application()
22 changes: 22 additions & 0 deletions manage.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys


def main():
"""Run administrative tasks."""
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'duck_duck_leak.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't import Django. Are you sure it's installed and "
"available on your PYTHONPATH environment variable? Did you "
"forget to activate a virtual environment?"
) from exc
execute_from_command_line(sys.argv)


if __name__ == '__main__':
main()
Empty file added myapp/__init__.py
Empty file.
Binary file added myapp/__pycache__/__init__.cpython-310.pyc
Binary file not shown.
Binary file added myapp/__pycache__/admin.cpython-310.pyc
Binary file not shown.
Binary file added myapp/__pycache__/apps.cpython-310.pyc
Binary file not shown.
Binary file added myapp/__pycache__/base64find.cpython-310.pyc
Binary file not shown.
Binary file added myapp/__pycache__/cleardata.cpython-310.pyc
Binary file not shown.
Binary file added myapp/__pycache__/crawledlinks.cpython-310.pyc
Binary file not shown.
Binary file added myapp/__pycache__/crypt.cpython-310.pyc
Binary file not shown.
Binary file added myapp/__pycache__/direnum.cpython-310.pyc
Binary file not shown.
Binary file added myapp/__pycache__/forms.cpython-310.pyc
Binary file not shown.
Binary file added myapp/__pycache__/git_secret.cpython-310.pyc
Binary file not shown.
Binary file added myapp/__pycache__/glsearch.cpython-310.pyc
Binary file not shown.
Binary file added myapp/__pycache__/linkchecker.cpython-310.pyc
Binary file not shown.
Binary file added myapp/__pycache__/linkscraping.cpython-310.pyc
Binary file not shown.
Binary file added myapp/__pycache__/linkscrapping.cpython-310.pyc
Binary file not shown.
Binary file added myapp/__pycache__/models.cpython-310.pyc
Binary file not shown.
Binary file added myapp/__pycache__/scraper.cpython-310.pyc
Binary file not shown.
Binary file added myapp/__pycache__/secret.cpython-310.pyc
Binary file not shown.
Binary file added myapp/__pycache__/sitemap_scan.cpython-310.pyc
Binary file not shown.
Binary file added myapp/__pycache__/subdom.cpython-310.pyc
Binary file not shown.
Binary file added myapp/__pycache__/trigger.cpython-310.pyc
Binary file not shown.
Binary file added myapp/__pycache__/trufflehog.cpython-310.pyc
Binary file not shown.
Binary file added myapp/__pycache__/urls.cpython-310.pyc
Binary file not shown.
Binary file added myapp/__pycache__/views.cpython-310.pyc
Binary file not shown.
3 changes: 3 additions & 0 deletions myapp/admin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.contrib import admin

# Register your models here.
6 changes: 6 additions & 0 deletions myapp/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from django.apps import AppConfig


class MyappConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'myapp'
49 changes: 49 additions & 0 deletions myapp/base64find.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import requests
from bs4 import BeautifulSoup
import base64
import re

def is_base64_encoded(data):
try:
if isinstance(data, str):
if len(data) % 4 == 0 and re.match(r'^[A-Za-z0-9+/]+={0,2}$', data):
# Attempt to decode the base64 string
base64.b64decode(data, validate=True)
return True
return False
except Exception:
return False

def decode_base64(data):
try:
decoded_bytes = base64.b64decode(data)
return decoded_bytes.decode('utf-8', errors='ignore')
except Exception as e:
print(f"Error decoding base64: {e}")
return None

def find_and_decode_base64_in_source(url):
decoded_results = []
try:
response = requests.get(url, timeout=5)
response.raise_for_status()
soup = BeautifulSoup(response.text, 'html.parser')

page_content = soup.get_text()

potential_base64_strings = re.findall(r'[A-Za-z0-9+/]{16,}={0,2}', page_content)

for encoded_str in potential_base64_strings:
if is_base64_encoded(encoded_str):
decoded_str = decode_base64(encoded_str)
if decoded_str:
decoded_results.append((encoded_str, decoded_str))

if not decoded_results:
print(f"No Base64 encoded strings found in {url}")

except requests.RequestException as e:
print(f"Failed to retrieve the webpage at {url}: {e}")

return decoded_results

12 changes: 12 additions & 0 deletions myapp/cleardata.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# cleardata.py
from .models import GoogleLink, Subdomain, DirectoryEnumeration, GitHubScan, SecretScan, Linkscrap, SitemapURL,GitDataLeak

def clear_data():
GoogleLink.objects.all().delete()
Subdomain.objects.all().delete()
DirectoryEnumeration.objects.all().delete()
GitHubScan.objects.all().delete()
SecretScan.objects.all().delete()
Linkscrap.objects.all().delete()
SitemapURL.objects.all().delete()
GitDataLeak.objects.all().delete()
Loading

0 comments on commit 7af0235

Please sign in to comment.