Adding the project for code injection and XSS vulnerability testing
This project is designed to help developers understand and mitigate code injection and XSS vulnerabilities. It includes a backend API and a frontend interface for testing various attack vectors in a controlled environment.
This commit is contained in:
16
backend/src/api/controller/controller.js
Normal file
16
backend/src/api/controller/controller.js
Normal file
@@ -0,0 +1,16 @@
|
||||
const db = require("../../query/database");
|
||||
|
||||
const loginUser = async (username, password) => {
|
||||
const user = await db.loginUser(username, password);
|
||||
return user;
|
||||
};
|
||||
|
||||
const executeJS = (code) => {
|
||||
const result = db.executeCode(code);
|
||||
return result;
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
loginUser,
|
||||
executeJS,
|
||||
};
|
||||
Reference in New Issue
Block a user