Anti-Spam Email Encryption and Obfuscation Tool




Cipher disk for reversed Caesar encryption, set here to the key 'N'. Chiffrierscheibe für umgekehrte Caesar-Verschlüsselung, hier eingestellt auf den Schlüssel N. Chiffrierscheibe für umgekehrte Caesar-Verschlüsselung, hier eingestellt auf den Schlüssel N.
Step Description
1 The script starts with an encrypted array of characters representing the email address.
2 It decrypts these characters using a Caesar Cipher algorithm.
3 It shuffles the decrypted characters randomly (Fisher-Yates shuffle) and adds dummy elements to further obfuscate the email.
4 It then assembles the decrypted email address.
5 Finally, it displays the decrypted email address on the webpage after a random delay.

How it works:

Encryption:

Your email address is encrypted using a Caesar Cipher encryption algorithm. This algorithm shifts each character in your email address by a fixed amount (a random number between 1 and 25).

Equation: E(x) = (x + k) mod 26

Where E(x) is the encrypted character, x is the original character, and k is the random shift.

Obfuscation:

The encrypted email address is then obfuscated using a combination of shuffling and adding dummy elements to the array of encrypted characters. This process ensures that the email address is further disguised, making it difficult for automated bots to extract it.

The array of encrypted characters is shuffled randomly, and dummy elements are inserted at random positions to add complexity. Finally, the email address is decrypted and displayed using the original algorithm with the appropriate shift value. Additionally, the email address is encoded in Base64 format to provide an extra layer of obfuscation.

Value of the App:

This tool provides a simple yet effective way to protect your email address from email-harvesting bots while still allowing genuine visitors to contact you. By encrypting and obfuscating your email address, you can minimize the risk of spam and phishing attacks.

Additionally, the combination of encryption, obfuscation, and randomness significantly enhances the security of your email address. It makes it virtually impossible for bots to decipher the email address, ensuring your privacy and security.

Explanation of Code

Step/Function Description
generateCode() Generates the obfuscated and encrypted code based on the user input.
encrypt(part, shift) Shifts characters by a certain amount using Caesar Cipher encryption.
decrypt(part, shift) Decrypts characters shifted by Caesar Cipher.
shuffle(array) Shuffles an array using Fisher-Yates shuffle with a random shift.
addDummies(array) Adds dummy elements to an array at random positions.
assembleEmail(parts, emailInput) Assembles the decrypted email from shuffled parts and dummy elements.
writeEmail(emailInput) Displays the decrypted email after a random delay.
generateRandomDelay(emailInput) Generates a random delay and calls writeEmail with the emailInput.
copyCode() Copies the generated code to the clipboard.
?
 
01
02
03
04
05
06
07
08
09
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<script type="text/javascript">
  var parts = ${encryptedParts};
 
  /*
    Function to decrypt characters shifted by Caesar Cipher
    Equation: D(x) = (x - k) mod 26
  */
  function decrypt(part, shift) {
    const charCode = part.charCodeAt(0);
    return String.fromCharCode((charCode - 97 - shift + 26) % 26 + 97);
  }
 
  /*
    Function to shuffle an array (Fisher-Yates shuffle) with a random shift
  */
  function shuffle(array) {
    for (let i = array.length - 1; i > 0; i--) {
      const j = Math.floor(Math.random() * (i + 1));
      [array[i], array[j]] = [array[j], array[i]];
    }
    return array;
  }
 
  /*
    Function to add dummy elements to an array
  */
  function addDummies(array) {
    const dummyElements = ['x', 'y', 'z', 'q', 'p'];
    for (let i = 0; i < dummyElements.length; i++) {
      const index = Math.floor(Math.random() * (array.length + 1));
      array.splice(index, 0, dummyElements[i]);
    }
    return array;
  }
 
  /*
    Function to assemble the decrypted email
  */
  function assembleEmail(parts, emailInput) {
    let shuffledParts = shuffle(parts);
    shuffledParts = addDummies(shuffledParts);
    let email = '';
    shuffledParts.forEach(part => {
      if (!['x', 'y', 'z', 'q', 'p'].includes(part)) {
        email += decrypt(part, ${shuffleShift});
      }
    });
    return email;
  }
 
  /*
    Function to display the decrypted email after a random delay
  */
  function writeEmail(emailInput) {
    const email = assembleEmail(parts, emailInput);
    document.getElementById('email-container').innerHTML = '<a href="mailto:' + emailInput + '">' + emailInput + '</a>';
  }
 
  /*
    Function to generate a random delay and call writeEmail with the emailInput
  */
  function generateRandomDelay(emailInput) {
    setTimeout(() => writeEmail(emailInput), Math.random() * 1000);
  }
 
  generateRandomDelay("${emailInput}");
<\/script>
      `;
 
      // Set the generated code in the textarea for user to copy
      const outputCode = document.getElementById('output-code');
      outputCode.value = code.trim();
 
      // Show the "Copy Code" button
      const copyButton = document.getElementById('copy-button');
      copyButton.style.display = 'block';
    }
 
    /*
      Function to copy the generated code to the clipboard
    */
    function copyCode() {
      const outputCode = document.getElementById('output-code');
      outputCode.select();
      document.execCommand('copy');
      alert('Code copied to clipboard!');
    }
  </script>
 
 

<script type="text/javascript">
  var parts = ${encryptedParts};

  /*
    Function to decrypt characters shifted by Caesar Cipher
    Equation: D(x) = (x - k) mod 26
  */
  function decrypt(part, shift) {
    const charCode = part.charCodeAt(0);
    return String.fromCharCode((charCode - 97 - shift + 26) % 26 + 97);
  }

  /*
    Function to shuffle an array (Fisher-Yates shuffle) with a random shift
  */
  function shuffle(array) {
    for (let i = array.length - 1; i > 0; i--) {
      const j = Math.floor(Math.random() * (i + 1));
      [array[i], array[j]] = [array[j], array[i]];
    }
    return array;
  }

  /*
    Function to add dummy elements to an array
  */
  function addDummies(array) {
    const dummyElements = ['x', 'y', 'z', 'q', 'p'];
    for (let i = 0; i < dummyElements.length; i++) {
      const index = Math.floor(Math.random() * (array.length + 1));
      array.splice(index, 0, dummyElements[i]);
    }
    return array;
  }

  /*
    Function to assemble the decrypted email
  */
  function assembleEmail(parts, emailInput) {
    let shuffledParts = shuffle(parts);
    shuffledParts = addDummies(shuffledParts);
    let email = '';
    shuffledParts.forEach(part => {
      if (!['x', 'y', 'z', 'q', 'p'].includes(part)) {
        email += decrypt(part, ${shuffleShift});
      }
    });
    return email;
  }

  /*
    Function to display the decrypted email after a random delay
  */
  function writeEmail(emailInput) {
    const email = assembleEmail(parts, emailInput);
    document.getElementById('email-container').innerHTML = '<a href="mailto:' + emailInput + '">' + emailInput + '</a>';
  }

  /*
    Function to generate a random delay and call writeEmail with the emailInput
  */
  function generateRandomDelay(emailInput) {
    setTimeout(() => writeEmail(emailInput), Math.random() * 1000);
  }

  generateRandomDelay("${emailInput}");
<\/script>
      `;

      // Set the generated code in the textarea for user to copy
      const outputCode = document.getElementById('output-code');
      outputCode.value = code.trim();

      // Show the "Copy Code" button
      const copyButton = document.getElementById('copy-button');
      copyButton.style.display = 'block';
    }

    /*
      Function to copy the generated code to the clipboard
    */
    function copyCode() {
      const outputCode = document.getElementById('output-code');
      outputCode.select();
      document.execCommand('copy');
      alert('Code copied to clipboard!');
    }
  </script>