Revert "Automate the captcha"

This reverts commit 0a2c198d1b.
This commit is contained in:
swag 2023-06-17 18:19:01 -04:00
parent 0b7509d6ee
commit 1cff4f3cf1
5 changed files with 8 additions and 21 deletions

View File

@ -3,6 +3,3 @@
< css/elements.css < css/elements.css
< css/simple.css < css/simple.css
< css/nested.css < css/nested.css
! app.js
< js/captcha.js

View File

@ -1,20 +1,13 @@
/*
'use strict'; 'use strict';
(() => { document.getElementById('captcha').value =
let captchaValue = document */
'use strict';
let captchaValue =
document
.querySelector('label[for="captcha"]') .querySelector('label[for="captcha"]')
.textContent .textContent
.match(/'(flag|bump)'/)[1]; .match(/'(flag|bump)'/)[1];
let captchaForm = document
.querySelector('form[class="form-body"]');
captchaForm.captcha.value = captchaValue;
// Make 'em work for it
window.crypto.subtle.generateKey({
name: 'RSA-OAEP',
modulusLength: 4096,
publicExponent: new Uint8Array([1, 0, 1]),
hash: 'SHA-512'
}, false, ['encrypt', 'decrypt'])
.finally(() => captchaForm.submit());
})();

View File

@ -10,7 +10,6 @@
<% } =%> <% } =%>
<%= label_for captcha => "Enter the word 'flag' to confirm:" %> <%= label_for captcha => "Enter the word 'flag' to confirm:" %>
<%= text_field captcha => id => 'captcha' %> <%= text_field captcha => id => 'captcha' %>
<%= asset 'app.js' %>
</div> </div>
<button type="submit" class="form-button">Confirm</button> <button type="submit" class="form-button">Confirm</button>
</form> </form>

View File

@ -10,7 +10,6 @@
<% } =%> <% } =%>
<%= label_for captcha => "Enter the word 'bump' to confirm:" %> <%= label_for captcha => "Enter the word 'bump' to confirm:" %>
<%= text_field captcha => id => 'captcha' %> <%= text_field captcha => id => 'captcha' %>
<%= asset 'app.js' %>
</div> </div>
<button type="submit" class="form-button">Confirm</button> <button type="submit" class="form-button">Confirm</button>
</form> </form>

View File

@ -10,7 +10,6 @@
<% } =%> <% } =%>
<%= label_for captcha => "Enter the word 'flag' to confirm:" %> <%= label_for captcha => "Enter the word 'flag' to confirm:" %>
<%= text_field captcha => id => 'captcha' %> <%= text_field captcha => id => 'captcha' %>
<%= asset 'app.js' %>
</div> </div>
<button type="submit" class="form-button">Confirm</button> <button type="submit" class="form-button">Confirm</button>
</form> </form>