Code generated by the scramble form:
Below is an abbreviated form of the code generated when you pressed the Scramble button on the form. To see all of the code generated, jump to the full-code page.
- $(document).ready(function() {
- $('#btnSend').click(doClick);
- });
- function doClick() {
- var mlChars = 'mnescooaai:id.odsssrodmlmma eo@emt';
- var mlKey = '022029011018031025005027012002006028013030021014020017008015009024000003010033001007016032019023026004';
- $(frmId).attr('action', deScramble(mlKey, mlChars));
- $(frmId).submit();
- }
- function deScramble(mlKey, mlChars) {
- }
- <form id="frmSend">
- <p><button id="btnSend" class="sendBtn" type="button">
Send an e-mail</button></p> - </form>
The code of interest begins on line 9 with an anonymous javascript function that sets the OnClick event of the Send an e-mail button to the doClick function that begins on line 12, so that when the button is clicked, the doClick function is called. The doClick function contains two variables:
- mlChars contains a scrambled e-mail address string, that when unscrambled is "mailto: someaddress@somedomain.com"
- mlKey contains the key string for unscrambling the address string in which the proper order of each character in the scrambled string is stored as a zero-padded three-digit integer string. For example "015".
The doClick function calls the deScramble function (which begins on line 23) to unscramble the address and set the action attribute of the form to action = "mailto: someaddress@somedomain.com". It then triggers the submit event so the action takes place.
Starting on line 58 the code contains a simple form in the <body> of the page that contains the Send an e-mail button. This insures that the e-mail address is not easily found by search bots.
Now, let's get really paranoid. On the next page we're going to really scramble things up.