hoodmonkey
Just another Hoodmonkey weblogDo you like this story?
Odd Belkin Router JavaScript
October 6th, 2009 • No Comments
This JS function was taken from one of the configuration pages hosted on my wireless router:
function isHex(s) {
var j, x = 0;
for (var i = 0 ; i < s.length; i++) {
var c = s.charAt(i);
j = parseInt(c, 16);
if (!((j == 0) || (j == 1)|| (j == 2)|| (j == 3)|| (j == 4)|| (j == 5)|| (j == 6)
|| (j == 7)|| (j == 8)|| (j == 9)|| (j == 10)|| (j == 11)|| (j == 12)|| (j == 13)
|| (j == 14)|| (j == 15))) {
x = 1;
}
if (x == 1) return false;
}
return true;
}
That’s worthy of dailywtf.com.
Categories: Uncategorized
You can leave a response, or trackback from your own site.