Dre4m Shell
Server IP : 85.214.239.14  /  Your IP : 216.73.216.189
Web Server : Apache/2.4.65 (Debian)
System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Mon Sep 30 15:36:27 MSK 2024 x86_64
User : www-data ( 33)
PHP Version : 8.2.29
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /proc/self/root/proc/2/cwd/proc/2/cwd/srv/automx/instance/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /proc/self/root/proc/2/cwd/proc/2/cwd/srv/automx/instance/__pycache__/automx_wsgi.cpython-35.pyc


̨�^�.�@s�dZddlmZddlmZddlmZddlmZddlZddlZddlZddl	Z	ddl
mZddlm
Z
dd	lmZdd
lmZddlmZmZyLddlmZmZmZmZdd
lmZmZddlmZWnZek
rtddlmZmZddl mZmZddl!mZmZmZYnXddl"m#Z#ddl"m$Z$ddl%m&Z&ej'j(ej'j)ej'j*e+���dZ,dZ-dZ.dZ/dZ0dd�Z1dS)a�
automx - auto configuration service
Copyright (c) 2011-2013 [*] sys4 AG

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
�)�absolute_import)�division)�print_function)�unicode_literalsN)�escape)�StringIO)�etree)�XMLSyntaxError)�int�str)�urlparse�	urlencode�parse_qs�unquote)�urlopen�Request)�	HTTPError)rr)r
r)rrr)�Config)�DataNotFoundException)�Viewz1.1.1z'Christian Roessner, Patrick Ben Koetterz#Copyright (c) 2011-2015 [*] sys4 AGz200 OKz500 Internal Server ErrorcMCs�d}d}d}d}d}d}d}d}	t}
yt|�}	WnEtk
r�}z%d}t}
t|d|d�WYdd}~XnX|ry&tjd|	jddd	tj�Wn9t	k
r�}zt|d|d�WYdd}~XnX|d
}t
|�}|	jrstjdKd
dL�x1|j�D]#\}
}tjd|
|f�q7WtjdMddN�|dkr{yt
|jdd��}Wntk
r�d}YnX|dj|�}|	jr�tjd|jd��t|jd�jdd��}ytj|�}WnLtk
rnt|jd��}|dk	r^|	jrmtjt|��d|krO|dd}|dkr@|	jr�tjd�d|kr�|dd}|j�d|kr�|dd}|j�d|kr$|dd}|j�t}
d}qLtjd�d}t}
q[d}t}
qjd}t}
nd}t}
YqX|j�}d}|j|d d!�}t|�dkr�tjd"�d}t}
|	jj�qd#|dj kr�d$}n"d%|dj kr	d&}nd}|j|d d'�}t|�dkr_tjd(�d}t}
|	jj�q|dj }d)}t}
n|d*krt!d+d,�|d-|d.j"�fD��r�d}t}
n�|d/}t|�}|	jr�tjd0|�|dk	rfd|krJ|dd}|j�d1|kr;t#|�}t}
d2}qtjd3�d}t}
ntj$d4�d}t}
|r�|	jr�tjd5�yY|	jj%�r�|	j&|||�n0d}t}
tjd6|	jj'�|d7f�Wn�t(k
rEd}t}
|	jj�tjd8|	jj'�|d7f�Yngtk
r�}zG|	jr|t)j*�}tj$|�ntj$d9|�d}t}
WYdd}~XnX|rf|	jr�tjd:�y:t+|	||�}|j,�}t|�dkrt}
Wnatk
re}zA|	jr<t)j*�}tj$|�ntj$d;|�t}
WYdd}~XnX|r�|	jr�|dkr�d<|	j-kr�|	j-d<dkr�tjd=�nCt.j/dOkr�tjd?|jd��ntjtd@|��tt|��}dAdB�}|dPkrA|dCdD�|dE|�g}nW|dkrz|dCdF�|dGdH�|dE|�g}n|dCdI�|dE|�g}t.j/dQkr�|
j0dJ�}
||
|�|gS)RN�TF�filezwsgi.errors�filename�formatz&%(asctime)s %(levelname)s: %(message)s�levelZREQUEST_METHOD�-�z BEGIN environ z%s: %sz
 END environ ZPOSTZCONTENT_LENGTHrz
wsgi.inputzRequest POST (raw)
zutf-8z&<?xml version="1.0" encoding="utf-8"?>Z
_mobileconfig�truez%Requesting mobileconfig configuration�cn�password�emailaddress�mobileconfigzError in mobileconfig request!z//*[local-name() = $name]�nameZAcceptableResponseSchemazError in XML requestz/mobilesync/Zmobilez	/outlook/ZoutlookZEMailAddresszError in autodiscover request!�autodiscoverZGETcss|]}d|kVqdS)r#N�)�.0�sr$r$�./automx_wsgi.py�	<genexpr>�szapplication.<locals>.<genexpr>Z	HTTP_HOSTZREQUEST_URIZQUERY_STRINGzRequest GET: QUERY_STRING: %s�@�
autoconfigzError in autoconfig request!z!Request GET: QUERY_STRING failed!zEntering data.configure()zRequest %d [%s] blocked!ZREMOTE_ADDRzRequest %d [%s]zdata.configure(): %szEntering view()zview.render(): %sZsign_mobileconfigz,No debugging output for signed mobileconfig!�z
Response:
zResponse:
%scSs9tjdkr+|jd�|jd�fS||fSdS)z�Auto-enocde to ascii; Make headers compatible for Py2/Py3

        :param key: header key
        :param value: header value
        :return: auto encoded tuple
        r+�asciiN)r+)�sys�version_info�encode)�key�valuer$r$r'�aenc!szapplication.<locals>.aenczContent-Typeztext/xmlzContent-Lengthz/application/x-apple-aspen-config; charset=utf-8zContent-Dispositionz*attachment; filename="company.mobileconfigz	text/htmlr,z---------------z---------------z---------------z---------------)r+)r*r#)r+)1�STAT_OKr�	Exception�STAT_ERR�print�loggingZbasicConfigZlogfile�DEBUG�IOErrorr�debug�itemsr
�get�
ValueError�read�decoder�replacer�parser	rr�stripZwarningZgetrootZxpath�lenZmemcacheZ
set_client�text�any�lowerr�errorZallow_clientZ	configureZcounterr�	tracebackZ
format_excrZrenderZdomainr-r.r/)�environ�start_responseZ
response_bodyrr rZschemaZ	subschemaZprocess�dataZstatus�eZrequest_method�k�vZrequest_body_sizeZrequest_body�fdZtree�dr!�rootZexprZresponse_schemaZemailaddressesZqs�tbZviewZbody_lenr2Zresponse_headersr$r$r'�applicationBsl''
	
		
		



	
				
		

	!	
	
	
	
	
	

		

		
rS)2�__doc__Z
__future__rrrr�osr-rHr7Zhtmlr�iorZlxmlrZ
lxml.etreer	�builtinsr
rZurllib.parserr
rrZurllib.requestrrZurllib.errorr�ImportErrorZurllibZurllib2Z
automx.configrrZautomx.viewr�path�append�dirname�realpath�__file__�__version__�
__author__Z
__copyright__r3r5rSr$r$r$r'�<module>s>"
!(

Anon7 - 2022
AnonSec Team