ó
"b<]c           @   s¾   d  Z  d d l Z d d l Z d d l m Z d d l m Z d d l m Z m	 Z	 d d l
 m Z m Z d d l m Z d d  Z d d  Z d   Z d   Z e j j d e    d S(   s   
WSGI Utilities
(from web.py)
i’’’’Ni   (   t   http(   t   webapi(   t   listgett   intget(   t	   validaddrt   validip(   t
   httpservert	   localhosti@  c         C   s7   d d l  j j } | j |  d t d | d t j   S(   s)   Runs a WSGI function as a FastCGI server.i’’’’Nt   multiplexedt   bindAddresst   debug(   t   flup.server.fcgit   servert   fcgit
   WSGIServert   Truet   Falset   run(   t   funct   addrt   flups(    (    s”   /mnt/my-files/home/darkz3ro/Desktop/my files/malware analysing and devlopment/viruses codes and analysis/APT34-leat/MuddyC3v1.0.1-/muddyc3_v1.0.1/lib/web/wsgi.pyt   runfcgi   s    i   c         C   s1   d d l  j j } | j |  d | d t j   S(   s'   Runs a WSGI function as an SCGI server.i’’’’NR	   R
   (   t   flup.server.scgiR   t   scgiR   R   R   (   R   R   R   (    (    s”   /mnt/my-files/home/darkz3ro/Desktop/my files/malware analysing and devlopment/viruses codes and analysis/APT34-leat/MuddyC3v1.0.1-/muddyc3_v1.0.1/lib/web/wsgi.pyt   runscgi   s    c         C   s  d t  j k r d t  j d <n  d t  j k s= d t  j k rJ t |  d  Sd t j k sh d t j k rŚ t j d } d | k r | j d  n d | k r­ | j d  n  | rŹ t |  t | d   St |  d  Sn  d	 t j k r-t j d } | j d	  | r t |  t | d   St |   Sn  t	 t
 t j d d
   } d t  j k rsd t t  j d  f } n  t j |  |  Sd S(   s   
    Runs a WSGI-compatible `func` using FCGI, SCGI, or a simple web server,
    as appropriate based on context and `sys.argv`.
    t   SERVER_SOFTWAREt   Yt   FCGI_FORCE_CGIt   PHP_FCGI_CHILDRENR   t   fastcgii   i    R   t    t   PORTs   0.0.0.0N(   t   ost   environR   t   Nonet   syst   argvt   removeR   R   R   R   R   R   t	   runsimple(   R   t   argst   server_addr(    (    s”   /mnt/my-files/home/darkz3ro/Desktop/my files/malware analysing and devlopment/viruses codes and analysis/APT34-leat/MuddyC3v1.0.1-/muddyc3_v1.0.1/lib/web/wsgi.pyt   runwsgi   s.    c          C   s\   t  t d g   }  d t j k sT d t j k sT d |  k sT d |  k sT d |  k rX t St S(   NR$   R   R   R   R   t   mod_wsgi(   t   getattrR#   R    R!   R   R   (   R$   (    (    s”   /mnt/my-files/home/darkz3ro/Desktop/my files/malware analysing and devlopment/viruses codes and analysis/APT34-leat/MuddyC3v1.0.1-/muddyc3_v1.0.1/lib/web/wsgi.pyt   _is_dev_mode:   s    BR
   (   R   i@  (   R   i   (   t   __doc__R    R#   R   R    R   t   webt   utilsR   R   t   netR   R   R   R   R   R)   R,   t   configt
   setdefault(    (    (    s”   /mnt/my-files/home/darkz3ro/Desktop/my files/malware analysing and devlopment/viruses codes and analysis/APT34-leat/MuddyC3v1.0.1-/muddyc3_v1.0.1/lib/web/wsgi.pyt   <module>   s   	!	