-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathcaptcha.html
44 lines (37 loc) · 1.08 KB
/
captcha.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<html>
<head>
<title>Captcha Harvester by dzt</title>
<style type="text/css">
body {
max-width: 450px;
margin: auto;
}
</style>
</head>
<body>
<center>
<form action="/submit" method="post" style="margin-top: 180px;">
<div id="captchaFrame"></div>
<script type="text/javascript" src="https://www.google.com/recaptcha/api.js"></script>
</form>
</center>
<script>
if (typeof module === 'object') {
window.module = module;
module = undefined;
}
</script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script>
const remote = require('electron').remote
const app = remote.app
const ipcRenderer = require('electron').ipcRenderer
// TODO: Wait for main process to send captcha sitekey over to render
$('#captchaFrame').html(`<div class="g-recaptcha" data-sitekey="${remote.getGlobal('sitekey')}" data-callback="sub"></div>`);
function sub() {
ipcRenderer.send('sendCaptcha', $('#g-recaptcha-response').val());
grecaptcha.reset();
}
</script>
</body>
</html>