Obfuscation and Spam Bots
By Romain Tuesday, March 27 2007 - 11:18 UTC - Tech - Permalink
By Romain Tuesday, March 27 2007 - 11:18 UTC - Tech - Permalink
Always on the same subject: Spam bots, i was thinking that obfuscation would be a good way to prevent spam bots. Then I first start playing with reverse strings even if it may be obvious for the bots but well, I'm pretty sure it's even more difficult than the previous technique which can almost be passed with an intelligent-but-with-no-javascript-support parser.
So this version is quite simple:
<script>
String.prototype.reverse = function() { return this.split('').reverse().join(''); };
function reverseNames() {
formElement = document.forms[0].elements;
for(var i = 0; i < formElement.length; i++) {
formElement[i].name = formElement[i].name.reverse();
}
formElement.submit();
}
</script>
...
<form method="post" action="check.php" onsubmit="reverseNames()">
<label for="emanresu">‮emanresu‭</label> <input type="text" name="emanresu" /> <br />
You can find the running example: here.
While talking about obfuscation/crypto, since there are few parameters to obfuscate/encrypt maybe a Vigenere
algorithm would be nice...
Note that we do not use the 'username' instance in the HTML page, if you want to print 'username' you can use the character ‮ which reverses the following text.
Last comments