PageSourceSearch

https://www.lebenshilfe-ansbach.de/_assets/542a38dbcbc3e9671534c5c…/JavaScript/FormCrShield.js?1758944859

js lebenshilfe-ansbach.de collected 2026-10-05 02:42:01 UTC 1,019 bytes, 35 lines download raw bytes

1/**
2 * Required JavaScript for challenge/response spam protection
3 */
4
5function getResult (method, challenge) {
6  switch (method) {
7    case '2':
8      return challenge.split('').reverse().join('')
9    case '1':
10    default:
11      return challenge.replace(/[a-z]/gi, char =>
12        String.fromCharCode(char.charCodeAt(0) + (char.toUpperCase() <= 'M' ? 13 : -13))
13      )
14  }
15}
16
17document.addEventListener('DOMContentLoaded', () =>
18{
19  [...document.querySelectorAll('[id$="-cr-field"]')].forEach(element =>
20  {
21    let [method, expiration,challenge,delay] = atob(element.value).split('|');
22
23    if (delay === undefined) {
24      // The CR field has already been submitted by the client, but server side validation may have failed
25      return;
26    }
27
28    if (method === undefined) {
29      // If no method is defined, we fall back to the default obfuscation method
30      method = '1';
31    }
32
33    setTimeout(() => {element.value = btoa(method + '|' + expiration + '|' + getResult(method, challenge))}, 1e3 * delay)
34  })
35});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.