feat: Add base files

This commit is contained in:
2025-04-16 16:04:34 +02:00
parent 96c2cb6a4f
commit a19f4f1aea
20 changed files with 3730 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
import React, { useState } from 'react';
export default function SQLInjection() {
const [username, setUsername] = useState('');
const [password, setPassword] = useState('');
const [msg, setMsg] = useState('');
const handleLogin = async () => {
const res = await fetch('http://localhost:5000/api/login', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ username, password })
});
const text = await res.text();
setMsg(text);
};
return (
<div>
<h2>SQL Injection Demo</h2>
<p>Try: <code>admin' --</code> as username</p>
<input placeholder="Username" onChange={e => setUsername(e.target.value)} />
<input placeholder="Password" type="password" onChange={e => setPassword(e.target.value)} />
<button onClick={handleLogin}>Login</button>
<p>{msg}</p>
</div>
);
}