1
0

port to python3

This commit is contained in:
2022-12-28 17:00:54 +01:00
parent 14f686baed
commit b9ed4d1d5f

View File

@@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
# Check if an OpenVPN server runs on a given UDP or TCP port. # Check if an OpenVPN server runs on a given UDP or TCP port.
# #
@@ -40,11 +40,11 @@ HMAC_CLIENT_KEY_START = 192
BUFFER_SIZE = 1024 BUFFER_SIZE = 1024
def ok(msg): def ok(msg):
print 'OK: %s' % msg print('OK: %s' % msg)
return 0 return 0
def critical(msg): def critical(msg):
print 'CRIT: %s' % msg print('CRIT: %s' % msg)
return 2 return 2
def buildpacket(tcp, key, digestmod): def buildpacket(tcp, key, digestmod):