UNPKG

saksh-secure

Version:

A Node.js tool to investigate login form security and performance issues

29 lines (23 loc) 1.46 kB
const { runTests } = require('./tests'); const { getConfig } = require('./config'); const { logResult } = require('./utils'); async function investigateLoginForm(userConfig = {}) { const config = getConfig(userConfig); if (!config.targetUrl) { throw new Error('Target URL is required. Set targetUrl in config.'); } console.log('Starting SakshSecure login form investigation...'); // Run all tests await logResult('Basic Login Test', await runTests.testBasicLogin(config)); await logResult('SQL Injection Test', await runTests.testSqlInjection(config)); await logResult('XSS Vulnerability Test', await runTests.testXssVulnerability(config)); await logResult('Session Management Test', await runTests.testSessionManagement(config)); await logResult('CSRF Protection Test', await runTests.testCsrfProtection(config)); await logResult('Password Policy Test', await runTests.testPasswordPolicy(config)); await logResult('Rate Limiting Test', await runTests.testRateLimiting(config)); await logResult('HTTPS Enforcement Test', await runTests.testHttpsEnforcement(config)); await logResult('Account Lockout Test', await runTests.testAccountLockout(config)); await logResult('Performance Test', await runTests.testPerformance(config)); console.log('Investigation complete. Results logged to saksh_secure.log'); } module.exports = { investigateLoginForm };