Page 1 of 1

NBR750 Python errors

Posted: Sat Feb 10, 2024 7:48 pm
by NHeydary
Great writeup in the tutorial albeit there are a couple of issues a newbie like myself is having troubling with. First off, I'm unclear how to, "open a command prompt in the directory where the script has been downloaded". And, just to be clear, the command prompt is utilizing the Python app or CMD? I tried both. The Windows CMD prompt gives the error: 'telnet-enable2.py' is not recognized as an internal or external command,
operable program or batch file. The Python app gives the following error:
C:\Users\nemat\Downloads\telnet-enable2.py 192.168.1.1 [MyMACAddress] admin [MyRouterPW]
^
SyntaxError: unexpected character after line continuation character

What's the proper syntax?

Re: NBR750 Python errors

Posted: Sun Feb 11, 2024 3:44 am
by NHeydary
So, after reading up on python I was able to put in the telnet-enable2.py 192.168.1.1 [MyMACAddress] admin [RouterPW] and got:

PS C:\Users\nemat\Downloads> python
Python 3.12.2 (tags/v3.12.2:6abddd9, Feb 6 2024, 21:26:36) [MSC v.1937 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> telnet-enable2.py 192.168.1.1 [MyMACAddress] admin [MyRouterPW]
File "<stdin>", line 1
telnet-enable2.py 192.168.1.1 [MyMACAddress] admin [MyRouterPW]
^^^^^^^
SyntaxError: invalid syntax

The arrows pointing to 192.168. show it as the invalid syntax. What needs to change?