const LessonModule = require('../base/LessonModule'); /** * XSS Deeplink Demo Lesson * Demonstrates cross-site scripting via URL parameter manipulation */ class XSSDeeplinkLesson extends LessonModule { constructor(config) { super(config); } /** * Detect XSS patterns in user input * @param {string} input - User-provided payload * @returns {string|null} Attack type or null if safe */ detectXSS(input) { const patterns = [ { regex: //gi, type: 'SCRIPT_TAG' }, { regex: /on\w+\s*=\s*["'][^"']*["']/gi, type: 'EVENT_HANDLER' }, { regex: /on\w+\s*=\s*/gi, type: 'EVENT_HANDLER_SIMPLE' }, { regex: /javascript:/gi, type: 'JAVASCRIPT_PROTOCOL' }, { regex: /