python+nicegui实现网站系统漏洞扫描安全可视化系统代码
代码语言:python
所属分类:其他
代码描述:python+nicegui实现网站系统漏洞扫描安全可视化系统代码
代码标签: python nicegui 网站 系统 漏洞 扫描 安全 可视化 代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
#!/usr/local/python3/bin/python3
# -*- coding: utf-8 -*
import asyncio
import aiohttp
import time
import json
import random
import re
from urllib.parse import urljoin, urlparse, parse_qs, urlencode
from dataclasses import dataclass, field
from typing import List, Dict
from datetime import datetime
from bs4 import BeautifulSoup
from nicegui import ui, app
# ===========================
# 1. 核心数据结构与配置
# ===========================
@dataclass
class Vulnerability:
vuln_type: str
severity: str # Critical, High, Medium, Low, Info
target: str
payload: str
description: str
timestamp: str = field(default_factory=lambda: datetime.now().strftime("%H:%M:%S"))
class ScanConfig:
USER_AGENTS = [
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36"
]
# 常见敏感路径 top 20
SENSITIVE_PATHS = [
".env", ".git/config", "wp-config.php", "config.php", "backup.sql",
"admin/", "dashboard/", "phpinfo.php", ".htaccess", "server-status",
"web.config", "id_rsa", "docker-compose.yml", "package.json"
]
# 常用端口
COMMON_PORTS = [21, 22, 80, 443, 3306, 8080, 8000, 8888]
# ===========================
# 2. 扫描核心引擎 (Engine)
# ===========================
class SecurityEngine:
def __init__(self, target_url, log_callback, update_stats_callback):
self.target_url = target_url.rstrip('/')
self.domain = urlparse(target_url).netloc
self.log = log_callback
self.update_stats = update_stats_callback
self.findi.........完整代码请登录后点击上方下载按钮下载查看















网友评论0