oi ddlZddlZddlZGddeZddZdZdZdZe d krddl Z e j ej d dd \Z Z n"#e j$rZeeYdZ[ndZ[wwxYwdZee dkr ed e D];\ZZed kr eeeedkr eeedkr eeZ:dSdS)NceZdZdS)ConnectionErrorN)__name__ __module__ __qualname__EC:\PYTHON\Scheduler\python\Lib\site-packages\win32/scripts/rasutil.pyrr sDr rc|dksJtjD]N}|d|krtd|d|dfcSOtjd|\}}|s2tdtdt jdtd|d|}|dkr_tjdd|d\}}tj|rd}n.td tj d |dz}|dk_|r"t|tj |d|fS) aaMake a connection to the specified RAS entry. Returns a tuple of (bool, handle) on success. - bool is 1 if a new connection was established, or 0 is a connection already existed. - handle is a RAS HANDLE that can be passed to Disconnect() to end the connection. Raises a ConnectionError if the connection could not be established. rzAlready connected toNz4Error: The password is not saved for this connectionzJPlease connect manually selecting the 'save password' option and try againz Connecting toz...z Retrying...i) win32rasEnumConnectionslowerprintGetEntryDialParamssysexitDial IsHandleValidwin32apiSleeprGetErrorString) rasEntryName numRetriesinfo dial_paramshave_pw retryCount rasHandleerrCodebValids r Connectr# s >>>>(** 7==??l0022 2 2 (, 7 7 7d1g:    3$6t\JJK  DEEE X      /<///J q..%]4{DII 7  !) , , F  mta  q..Igx'>w'G'GHHH i<r ct|trctjD]<}|d|kr |d}n=t dd|ztj|dS)Nr rzNot connected to entry '%s') isinstancestrrrrrHangUp)handlers r Disconnectr)4s&#M,.. M MDAw}}&,,..00a1"!%BV%KLL L OFr a+rasutil.py - Utilities for using RAS Usage: rasutil [-r retryCount] [-c rasname] [-d rasname] -r retryCount - Number of times to retry the RAS connection -c rasname - Connect to the phonebook entry specified by rasname -d rasname - Disconnect from the phonebook entry specified by rasname ctt|tttjddS)Nr )rusagerr)whys r Usager-Ks) #JJJ %LLLHQKKKKKr __main__r zr:c:d:zInvalid argumentz-cz-dz-r)r )rrr Exceptionrr#r)r+r-rgetoptargvoptsargserrorr,retrieslenoptvalintrr r r:s      i   $$$$N      zMMM"V]38ABB<:: dd < c G s4yyA~~  !!!S $;; GC ! ! ! $;; JsOOO $;;c#hhG#s!A A3 A..A3