troyxmccall / netgear-telnetenable

Automatically exported from code.google.com/p/netgear-telnetenable
0 stars 1 forks source link

MAC address requires uppercase hex codes #1

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Reproducing the problem:
1. Try to enable telnet with lower-case or mixed-case MAC address
2. Telneting in won't work

Fix:  Enable telnet with the MAC address's characters (A-F) in upper-case.

What version of the product are you using? On what operating system?
Netgear WGT624v3 hardware version V3H1 and firmware version V2.0.26_1.0.1NA

Original issue reported on code.google.com by eric.n.b...@gmail.com on 7 Aug 2010 at 12:12

GoogleCodeExporter commented 9 years ago
Not sure how to contribute a patch back to the author, but:

--- telnetenable.py.orig    2009-10-30 20:27:49.000000000 -0700
+++ telnetenable.py 2011-12-28 10:01:18.000000000 -0800
@@ -99,7 +99,7 @@
     print "usage: python telnetenable.py <ip> <mac> <username> [<password>]"

   ip = args[0]
-  mac = args[1]
+  mac = args[1].upper().replace(':', '')
   username = args[2]

   password = ""

Original comment by john.re...@gmail.com on 28 Dec 2011 at 6:36

Attachments:

GoogleCodeExporter commented 9 years ago
Using

mac = ''.join(x.rjust(2, '0') for x in args[1].split(':')).upper()

instead, ensures that somthing like 1:2:3:4:5:6 is the same as 
01:02:03:04:05:06.

Original comment by asgerdre...@gmail.com on 7 Jun 2014 at 9:03