Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[t] OpenVPN scripts for key generation and client enumeration don't work anymore with python3.11+ #2803

Closed
Hooverdan96 opened this issue Feb 26, 2024 · 2 comments

Comments

@Hooverdan96
Copy link
Member

Hooverdan96 commented Feb 26, 2024

Thanks to user ZeusMR who uncovered a renamed python 2.x function. The raw_input function was used in one of the specialized scripts connected to the OpenVPN Rockon to generate keys, etc.

Unfortunately, this function has been renamed to input() so the interpreted won't recognize the raw_input function name anymore.

https://peps.python.org/pep-3111/

This affect these two script functions that were created for the OpenVPN Rockon:

def client_gen():
client_name = raw_input("Enter a name for the client(no spaces): ") # noqa F821
os.system(
"%s -it %s easyrsa build-client-full %s nopass" % (CMD, image, client_name)
)
def client_retrieve():
client_name = raw_input(
"Enter the name of the client you like to retrieve: "
) # noqa F821 E501
outfile = "/tmp/%s.ovpn" % client_name
rc = os.system("%s %s ovpn_getclient %s > %s" % (CMD, image, client_name, outfile))
if rc == 0:
print(
"client configuration is saved at %s. It can be used by your "
"vpn client software to connect." % outfile
)

It will hopefully be as easy as replacing the renamed function name with the new one to get it to work again.

@Hooverdan96 Hooverdan96 changed the title [t] OpenVPN scripts for key generation, etc. don't work anymore with python3 [t] OpenVPN scripts for key generation and client enumeration don't work anymore with python3.11+ Feb 26, 2024
@Hooverdan96
Copy link
Member Author

Also, these seem to be the only 2 instances (at least the Github search didn't surface any others) where raw_input was used.

phillxnet added a commit that referenced this issue Mar 13, 2024
@phillxnet
Copy link
Member

Closing as:
Fixed by #2804

@phillxnet phillxnet added this to the 5.1.X-X Stable release milestone Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants