Article 31SXS CodeSOD: A Bad Route

CodeSOD: A Bad Route

by
Remy Porter
from The Daily WTF on (#31SXS)

Ah, consumer products. Regardless of what the product in question is, therre's a certain amount of "design" that goes into the device. Not design which might make the product more user-friendly, or useful, or in any way better. No, "design", which means it looks nicer on the shelf at Target, or Best Buy, or has a better image on its Amazon listing. The manufacturer wants you to buy it, but they don't really care if you use it.

This thinking extends to any software that may be on the device. This is obviously true if it's your basic Internet of Garbage device, but it's often true of something we depend on far more: consumer grade routers.

Micha Koryak just bought a new router, and the first thing he did was peek through the code on the device. Like most routers, it has a web-based configuration tool, and thus it has a directory called "applets" which contains JavaScript.

Javascript like this:

function a6(ba) { if (ba == "0") { return ad.find("#wireless-channel-auto").text() } else { if (ba == "1") { return "1 - 2.412 GHz" } else { if (ba == "2") { return "2 - 2.417 GHz" } else { if (ba == "3") { return "3 - 2.422 GHz" } else { if (ba == "4") { return "4 - 2.427 GHz" } else { if (ba == "5") { return "5 - 2.432 GHz" } else { if (ba == "6") { return "6 - 2.437 GHz" } else { if (ba == "7") { return "7 - 2.442 GHz" } else { if (ba == "8") { return "8 - 2.447 GHz" } else { if (ba == "9") { return "9 - 2.452 GHz" } else { if (ba == "10") { return "10 - 2.457 GHz" } else { if (ba == "11") { return "11 - 2.462 GHz" } else { if (ba == "12") { return "12 - 2.467 GHz" } else { if (ba == "13") { return "13 - 2.472 GHz" } else { if (ba == "14") { return "14 - 2.484 GHz" } else { if (ba == "34") { return "34 - 5.170 GHz" } else { if (ba == "36") { return "36 - 5.180 GHz" } else { if (ba == "38") { return "38 - 5.190 GHz" } else { if (ba == "40") { return "40 - 5.200 GHz" } else { if (ba == "42") { return "42 - 5.210 GHz" } else { if (ba == "44") { return "44 - 5.220 GHz" } else { if (ba == "46") { return "46 - 5.230 GHz" } else { if (ba == "48") { return "48 - 5.240 GHz" } else { if (ba == "52") { return "52 - 5.260 GHz" } else { if (ba == "56") { return "56 - 5.280 GHz" } else { if (ba == "60") { return "60 - 5.300 GHz" } else { if (ba == "64") { return "64 - 5.320 GHz" } else { if (ba == "100") { return "100 - 5.500 GHz" } else { if (ba == "104") { return "104 - 5.520 GHz" } else { if (ba == "108") { return "108 - 5.540 GHz" } else { if (ba == "112") { return "112 - 5.560 GHz" } else { if (ba == "116") { return "116 - 5.580 GHz" } else { if (ba == "120") { return "120 - 5.600 GHz" } else { if (ba == "124") { return "124 - 5.620 GHz" } else { if (ba == "128") { return "128 - 5.640 GHz" } else { if (ba == "132") { return "132 - 5.660 GHz" } else { if (ba == "136") { return "136 - 5.680 GHz" } else { if (ba == "140") { return "140 - 5.700 GHz" } else { if (ba == "149") { return "149 - 5.745 GHz" } else { if (ba == "153") { return "153 - 5.765 GHz" } else { if (ba == "157") { return "157 - 5.785 GHz" } else { if (ba == "161") { return "161 - 5.805 GHz" } else { if (ba == "165") { return "165 - 5.825 GHz" } else { if (ba == "184") { return "184 - 4.920 GHz" } else { if (ba == "188") { return "188 - 4.940 GHz" } else { if (ba == "192") { return "192 - 4.960 GHz" } else { if (ba == "196") { return "196 - 4.980 GHz" } else { return "" } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } }}}
puppetlabs50.png[Advertisement] Manage IT infrastructure as code across all environments with Puppet. Puppet Enterprise now offers more control and insight, with role-based access control, activity logging and all-new Puppet Apps. Start your free trial today! TheDailyWtf?d=yIl2AUoC8zA6ELt1smUPPs
External Content
Source RSS or Atom Feed
Feed Location http://syndication.thedailywtf.com/TheDailyWtf
Feed Title The Daily WTF
Feed Link http://thedailywtf.com/
Reply 0 comments