;ò
|°Bc        
   @   sÊ  d  k  Z  d  k Z d  k Z d  k Z d  k Z d  k Z d  k Z d k l Z d k	 l
 Z
 d k l Z l Z l Z d k l Z d k l Z d k l Z d  k Z d  k Z y d  k Z Wn e j
 o d  k Z n Xd e f d „  ƒ  YZ d	 e
 i f d
 „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ d d „ Z  d d „ Z! d d „ Z" d „  Z# d „  Z$ d „  Z% d „  Z& e' d j o)d  k( Z( d  k Z d  k Z d k l) Z) l* Z* l+ Z+ l, Z, l- Z- l. Z. l/ Z/ d k0 l1 Z1 d k2 l3 Z3 d  k4 Z4 d  k5 Z5 d Z6 d  Z7 d! e i8 Z9 d" e: ƒ  Z; d# e i< d$ Z= e= d% e; Z= y2 e i e i< d& d' d( d) d* d+ g ƒ \ Z> Z? Wn4 e i j
 o% Z@ d, e@ e= f GHe iA d- ƒ n Xyï xè e> D]à ZB eB d$ d. j p eB d$ d/ j o e= GHe iA d$ ƒ n eB d$ d0 j p eB d$ d1 j o eC eB d& ƒ Z6 n eB d$ d2 j p eB d$ d3 j o eD eB d& ƒ Z7 n eB d$ d4 j p eB d$ d5 j o eD eB d& ƒ Z9 qÍqÍWWn? eE j
 o3 Z@ d6 eB d& eB d$ e@ e= f GHe iA d- ƒ n XeF e? ƒ d$ j  o d7 e= GHe iA d- ƒ n yk e" ƒ  ZG e3 iH ƒ  ZI xO eG D]G ZJ eJ d$ iK ƒ  GeJ d& iK ƒ  GHeI iL eJ d$ iK ƒ  eJ d& iK ƒ  ƒ q@WWn d8 GHe iA d& ƒ n Xe) iM e9 d9 d: d; d< d= eN d> d$ ƒZO h  d? e- iP <d@ e <dA e <dB e <eO _Q e4 iR eO eI g dC e# dD e ƒe _R e iR iS GHe iR i/ GHdE g eO _T e* iU dF e iR ƒ ZV e1 iW e6 eV dG e7 ƒe( i( ƒ  e _X e  dH ƒ e _Y e! e iY dI d ƒ e _Z d% GHdJ GHdK Ge( i[ dL e( i\ e iX ƒ ƒ GHdM Ge6 GdN Ge7 p dO GHdP Ge9 GHHdQ Ge iY GHdR Ge iZ GHHdS Ge  i] Ge i^ ƒ  dT Ge i_ GdU GHdV Ge i` ƒ  dT Ge ia GdU GHdW k0 lb Zb d  kc Zc dX „  Zd eb ie ed ƒ Zf ef ig dY ƒ Zh eh ii d& e$ ƒ eh ij e% ƒ eh ik e& ƒ e1 il ƒ  n d  S(Z   N(   s   Resource(   s   page(   s   utils   htmls   error(   s   log(   s	   copyright(   s   https   NotLoggedInc           B   s   t  Z d „  Z d „  Z RS(   Nc         C   s   d GH|  Sd  S(   Ns#   getChild **************************(   s   self(   s   selfs   paths   request(    (    s   C:\Python\PL\statweb.pys   getChild,   s    c         C   s   d Sd  S(   NsB    I don't know you!<br/>
		<a href ='perspective-init'>login</a>
		(    (   s   selfs   request(    (    s   C:\Python\PL\statweb.pys
   render_GET0   s    (   s   __name__s
   __module__s   getChilds
   render_GET(    (    (    s   C:\Python\PL\statweb.pys   NotLoggedIn*   s   	s   ErrLoginPagec           B   s    t  Z d  Z e Z d Z d Z RS(   s6   This is the page that is shown to non-logged in users.i    s  <html>
    <head>
    <script language="JavaScript">
 
    function callLogin() {
        loginwin = window.open('statlogin.rpy', '_parent')
        loginwin.focus()
    }
    </script>
    
    <title>Loged in</title>
    <style type="text/css">
.formDescription, .formError {
    /* fixme - inherit */
    font-size: smaller;
    font-family: arial;
    margin-bottom: 1em;
}

.formDescription {
    color: green;
}

.formError {
    color: red;
}
</style>
    </head>
    <body onload ="callLogin()">
    </body>
</html>(   s   __name__s
   __module__s   __doc__s   Trues   isLeafs   addSlashs   template(    (    (    s   C:\Python\PL\statweb.pys   ErrLoginPage5   s    s   PythonScriptc           B   s&   t  Z d  Z d Z d „  Z d „  Z RS(   s¹   I am an extremely simple dynamic resource; an embedded python script.

    This will execute a file (usually of the extension '.epy') as Python code,
    internal to the webserver.
    i   c         C   s   | |  _  | |  _ d S(   s*   Initialize me with a script name.
        N(   s   filenames   selfs   registry(   s   selfs   filenames   registry(    (    s   C:\Python\PL\statweb.pys   __init__a   s     	c         C   s  | i d d t i ƒ h  d | <d |  i <d |  i <} y t |  i | | ƒ Wn– t	 j
 oL } | i d j o3 | i t i ƒ | i t i d ƒ i | ƒ ƒ qî n@ t i ƒ  } t i d | ƒ | i t i | i ƒ  ƒ ƒ n X| i ƒ  t i Sd	 S(
   s+  Render me to a web client.

        Load my file, execute it in a special namespace (with 'request' and
        '__file__' global vars) and finish the request.  Output to the web-page
        will NOT be handled with print - standard output goes to the log - but
        with request.write.
        s   x-powered-bys
   Twisted/%ss   requests   __file__s   registryi   s   File not found.s   fileN(   s   requests	   setHeaders	   copyrights   versions   selfs   filenames   registrys	   namespaces   execfiles   IOErrors   es   errnos   setResponseCodes   https	   NOT_FOUNDs   writes   errors
   NoResources   renders   StringIOs   ios	   tracebacks	   print_excs   htmls   PREs   getvalues   finishs   servers   NOT_DONE_YET(   s   selfs   requests   es	   namespaces   io(    (    s   C:\Python\PL\statweb.pys   renderg   s     '' 
(   s   __name__s
   __module__s   __doc__s   isLeafs   __init__s   render(    (    (    s   C:\Python\PL\statweb.pys   PythonScriptZ   s    	s   ASISProcessorc           B   s   t  Z e d „ Z d „  Z RS(   Nc         C   s3   t  i i |  ƒ | |  _ | p
 t i ƒ  |  _ d  S(   N(   s   resources   Resources   __init__s   selfs   paths   registrys   statics   Registry(   s   selfs   paths   registry(    (    s   C:\Python\PL\statweb.pys   __init__‚   s    	c         C   sE   t  i o	 d GHn d | _ t i |  i |  i ƒ } | i
 | ƒ Sd  S(   Ns>   ==============================================================i   (   s   PL2_inis   developments   requests   startedWritings   statics   Files   selfs   paths   registrys   ress   render(   s   selfs   requests   res(    (    s   C:\Python\PL\statweb.pys   render‡   s
    
		(   s   __name__s
   __module__s   Nones   __init__s   render(    (    (    s   C:\Python\PL\statweb.pys   ASISProcessor€   s   s   NoValidFilec           B   s    t  Z d Z d „  Z d „  Z RS(   Ni   c         C   s   | |  _  | |  _ d S(   s$   Initialize me with a script name.
		N(   s   filenames   selfs   registry(   s   selfs   filenames   registry(    (    s   C:\Python\PL\statweb.pys   __init__’   s     	c         C   s‚   | i d d t i ƒ h  d | <d |  i <d |  i <} | i t	 i
 ƒ | i t i d ƒ i | ƒ ƒ | i ƒ  t i Sd S(   s  Render me to a web client.

		Load my file, execute it in a special namespace (with 'request' and
		'__file__' global vars) and finish the request.  Output to the web-page
		will NOT be handled with print - standard output goes to the log - but
		with request.write.
		s   x-powered-bys
   Twisted/%ss   requests   __file__s   registrys   File not found.N(   s   requests	   setHeaders	   copyrights   versions   selfs   filenames   registrys	   namespaces   setResponseCodes   https	   NOT_FOUNDs   writes   errors
   NoResources   renders   finishs   servers   NOT_DONE_YET(   s   selfs   requests	   namespace(    (    s   C:\Python\PL\statweb.pys   render˜   s     '
(   s   __name__s
   __module__s   isLeafs   __init__s   render(    (    (    s   C:\Python\PL\statweb.pys   NoValidFileŽ   s   	s   SYSTEMc         C   sÅ   d } y t |  d ƒ } Wn d G|  GH| Sn Xyp xi n oa | i ƒ  } | GH| p
 | d j o Pn | i d ƒ \ } } | d j o | i	 ƒ  } q6 q= WWn d G|  GHn X| i
 ƒ  | Sd  S(	   Ns    s   rs   Can't open file:i   s   
s   =s	   PLSYSPATHs   Error reading file:(   s	   PLSYSPATHs   opens   filenames
   systemfiles   readlines   system_lines   splits   labels   values   strips   close(   s   filenames   system_lines
   systemfiles	   PLSYSPATHs   values   label(    (    s   C:\Python\PL\statweb.pys   findPLSYSPATH¬   s(    	 
s
   plsd.hostsc         C   sŸ   y t  |  d ƒ } Wn d G|  GHt i Sn XyQ | i ƒ  } | p
 | d j o
 d } n | i d ƒ \ } } } | i ƒ  Wn d G|  GHd } n X| Sd  S(   Ns   rs   Can't open file:s   
s	   127.0.0.1s    s   Error reading file:(   s   opens   filenames   addrfiles   PL2_inis   PL2_address1s   readlines	   addr_lines   addrs   splits   users   passwords   close(   s   filenames   addrs	   addr_lines   users   addrfiles   password(    (    s   C:\Python\PL\statweb.pys   readStatWebAuthserveraddressÈ   s    	
	
s   webstatusers.pwdc         C   s”   t  |  d ƒ } d } g  } xd n o\ | i ƒ  } | p
 | d j o Pn | d 7} | i d ƒ \ } } | i
 | | f ƒ q% W| i ƒ  | Sd  S(   Ns   ri    i   s   
s   :(   s   opens   filenames   userfiles   cous	   usersLists   readlines	   user_lines   splits   users   passwords   appends   close(   s   filenames	   usersLists   passwords   cous   userfiles   users	   user_line(    (    s   C:\Python\PL\statweb.pys   readStatwebUsersÝ   s     

c         C   s!   t  i d ƒ St  i t i ƒ Sd  S(   Ns   PL2_justlogedin.rpy(   s   utils   Redirects
   myresources   redirect_uri(   s   _(    (    s   C:\Python\PL\statweb.pys   callbackñ   s    c         C   s   d G|  GHd  S(   Ns   Timeout-error(   s   x(   s   x(    (    s   C:\Python\PL\statweb.pys   timeoutErrorü   s    c         C   s	   |  GHd  S(   N(   s   d(   s   d(    (    s   C:\Python\PL\statweb.pys	   printDataÿ   s    c         C   s#   d  k  } | i i t |  ƒ ƒ d  S(   N(   s   syss   stderrs   writes   strs   failure(   s   failures   sys(    (    s   C:\Python\PL\statweb.pys
   printError  s    	s   __main__(   s   statics   servers   vhosts   twcgis   scripts   trps   resource(   s   reactor(   s   checkersiP   s    s   .s·   
Options:
  -p <port>      port to communicate with. Default is 80.
  -a <address>   IP-address to communicate with. Default is any.
  -P <path>      path. Default is %(serverPath)s
	s   

Usage: %s [options] i    s   
i   s   hp:a:P:s   helps   port=s   address=s   path=s   getopt error: %s
%siÿÿÿÿs   -hs   --helps   -ps   --ports   -as	   --addresss   -Ps   --paths'   Bad parameter '%s' for option %s: %s
%ss,   Insufficient number of arguments supplied
%ss   Error when setting up userss   defaultTypes	   text/htmls   ignoredExtss   *s   registrys   allowExts   .rpys   .pwds   .pycs   .pys   callbacks   errbacks	   index.rpys   resources	   interfaces   /etc/SYSTEMs   /s&   PacketLogic Statistics server ver 2.00s   Service started:s   %Y-%m-%d %H:%M:%Ss   Listening on ports   ats   anys   Server-path:s
   PLSYSPATH:s#   IP-address to Authenticationserver:s   Loading Hostlist:s    -- s    loadeds   Loading rootObj: /(   s   taskc           C   s+   t  i o	 d GHn t i ƒ  t i ƒ  d  S(   Ns   2.5 seconds has passed(   s   PL2_inis   developments   PL2_Packetlogics   updateChannelStatDatas   updateSystemStatData(    (    (    s   C:\Python\PL\statweb.pys   runEverySecond™  s    
	
f2.5(m   s   PL2_inis
   PL2_configs   webenvs
   myresources   oss   syss   getopts   twisted.web.resources   Resources   twisted.web.wovens   pages   twisted.webs   utils   htmls   errors   twisted.pythons   logs   twisteds	   copyrights   twisted.protocolss   https	   tracebacks   PL_miscs	   cStringIOs   StringIOs   ImportErrors   NotLoggedIns   Pages   ErrLoginPages   PythonScripts   ASISProcessors   NoValidFiles   findPLSYSPATHs   readStatWebAuthserveraddresss   readStatwebUserss   callbacks   timeoutErrors	   printDatas
   printErrors   __name__s   times   statics   servers   vhosts   twcgis   scripts   trps   resources   twisted.internets   reactors   twisted.creds   checkerss   PL2_simpleguards	   PL2_guards
   serverPorts
   IP_addresss   seps
   serverPaths   varss   optionss   argvs   usages   optss   argss   whys   exits   opts   ints   strs
   ValueErrors   lens   userss'   InMemoryUsernamePasswordDatabaseDontUses   checkers   users   strips   addUsers   Files   Nones   roots   ResourceScripts
   processorss   guardResources	   cookieKeys
   indexNamess   Sites   sites	   listenTCPs
   start_times   PL_sys_paths	   auth_addrs   strftimes	   localtimes   PL2_nodePaths   hostlistFromPLs   cous   rootObjFromPLs
   rootObjCous   tasks   PL2_Packetlogics   runEverySeconds   LoopingCalls   ls   starts   task_defs
   setTimeouts   addCallbacks
   addErrbacks   run(=   s	   tracebacks   reactors   sites   roots   statics
   serverPorts   https   task_defs   NoValidFiles   userss   PL2_Packetlogics   checkerss   logs	   copyrights   scripts
   IP_addresss   runEverySeconds   twcgis   ASISProcessors   checkers   htmls	   PL2_guards   usages   getopts
   printErrors   optionss
   PL2_configs   opts   readStatWebAuthserveraddresss   argss   Resources   webenvs   PythonScripts   times   PL2_simpleguards   utils   vhosts   users   trps
   myresources   whys
   serverPaths   timeoutErrors   syss   PL2_inis   tasks   resources   NotLoggedIns	   printDatas   StringIOs   findPLSYSPATHs   ls   servers   readStatwebUserss   callbacks   errors   PL_miscs   ErrLoginPages   oss   pages   opts(    (    s   C:\Python\PL\statweb.pys   ?   sÚ   				%&				1 """"	 	 ,'0$!	

		