This repository has been archived by the owner on Mar 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rasutil.py
38 lines (35 loc) · 1.7 KB
/
rasutil.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import win32ras
stateStrings = {
win32ras.RASCS_OpenPort : "OpenPort",
win32ras.RASCS_PortOpened : "PortOpened",
win32ras.RASCS_ConnectDevice : "ConnectDevice",
win32ras.RASCS_DeviceConnected : "DeviceConnected",
win32ras.RASCS_AllDevicesConnected : "AllDevicesConnected",
win32ras.RASCS_Authenticate : "Authenticate",
win32ras.RASCS_AuthNotify : "AuthNotify",
win32ras.RASCS_AuthRetry : "AuthRetry",
win32ras.RASCS_AuthCallback : "AuthCallback",
win32ras.RASCS_AuthChangePassword : "AuthChangePassword",
win32ras.RASCS_AuthProject : "AuthProject",
win32ras.RASCS_AuthLinkSpeed : "AuthLinkSpeed",
win32ras.RASCS_AuthAck : "AuthAck",
win32ras.RASCS_ReAuthenticate : "ReAuthenticate",
win32ras.RASCS_Authenticated : "Authenticated",
win32ras.RASCS_PrepareForCallback : "PrepareForCallback",
win32ras.RASCS_WaitForModemReset : "WaitForModemReset",
win32ras.RASCS_WaitForCallback : "WaitForCallback",
win32ras.RASCS_Projected : "Projected",
win32ras.RASCS_StartAuthentication : "StartAuthentication",
win32ras.RASCS_CallbackComplete : "CallbackComplete",
win32ras.RASCS_LogonNetwork : "LogonNetwork",
win32ras.RASCS_Interactive : "Interactive",
win32ras.RASCS_RetryAuthentication : "RetryAuthentication",
win32ras.RASCS_CallbackSetByCaller : "CallbackSetByCaller",
win32ras.RASCS_PasswordExpired : "PasswordExpired",
win32ras.RASCS_Connected : "Connected",
win32ras.RASCS_Disconnected : "Disconnected"
}
def TestCallback( hras, msg, state, error, exterror):
print("Callback called with ", hras, msg, stateStrings[state], error, exterror)
def test(rasName = "_ Divert Off"):
return win32ras.Dial(None, None, (rasName,),TestCallback)