active directory authentication, full mfa implementation, vpn generation
This commit is contained in:
12
vpn.py
Normal file
12
vpn.py
Normal file
@@ -0,0 +1,12 @@
|
||||
import sys
|
||||
import subprocess
|
||||
|
||||
def genVPN(cu, dev):
|
||||
result = subprocess.call(['sh', 'ikev2.sh', '--addclient', cu+'-'+dev])
|
||||
if result == "Error: Invalid client name. Client " + cu+'-'+dev + " already exists.":
|
||||
return getVPN(cu, dev)
|
||||
else:
|
||||
return "profiles/"+cu+'-'+dev+".mobileconfig"
|
||||
|
||||
def getVPN(cu, dev):
|
||||
return "profiles/"+cu+'-'+dev+".mobileconfig"
|
||||
Reference in New Issue
Block a user