first commit

This commit is contained in:
sky
2025-07-27 03:28:57 -04:00
commit 66f23e6494
6 changed files with 1003 additions and 0 deletions

73
public/index.html Normal file
View File

@ -0,0 +1,73 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>solve captchas</title>
<style>
body {
display: flex;
justify-content: center;
align-items: center;
width: 100vw;
height: 100vh;
margin: 0;
padding: 0;
flex-direction: column;
background-color: black;
color: white;
}
h1 {
font-size: 32px;
margin: 20px;
text-align: center;
}
img {
width: 40%;
margin: 20px;
}
input {
width: 30%;
margin: 20px;
padding: 10px;
}
div {
width: 100%;
display: flex;
justify-content: center;
align-items: center;
}
button {
margin: 20px;
padding: 10px;
}
</style>
<script>
let captchaUUID;
document.addEventListener("DOMContentLoaded", async ()=>await loadCaptcha());
async function loadCaptcha() {
captchaUUID = await (await fetch("/new")).text();
document.getElementById("captcha").src = "/image/" + captchaUUID;
document.getElementById("solved").value = "";
}
async function submit() {
await fetch('/solve', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({ uuid: captchaUUID, answer: document.getElementById("solved").value })
})
await loadCaptcha();
}
</script>
</head>
<body>
<h1>solve captchas for fun</h1>
<img id="captcha">
<div>
<input type="text" id="solved" placeholder="solve the captcha above..">
<button onclick="submit()">submit</button>
</div>
</body>
</html>