├── .gitignore
├── README.md
├── SwitchyOmega
├── OmegaOptions.bak
├── SwitchyOmega.crx
└── y.autoproxy.xpi
├── gae_proxy
├── __init__.py
├── babel.config
├── lang
│ ├── de_DE
│ │ └── LC_MESSAGES
│ │ │ └── messages.po
│ ├── es_VE
│ │ └── LC_MESSAGES
│ │ │ └── messages.po
│ ├── fa_IR
│ │ └── LC_MESSAGES
│ │ │ └── messages.po
│ ├── ja_JP
│ │ └── LC_MESSAGES
│ │ │ └── messages.po
│ └── zh_CN
│ │ └── LC_MESSAGES
│ │ └── messages.po
├── local
│ ├── __init__.py
│ ├── appids_manager.py
│ ├── cacert.pem
│ ├── cert_util.py
│ ├── check_ip.py
│ ├── check_local_network.py
│ ├── config.py
│ ├── connect_control.py
│ ├── connect_manager.py
│ ├── direct_handler.py
│ ├── env_info.py
│ ├── gae_handler.py
│ ├── generate_ip_range.py
│ ├── good_ip.txt
│ ├── good_ipv6.txt
│ ├── google_ip.py
│ ├── google_ip_range.py
│ ├── ip_range.txt
│ ├── ip_utils.py
│ ├── need_proxy_http.conf
│ ├── need_proxy_http.py
│ ├── openssl_wrap.py
│ ├── pac_server.py
│ ├── proxy.ini
│ ├── proxy.pac
│ ├── proxy.py
│ ├── proxy_handler.py
│ ├── scan_ip_log.py
│ ├── test_appid.py
│ └── web_control.py
├── pybabel_update.sh
├── server
│ ├── .gitignore
│ ├── README.md
│ ├── gae
│ │ ├── app.template.yaml
│ │ ├── gae.py
│ │ ├── legacy.py
│ │ └── wsgi.py
│ ├── lib
│ │ ├── VERSION
│ │ ├── antlr3
│ │ │ ├── __init__.py
│ │ │ ├── compat.py
│ │ │ ├── constants.py
│ │ │ ├── dfa.py
│ │ │ ├── exceptions.py
│ │ │ ├── recognizers.py
│ │ │ ├── streams.py
│ │ │ └── tokens.py
│ │ ├── google
│ │ │ ├── __init__.py
│ │ │ ├── appengine
│ │ │ │ ├── __init__.py
│ │ │ │ ├── _internal
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── antlr3
│ │ │ │ │ │ ├── __init__.py
│ │ │ │ │ │ ├── compat.py
│ │ │ │ │ │ ├── constants.py
│ │ │ │ │ │ ├── dfa.py
│ │ │ │ │ │ ├── exceptions.py
│ │ │ │ │ │ ├── recognizers.py
│ │ │ │ │ │ ├── streams.py
│ │ │ │ │ │ ├── tokens.py
│ │ │ │ │ │ └── tree.py
│ │ │ │ ├── api
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── api_base_pb.py
│ │ │ │ │ ├── apiproxy_rpc.py
│ │ │ │ │ ├── apiproxy_stub_map.py
│ │ │ │ │ ├── app_identity
│ │ │ │ │ │ ├── __init__.py
│ │ │ │ │ │ ├── app_identity.py
│ │ │ │ │ │ └── app_identity_service_pb.py
│ │ │ │ │ ├── appinfo.py
│ │ │ │ │ ├── appinfo_errors.py
│ │ │ │ │ ├── appinfo_includes.py
│ │ │ │ │ ├── backendinfo.py
│ │ │ │ │ ├── blobstore
│ │ │ │ │ │ ├── __init__.py
│ │ │ │ │ │ ├── blobstore.py
│ │ │ │ │ │ └── blobstore_service_pb.py
│ │ │ │ │ ├── capabilities
│ │ │ │ │ │ ├── __init__.py
│ │ │ │ │ │ └── capability_service_pb.py
│ │ │ │ │ ├── channel
│ │ │ │ │ │ ├── __init__.py
│ │ │ │ │ │ ├── channel.py
│ │ │ │ │ │ └── channel_service_pb.py
│ │ │ │ │ ├── client_deployinfo.py
│ │ │ │ │ ├── croninfo.py
│ │ │ │ │ ├── datastore.py
│ │ │ │ │ ├── datastore_errors.py
│ │ │ │ │ ├── datastore_types.py
│ │ │ │ │ ├── dispatchinfo.py
│ │ │ │ │ ├── dosinfo.py
│ │ │ │ │ ├── files
│ │ │ │ │ │ ├── __init__.py
│ │ │ │ │ │ ├── blobstore.py
│ │ │ │ │ │ ├── file.py
│ │ │ │ │ │ ├── file_service_pb.py
│ │ │ │ │ │ ├── gs.py
│ │ │ │ │ │ └── shuffler.py
│ │ │ │ │ ├── images
│ │ │ │ │ │ ├── __init__.py
│ │ │ │ │ │ └── images_service_pb.py
│ │ │ │ │ ├── lib_config.py
│ │ │ │ │ ├── logservice
│ │ │ │ │ │ ├── __init__.py
│ │ │ │ │ │ ├── log_service_pb.py
│ │ │ │ │ │ ├── logservice.py
│ │ │ │ │ │ └── logsutil.py
│ │ │ │ │ ├── mail_service_pb.py
│ │ │ │ │ ├── memcache
│ │ │ │ │ │ ├── __init__.py
│ │ │ │ │ │ └── memcache_service_pb.py
│ │ │ │ │ ├── modules
│ │ │ │ │ │ ├── __init__.py
│ │ │ │ │ │ ├── modules.py
│ │ │ │ │ │ └── modules_service_pb.py
│ │ │ │ │ ├── namespace_manager
│ │ │ │ │ │ ├── __init__.py
│ │ │ │ │ │ └── namespace_manager.py
│ │ │ │ │ ├── pagespeedinfo.py
│ │ │ │ │ ├── prospective_search
│ │ │ │ │ │ ├── __init__.py
│ │ │ │ │ │ ├── error_pb.py
│ │ │ │ │ │ ├── prospective_search.py
│ │ │ │ │ │ ├── prospective_search_admin.py
│ │ │ │ │ │ └── prospective_search_pb.py
│ │ │ │ │ ├── queueinfo.py
│ │ │ │ │ ├── remote_socket
│ │ │ │ │ │ ├── __init__.py
│ │ │ │ │ │ └── remote_socket_service_pb.py
│ │ │ │ │ ├── search
│ │ │ │ │ │ ├── ExpressionLexer.py
│ │ │ │ │ │ ├── ExpressionParser.py
│ │ │ │ │ │ ├── QueryLexer.py
│ │ │ │ │ │ ├── QueryParser.py
│ │ │ │ │ │ ├── __init__.py
│ │ │ │ │ │ ├── expression_parser.py
│ │ │ │ │ │ ├── query_parser.py
│ │ │ │ │ │ ├── search.py
│ │ │ │ │ │ ├── search_service_pb.py
│ │ │ │ │ │ └── search_util.py
│ │ │ │ │ ├── source_pb.py
│ │ │ │ │ ├── system
│ │ │ │ │ │ ├── __init__.py
│ │ │ │ │ │ └── system_service_pb.py
│ │ │ │ │ ├── taskqueue
│ │ │ │ │ │ ├── __init__.py
│ │ │ │ │ │ ├── taskqueue.py
│ │ │ │ │ │ └── taskqueue_service_pb.py
│ │ │ │ │ ├── urlfetch.py
│ │ │ │ │ ├── urlfetch_errors.py
│ │ │ │ │ ├── urlfetch_service_pb.py
│ │ │ │ │ ├── user_service_pb.py
│ │ │ │ │ ├── users.py
│ │ │ │ │ ├── validation.py
│ │ │ │ │ ├── xmpp
│ │ │ │ │ │ ├── __init__.py
│ │ │ │ │ │ └── xmpp_service_pb.py
│ │ │ │ │ ├── yaml_builder.py
│ │ │ │ │ ├── yaml_errors.py
│ │ │ │ │ ├── yaml_listener.py
│ │ │ │ │ └── yaml_object.py
│ │ │ │ ├── base
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── capabilities_pb.py
│ │ │ │ ├── cron
│ │ │ │ │ ├── GrocLexer.py
│ │ │ │ │ ├── GrocParser.py
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── groc.py
│ │ │ │ │ └── groctimespecification.py
│ │ │ │ ├── datastore
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── action_pb.py
│ │ │ │ │ ├── datastore_index.py
│ │ │ │ │ ├── datastore_index_xml.py
│ │ │ │ │ ├── datastore_pb.py
│ │ │ │ │ ├── datastore_pbs.py
│ │ │ │ │ ├── datastore_query.py
│ │ │ │ │ ├── datastore_rpc.py
│ │ │ │ │ ├── datastore_v3_pb.py
│ │ │ │ │ ├── datastore_v4_pb.py
│ │ │ │ │ ├── document_pb.py
│ │ │ │ │ ├── entity_pb.py
│ │ │ │ │ ├── entity_v4_pb.py
│ │ │ │ │ ├── snapshot_pb.py
│ │ │ │ │ └── sortable_pb_encoder.py
│ │ │ │ ├── ext
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── blobstore
│ │ │ │ │ │ ├── __init__.py
│ │ │ │ │ │ └── blobstore.py
│ │ │ │ │ ├── builtins
│ │ │ │ │ │ ├── __init__.py
│ │ │ │ │ │ └── default
│ │ │ │ │ │ │ ├── include-python27.yaml
│ │ │ │ │ │ │ └── include.yaml
│ │ │ │ │ ├── bulkload
│ │ │ │ │ │ ├── __init__.py
│ │ │ │ │ │ ├── bulkload_deprecated.py
│ │ │ │ │ │ ├── bulkloader_config.py
│ │ │ │ │ │ ├── bulkloader_errors.py
│ │ │ │ │ │ ├── bulkloader_parser.py
│ │ │ │ │ │ ├── connector_interface.py
│ │ │ │ │ │ ├── constants.py
│ │ │ │ │ │ ├── csv_connector.py
│ │ │ │ │ │ ├── simpletext_connector.py
│ │ │ │ │ │ └── simplexml_connector.py
│ │ │ │ │ ├── db
│ │ │ │ │ │ ├── __init__.py
│ │ │ │ │ │ ├── polymodel.py
│ │ │ │ │ │ └── stats.py
│ │ │ │ │ ├── gql
│ │ │ │ │ │ └── __init__.py
│ │ │ │ │ ├── key_range
│ │ │ │ │ │ └── __init__.py
│ │ │ │ │ ├── ndb
│ │ │ │ │ │ ├── __init__.py
│ │ │ │ │ │ ├── context.py
│ │ │ │ │ │ ├── eventloop.py
│ │ │ │ │ │ ├── google_imports.py
│ │ │ │ │ │ ├── key.py
│ │ │ │ │ │ ├── model.py
│ │ │ │ │ │ ├── query.py
│ │ │ │ │ │ ├── tasklets.py
│ │ │ │ │ │ └── utils.py
│ │ │ │ │ ├── remote_api
│ │ │ │ │ │ ├── __init__.py
│ │ │ │ │ │ ├── remote_api_pb.py
│ │ │ │ │ │ ├── remote_api_services.py
│ │ │ │ │ │ ├── remote_api_stub.py
│ │ │ │ │ │ └── throttle.py
│ │ │ │ │ └── webapp
│ │ │ │ │ │ ├── __init__.py
│ │ │ │ │ │ └── _webapp25.py
│ │ │ │ ├── runtime
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── apiproxy.py
│ │ │ │ │ ├── apiproxy_errors.py
│ │ │ │ │ └── features
│ │ │ │ │ │ └── __init__.py
│ │ │ │ └── tools
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── adaptive_thread_pool.py
│ │ │ │ │ ├── app_engine_config_exception.py
│ │ │ │ │ ├── app_engine_web_xml_parser.py
│ │ │ │ │ ├── appcfg.py
│ │ │ │ │ ├── appcfg_java.py
│ │ │ │ │ ├── appengine_rpc.py
│ │ │ │ │ ├── appengine_rpc_httplib2.py
│ │ │ │ │ ├── augment_mimetypes.py
│ │ │ │ │ ├── backends_xml_parser.py
│ │ │ │ │ ├── bulkloader.py
│ │ │ │ │ ├── cron_xml_parser.py
│ │ │ │ │ ├── dispatch_xml_parser.py
│ │ │ │ │ ├── dos_xml_parser.py
│ │ │ │ │ ├── handler.py
│ │ │ │ │ ├── handler_generator.py
│ │ │ │ │ ├── jarfile.py
│ │ │ │ │ ├── java_quickstart.py
│ │ │ │ │ ├── java_utils.py
│ │ │ │ │ ├── queue_xml_parser.py
│ │ │ │ │ ├── requeue.py
│ │ │ │ │ ├── sdk_update_checker.py
│ │ │ │ │ ├── value_mixin.py
│ │ │ │ │ ├── web_xml_parser.py
│ │ │ │ │ ├── xml_parser_utils.py
│ │ │ │ │ └── yaml_translator.py
│ │ │ └── net
│ │ │ │ ├── __init__.py
│ │ │ │ └── proto
│ │ │ │ ├── ProtocolBuffer.py
│ │ │ │ ├── __init__.py
│ │ │ │ └── message_set.py
│ │ ├── httplib2
│ │ │ ├── __init__.py
│ │ │ ├── iri2uri.py
│ │ │ └── socks.py
│ │ ├── ipaddr
│ │ │ └── __init__.py
│ │ ├── oauth2client
│ │ │ ├── __init__.py
│ │ │ ├── client.py
│ │ │ ├── clientsecrets.py
│ │ │ ├── crypt.py
│ │ │ ├── devshell.py
│ │ │ ├── file.py
│ │ │ ├── old_run.py
│ │ │ ├── tools.py
│ │ │ └── util.py
│ │ ├── six
│ │ │ └── __init__.py
│ │ └── webob
│ │ │ ├── __init__.py
│ │ │ ├── acceptparse.py
│ │ │ ├── byterange.py
│ │ │ ├── cachecontrol.py
│ │ │ ├── compat.py
│ │ │ ├── cookies.py
│ │ │ ├── datetime_utils.py
│ │ │ ├── descriptors.py
│ │ │ ├── etag.py
│ │ │ ├── exc.py
│ │ │ ├── headers.py
│ │ │ ├── multidict.py
│ │ │ ├── request.py
│ │ │ ├── response.py
│ │ │ └── util.py
│ ├── uploader.bat
│ └── uploader.py
├── setup.py
├── start.py
└── web_ui
│ ├── advanced.html
│ ├── check_ip.html
│ ├── config.html
│ ├── deploy.html
│ ├── export_ip.html
│ ├── import_ip.html
│ ├── logging.html
│ ├── menu.yaml
│ ├── scan_log.html
│ ├── scan_setting.html
│ └── status.html
├── launcher
├── LICENSE.txt
├── autorun.py
├── babel.config
├── config.py
├── create_shortcut.js
├── download.md
├── gtk_tray.py
├── instances.py
├── lang
│ ├── de_DE
│ │ └── LC_MESSAGES
│ │ │ └── messages.po
│ ├── en_US
│ │ └── LC_MESSAGES
│ │ │ └── messages.po
│ ├── es_VE
│ │ └── LC_MESSAGES
│ │ │ └── messages.po
│ ├── fa_IR
│ │ └── LC_MESSAGES
│ │ │ └── messages.po
│ ├── ja_JP
│ │ └── LC_MESSAGES
│ │ │ └── messages.po
│ └── zh_CN
│ │ └── LC_MESSAGES
│ │ └── messages.po
├── mac_helper
├── mac_helper.c
├── mac_tray.py
├── module_init.py
├── non_tray.py
├── pybabel_update.sh
├── setup.py
├── setup_win_python.py
├── simple_i18n.py
├── start.py
├── update.py
├── update_from_github.py
├── version.txt
├── web_control.py
├── web_ui
│ ├── about.html
│ ├── config.html
│ ├── css
│ │ ├── bootstrap-responsive.css
│ │ ├── bootstrap.css
│ │ ├── flat-ui.css
│ │ ├── ladda-themeless.min.css
│ │ └── style.css
│ ├── favicon-mac.ico
│ ├── favicon.ico
│ ├── img
│ │ ├── fixed-width.png
│ │ ├── full-width.png
│ │ ├── glyphicons-halflings-white.png
│ │ ├── glyphicons-halflings.png
│ │ ├── logo.png
│ │ ├── quit.png
│ │ └── switch-mask.png
│ ├── index.html
│ ├── js
│ │ ├── bootstrap.min.js
│ │ ├── flat-ui.min.js
│ │ ├── jquery-1.11.2.min.js
│ │ ├── jquery.placeholder.min.js
│ │ ├── jquery.timer.js
│ │ ├── jquery.xdomainrequest.min.js
│ │ ├── ladda.min.js
│ │ ├── site.js
│ │ └── spin.min.js
│ └── menu.yaml
├── win_tray.py
└── xx_net.sh
├── php_proxy
├── babel.config
├── lang
│ └── zh_CN
│ │ └── LC_MESSAGES
│ │ └── messages.po
├── local
│ ├── __init__.py
│ ├── cacert.pem
│ ├── cert_util.py
│ ├── logging.py
│ ├── proxy.ini
│ ├── proxy.py
│ ├── proxylib.py
│ └── web_control.py
├── pybabel_update.sh
├── server
│ ├── index.js
│ ├── index.php
│ ├── index.py
│ └── relay.php
├── setup.py
├── start.py
└── web_ui
│ ├── config.html
│ ├── logging.html
│ └── menu.yaml
├── python27
└── 1.0
│ ├── Microsoft.VC90.CRT.manifest
│ ├── WinSxS
│ ├── Manifests
│ │ ├── x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.30729.6161_x-ww_31a54e43.cat
│ │ └── x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.30729.6161_x-ww_31a54e43.manifest
│ ├── Policies
│ │ └── x86_policy.9.0.Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_x-ww_b7353f75
│ │ │ ├── 9.0.30729.6161.cat
│ │ │ └── 9.0.30729.6161.policy
│ └── x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.30729.6161_x-ww_31a54e43
│ │ ├── msvcm90.dll
│ │ ├── msvcp90.dll
│ │ └── msvcr90.dll
│ ├── lib
│ ├── BaseHTTPServer.py
│ ├── ConfigParser.py
│ ├── Cookie.py
│ ├── Queue.py
│ ├── SimpleHTTPServer.py
│ ├── SocketServer.py
│ ├── StringIO.py
│ ├── UserDict.py
│ ├── _LWPCookieJar.py
│ ├── _MozillaCookieJar.py
│ ├── __future__.py
│ ├── _abcoll.py
│ ├── _ctypes.pyd
│ ├── _elementtree.pyd
│ ├── _hashlib.pyd
│ ├── _socket.pyd
│ ├── _ssl.pyd
│ ├── _strptime.py
│ ├── _threading_local.py
│ ├── _weakrefset.py
│ ├── abc.py
│ ├── atexit.py
│ ├── base64.py
│ ├── bdb.py
│ ├── bisect.py
│ ├── bz2.pyd
│ ├── calendar.py
│ ├── cgi.py
│ ├── cmd.py
│ ├── code.py
│ ├── codecs.py
│ ├── codeop.py
│ ├── collections.py
│ ├── contextlib.py
│ ├── cookielib.py
│ ├── copy.py
│ ├── copy_reg.py
│ ├── crypto
│ │ ├── __init__.py
│ │ ├── py3AES.py
│ │ └── py3PBKDF2.py
│ ├── csv.py
│ ├── ctypes
│ │ ├── __init__.py
│ │ ├── _endian.py
│ │ ├── util.py
│ │ └── wintypes.py
│ ├── darwin
│ │ ├── OpenSSL
│ │ │ ├── SSL.so
│ │ │ ├── __init__.py
│ │ │ ├── crypto.so
│ │ │ ├── rand.so
│ │ │ ├── test
│ │ │ │ ├── __init__.py
│ │ │ │ ├── test_crypto.py
│ │ │ │ ├── test_rand.py
│ │ │ │ ├── test_ssl.py
│ │ │ │ └── util.py
│ │ │ ├── tsafe.py
│ │ │ └── version.py
│ │ ├── gevent
│ │ │ ├── __init__.py
│ │ │ ├── _semaphore.py
│ │ │ ├── _semaphore.so
│ │ │ ├── _threading.py
│ │ │ ├── _util.py
│ │ │ ├── _util.so
│ │ │ ├── ares.py
│ │ │ ├── ares.so
│ │ │ ├── backdoor.py
│ │ │ ├── baseserver.py
│ │ │ ├── core.py
│ │ │ ├── core.so
│ │ │ ├── coros.py
│ │ │ ├── event.py
│ │ │ ├── fileobject.py
│ │ │ ├── greenlet.py
│ │ │ ├── hub.py
│ │ │ ├── local.py
│ │ │ ├── lock.py
│ │ │ ├── monkey.py
│ │ │ ├── os.py
│ │ │ ├── pool.py
│ │ │ ├── pywsgi.py
│ │ │ ├── queue.py
│ │ │ ├── resolver_ares.py
│ │ │ ├── resolver_thread.py
│ │ │ ├── select.py
│ │ │ ├── server.py
│ │ │ ├── socket.py
│ │ │ ├── ssl.py
│ │ │ ├── subprocess.py
│ │ │ ├── thread.py
│ │ │ ├── threading.py
│ │ │ ├── threadpool.py
│ │ │ ├── timeout.py
│ │ │ ├── util.py
│ │ │ ├── win32util.py
│ │ │ └── wsgi.py
│ │ └── greenlet
│ │ │ ├── __init__.py
│ │ │ └── greenlet.so
│ ├── difflib.py
│ ├── dis.py
│ ├── distutils
│ │ ├── __init__.py
│ │ └── version.py
│ ├── doctest.py
│ ├── dummy_thread.py
│ ├── dummy_threading.py
│ ├── email
│ │ ├── __init__.py
│ │ ├── _parseaddr.py
│ │ ├── base64mime.py
│ │ ├── charset.py
│ │ ├── encoders.py
│ │ ├── errors.py
│ │ ├── feedparser.py
│ │ ├── generator.py
│ │ ├── header.py
│ │ ├── iterators.py
│ │ ├── message.py
│ │ ├── mime
│ │ │ ├── __init__.py
│ │ │ ├── application.py
│ │ │ ├── audio.py
│ │ │ ├── base.py
│ │ │ ├── image.py
│ │ │ ├── message.py
│ │ │ ├── multipart.py
│ │ │ ├── nonmultipart.py
│ │ │ └── text.py
│ │ ├── parser.py
│ │ ├── quoprimime.py
│ │ ├── test
│ │ │ ├── __init__.py
│ │ │ ├── test_email.py
│ │ │ ├── test_email_codecs.py
│ │ │ ├── test_email_codecs_renamed.py
│ │ │ ├── test_email_renamed.py
│ │ │ └── test_email_torture.py
│ │ └── utils.py
│ ├── encodings
│ │ ├── __init__.py
│ │ ├── aliases.py
│ │ ├── ascii.py
│ │ ├── base64_codec.py
│ │ ├── big5.py
│ │ ├── big5hkscs.py
│ │ ├── bz2_codec.py
│ │ ├── charmap.py
│ │ ├── cp037.py
│ │ ├── cp1006.py
│ │ ├── cp1026.py
│ │ ├── cp1140.py
│ │ ├── cp1250.py
│ │ ├── cp1251.py
│ │ ├── cp1252.py
│ │ ├── cp1253.py
│ │ ├── cp1254.py
│ │ ├── cp1255.py
│ │ ├── cp1256.py
│ │ ├── cp1257.py
│ │ ├── cp1258.py
│ │ ├── cp424.py
│ │ ├── cp437.py
│ │ ├── cp500.py
│ │ ├── cp720.py
│ │ ├── cp737.py
│ │ ├── cp775.py
│ │ ├── cp850.py
│ │ ├── cp852.py
│ │ ├── cp855.py
│ │ ├── cp856.py
│ │ ├── cp857.py
│ │ ├── cp858.py
│ │ ├── cp860.py
│ │ ├── cp861.py
│ │ ├── cp862.py
│ │ ├── cp863.py
│ │ ├── cp864.py
│ │ ├── cp865.py
│ │ ├── cp866.py
│ │ ├── cp869.py
│ │ ├── cp874.py
│ │ ├── cp875.py
│ │ ├── cp932.py
│ │ ├── cp949.py
│ │ ├── cp950.py
│ │ ├── euc_jis_2004.py
│ │ ├── euc_jisx0213.py
│ │ ├── euc_jp.py
│ │ ├── euc_kr.py
│ │ ├── gb18030.py
│ │ ├── gb2312.py
│ │ ├── gbk.py
│ │ ├── hex_codec.py
│ │ ├── hp_roman8.py
│ │ ├── hz.py
│ │ ├── idna.py
│ │ ├── iso2022_jp.py
│ │ ├── iso2022_jp_1.py
│ │ ├── iso2022_jp_2.py
│ │ ├── iso2022_jp_2004.py
│ │ ├── iso2022_jp_3.py
│ │ ├── iso2022_jp_ext.py
│ │ ├── iso2022_kr.py
│ │ ├── iso8859_1.py
│ │ ├── iso8859_10.py
│ │ ├── iso8859_11.py
│ │ ├── iso8859_13.py
│ │ ├── iso8859_14.py
│ │ ├── iso8859_15.py
│ │ ├── iso8859_16.py
│ │ ├── iso8859_2.py
│ │ ├── iso8859_3.py
│ │ ├── iso8859_4.py
│ │ ├── iso8859_5.py
│ │ ├── iso8859_6.py
│ │ ├── iso8859_7.py
│ │ ├── iso8859_8.py
│ │ ├── iso8859_9.py
│ │ ├── johab.py
│ │ ├── koi8_r.py
│ │ ├── koi8_u.py
│ │ ├── latin_1.py
│ │ ├── mac_arabic.py
│ │ ├── mac_centeuro.py
│ │ ├── mac_croatian.py
│ │ ├── mac_cyrillic.py
│ │ ├── mac_farsi.py
│ │ ├── mac_greek.py
│ │ ├── mac_iceland.py
│ │ ├── mac_latin2.py
│ │ ├── mac_roman.py
│ │ ├── mac_romanian.py
│ │ ├── mac_turkish.py
│ │ ├── mbcs.py
│ │ ├── palmos.py
│ │ ├── ptcp154.py
│ │ ├── punycode.py
│ │ ├── quopri_codec.py
│ │ ├── raw_unicode_escape.py
│ │ ├── rot_13.py
│ │ ├── shift_jis.py
│ │ ├── shift_jis_2004.py
│ │ ├── shift_jisx0213.py
│ │ ├── string_escape.py
│ │ ├── tis_620.py
│ │ ├── undefined.py
│ │ ├── unicode_escape.py
│ │ ├── unicode_internal.py
│ │ ├── utf_16.py
│ │ ├── utf_16_be.py
│ │ ├── utf_16_le.py
│ │ ├── utf_32.py
│ │ ├── utf_32_be.py
│ │ ├── utf_32_le.py
│ │ ├── utf_7.py
│ │ ├── utf_8.py
│ │ ├── utf_8_sig.py
│ │ ├── uu_codec.py
│ │ └── zlib_codec.py
│ ├── fnmatch.py
│ ├── ftplib.py
│ ├── functools.py
│ ├── genericpath.py
│ ├── getopt.py
│ ├── getpass.py
│ ├── gettext.py
│ ├── glob.py
│ ├── gzip.py
│ ├── hashlib.py
│ ├── heapq.py
│ ├── hmac.py
│ ├── httplib.py
│ ├── inspect.py
│ ├── io.py
│ ├── json
│ │ ├── __init__.py
│ │ ├── decoder.py
│ │ ├── encoder.py
│ │ ├── scanner.py
│ │ └── tool.py
│ ├── keyword.py
│ ├── linecache.py
│ ├── linux
│ │ ├── OpenSSL
│ │ │ ├── SSL.so
│ │ │ ├── __init__.py
│ │ │ ├── crypto.so
│ │ │ ├── rand.so
│ │ │ └── version.py
│ │ ├── gevent
│ │ │ ├── __init__.py
│ │ │ ├── backdoor.py
│ │ │ ├── baseserver.py
│ │ │ ├── core.so
│ │ │ ├── coros.py
│ │ │ ├── dns.py
│ │ │ ├── event.py
│ │ │ ├── greenlet.py
│ │ │ ├── http.py
│ │ │ ├── httplib.py
│ │ │ ├── hub.py
│ │ │ ├── local.py
│ │ │ ├── monkey.py
│ │ │ ├── pool.py
│ │ │ ├── pywsgi.py
│ │ │ ├── queue.py
│ │ │ ├── rawgreenlet.py
│ │ │ ├── select.py
│ │ │ ├── server.py
│ │ │ ├── socket.py
│ │ │ ├── ssl.py
│ │ │ ├── sslold.py
│ │ │ ├── thread.py
│ │ │ ├── timeout.py
│ │ │ ├── util.py
│ │ │ ├── win32util.py
│ │ │ └── wsgi.py
│ │ └── greenlet
│ │ │ ├── __init__.py
│ │ │ ├── greenlet-i686.so
│ │ │ ├── greenlet-mips.so
│ │ │ └── greenlet-x86_64.so
│ ├── locale.py
│ ├── logging
│ │ └── __init__.py
│ ├── mimetools.py
│ ├── mimetypes.py
│ ├── noarch
│ │ ├── dnslib
│ │ │ ├── __init__.py
│ │ │ ├── bimap.py
│ │ │ ├── bit.py
│ │ │ ├── buffer.py
│ │ │ ├── client.py
│ │ │ ├── digparser.py
│ │ │ ├── dns.py
│ │ │ ├── fixedresolver.py
│ │ │ ├── intercept.py
│ │ │ ├── label.py
│ │ │ ├── lex.py
│ │ │ ├── proxy.py
│ │ │ ├── ranges.py
│ │ │ ├── server.py
│ │ │ ├── shellresolver.py
│ │ │ ├── test_decode.py
│ │ │ └── zoneresolver.py
│ │ ├── encrypt.py
│ │ ├── pyasn1
│ │ │ ├── __init__.py
│ │ │ ├── codec
│ │ │ │ ├── __init__.py
│ │ │ │ ├── ber
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── decoder.py
│ │ │ │ │ ├── encoder.py
│ │ │ │ │ └── eoo.py
│ │ │ │ ├── cer
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── decoder.py
│ │ │ │ │ └── encoder.py
│ │ │ │ └── der
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── decoder.py
│ │ │ │ │ └── encoder.py
│ │ │ ├── compat
│ │ │ │ ├── __init__.py
│ │ │ │ └── octets.py
│ │ │ ├── debug.py
│ │ │ ├── error.py
│ │ │ └── type
│ │ │ │ ├── __init__.py
│ │ │ │ ├── base.py
│ │ │ │ ├── char.py
│ │ │ │ ├── constraint.py
│ │ │ │ ├── error.py
│ │ │ │ ├── namedtype.py
│ │ │ │ ├── namedval.py
│ │ │ │ ├── tag.py
│ │ │ │ ├── tagmap.py
│ │ │ │ ├── univ.py
│ │ │ │ └── useful.py
│ │ ├── scrypto
│ │ │ ├── __init__.py
│ │ │ ├── ctypes_openssl.py
│ │ │ ├── m2.py
│ │ │ ├── rc4_md5.py
│ │ │ ├── salsa20_ctr.py
│ │ │ ├── table.py
│ │ │ └── util.py
│ │ ├── simple_http_client.py
│ │ ├── simple_http_server.py
│ │ ├── socks.py
│ │ ├── sortedcontainers
│ │ │ ├── __init__.py
│ │ │ ├── sorteddict.py
│ │ │ ├── sortedlist.py
│ │ │ ├── sortedlistwithkey.py
│ │ │ └── sortedset.py
│ │ ├── utils.py
│ │ ├── xconfig.py
│ │ ├── xlog.py
│ │ └── yaml
│ │ │ ├── __init__.py
│ │ │ ├── composer.py
│ │ │ ├── constructor.py
│ │ │ ├── cyaml.py
│ │ │ ├── dumper.py
│ │ │ ├── emitter.py
│ │ │ ├── error.py
│ │ │ ├── events.py
│ │ │ ├── loader.py
│ │ │ ├── nodes.py
│ │ │ ├── parser.py
│ │ │ ├── reader.py
│ │ │ ├── representer.py
│ │ │ ├── resolver.py
│ │ │ ├── scanner.py
│ │ │ ├── serializer.py
│ │ │ └── tokens.py
│ ├── ntpath.py
│ ├── nturl2path.py
│ ├── opcode.py
│ ├── optparse.py
│ ├── os.py
│ ├── os2emxpath.py
│ ├── pdb.py
│ ├── pickle.py
│ ├── pkgutil.py
│ ├── platform.py
│ ├── posixpath.py
│ ├── pprint.py
│ ├── pyexpat.pyd
│ ├── quopri.py
│ ├── random.py
│ ├── re.py
│ ├── repr.py
│ ├── rfc822.py
│ ├── runpy.py
│ ├── select.pyd
│ ├── sets.py
│ ├── shlex.py
│ ├── shutil.py
│ ├── site.py
│ ├── smtplib.py
│ ├── socket.py
│ ├── sre.py
│ ├── sre_compile.py
│ ├── sre_constants.py
│ ├── sre_parse.py
│ ├── ssl.py
│ ├── stat.py
│ ├── string.py
│ ├── stringprep.py
│ ├── struct.py
│ ├── subprocess.py
│ ├── sysconfig.py
│ ├── tempfile.py
│ ├── textwrap.py
│ ├── threading.py
│ ├── token.py
│ ├── tokenize.py
│ ├── traceback.py
│ ├── types.py
│ ├── unicodedata.pyd
│ ├── urllib.py
│ ├── urllib2.py
│ ├── urlparse.py
│ ├── uu.py
│ ├── uuid.py
│ ├── warnings.py
│ ├── weakref.py
│ ├── webbrowser.py
│ ├── win32
│ │ ├── OpenSSL
│ │ │ ├── LIBEAY32.dll
│ │ │ ├── SSL.py
│ │ │ ├── SSL.pyd
│ │ │ ├── SSLEAY32.dll
│ │ │ ├── __init__.py
│ │ │ ├── crypto.py
│ │ │ ├── crypto.pyd
│ │ │ ├── rand.py
│ │ │ ├── rand.pyd
│ │ │ ├── tsafe.py
│ │ │ └── version.py
│ │ ├── gevent
│ │ │ ├── __init__.py
│ │ │ ├── _semaphore.py
│ │ │ ├── _semaphore.pyd
│ │ │ ├── _threading.py
│ │ │ ├── _util.py
│ │ │ ├── _util.pyd
│ │ │ ├── ares.py
│ │ │ ├── ares.pyd
│ │ │ ├── backdoor.py
│ │ │ ├── baseserver.py
│ │ │ ├── core.py
│ │ │ ├── core.pyd
│ │ │ ├── coros.py
│ │ │ ├── event.py
│ │ │ ├── fileobject.py
│ │ │ ├── greenlet.py
│ │ │ ├── hub.py
│ │ │ ├── local.py
│ │ │ ├── lock.py
│ │ │ ├── monkey.py
│ │ │ ├── os.py
│ │ │ ├── pool.py
│ │ │ ├── pywsgi.py
│ │ │ ├── queue.py
│ │ │ ├── resolver_ares.py
│ │ │ ├── resolver_thread.py
│ │ │ ├── select.py
│ │ │ ├── server.py
│ │ │ ├── socket.py
│ │ │ ├── ssl.py
│ │ │ ├── subprocess.py
│ │ │ ├── thread.py
│ │ │ ├── threading.py
│ │ │ ├── threadpool.py
│ │ │ ├── timeout.py
│ │ │ ├── util.py
│ │ │ ├── win32util.py
│ │ │ └── wsgi.py
│ │ ├── greenlet.py
│ │ ├── greenlet.pyd
│ │ ├── systray
│ │ │ ├── __init__.py
│ │ │ ├── traybar.py
│ │ │ └── win32_adapter.py
│ │ ├── unicodedata.lib
│ │ ├── unicodedata.pyd
│ │ ├── win32_proxy_manager.py
│ │ └── win32elevate.py
│ ├── wsgiref
│ │ ├── __init__.py
│ │ ├── handlers.py
│ │ ├── headers.py
│ │ ├── simple_server.py
│ │ ├── util.py
│ │ └── validate.py
│ ├── xml
│ │ ├── __init__.py
│ │ ├── dom
│ │ │ ├── NodeFilter.py
│ │ │ ├── __init__.py
│ │ │ ├── domreg.py
│ │ │ ├── expatbuilder.py
│ │ │ ├── minicompat.py
│ │ │ ├── minidom.py
│ │ │ ├── pulldom.py
│ │ │ └── xmlbuilder.py
│ │ ├── etree
│ │ │ ├── ElementInclude.py
│ │ │ ├── ElementPath.py
│ │ │ ├── ElementTree.py
│ │ │ ├── __init__.py
│ │ │ └── cElementTree.py
│ │ ├── parsers
│ │ │ ├── __init__.py
│ │ │ └── expat.py
│ │ └── sax
│ │ │ ├── __init__.py
│ │ │ ├── _exceptions.py
│ │ │ ├── expatreader.py
│ │ │ ├── handler.py
│ │ │ ├── saxutils.py
│ │ │ └── xmlreader.py
│ ├── zipextimporter.py
│ └── zipfile.py
│ ├── msvcr90.dll
│ ├── python.exe
│ ├── python27.dll
│ └── pythonw.exe
├── start.bat
├── start.command
├── start.lnk
├── start.sh
├── start.vbs
└── x_tunnel
├── __init__.py
├── babel.config
├── lang
└── zh_CN
│ └── LC_MESSAGES
│ └── messages.po
├── local
├── __init__.py
├── base_container.py
├── client.py
├── global_var.py
├── proxy_handler.py
├── proxy_session.py
└── web_control.py
├── pybabel_update.sh
├── start.py
└── web_ui
├── config.html
├── logging.html
└── menu.yaml
/.gitignore:
--------------------------------------------------------------------------------
1 | .idea
2 | data
3 | *~
4 | *.pyc
5 | *.swp
6 | *.pot
7 | *.mo
8 |
9 | .DS_Store
10 | desktop.ini
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | [中文文档](https://github.com/XX-net/XX-Net/wiki/%E4%B8%AD%E6%96%87%E6%96%87%E6%A1%A3)
2 |
3 | [English Home](https://github.com/XX-net/XX-Net/wiki/English-Home-Page)
4 |
5 | [فارسی صفحه اصلی](https://github.com/XX-net/XX-Net/wiki/Persian-home-page)
6 |
7 |
8 | XX-Net
9 | =================
10 | 翻墙工具套件
11 | * GAE proxy, 稳定、易用、快速
12 | * Web界面,人性化交互
13 |
14 |
15 | ## 下载(Download):
16 | https://github.com/XX-net/XX-Net/blob/master/launcher/download.md
17 |
18 |
19 | ## 链接
20 | | | |
21 | | -------- | :---- |
22 | |使用方法:|https://github.com/XX-net/XX-Net/wiki/使用方法|
23 | |更新历史:|https://github.com/XX-net/XX-Net/wiki/更新历史|
24 | |问题报告: |https://github.com/XX-net/XX-Net/issues|
25 | |讨论群: |https://groups.google.com/forum/#!forum/xx-net|
26 |
27 |
28 | ## 如何帮助项目
29 | https://github.com/XX-net/XX-Net/wiki/How-to-contribute
30 |
31 |
--------------------------------------------------------------------------------
/SwitchyOmega/SwitchyOmega.crx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Thobian/XX-Net/dd2fac14824caa6d6a0289298c937d7bace8b6af/SwitchyOmega/SwitchyOmega.crx
--------------------------------------------------------------------------------
/SwitchyOmega/y.autoproxy.xpi:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Thobian/XX-Net/dd2fac14824caa6d6a0289298c937d7bace8b6af/SwitchyOmega/y.autoproxy.xpi
--------------------------------------------------------------------------------
/gae_proxy/__init__.py:
--------------------------------------------------------------------------------
1 | __all__ = ["local", "start"]
--------------------------------------------------------------------------------
/gae_proxy/babel.config:
--------------------------------------------------------------------------------
1 | # Extraction from Python source files
2 | #[python: **.py]
3 |
4 | # Extraction from HTML and YAML templates
5 | [jinja2: **/web_ui/**.html]
6 | [jinja2: **/web_ui/**.yaml]
7 |
8 | encoding = utf-8
9 |
--------------------------------------------------------------------------------
/gae_proxy/local/__init__.py:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/gae_proxy/local/good_ip.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Thobian/XX-Net/dd2fac14824caa6d6a0289298c937d7bace8b6af/gae_proxy/local/good_ip.txt
--------------------------------------------------------------------------------
/gae_proxy/local/need_proxy_http.conf:
--------------------------------------------------------------------------------
1 | # start with # is comment
2 | google.com
3 | google.com.*
4 | gmail.com
5 | goo.gl
6 | t.co
7 | googleusercontent.com
8 | google-analytics.com
9 | googleapis.com
10 | googlecode.com
11 | gstatic.com
12 | youtube.com
13 | ytimg.com
14 | twitter.com
15 | twimg.com
16 | facebook.com
17 | wordpress.org
18 | github.com
19 | godaddy.com
20 | wikipedia.org
21 | hashkiller.co.uk
22 | w3.org
23 |
24 |
--------------------------------------------------------------------------------
/gae_proxy/local/need_proxy_http.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 |
3 | import os
4 | need_proxy_http_conf = 'need_proxy_http.conf'
5 |
6 | def proxy(host):
7 | '''without config file,all request go with proxy'''
8 | if not os.path.isfile(need_proxy_http_conf):
9 | return True
10 | file = open(need_proxy_http_conf)
11 | line = file.readline()
12 | while line:
13 | line = line.strip()
14 | if line and line[0]!='#':
15 | #print(line in host)
16 | if line in host:
17 | return True
18 | line = file.readline()
19 | return False
20 |
--------------------------------------------------------------------------------
/gae_proxy/local/test_appid.py:
--------------------------------------------------------------------------------
1 | import httplib
2 |
3 | from xlog import getLogger
4 | xlog = getLogger("gae_proxy")
5 |
6 | from connect_manager import https_manager
7 |
8 |
9 | def test_appid_exist(ssl_sock, appid):
10 | request_data = 'GET /_gh/ HTTP/1.1\r\nHost: %s.appspot.com\r\n\r\n' % appid
11 | ssl_sock.send(request_data.encode())
12 | response = httplib.HTTPResponse(ssl_sock, buffering=True)
13 |
14 | response.begin()
15 | if response.status == 404:
16 | #xlog.warn("app check %s status:%d", appid, response.status)
17 | return False
18 |
19 | if response.status == 503:
20 | # out of quota
21 | return True
22 |
23 | if response.status != 200:
24 | xlog.warn("test appid %s status:%d", appid, response.status)
25 |
26 | content = response.read()
27 | if "GoAgent" not in content:
28 | #xlog.warn("app check %s content:%s", appid, content)
29 | return False
30 |
31 | return True
32 |
33 |
34 | def test_appid(appid):
35 | for i in range(0, 3):
36 | ssl_sock = https_manager.get_new_ssl()
37 | if not ssl_sock:
38 | return True
39 |
40 | try:
41 | return test_appid_exist(ssl_sock, appid)
42 | except Exception as e:
43 | xlog.exception("check_appid %s %r", appid, e)
44 | continue
45 |
46 | return False
47 |
48 |
49 | def test_appids(appids):
50 | appid_list = appids.split("|")
51 | fail_appid_list = []
52 | for appid in appid_list:
53 | if not test_appid(appid):
54 | fail_appid_list.append(appid)
55 | else:
56 | # return success if one appid is work
57 | # just reduce wait time
58 | # here can be more ui friendly.
59 | return []
60 | return fail_appid_list
61 |
--------------------------------------------------------------------------------
/gae_proxy/pybabel_update.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 |
4 | pybabel extract -F babel.config -o lang/messages.pot .
5 |
6 | #pybabel update -l de_DE -d ./lang -i ./lang/messages.pot
7 | pybabel update -l en_US -d ./lang -i ./lang/messages.pot
8 | #pybabel update -l es_VE -d ./lang -i ./lang/messages.pot
9 | pybabel update -l fa_IR -d ./lang -i ./lang/messages.pot
10 | #pybabel update -l ja_JP -d ./lang -i ./lang/messages.pot
11 | pybabel update -l zh_CN -d ./lang -i ./lang/messages.pot
12 |
13 | #msgfmt lang/zh_CN/LC_MESSAGES/messages.po -o lang/zh_CN/LC_MESSAGES/messages.mo
14 | sed -i -e '/#.*$/d' lang/en_US/LC_MESSAGES/messages.po
15 | sed -i -e '/#.*$/d' lang/fa_IR/LC_MESSAGES/messages.po
16 | sed -i -e '/#.*$/d' lang/zh_CN/LC_MESSAGES/messages.po
17 |
--------------------------------------------------------------------------------
/gae_proxy/server/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | *~
3 | *.pyc
4 | app.yaml
5 | .appcfg_cookies
6 | upload.log
7 |
--------------------------------------------------------------------------------
/gae_proxy/server/README.md:
--------------------------------------------------------------------------------
1 | Uploader command line usage:
2 | python uploader.py YourAppid1|YourAppid2|YourAppid3...
3 | or
4 | ..\..\python27\1.0\python.exe uploader.py YourAppid1|YourAppid2|YourAppid3...
5 | if you don't have python2 installed.
6 |
7 | Note:
8 | * Keep the path name as server, other wise upload can't work.
9 | * Appid support combind multi appid with |.
10 | * RC4 password no longer supported by default. If you want to set a password, please modify uploader.py, line 197 from
11 | * uploads(appids)
12 | * to
13 | * uploads(appids,"YourPassword")
14 |
--------------------------------------------------------------------------------
/gae_proxy/server/gae/app.template.yaml:
--------------------------------------------------------------------------------
1 | application: gae_proxy
2 | version: 1
3 | runtime: python27
4 | api_version: 1
5 | threadsafe: true
6 |
7 | handlers:
8 | - url: /_gh/.*
9 | script: gae.application
10 | secure: optional
11 |
12 | - url: /2
13 | script: wsgi.gae_application
14 | secure: optional
15 |
16 | - url: /favicon.ico
17 | script: gae.application
18 | secure: optional
19 |
20 | - url: /.*
21 | script: legacy.application
22 | secure: optional
23 |
24 | libraries:
25 | - name: pycrypto
26 | version: "latest"
27 |
--------------------------------------------------------------------------------
/gae_proxy/server/gae/legacy.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # coding:utf-8
3 |
4 | import time
5 | from gae import __version__
6 |
7 | def application(environ, start_response):
8 | start_response('200 OK', [('Content-Type', 'text/plain; charset=UTF-8')])
9 | if environ['PATH_INFO'] == '/robots.txt':
10 | yield '\n'.join(['User-agent: *', 'Disallow: /'])
11 | else:
12 | timestamp = long(environ['CURRENT_VERSION_ID'].split('.')[1])/2**28
13 | ctime = time.strftime('%Y-%m-%d %H:%M:%S', time.gmtime(timestamp+8*3600))
14 | yield "GoAgent 服务端已经在 %s 升级到 %s 版本, 请更新您的客户端。" % (ctime, __version__)
15 |
--------------------------------------------------------------------------------
/gae_proxy/server/lib/VERSION:
--------------------------------------------------------------------------------
1 | release: "1.9.33"
2 | timestamp: 1454093067
3 | api_versions: ['1']
4 | supported_api_versions:
5 | python:
6 | api_versions: ['1']
7 | python27:
8 | api_versions: ['1']
9 | go:
10 | api_versions: ['go1']
11 | java7:
12 | api_versions: ['1.0']
13 |
--------------------------------------------------------------------------------
/gae_proxy/server/lib/google/__init__.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | #
3 | # Copyright 2007 Google Inc.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 |
--------------------------------------------------------------------------------
/gae_proxy/server/lib/google/appengine/__init__.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | #
3 | # Copyright 2007 Google Inc.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 |
--------------------------------------------------------------------------------
/gae_proxy/server/lib/google/appengine/_internal/__init__.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | #
3 | # Copyright 2007 Google Inc.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 |
--------------------------------------------------------------------------------
/gae_proxy/server/lib/google/appengine/api/__init__.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | #
3 | # Copyright 2007 Google Inc.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 |
--------------------------------------------------------------------------------
/gae_proxy/server/lib/google/appengine/api/app_identity/__init__.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | #
3 | # Copyright 2007 Google Inc.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 |
18 |
19 |
20 |
21 | """App identity API Provides access functions for the app identity service ."""
22 |
23 | from app_identity import *
24 |
--------------------------------------------------------------------------------
/gae_proxy/server/lib/google/appengine/api/blobstore/__init__.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | #
3 | # Copyright 2007 Google Inc.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 |
18 |
19 |
20 |
21 | """Blobstore API module."""
22 |
23 | from blobstore import *
24 |
--------------------------------------------------------------------------------
/gae_proxy/server/lib/google/appengine/api/channel/__init__.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | #
3 | # Copyright 2007 Google Inc.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 |
18 |
19 |
20 |
21 | """Channel API module."""
22 |
23 |
24 | from channel import *
25 |
--------------------------------------------------------------------------------
/gae_proxy/server/lib/google/appengine/api/files/__init__.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | #
3 | # Copyright 2007 Google Inc.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 |
18 |
19 |
20 |
21 | """Appengine Files API
22 |
23 | .. deprecated:: 1.8.1
24 | Use Google Cloud Storage Client library instead.
25 | """
26 |
27 |
28 |
29 | from file import *
30 | import blobstore
31 | import gs
32 | import shuffler
33 |
--------------------------------------------------------------------------------
/gae_proxy/server/lib/google/appengine/api/logservice/__init__.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | #
3 | # Copyright 2007 Google Inc.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 |
18 |
19 |
20 |
21 | """Logging API module."""
22 |
23 |
24 | from logservice import *
25 |
--------------------------------------------------------------------------------
/gae_proxy/server/lib/google/appengine/api/modules/__init__.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | #
3 | # Copyright 2007 Google Inc.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 | """Modules API module."""
18 |
19 | from modules import *
20 |
--------------------------------------------------------------------------------
/gae_proxy/server/lib/google/appengine/api/namespace_manager/__init__.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | #
3 | # Copyright 2007 Google Inc.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 |
18 |
19 |
20 |
21 | """Namespace Manager Module."""
22 |
23 |
24 |
25 |
26 |
27 |
28 | from namespace_manager import *
29 |
--------------------------------------------------------------------------------
/gae_proxy/server/lib/google/appengine/api/prospective_search/__init__.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | #
3 | # Copyright 2007 Google Inc.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 |
18 |
19 |
20 |
21 |
22 | """Prospective search API module."""
23 |
24 | from prospective_search import *
25 |
--------------------------------------------------------------------------------
/gae_proxy/server/lib/google/appengine/api/remote_socket/__init__.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | #
3 | # Copyright 2007 Google Inc.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 |
--------------------------------------------------------------------------------
/gae_proxy/server/lib/google/appengine/api/system/__init__.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | #
3 | # Copyright 2007 Google Inc.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 |
--------------------------------------------------------------------------------
/gae_proxy/server/lib/google/appengine/api/taskqueue/__init__.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | #
3 | # Copyright 2007 Google Inc.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 |
18 |
19 |
20 |
21 | """Task Queue API module."""
22 |
23 | from taskqueue import *
24 |
25 | __all__ = [
26 |
27 | 'BadTaskStateError', 'BadTransactionState', 'BadTransactionStateError',
28 | 'DatastoreError', 'DuplicateTaskNameError', 'Error', 'InternalError',
29 | 'InvalidQueueError', 'InvalidQueueNameError', 'InvalidTaskError',
30 | 'InvalidTaskNameError', 'InvalidUrlError', 'PermissionDeniedError',
31 | 'TaskAlreadyExistsError', 'TaskTooLargeError', 'TombstonedTaskError',
32 | 'TooManyTasksError', 'TransientError', 'UnknownQueueError',
33 | 'InvalidLeaseTimeError', 'InvalidMaxTasksError', 'InvalidDeadlineError',
34 | 'InvalidQueueModeError', 'TransactionalRequestTooLargeError',
35 | 'TaskLeaseExpiredError', 'QueuePausedError', 'InvalidEtaError',
36 | 'InvalidTagError',
37 |
38 | 'MAX_QUEUE_NAME_LENGTH', 'MAX_TASK_NAME_LENGTH', 'MAX_TASK_SIZE_BYTES',
39 | 'MAX_PULL_TASK_SIZE_BYTES', 'MAX_PUSH_TASK_SIZE_BYTES',
40 | 'MAX_LEASE_SECONDS', 'MAX_TASKS_PER_ADD',
41 | 'MAX_TASKS_PER_LEASE',
42 | 'MAX_URL_LENGTH',
43 |
44 | 'DEFAULT_APP_VERSION',
45 |
46 | 'Queue', 'QueueStatistics', 'Task', 'TaskRetryOptions', 'add', 'create_rpc']
47 |
--------------------------------------------------------------------------------
/gae_proxy/server/lib/google/appengine/base/__init__.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | #
3 | # Copyright 2007 Google Inc.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 |
--------------------------------------------------------------------------------
/gae_proxy/server/lib/google/appengine/cron/__init__.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | #
3 | # Copyright 2007 Google Inc.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 | "this file is needed to make this a package"
18 |
--------------------------------------------------------------------------------
/gae_proxy/server/lib/google/appengine/datastore/__init__.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | #
3 | # Copyright 2007 Google Inc.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 |
--------------------------------------------------------------------------------
/gae_proxy/server/lib/google/appengine/datastore/action_pb.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | #
3 | # Copyright 2007 Google Inc.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 | from google.net.proto import ProtocolBuffer
35 |
36 | __pychecker__ = """maxreturns=0 maxbranches=0 no-callinit
37 | unusednames=printElemNumber,debug_strs no-special"""
38 |
39 |
40 |
41 | class Action(ProtocolBuffer.ProtocolMessage):
42 | pass
43 |
--------------------------------------------------------------------------------
/gae_proxy/server/lib/google/appengine/datastore/datastore_pb.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | #
3 | # Copyright 2007 Google Inc.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 |
18 |
19 |
20 |
21 |
22 | """The Python datastore protocol buffer definition (old name)."""
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 | from google.appengine.datastore.action_pb import Action
32 | from google.appengine.datastore.entity_pb import CompositeIndex
33 | from google.appengine.datastore.entity_pb import EntityProto
34 | from google.appengine.datastore.entity_pb import Index
35 | from google.appengine.datastore.entity_pb import Path
36 | from google.appengine.datastore.entity_pb import Property
37 | from google.appengine.datastore.entity_pb import PropertyValue
38 | from google.appengine.datastore.entity_pb import Reference
39 | from google.appengine.datastore.snapshot_pb import Snapshot
40 |
41 | from google.appengine.api.api_base_pb import Integer64Proto
42 | from google.appengine.api.api_base_pb import StringProto
43 | from google.appengine.api.api_base_pb import VoidProto
44 | from google.appengine.datastore import datastore_v3_pb
45 | from google.appengine.datastore.datastore_v3_pb import *
46 |
47 |
--------------------------------------------------------------------------------
/gae_proxy/server/lib/google/appengine/ext/__init__.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | #
3 | # Copyright 2007 Google Inc.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 |
--------------------------------------------------------------------------------
/gae_proxy/server/lib/google/appengine/ext/blobstore/__init__.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | #
3 | # Copyright 2007 Google Inc.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 |
18 |
19 |
20 |
21 | """Blobstore API module."""
22 |
23 | from blobstore import *
24 |
--------------------------------------------------------------------------------
/gae_proxy/server/lib/google/appengine/ext/builtins/default/include-python27.yaml:
--------------------------------------------------------------------------------
1 | # No defaults yet.
2 |
--------------------------------------------------------------------------------
/gae_proxy/server/lib/google/appengine/ext/builtins/default/include.yaml:
--------------------------------------------------------------------------------
1 | # No defaults yet.
2 |
--------------------------------------------------------------------------------
/gae_proxy/server/lib/google/appengine/ext/bulkload/__init__.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | #
3 | # Copyright 2007 Google Inc.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 |
18 |
19 |
20 |
21 | """Bulkload package: Helpers for both bulkloader and bulkload_client.
22 |
23 | For complete documentation, see the Tools and Libraries section of the
24 | documentation.
25 |
26 | This package contains two separate systems:
27 | * The historical and deprecated bulkload/bulkload_client server mix-in,
28 | in the 'bulkload.bulkload' module; exposed here for backwards compatability.
29 | * New helpers for the bulkloader client (appengine/tools/bulkloader.py).
30 | Many of these helpers can also run on the server though there is not
31 | (as of January 2010) any support for using them there.
32 | """
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 | import bulkload_deprecated
41 | Validate = bulkload_deprecated.Validate
42 | Loader = bulkload_deprecated.Loader
43 | BulkLoad = bulkload_deprecated.BulkLoad
44 | main = bulkload_deprecated.main
45 |
46 |
47 |
--------------------------------------------------------------------------------
/gae_proxy/server/lib/google/appengine/ext/bulkload/bulkloader_errors.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | #
3 | # Copyright 2007 Google Inc.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 |
18 |
19 |
20 |
21 |
22 | """Exceptions raised by bulkloader methods."""
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 | class Error(Exception):
33 | """Base bulkloader error type."""
34 |
35 |
36 | class ErrorOnTransform(Error):
37 | """An exception was raised during this transform."""
38 |
39 |
40 |
41 | class InvalidConfiguration(Error):
42 | """The configuration is invalid."""
43 |
44 |
45 | class InvalidCodeInConfiguration(Error):
46 | """A code or lambda statement in the configuration could not be evaulated."""
47 |
48 |
49 | class InvalidExportData(Error):
50 | """The export data cannot be written using this connector object."""
51 |
52 |
53 | class InvalidImportData(Error):
54 | """The import data is inconsistent with the configuration."""
55 |
--------------------------------------------------------------------------------
/gae_proxy/server/lib/google/appengine/ext/bulkload/constants.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | #
3 | # Copyright 2007 Google Inc.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 |
18 |
19 |
20 |
21 | """ Constants used by both the bulkload server-side mixin handler and the
22 | command-line client.
23 | """
24 |
25 |
26 |
27 | KIND_PARAM = 'kind'
28 | CSV_PARAM = 'csv'
29 |
--------------------------------------------------------------------------------
/gae_proxy/server/lib/google/appengine/ext/ndb/__init__.py:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright 2008 The ndb Authors. All Rights Reserved.
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 |
16 | """NDB -- A new datastore API for the Google App Engine Python runtime."""
17 |
18 | __version__ = '1.0.10'
19 |
20 | __all__ = []
21 |
22 | from tasklets import *
23 | __all__ += tasklets.__all__
24 |
25 | from model import * # This implies key.*
26 | __all__ += model.__all__
27 |
28 | from query import *
29 | __all__ += query.__all__
30 |
31 | from context import *
32 | __all__ += context.__all__
33 |
--------------------------------------------------------------------------------
/gae_proxy/server/lib/google/appengine/ext/remote_api/__init__.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | #
3 | # Copyright 2007 Google Inc.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 |
--------------------------------------------------------------------------------
/gae_proxy/server/lib/google/appengine/runtime/__init__.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | #
3 | # Copyright 2007 Google Inc.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 |
18 |
19 |
20 |
21 | """Define the DeadlineExceededError exception."""
22 |
23 |
24 |
25 |
26 |
27 | try:
28 | BaseException
29 | except NameError:
30 | BaseException = Exception
31 |
32 |
33 | class DeadlineExceededError(BaseException):
34 | """Exception raised when the request reaches its overall time limit.
35 |
36 | This exception will be thrown by the original thread handling the request,
37 | shortly after the request reaches its deadline. Since the exception is
38 | asynchronously set on the thread by the App Engine runtime, it can appear
39 | to originate from any line of code that happens to be executing at that
40 | time.
41 |
42 | If the application catches this exception and does not generate a response
43 | very quickly afterwards, an error will be returned to the user and
44 | the application instance may be terminated.
45 |
46 | Not to be confused with runtime.apiproxy_errors.DeadlineExceededError.
47 | That one is raised when individual API calls take too long.
48 | """
49 |
50 | def __str__(self):
51 | return ('The overall deadline for responding to the HTTP request '
52 | 'was exceeded.')
53 |
--------------------------------------------------------------------------------
/gae_proxy/server/lib/google/appengine/runtime/features/__init__.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | #
3 | # Copyright 2007 Google Inc.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 | """features module.
18 |
19 | This module simplifies the access to the appengine feature flags.
20 | """
21 |
22 | import __builtin__
23 |
24 |
25 |
26 |
27 |
28 |
29 | def IsEnabled(feature_name, default=False):
30 | """Indicates if a specific feature flag is enabled.
31 |
32 | Args:
33 | feature_name: The name of the feature flag to check.
34 | default: Default value if the flags are not initialized (In a test
35 | environment for example).
36 |
37 | Returns:
38 | True/False if the flag is set/not set or default if the feature flags
39 | were not initialized.
40 | """
41 | try:
42 |
43 | return feature_name in __builtin__._APPENGINE_FEATURE_FLAGS
44 | except AttributeError:
45 | return default
46 |
--------------------------------------------------------------------------------
/gae_proxy/server/lib/google/appengine/tools/__init__.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | #
3 | # Copyright 2007 Google Inc.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 |
--------------------------------------------------------------------------------
/gae_proxy/server/lib/google/appengine/tools/app_engine_config_exception.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | #
3 | # Copyright 2007 Google Inc.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 | """Contains exception class for reporting XML parsing errors."""
18 |
19 |
20 | class AppEngineConfigException(Exception):
21 | """generic exception class for App Engine application configuration."""
22 | pass
23 |
--------------------------------------------------------------------------------
/gae_proxy/server/lib/google/appengine/tools/augment_mimetypes.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | #
3 | # Copyright 2007 Google Inc.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 | """Augment the mimetypes provided by Python."""
18 |
19 | import mimetypes
20 |
21 |
22 | def init():
23 | mimetypes.add_type('application/dart', '.dart')
24 | mimetypes.add_type('text/css', '.gss')
25 | mimetypes.add_type('text/html', '.ng')
26 | mimetypes.add_type('application/x-font-ttf', '.ttf')
27 | mimetypes.add_type('application/font-woff', '.woff')
28 | mimetypes.add_type('application/font-woff2', '.woff2')
29 |
--------------------------------------------------------------------------------
/gae_proxy/server/lib/google/appengine/tools/value_mixin.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | #
3 | # Copyright 2007 Google Inc.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 | """Provides ValueMixin.
18 |
19 | ValueMixin provides comparison (including equality) methods and hashing
20 | based on the values of fields.
21 | """
22 |
23 |
24 | class ValueMixin(object):
25 | def __cmp__(self, other):
26 |
27 |
28 |
29 |
30 |
31 |
32 | if hasattr(other, '__dict__'):
33 | return self.__dict__.__cmp__(other.__dict__)
34 | else:
35 | return 1
36 |
37 | def __hash__(self):
38 | return hash(frozenset(self.__dict__.items()))
39 |
40 | def __repr__(self):
41 |
42 | d = self.__dict__
43 | attrs = ['%s=%r' % (key, d[key]) for key in sorted(d)]
44 | return '%s(%s)' % (self.__class__.__name__, ', '.join(attrs))
45 |
--------------------------------------------------------------------------------
/gae_proxy/server/lib/google/appengine/tools/xml_parser_utils.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | #
3 | # Copyright 2007 Google Inc.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 | """Contains some functions that come in handy with XML parsing."""
18 |
19 |
20 | def GetTag(node):
21 | """Strips namespace prefix."""
22 | return node.tag.rsplit('}', 1)[-1]
23 |
24 |
25 | def GetChild(node, tag):
26 | """Returns first child of node with tag."""
27 | for child in node.getchildren():
28 | if GetTag(child) == tag:
29 | return child
30 |
31 |
32 | def BooleanValue(node_text):
33 | return node_text.lower() in ('1', 'true')
34 |
35 |
36 | def GetAttribute(node, attr):
37 | """Wrapper function to retrieve attributes from XML nodes."""
38 | return node.attrib.get(attr, '')
39 |
40 |
41 | def GetChildNodeText(node, child_tag, default=''):
42 | """Finds child xml node with desired tag and returns its text."""
43 | for child in node.getchildren():
44 | if GetTag(child) == child_tag:
45 |
46 | return child.text or default
47 | return default
48 |
49 |
50 | def GetNodes(node, match_tag):
51 | """Gets all children of a node with the desired tag."""
52 | return (child for child in node.getchildren() if GetTag(child) == match_tag)
53 |
--------------------------------------------------------------------------------
/gae_proxy/server/lib/google/net/__init__.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | #
3 | # Copyright 2007 Google Inc.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 |
--------------------------------------------------------------------------------
/gae_proxy/server/lib/google/net/proto/__init__.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | #
3 | # Copyright 2007 Google Inc.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 |
--------------------------------------------------------------------------------
/gae_proxy/server/lib/oauth2client/__init__.py:
--------------------------------------------------------------------------------
1 | """Client library for using OAuth2, especially with Google APIs."""
2 |
3 | __version__ = '1.4.12'
4 |
5 | GOOGLE_AUTH_URI = 'https://accounts.google.com/o/oauth2/auth'
6 | GOOGLE_DEVICE_URI = 'https://accounts.google.com/o/oauth2/device/code'
7 | GOOGLE_REVOKE_URI = 'https://accounts.google.com/o/oauth2/revoke'
8 | GOOGLE_TOKEN_URI = 'https://accounts.google.com/o/oauth2/token'
9 |
--------------------------------------------------------------------------------
/gae_proxy/server/lib/webob/__init__.py:
--------------------------------------------------------------------------------
1 | from webob.datetime_utils import *
2 | from webob.request import *
3 | from webob.response import *
4 | from webob.util import html_escape
5 |
6 | __all__ = [
7 | 'Request', 'LegacyRequest', 'Response', 'UTC', 'day', 'week', 'hour',
8 | 'minute', 'second', 'month', 'year', 'html_escape'
9 | ]
10 |
11 | BaseRequest.ResponseClass = Response
12 |
13 | __version__ = '1.2.3'
14 |
--------------------------------------------------------------------------------
/gae_proxy/server/uploader.bat:
--------------------------------------------------------------------------------
1 | ..\..\python27\1.0\python.exe uploader.py %1
2 |
--------------------------------------------------------------------------------
/gae_proxy/setup.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 |
3 | print "setup ok!"
4 |
--------------------------------------------------------------------------------
/gae_proxy/start.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # coding:utf-8
3 |
4 | import os
5 | import sys
6 |
7 |
8 | __file__ = os.path.abspath(__file__)
9 | if os.path.islink(__file__):
10 | __file__ = getattr(os, 'readlink', lambda x: x)(__file__)
11 |
12 | current_path = os.path.dirname(os.path.abspath(__file__))
13 | sys.path.append(current_path)
14 | import local.proxy as client
15 |
16 |
17 | def main():
18 | try:
19 | client.main()
20 | except KeyboardInterrupt:
21 | sys.exit()
22 |
23 | if __name__ == "__main__":
24 | main()
25 |
--------------------------------------------------------------------------------
/gae_proxy/web_ui/advanced.html:
--------------------------------------------------------------------------------
1 |
8 |
12 |
15 |
24 |
--------------------------------------------------------------------------------
/gae_proxy/web_ui/menu.yaml:
--------------------------------------------------------------------------------
1 | module_title: GAEProxy
2 | menu_sort_id: 1
3 | sub_menus: {
4 | 1:{
5 | title: {{ _("Status") }},
6 | url: status
7 | },
8 | 2:{
9 | title: {{ _("Configuration") }},
10 | url: config
11 | },
12 | 3:{
13 | title: {{ _("Deploy Server") }},
14 | url: deploy
15 | },
16 | 4:{
17 | title: {{ _("Advanced") }},
18 | url: advanced
19 | },
20 | 5:{
21 | title: {{ _("Log") }},
22 | url: logging
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/gae_proxy/web_ui/scan_log.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
26 |
--------------------------------------------------------------------------------
/launcher/LICENSE.txt:
--------------------------------------------------------------------------------
1 | Copyright (c) [2015], [XX-Net]
2 | All rights reserved.
3 |
4 | Redistribution and use in source and binary forms, with or without
5 | modification, are permitted provided that the following conditions are met:
6 |
7 | * Redistributions of source code must retain the above copyright notice, this
8 | list of conditions and the following disclaimer.
9 |
10 | * Redistributions in binary form must reproduce the above copyright notice,
11 | this list of conditions and the following disclaimer in the documentation
12 | and/or other materials provided with the distribution.
13 |
14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
15 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
18 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
20 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
21 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
22 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 |
--------------------------------------------------------------------------------
/launcher/babel.config:
--------------------------------------------------------------------------------
1 | # Extraction from Python source files
2 | #[python: **.py]
3 |
4 | # Extraction from HTML and YAML templates
5 | [jinja2: **/web_ui/**.html]
6 | [jinja2: **/web_ui/**.yaml]
7 |
8 | encoding = utf-8
9 |
--------------------------------------------------------------------------------
/launcher/create_shortcut.js:
--------------------------------------------------------------------------------
1 |
2 | function CreateShortcut()
3 | {
4 | wsh = new ActiveXObject('WScript.Shell');
5 | target_path = '"' + wsh.CurrentDirectory + '\\..\\python27\\1.0\\pythonw.exe"';
6 | icon_path = wsh.CurrentDirectory + '\\web_ui\\favicon.ico';
7 |
8 |
9 | link = wsh.CreateShortcut(wsh.SpecialFolders("Desktop") + '\\XX-Net.lnk');
10 | link.TargetPath = target_path;
11 | link.Arguments = '"' + wsh.CurrentDirectory + '\\start.py"';
12 | link.WindowStyle = 7;
13 | link.IconLocation = icon_path;
14 | link.Description = 'XX-Net';
15 | link.WorkingDirectory = wsh.CurrentDirectory;
16 | link.Save();
17 | }
18 |
19 |
20 | function main(){
21 | CreateShortcut();
22 | }
23 | main();
24 |
--------------------------------------------------------------------------------
/launcher/download.md:
--------------------------------------------------------------------------------
1 |
2 | ## 下载(Download):
3 | 测试版(Test):
4 | https://codeload.github.com/XX-net/XX-Net/zip/2.9.6
5 |
6 | 稳定版(Stable):
7 | https://codeload.github.com/XX-net/XX-Net/zip/2.9.4
8 |
9 | 懒人集成浏览器版(Easy Browser Bundle):
10 | https://github.com/yeahwu/firefox-xx
11 |
12 | 极客精简版(Geek mini version):
13 | https://github.com/xyuanmu/XX-Mini
14 |
--------------------------------------------------------------------------------
/launcher/instances.py:
--------------------------------------------------------------------------------
1 | import os
2 |
3 |
4 | current_path = os.path.dirname(os.path.abspath(__file__))
5 | root_path = os.path.abspath( os.path.join(current_path, os.pardir))
6 | data_path = os.path.join(root_path, 'data')
7 | data_launcher_path = os.path.join(data_path, 'launcher')
8 |
9 |
10 | from xlog import Logger
11 | log_file = os.path.join(data_launcher_path, "launcher.log")
12 | xlog = Logger(file_name=log_file)
13 |
--------------------------------------------------------------------------------
/launcher/mac_helper:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Thobian/XX-Net/dd2fac14824caa6d6a0289298c937d7bace8b6af/launcher/mac_helper
--------------------------------------------------------------------------------
/launcher/mac_helper.c:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 |
5 | int main(int argc, const char * argv[]) {
6 | if (geteuid() != 0) {
7 | fprintf(stderr, "Must be run as root!\n");
8 | return 1;
9 | }
10 | if (argc == 4 && strcmp(argv[1], "enableauto") == 0) {
11 | execl("/usr/sbin/networksetup", "networksetup", "-setautoproxyurl", argv[2], argv[3], NULL);
12 | } else if (argc == 5 && strcmp(argv[1], "enablehttp") == 0) {
13 | execl("/usr/sbin/networksetup", "networksetup", "-setwebproxy", argv[2], argv[3], argv[4], NULL);
14 | } else if (argc == 5 && strcmp(argv[1], "enablehttps") == 0) {
15 | execl("/usr/sbin/networksetup", "networksetup", "-setsecurewebproxy", argv[2], argv[3], argv[4], NULL);
16 | } else if (argc == 3 && strcmp(argv[1], "disableauto") == 0) {
17 | execl("/usr/sbin/networksetup", "networksetup", "-setautoproxystate", argv[2], "off", NULL);
18 | } else if (argc == 3 && strcmp(argv[1], "disablehttp") == 0) {
19 | execl("/usr/sbin/networksetup", "networksetup", "-setwebproxystate", argv[2], "off", NULL);
20 | } else if (argc == 3 && strcmp(argv[1], "disablehttps") == 0) {
21 | execl("/usr/sbin/networksetup", "networksetup", "-setsecurewebproxystate", argv[2], "off", NULL);
22 | } else {
23 | fprintf(stderr, "Usage:\n");
24 | fprintf(stderr, "%s enableauto \n", argv[0]);
25 | fprintf(stderr, "%s enablehttp \n", argv[0]);
26 | fprintf(stderr, "%s enablehttps \n", argv[0]);
27 | fprintf(stderr, "%s disableauto \n", argv[0]);
28 | fprintf(stderr, "%s disablehttp \n", argv[0]);
29 | fprintf(stderr, "%s disablehttps \n", argv[0]);
30 | }
31 | return 0;
32 | }
33 |
--------------------------------------------------------------------------------
/launcher/non_tray.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # coding:utf-8
3 |
4 | import time
5 |
6 | class None_tray():
7 | def notify_general(self, msg="msg", title="Title", buttons={}, timeout=3600):
8 | pass
9 |
10 | def on_quit(self, widget, data=None):
11 | pass
12 |
13 | def serve_forever(self):
14 | while True:
15 | time.sleep(100)
16 |
17 | sys_tray = None_tray()
18 |
19 | def main():
20 | sys_tray.serve_forever()
21 |
22 | if __name__ == '__main__':
23 | main()
24 |
25 |
--------------------------------------------------------------------------------
/launcher/pybabel_update.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 |
4 | pybabel extract -F babel.config -o lang/messages.pot .
5 |
6 | #pybabel update -l de_DE -d ./lang -i ./lang/messages.pot
7 | pybabel update -l en_US -d ./lang -i ./lang/messages.pot
8 | #pybabel update -l es_VE -d ./lang -i ./lang/messages.pot
9 | pybabel update -l fa_IR -d ./lang -i ./lang/messages.pot
10 | #pybabel update -l ja_JP -d ./lang -i ./lang/messages.pot
11 | pybabel update -l zh_CN -d ./lang -i ./lang/messages.pot
12 |
13 | #msgfmt lang/zh_CN/LC_MESSAGES/messages.po -o lang/zh_CN/LC_MESSAGES/messages.mo
14 | sed -i -e '/#.*$/d' lang/en_US/LC_MESSAGES/messages.po
15 | sed -i -e '/#.*$/d' lang/fa_IR/LC_MESSAGES/messages.po
16 | sed -i -e '/#.*$/d' lang/zh_CN/LC_MESSAGES/messages.po
17 |
--------------------------------------------------------------------------------
/launcher/version.txt:
--------------------------------------------------------------------------------
1 | 2.9.6
2 |
--------------------------------------------------------------------------------
/launcher/web_ui/favicon-mac.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Thobian/XX-Net/dd2fac14824caa6d6a0289298c937d7bace8b6af/launcher/web_ui/favicon-mac.ico
--------------------------------------------------------------------------------
/launcher/web_ui/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Thobian/XX-Net/dd2fac14824caa6d6a0289298c937d7bace8b6af/launcher/web_ui/favicon.ico
--------------------------------------------------------------------------------
/launcher/web_ui/img/fixed-width.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Thobian/XX-Net/dd2fac14824caa6d6a0289298c937d7bace8b6af/launcher/web_ui/img/fixed-width.png
--------------------------------------------------------------------------------
/launcher/web_ui/img/full-width.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Thobian/XX-Net/dd2fac14824caa6d6a0289298c937d7bace8b6af/launcher/web_ui/img/full-width.png
--------------------------------------------------------------------------------
/launcher/web_ui/img/glyphicons-halflings-white.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Thobian/XX-Net/dd2fac14824caa6d6a0289298c937d7bace8b6af/launcher/web_ui/img/glyphicons-halflings-white.png
--------------------------------------------------------------------------------
/launcher/web_ui/img/glyphicons-halflings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Thobian/XX-Net/dd2fac14824caa6d6a0289298c937d7bace8b6af/launcher/web_ui/img/glyphicons-halflings.png
--------------------------------------------------------------------------------
/launcher/web_ui/img/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Thobian/XX-Net/dd2fac14824caa6d6a0289298c937d7bace8b6af/launcher/web_ui/img/logo.png
--------------------------------------------------------------------------------
/launcher/web_ui/img/quit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Thobian/XX-Net/dd2fac14824caa6d6a0289298c937d7bace8b6af/launcher/web_ui/img/quit.png
--------------------------------------------------------------------------------
/launcher/web_ui/img/switch-mask.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Thobian/XX-Net/dd2fac14824caa6d6a0289298c937d7bace8b6af/launcher/web_ui/img/switch-mask.png
--------------------------------------------------------------------------------
/launcher/web_ui/js/jquery.xdomainrequest.min.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * jQuery-ajaxTransport-XDomainRequest - v1.0.4 - 2015-03-05
3 | * https://github.com/MoonScript/jQuery-ajaxTransport-XDomainRequest
4 | * Copyright (c) 2015 Jason Moon (@JSONMOON)
5 | * Licensed MIT (/blob/master/LICENSE.txt)
6 | */
7 | (function(a){if(typeof define==='function'&&define.amd){define(['jquery'],a)}else if(typeof exports==='object'){module.exports=a(require('jquery'))}else{a(jQuery)}}(function($){if($.support.cors||!$.ajaxTransport||!window.XDomainRequest){return $}var n=/^(https?:)?\/\//i;var o=/^get|post$/i;var p=new RegExp('^(\/\/|'+location.protocol+')','i');$.ajaxTransport('* text html xml json',function(j,k,l){if(!j.crossDomain||!j.async||!o.test(j.type)||!n.test(j.url)||!p.test(j.url)){return}var m=null;return{send:function(f,g){var h='';var i=(k.dataType||'').toLowerCase();m=new XDomainRequest();if(/^\d+$/.test(k.timeout)){m.timeout=k.timeout}m.ontimeout=function(){g(500,'timeout')};m.onload=function(){var a='Content-Length: '+m.responseText.length+'\r\nContent-Type: '+m.contentType;var b={code:200,message:'success'};var c={text:m.responseText};try{if(i==='html'||/text\/html/i.test(m.contentType)){c.html=m.responseText}else if(i==='json'||(i!=='text'&&/\/json/i.test(m.contentType))){try{c.json=$.parseJSON(m.responseText)}catch(e){b.code=500;b.message='parseerror'}}else if(i==='xml'||(i!=='text'&&/\/xml/i.test(m.contentType))){var d=new ActiveXObject('Microsoft.XMLDOM');d.async=false;try{d.loadXML(m.responseText)}catch(e){d=undefined}if(!d||!d.documentElement||d.getElementsByTagName('parsererror').length){b.code=500;b.message='parseerror';throw'Invalid XML: '+m.responseText;}c.xml=d}}catch(parseMessage){throw parseMessage;}finally{g(b.code,b.message,c,a)}};m.onprogress=function(){};m.onerror=function(){g(500,'error',{text:m.responseText})};if(k.data){h=($.type(k.data)==='string')?k.data:$.param(k.data)}m.open(j.type,j.url);m.send(h)},abort:function(){if(m){m.abort()}}}});return $}));
--------------------------------------------------------------------------------
/launcher/web_ui/js/site.js:
--------------------------------------------------------------------------------
1 | /* String format */
2 | String.prototype.format = function() {
3 | var newStr = this, i = 0;
4 | while (/%s/.test(newStr)) {
5 | newStr = newStr.replace("%s", arguments[i++])
6 | }
7 | return newStr;
8 | }
9 |
10 | /* JavaScript for UI */
11 | function title(title) {
12 | $('#title').text(title);
13 | }
14 |
15 | function tip(message, type, allowOff) {
16 | if( allowOff === undefined ) {
17 | allowOff = true;
18 | }
19 | if( type === undefined ) {
20 | type = 'info';
21 | }
22 |
23 | $('#tip').removeClass('alert-info');
24 | $('#tip').removeClass('alert-warning');
25 | $('#tip').removeClass('alert-success');
26 | $('#tip').removeClass('alert-error');
27 | $('#tip').removeClass('hide');
28 |
29 | $('#tip').addClass('alert-' + type);
30 |
31 | $('#tip-message').html(message);
32 |
33 | if( allowOff === true ) {
34 | $('#tip-close').css('display', '');
35 | } else {
36 | $('#tip-close').css('display', 'none');
37 | }
38 | }
39 | function tipClose() {
40 | $('#tip').addClass('hide');
41 | }
42 | function tipHasClose() {
43 | return $('#tip').hasClass('hide');
44 | }
45 |
46 | $('#tip-close').click(function() {
47 | tipClose();
48 | });
--------------------------------------------------------------------------------
/launcher/web_ui/menu.yaml:
--------------------------------------------------------------------------------
1 | module_title: {{ _( "System" ) }}
2 | menu_sort_id: 100
3 | sub_menus: {
4 | 1:{
5 | title: {{ _( "Configuration" ) }},
6 | url: config
7 | },
8 | 2:{
9 | title: {{ _( "About" ) }},
10 | url: about
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/php_proxy/babel.config:
--------------------------------------------------------------------------------
1 | # Extraction from Python source files
2 | #[python: **.py]
3 |
4 | # Extraction from HTML and YAML templates
5 | [jinja2: **/web_ui/**.html]
6 | [jinja2: **/web_ui/**.yaml]
7 |
8 | encoding = utf-8
9 |
--------------------------------------------------------------------------------
/php_proxy/lang/zh_CN/LC_MESSAGES/messages.po:
--------------------------------------------------------------------------------
1 | msgid ""
2 | msgstr ""
3 | "Project-Id-Version: PROJECT VERSION\n"
4 | "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
5 | "POT-Creation-Date: 2016-02-20 18:30+0800\n"
6 | "PO-Revision-Date: 2015-02-02 18:30+0800\n"
7 | "Last-Translator: Haozhe Xie \n"
8 | "Language: zh_Hans_CN\n"
9 | "Language-Team: zh_Hans_CN \n"
10 | "Plural-Forms: nplurals=2; plural=(n != 1)\n"
11 | "MIME-Version: 1.0\n"
12 | "Content-Type: text/plain; charset=utf-8\n"
13 | "Content-Transfer-Encoding: 8bit\n"
14 | "Generated-By: Babel 2.1.1\n"
15 |
16 | msgid "Config"
17 | msgstr "配置"
18 |
19 | msgid "Log"
20 | msgstr "日志"
21 |
22 | msgid "PHP Server URL"
23 | msgstr "PHP 服务器地址"
24 |
25 | msgid "Password"
26 | msgstr "密码"
27 |
28 | msgid "Default: "
29 | msgstr "默认:"
30 |
31 | msgid "Frontend Proxy"
32 | msgstr "前置代理"
33 |
34 | msgid "Address"
35 | msgstr "地址"
36 |
37 | msgid "Example: "
38 | msgstr "例如:"
39 |
40 | msgid "Port"
41 | msgstr "端口"
42 |
43 | msgid "Username"
44 | msgstr "用户名"
45 |
46 | msgid "Password"
47 | msgstr "密码"
48 |
49 | msgid "Save and Restart PHP Proxy"
50 | msgstr "保存并重启PHP代理"
51 |
52 | msgid "Help: "
53 | msgstr "帮助:"
54 |
55 | msgid "PHP Proxy Config"
56 | msgstr "PHP代理配置"
57 |
58 | msgid "PHP proxy is disabled. Please enable it in system settings."
59 | msgstr "PHP代理被禁用,请先在系统配置的高级选项中启用PHP代理。"
60 |
61 | msgid "Settings saved."
62 | msgstr "设置已保存。"
63 |
64 | msgid "Unknown error occurred."
65 | msgstr "发生了未知错误。"
66 |
67 | msgid "PHP Proxy Log"
68 | msgstr "PHP Proxy 日志 "
--------------------------------------------------------------------------------
/php_proxy/local/__init__.py:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/php_proxy/pybabel_update.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 |
4 | pybabel extract -F babel.config -o lang/messages.pot .
5 |
6 | #pybabel update -l de_DE -d ./lang -i ./lang/messages.pot
7 | #pybabel update -l en_US -d ./lang -i ./lang/messages.pot
8 | #pybabel update -l es_VE -d ./lang -i ./lang/messages.pot
9 | #pybabel update -l fa_IR -d ./lang -i ./lang/messages.pot
10 | #pybabel update -l ja_JP -d ./lang -i ./lang/messages.pot
11 | pybabel update -l zh_CN -d ./lang -i ./lang/messages.pot
12 |
13 | #msgfmt lang/zh_CN/LC_MESSAGES/messages.po -o lang/zh_CN/LC_MESSAGES/messages.mo
14 | sed -i -e '/#.*$/d' lang/zh_CN/LC_MESSAGES/messages.po
15 |
--------------------------------------------------------------------------------
/php_proxy/setup.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 |
3 | print "setup ok!"
4 |
--------------------------------------------------------------------------------
/php_proxy/start.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # coding:utf-8
3 |
4 | import os, sys
5 |
6 |
7 | __file__ = os.path.abspath(__file__)
8 | if os.path.islink(__file__):
9 | __file__ = getattr(os, 'readlink', lambda x: x)(__file__)
10 |
11 | current_path = os.path.dirname(os.path.abspath(__file__))
12 | sys.path.append(current_path)
13 | import local.proxy as php_proxy
14 |
15 |
16 |
17 | try:
18 | php_proxy.main()
19 | except KeyboardInterrupt:
20 | sys.exit()
--------------------------------------------------------------------------------
/php_proxy/web_ui/menu.yaml:
--------------------------------------------------------------------------------
1 | module_title: PHP_proxy
2 | menu_sort_id: 2
3 | sub_menus: {
4 | 1:{
5 | title: {{ _("Config") }},
6 | url: config
7 | },
8 | 2:{
9 | title: {{ _("Log") }},
10 | url: logging
11 | }
12 | }
--------------------------------------------------------------------------------
/python27/1.0/Microsoft.VC90.CRT.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/python27/1.0/WinSxS/Manifests/x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.30729.6161_x-ww_31a54e43.cat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Thobian/XX-Net/dd2fac14824caa6d6a0289298c937d7bace8b6af/python27/1.0/WinSxS/Manifests/x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.30729.6161_x-ww_31a54e43.cat
--------------------------------------------------------------------------------
/python27/1.0/WinSxS/Manifests/x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.30729.6161_x-ww_31a54e43.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | S83+LBs1RkUxSkzia1WysaAhLbk= cKyCmIKF+fcGn6qaBhKuun+wAcQ= r+4y/NnOFgaANxNXoHL1jF95DUg=
6 |
--------------------------------------------------------------------------------
/python27/1.0/WinSxS/Policies/x86_policy.9.0.Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_x-ww_b7353f75/9.0.30729.6161.cat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Thobian/XX-Net/dd2fac14824caa6d6a0289298c937d7bace8b6af/python27/1.0/WinSxS/Policies/x86_policy.9.0.Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_x-ww_b7353f75/9.0.30729.6161.cat
--------------------------------------------------------------------------------
/python27/1.0/WinSxS/Policies/x86_policy.9.0.Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_x-ww_b7353f75/9.0.30729.6161.policy:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/python27/1.0/WinSxS/x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.30729.6161_x-ww_31a54e43/msvcm90.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Thobian/XX-Net/dd2fac14824caa6d6a0289298c937d7bace8b6af/python27/1.0/WinSxS/x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.30729.6161_x-ww_31a54e43/msvcm90.dll
--------------------------------------------------------------------------------
/python27/1.0/WinSxS/x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.30729.6161_x-ww_31a54e43/msvcp90.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Thobian/XX-Net/dd2fac14824caa6d6a0289298c937d7bace8b6af/python27/1.0/WinSxS/x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.30729.6161_x-ww_31a54e43/msvcp90.dll
--------------------------------------------------------------------------------
/python27/1.0/WinSxS/x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.30729.6161_x-ww_31a54e43/msvcr90.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Thobian/XX-Net/dd2fac14824caa6d6a0289298c937d7bace8b6af/python27/1.0/WinSxS/x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.30729.6161_x-ww_31a54e43/msvcr90.dll
--------------------------------------------------------------------------------
/python27/1.0/lib/_ctypes.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Thobian/XX-Net/dd2fac14824caa6d6a0289298c937d7bace8b6af/python27/1.0/lib/_ctypes.pyd
--------------------------------------------------------------------------------
/python27/1.0/lib/_elementtree.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Thobian/XX-Net/dd2fac14824caa6d6a0289298c937d7bace8b6af/python27/1.0/lib/_elementtree.pyd
--------------------------------------------------------------------------------
/python27/1.0/lib/_hashlib.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Thobian/XX-Net/dd2fac14824caa6d6a0289298c937d7bace8b6af/python27/1.0/lib/_hashlib.pyd
--------------------------------------------------------------------------------
/python27/1.0/lib/_socket.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Thobian/XX-Net/dd2fac14824caa6d6a0289298c937d7bace8b6af/python27/1.0/lib/_socket.pyd
--------------------------------------------------------------------------------
/python27/1.0/lib/_ssl.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Thobian/XX-Net/dd2fac14824caa6d6a0289298c937d7bace8b6af/python27/1.0/lib/_ssl.pyd
--------------------------------------------------------------------------------
/python27/1.0/lib/bz2.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Thobian/XX-Net/dd2fac14824caa6d6a0289298c937d7bace8b6af/python27/1.0/lib/bz2.pyd
--------------------------------------------------------------------------------
/python27/1.0/lib/darwin/OpenSSL/SSL.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Thobian/XX-Net/dd2fac14824caa6d6a0289298c937d7bace8b6af/python27/1.0/lib/darwin/OpenSSL/SSL.so
--------------------------------------------------------------------------------
/python27/1.0/lib/darwin/OpenSSL/__init__.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) AB Strakt
2 | # See LICENSE for details.
3 |
4 | """
5 | pyOpenSSL - A simple wrapper around the OpenSSL library
6 | """
7 |
8 | import sys
9 |
10 | try:
11 | orig = sys.getdlopenflags()
12 | except AttributeError:
13 | from OpenSSL import crypto
14 | else:
15 | try:
16 | import DLFCN
17 | except ImportError:
18 | try:
19 | import dl
20 | except ImportError:
21 | try:
22 | import ctypes
23 | except ImportError:
24 | flags = 2 | 256
25 | else:
26 | flags = 2 | ctypes.RTLD_GLOBAL
27 | del ctypes
28 | else:
29 | flags = dl.RTLD_NOW | dl.RTLD_GLOBAL
30 | del dl
31 | else:
32 | flags = DLFCN.RTLD_NOW | DLFCN.RTLD_GLOBAL
33 | del DLFCN
34 |
35 | sys.setdlopenflags(flags)
36 | from OpenSSL import crypto
37 | sys.setdlopenflags(orig)
38 | del orig, flags
39 | del sys
40 |
41 | from OpenSSL import rand, SSL
42 | from OpenSSL.version import __version__
43 |
44 | __all__ = [
45 | 'rand', 'crypto', 'SSL', 'tsafe', '__version__']
46 |
--------------------------------------------------------------------------------
/python27/1.0/lib/darwin/OpenSSL/crypto.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Thobian/XX-Net/dd2fac14824caa6d6a0289298c937d7bace8b6af/python27/1.0/lib/darwin/OpenSSL/crypto.so
--------------------------------------------------------------------------------
/python27/1.0/lib/darwin/OpenSSL/rand.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Thobian/XX-Net/dd2fac14824caa6d6a0289298c937d7bace8b6af/python27/1.0/lib/darwin/OpenSSL/rand.so
--------------------------------------------------------------------------------
/python27/1.0/lib/darwin/OpenSSL/test/__init__.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) Jean-Paul Calderone
2 | # See LICENSE for details.
3 |
4 | """
5 | Package containing unit tests for L{OpenSSL}.
6 | """
7 |
--------------------------------------------------------------------------------
/python27/1.0/lib/darwin/OpenSSL/tsafe.py:
--------------------------------------------------------------------------------
1 | from OpenSSL import SSL
2 | _ssl = SSL
3 | del SSL
4 |
5 | import threading
6 | _RLock = threading.RLock
7 | del threading
8 |
9 | class Connection:
10 | def __init__(self, *args):
11 | self._ssl_conn = apply(_ssl.Connection, args)
12 | self._lock = _RLock()
13 |
14 | for f in ('get_context', 'pending', 'send', 'write', 'recv', 'read',
15 | 'renegotiate', 'bind', 'listen', 'connect', 'accept',
16 | 'setblocking', 'fileno', 'shutdown', 'close', 'get_cipher_list',
17 | 'getpeername', 'getsockname', 'getsockopt', 'setsockopt',
18 | 'makefile', 'get_app_data', 'set_app_data', 'state_string',
19 | 'sock_shutdown', 'get_peer_certificate', 'get_peer_cert_chain', 'want_read',
20 | 'want_write', 'set_connect_state', 'set_accept_state',
21 | 'connect_ex', 'sendall'):
22 | exec("""def %s(self, *args):
23 | self._lock.acquire()
24 | try:
25 | return self._ssl_conn.%s(*args)
26 | finally:
27 | self._lock.release()\n""" % (f, f))
28 |
29 |
--------------------------------------------------------------------------------
/python27/1.0/lib/darwin/OpenSSL/version.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) AB Strakt
2 | # Copyright (C) Jean-Paul Calderone
3 | # See LICENSE for details.
4 |
5 | """
6 | pyOpenSSL - A simple wrapper around the OpenSSL library
7 | """
8 |
9 | __version__ = '0.13'
10 |
--------------------------------------------------------------------------------
/python27/1.0/lib/darwin/gevent/__init__.py:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2009-2012 Denis Bilenko. See LICENSE for details.
2 | """
3 | gevent is a coroutine-based Python networking library that uses greenlet
4 | to provide a high-level synchronous API on top of libev event loop.
5 |
6 | See http://www.gevent.org/ for the documentation.
7 | """
8 |
9 | from __future__ import absolute_import
10 |
11 | version_info = (1, 0, 0, 'final', 0)
12 | __version__ = '1.0'
13 | __changeset__ = '1.0-0-ga5ae94c'
14 |
15 |
16 | __all__ = ['get_hub',
17 | 'Greenlet',
18 | 'GreenletExit',
19 | 'spawn',
20 | 'spawn_later',
21 | 'spawn_raw',
22 | 'iwait',
23 | 'wait',
24 | 'killall',
25 | 'Timeout',
26 | 'with_timeout',
27 | 'getcurrent',
28 | 'sleep',
29 | 'idle',
30 | 'kill',
31 | 'signal',
32 | 'fork',
33 | 'reinit']
34 |
35 |
36 | from gevent.hub import get_hub, iwait, wait
37 | from gevent.greenlet import Greenlet, joinall, killall
38 | spawn = Greenlet.spawn
39 | spawn_later = Greenlet.spawn_later
40 | from gevent.timeout import Timeout, with_timeout
41 | from gevent.hub import getcurrent, GreenletExit, spawn_raw, sleep, idle, kill, signal, reinit
42 | try:
43 | from gevent.os import fork
44 | except ImportError:
45 | __all__.remove('fork')
46 |
47 |
48 | # the following makes hidden imports visible to freezing tools like
49 | # py2exe. see https://github.com/surfly/gevent/issues/181
50 | def __dependencies_for_freezing():
51 | from gevent import core, resolver_thread, resolver_ares, socket,\
52 | threadpool, thread, threading, select, subprocess
53 | import pprint
54 | import traceback
55 | import signal
56 |
57 | del __dependencies_for_freezing
58 |
--------------------------------------------------------------------------------
/python27/1.0/lib/darwin/gevent/_semaphore.py:
--------------------------------------------------------------------------------
1 | def __bootstrap__():
2 | global __bootstrap__, __loader__, __file__
3 | import pkg_resources, imp
4 | __file__ = pkg_resources.resource_filename(__name__,'_semaphore.so')
5 | __loader__ = None; del __bootstrap__, __loader__
6 | imp.load_dynamic(__name__,__file__)
7 | try:
8 | __bootstrap__()
9 | except (ImportError, LookupError):
10 | raise ImportError('No module named %s' % __name__)
11 |
--------------------------------------------------------------------------------
/python27/1.0/lib/darwin/gevent/_semaphore.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Thobian/XX-Net/dd2fac14824caa6d6a0289298c937d7bace8b6af/python27/1.0/lib/darwin/gevent/_semaphore.so
--------------------------------------------------------------------------------
/python27/1.0/lib/darwin/gevent/_util.py:
--------------------------------------------------------------------------------
1 | def __bootstrap__():
2 | global __bootstrap__, __loader__, __file__
3 | import pkg_resources, imp
4 | __file__ = pkg_resources.resource_filename(__name__,'_util.so')
5 | __loader__ = None; del __bootstrap__, __loader__
6 | imp.load_dynamic(__name__,__file__)
7 | try:
8 | __bootstrap__()
9 | except (ImportError, LookupError):
10 | raise ImportError('No module named %s' % __name__)
11 |
--------------------------------------------------------------------------------
/python27/1.0/lib/darwin/gevent/_util.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Thobian/XX-Net/dd2fac14824caa6d6a0289298c937d7bace8b6af/python27/1.0/lib/darwin/gevent/_util.so
--------------------------------------------------------------------------------
/python27/1.0/lib/darwin/gevent/ares.py:
--------------------------------------------------------------------------------
1 | def __bootstrap__():
2 | global __bootstrap__, __loader__, __file__
3 | import pkg_resources, imp
4 | __file__ = pkg_resources.resource_filename(__name__,'ares.so')
5 | __loader__ = None; del __bootstrap__, __loader__
6 | imp.load_dynamic(__name__,__file__)
7 | try:
8 | __bootstrap__()
9 | except (ImportError, LookupError):
10 | raise ImportError('No module named %s' % __name__)
11 |
--------------------------------------------------------------------------------
/python27/1.0/lib/darwin/gevent/ares.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Thobian/XX-Net/dd2fac14824caa6d6a0289298c937d7bace8b6af/python27/1.0/lib/darwin/gevent/ares.so
--------------------------------------------------------------------------------
/python27/1.0/lib/darwin/gevent/core.py:
--------------------------------------------------------------------------------
1 | def __bootstrap__():
2 | global __bootstrap__, __loader__, __file__
3 | import pkg_resources, imp
4 | __file__ = pkg_resources.resource_filename(__name__,'core.so')
5 | __loader__ = None; del __bootstrap__, __loader__
6 | imp.load_dynamic(__name__,__file__)
7 | try:
8 | __bootstrap__()
9 | except (ImportError, LookupError):
10 | raise ImportError('No module named %s' % __name__)
11 |
--------------------------------------------------------------------------------
/python27/1.0/lib/darwin/gevent/core.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Thobian/XX-Net/dd2fac14824caa6d6a0289298c937d7bace8b6af/python27/1.0/lib/darwin/gevent/core.so
--------------------------------------------------------------------------------
/python27/1.0/lib/darwin/gevent/coros.py:
--------------------------------------------------------------------------------
1 | # This module definitely remains in 1.0.x, probably in versions after that too.
2 | import warnings
3 | warnings.warn('gevent.coros has been renamed to gevent.lock', DeprecationWarning, stacklevel=2)
4 |
5 | from gevent.lock import *
6 | from gevent.lock import __all__
7 |
--------------------------------------------------------------------------------
/python27/1.0/lib/darwin/gevent/resolver_thread.py:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2012 Denis Bilenko. See LICENSE for details.
2 | import _socket
3 | from gevent.hub import get_hub
4 |
5 |
6 | __all__ = ['Resolver']
7 |
8 |
9 | class Resolver(object):
10 |
11 | expected_errors = Exception
12 |
13 | def __init__(self, hub=None):
14 | if hub is None:
15 | hub = get_hub()
16 | self.pool = hub.threadpool
17 |
18 | def __repr__(self):
19 | return '' % (id(self), self.pool)
20 |
21 | def close(self):
22 | pass
23 |
24 | # from briefly reading socketmodule.c, it seems that all of the functions
25 | # below are thread-safe in Python, even if they are not thread-safe in C.
26 |
27 | def gethostbyname(self, *args):
28 | return self.pool.apply_e(self.expected_errors, _socket.gethostbyname, args)
29 |
30 | def gethostbyname_ex(self, *args):
31 | return self.pool.apply_e(self.expected_errors, _socket.gethostbyname_ex, args)
32 |
33 | def getaddrinfo(self, *args, **kwargs):
34 | return self.pool.apply_e(self.expected_errors, _socket.getaddrinfo, args, kwargs)
35 |
36 | def gethostbyaddr(self, *args, **kwargs):
37 | return self.pool.apply_e(self.expected_errors, _socket.gethostbyaddr, args, kwargs)
38 |
39 | def getnameinfo(self, *args, **kwargs):
40 | return self.pool.apply_e(self.expected_errors, _socket.getnameinfo, args, kwargs)
41 |
--------------------------------------------------------------------------------
/python27/1.0/lib/darwin/gevent/threading.py:
--------------------------------------------------------------------------------
1 | from __future__ import absolute_import
2 |
3 |
4 | __implements__ = ['local',
5 | '_start_new_thread',
6 | '_allocate_lock',
7 | 'Lock',
8 | '_get_ident',
9 | '_sleep',
10 | '_DummyThread']
11 |
12 |
13 | import threading as __threading__
14 | _DummyThread_ = __threading__._DummyThread
15 | from gevent.local import local
16 | from gevent.thread import start_new_thread as _start_new_thread, allocate_lock as _allocate_lock, get_ident as _get_ident
17 | from gevent.hub import sleep as _sleep, getcurrent
18 | Lock = _allocate_lock
19 |
20 |
21 | def _cleanup(g):
22 | __threading__._active.pop(id(g))
23 |
24 |
25 | class _DummyThread(_DummyThread_):
26 | # instances of this will cleanup its own entry
27 | # in ``threading._active``
28 |
29 | def __init__(self):
30 | _DummyThread_.__init__(self)
31 | g = getcurrent()
32 | rawlink = getattr(g, 'rawlink', None)
33 | if rawlink is not None:
34 | rawlink(_cleanup)
35 |
--------------------------------------------------------------------------------
/python27/1.0/lib/darwin/gevent/util.py:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2009 Denis Bilenko. See LICENSE for details.
2 | __all__ = ['wrap_errors']
3 |
4 | import sys
5 |
6 |
7 | class wrap_errors(object):
8 | """Helper to make function return an exception, rather than raise it.
9 |
10 | Because every exception that is unhandled by greenlet will be logged,
11 | it is desirable to prevent non-error exceptions from leaving a greenlet.
12 | This can done with simple ``try``/``except`` construct::
13 |
14 | def wrapped_func(*args, **kwargs):
15 | try:
16 | return func(*args, **kwargs)
17 | except (A, B, C), ex:
18 | return ex
19 |
20 | :class:`wrap_errors` provides a shortcut to write that in one line::
21 |
22 | wrapped_func = wrap_errors((A, B, C), func)
23 |
24 | It also preserves ``__str__`` and ``__repr__`` of the original function.
25 | """
26 | # QQQ could also support using wrap_errors as a decorator
27 |
28 | def __init__(self, errors, func):
29 | """Make a new function from `func', such that it catches `errors' (an
30 | Exception subclass, or a tuple of Exception subclasses) and return
31 | it as a value.
32 | """
33 | self.errors = errors
34 | self.func = func
35 |
36 | def __call__(self, *args, **kwargs):
37 | func = self.func
38 | try:
39 | return func(*args, **kwargs)
40 | except self.errors:
41 | return sys.exc_info()[1]
42 |
43 | def __str__(self):
44 | return str(self.func)
45 |
46 | def __repr__(self):
47 | return repr(self.func)
48 |
49 | def __getattr__(self, item):
50 | return getattr(self.func, item)
51 |
--------------------------------------------------------------------------------
/python27/1.0/lib/darwin/gevent/wsgi.py:
--------------------------------------------------------------------------------
1 | from gevent.pywsgi import *
2 | import gevent.pywsgi as _pywsgi
3 | __all__ = _pywsgi.__all__
4 | del _pywsgi
5 |
--------------------------------------------------------------------------------
/python27/1.0/lib/darwin/greenlet/__init__.py:
--------------------------------------------------------------------------------
1 | def __bootstrap__():
2 | global __bootstrap__, __loader__, __file__
3 | import pkg_resources, imp
4 | __file__ = pkg_resources.resource_filename(__name__,'greenlet.so')
5 | __loader__ = None; del __bootstrap__, __loader__
6 | imp.load_dynamic(__name__,__file__)
7 | try:
8 | __bootstrap__()
9 | except (ImportError, LookupError):
10 | raise ImportError('No module named %s' % __name__)
11 |
--------------------------------------------------------------------------------
/python27/1.0/lib/darwin/greenlet/greenlet.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Thobian/XX-Net/dd2fac14824caa6d6a0289298c937d7bace8b6af/python27/1.0/lib/darwin/greenlet/greenlet.so
--------------------------------------------------------------------------------
/python27/1.0/lib/distutils/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Thobian/XX-Net/dd2fac14824caa6d6a0289298c937d7bace8b6af/python27/1.0/lib/distutils/__init__.py
--------------------------------------------------------------------------------
/python27/1.0/lib/email/errors.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2001-2006 Python Software Foundation
2 | # Author: Barry Warsaw
3 | # Contact: email-sig@python.org
4 |
5 | """email package exception classes."""
6 |
7 |
8 |
9 | class MessageError(Exception):
10 | """Base class for errors in the email package."""
11 |
12 |
13 | class MessageParseError(MessageError):
14 | """Base class for message parsing errors."""
15 |
16 |
17 | class HeaderParseError(MessageParseError):
18 | """Error while parsing headers."""
19 |
20 |
21 | class BoundaryError(MessageParseError):
22 | """Couldn't find terminating boundary."""
23 |
24 |
25 | class MultipartConversionError(MessageError, TypeError):
26 | """Conversion to a multipart is prohibited."""
27 |
28 |
29 | class CharsetError(MessageError):
30 | """An illegal charset was given."""
31 |
32 |
33 |
34 | # These are parsing defects which the parser was able to work around.
35 | class MessageDefect:
36 | """Base class for a message defect."""
37 |
38 | def __init__(self, line=None):
39 | self.line = line
40 |
41 | class NoBoundaryInMultipartDefect(MessageDefect):
42 | """A message claimed to be a multipart but had no boundary parameter."""
43 |
44 | class StartBoundaryNotFoundDefect(MessageDefect):
45 | """The claimed start boundary was never found."""
46 |
47 | class FirstHeaderLineIsContinuationDefect(MessageDefect):
48 | """A message had a continuation line as its first header line."""
49 |
50 | class MisplacedEnvelopeHeaderDefect(MessageDefect):
51 | """A 'Unix-from' header was found in the middle of a header block."""
52 |
53 | class MalformedHeaderDefect(MessageDefect):
54 | """Found a header that was missing a colon, or was otherwise malformed."""
55 |
56 | class MultipartInvariantViolationDefect(MessageDefect):
57 | """A message claimed to be a multipart but no subparts were found."""
58 |
--------------------------------------------------------------------------------
/python27/1.0/lib/email/mime/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Thobian/XX-Net/dd2fac14824caa6d6a0289298c937d7bace8b6af/python27/1.0/lib/email/mime/__init__.py
--------------------------------------------------------------------------------
/python27/1.0/lib/email/mime/application.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2001-2006 Python Software Foundation
2 | # Author: Keith Dart
3 | # Contact: email-sig@python.org
4 |
5 | """Class representing application/* type MIME documents."""
6 |
7 | __all__ = ["MIMEApplication"]
8 |
9 | from email import encoders
10 | from email.mime.nonmultipart import MIMENonMultipart
11 |
12 |
13 | class MIMEApplication(MIMENonMultipart):
14 | """Class for generating application/* MIME documents."""
15 |
16 | def __init__(self, _data, _subtype='octet-stream',
17 | _encoder=encoders.encode_base64, **_params):
18 | """Create an application/* type MIME document.
19 |
20 | _data is a string containing the raw application data.
21 |
22 | _subtype is the MIME content type subtype, defaulting to
23 | 'octet-stream'.
24 |
25 | _encoder is a function which will perform the actual encoding for
26 | transport of the application data, defaulting to base64 encoding.
27 |
28 | Any additional keyword arguments are passed to the base class
29 | constructor, which turns them into parameters on the Content-Type
30 | header.
31 | """
32 | if _subtype is None:
33 | raise TypeError('Invalid application MIME subtype')
34 | MIMENonMultipart.__init__(self, 'application', _subtype, **_params)
35 | self.set_payload(_data)
36 | _encoder(self)
37 |
--------------------------------------------------------------------------------
/python27/1.0/lib/email/mime/base.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2001-2006 Python Software Foundation
2 | # Author: Barry Warsaw
3 | # Contact: email-sig@python.org
4 |
5 | """Base class for MIME specializations."""
6 |
7 | __all__ = ['MIMEBase']
8 |
9 | from email import message
10 |
11 |
12 |
13 | class MIMEBase(message.Message):
14 | """Base class for MIME specializations."""
15 |
16 | def __init__(self, _maintype, _subtype, **_params):
17 | """This constructor adds a Content-Type: and a MIME-Version: header.
18 |
19 | The Content-Type: header is taken from the _maintype and _subtype
20 | arguments. Additional parameters for this header are taken from the
21 | keyword arguments.
22 | """
23 | message.Message.__init__(self)
24 | ctype = '%s/%s' % (_maintype, _subtype)
25 | self.add_header('Content-Type', ctype, **_params)
26 | self['MIME-Version'] = '1.0'
27 |
--------------------------------------------------------------------------------
/python27/1.0/lib/email/mime/message.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2001-2006 Python Software Foundation
2 | # Author: Barry Warsaw
3 | # Contact: email-sig@python.org
4 |
5 | """Class representing message/* MIME documents."""
6 |
7 | __all__ = ['MIMEMessage']
8 |
9 | from email import message
10 | from email.mime.nonmultipart import MIMENonMultipart
11 |
12 |
13 |
14 | class MIMEMessage(MIMENonMultipart):
15 | """Class representing message/* MIME documents."""
16 |
17 | def __init__(self, _msg, _subtype='rfc822'):
18 | """Create a message/* type MIME document.
19 |
20 | _msg is a message object and must be an instance of Message, or a
21 | derived class of Message, otherwise a TypeError is raised.
22 |
23 | Optional _subtype defines the subtype of the contained message. The
24 | default is "rfc822" (this is defined by the MIME standard, even though
25 | the term "rfc822" is technically outdated by RFC 2822).
26 | """
27 | MIMENonMultipart.__init__(self, 'message', _subtype)
28 | if not isinstance(_msg, message.Message):
29 | raise TypeError('Argument is not an instance of Message')
30 | # It's convenient to use this base class method. We need to do it
31 | # this way or we'll get an exception
32 | message.Message.attach(self, _msg)
33 | # And be sure our default type is set correctly
34 | self.set_default_type('message/rfc822')
35 |
--------------------------------------------------------------------------------
/python27/1.0/lib/email/mime/multipart.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2002-2006 Python Software Foundation
2 | # Author: Barry Warsaw
3 | # Contact: email-sig@python.org
4 |
5 | """Base class for MIME multipart/* type messages."""
6 |
7 | __all__ = ['MIMEMultipart']
8 |
9 | from email.mime.base import MIMEBase
10 |
11 |
12 |
13 | class MIMEMultipart(MIMEBase):
14 | """Base class for MIME multipart/* type messages."""
15 |
16 | def __init__(self, _subtype='mixed', boundary=None, _subparts=None,
17 | **_params):
18 | """Creates a multipart/* type message.
19 |
20 | By default, creates a multipart/mixed message, with proper
21 | Content-Type and MIME-Version headers.
22 |
23 | _subtype is the subtype of the multipart content type, defaulting to
24 | `mixed'.
25 |
26 | boundary is the multipart boundary string. By default it is
27 | calculated as needed.
28 |
29 | _subparts is a sequence of initial subparts for the payload. It
30 | must be an iterable object, such as a list. You can always
31 | attach new subparts to the message by using the attach() method.
32 |
33 | Additional parameters for the Content-Type header are taken from the
34 | keyword arguments (or passed into the _params argument).
35 | """
36 | MIMEBase.__init__(self, 'multipart', _subtype, **_params)
37 |
38 | # Initialise _payload to an empty list as the Message superclass's
39 | # implementation of is_multipart assumes that _payload is a list for
40 | # multipart messages.
41 | self._payload = []
42 |
43 | if _subparts:
44 | for p in _subparts:
45 | self.attach(p)
46 | if boundary:
47 | self.set_boundary(boundary)
48 |
--------------------------------------------------------------------------------
/python27/1.0/lib/email/mime/nonmultipart.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2002-2006 Python Software Foundation
2 | # Author: Barry Warsaw
3 | # Contact: email-sig@python.org
4 |
5 | """Base class for MIME type messages that are not multipart."""
6 |
7 | __all__ = ['MIMENonMultipart']
8 |
9 | from email import errors
10 | from email.mime.base import MIMEBase
11 |
12 |
13 |
14 | class MIMENonMultipart(MIMEBase):
15 | """Base class for MIME non-multipart type messages."""
16 |
17 | def attach(self, payload):
18 | # The public API prohibits attaching multiple subparts to MIMEBase
19 | # derived subtypes since none of them are, by definition, of content
20 | # type multipart/*
21 | raise errors.MultipartConversionError(
22 | 'Cannot attach additional subparts to non-multipart/*')
23 |
--------------------------------------------------------------------------------
/python27/1.0/lib/email/mime/text.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2001-2006 Python Software Foundation
2 | # Author: Barry Warsaw
3 | # Contact: email-sig@python.org
4 |
5 | """Class representing text/* type MIME documents."""
6 |
7 | __all__ = ['MIMEText']
8 |
9 | from email.encoders import encode_7or8bit
10 | from email.mime.nonmultipart import MIMENonMultipart
11 |
12 |
13 |
14 | class MIMEText(MIMENonMultipart):
15 | """Class for generating text/* type MIME documents."""
16 |
17 | def __init__(self, _text, _subtype='plain', _charset='us-ascii'):
18 | """Create a text/* type MIME document.
19 |
20 | _text is the string for this message object.
21 |
22 | _subtype is the MIME sub content type, defaulting to "plain".
23 |
24 | _charset is the character set parameter added to the Content-Type
25 | header. This defaults to "us-ascii". Note that as a side-effect, the
26 | Content-Transfer-Encoding header will also be set.
27 | """
28 | MIMENonMultipart.__init__(self, 'text', _subtype,
29 | **{'charset': _charset})
30 | self.set_payload(_text, _charset)
31 |
--------------------------------------------------------------------------------
/python27/1.0/lib/email/test/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Thobian/XX-Net/dd2fac14824caa6d6a0289298c937d7bace8b6af/python27/1.0/lib/email/test/__init__.py
--------------------------------------------------------------------------------
/python27/1.0/lib/encodings/ascii.py:
--------------------------------------------------------------------------------
1 | """ Python 'ascii' Codec
2 |
3 |
4 | Written by Marc-Andre Lemburg (mal@lemburg.com).
5 |
6 | (c) Copyright CNRI, All Rights Reserved. NO WARRANTY.
7 |
8 | """
9 | import codecs
10 |
11 | ### Codec APIs
12 |
13 | class Codec(codecs.Codec):
14 |
15 | # Note: Binding these as C functions will result in the class not
16 | # converting them to methods. This is intended.
17 | encode = codecs.ascii_encode
18 | decode = codecs.ascii_decode
19 |
20 | class IncrementalEncoder(codecs.IncrementalEncoder):
21 | def encode(self, input, final=False):
22 | return codecs.ascii_encode(input, self.errors)[0]
23 |
24 | class IncrementalDecoder(codecs.IncrementalDecoder):
25 | def decode(self, input, final=False):
26 | return codecs.ascii_decode(input, self.errors)[0]
27 |
28 | class StreamWriter(Codec,codecs.StreamWriter):
29 | pass
30 |
31 | class StreamReader(Codec,codecs.StreamReader):
32 | pass
33 |
34 | class StreamConverter(StreamWriter,StreamReader):
35 |
36 | encode = codecs.ascii_decode
37 | decode = codecs.ascii_encode
38 |
39 | ### encodings module API
40 |
41 | def getregentry():
42 | return codecs.CodecInfo(
43 | name='ascii',
44 | encode=Codec.encode,
45 | decode=Codec.decode,
46 | incrementalencoder=IncrementalEncoder,
47 | incrementaldecoder=IncrementalDecoder,
48 | streamwriter=StreamWriter,
49 | streamreader=StreamReader,
50 | )
51 |
--------------------------------------------------------------------------------
/python27/1.0/lib/encodings/big5.py:
--------------------------------------------------------------------------------
1 | #
2 | # big5.py: Python Unicode Codec for BIG5
3 | #
4 | # Written by Hye-Shik Chang
5 | #
6 |
7 | import _codecs_tw, codecs
8 | import _multibytecodec as mbc
9 |
10 | codec = _codecs_tw.getcodec('big5')
11 |
12 | class Codec(codecs.Codec):
13 | encode = codec.encode
14 | decode = codec.decode
15 |
16 | class IncrementalEncoder(mbc.MultibyteIncrementalEncoder,
17 | codecs.IncrementalEncoder):
18 | codec = codec
19 |
20 | class IncrementalDecoder(mbc.MultibyteIncrementalDecoder,
21 | codecs.IncrementalDecoder):
22 | codec = codec
23 |
24 | class StreamReader(Codec, mbc.MultibyteStreamReader, codecs.StreamReader):
25 | codec = codec
26 |
27 | class StreamWriter(Codec, mbc.MultibyteStreamWriter, codecs.StreamWriter):
28 | codec = codec
29 |
30 | def getregentry():
31 | return codecs.CodecInfo(
32 | name='big5',
33 | encode=Codec().encode,
34 | decode=Codec().decode,
35 | incrementalencoder=IncrementalEncoder,
36 | incrementaldecoder=IncrementalDecoder,
37 | streamreader=StreamReader,
38 | streamwriter=StreamWriter,
39 | )
40 |
--------------------------------------------------------------------------------
/python27/1.0/lib/encodings/big5hkscs.py:
--------------------------------------------------------------------------------
1 | #
2 | # big5hkscs.py: Python Unicode Codec for BIG5HKSCS
3 | #
4 | # Written by Hye-Shik Chang
5 | #
6 |
7 | import _codecs_hk, codecs
8 | import _multibytecodec as mbc
9 |
10 | codec = _codecs_hk.getcodec('big5hkscs')
11 |
12 | class Codec(codecs.Codec):
13 | encode = codec.encode
14 | decode = codec.decode
15 |
16 | class IncrementalEncoder(mbc.MultibyteIncrementalEncoder,
17 | codecs.IncrementalEncoder):
18 | codec = codec
19 |
20 | class IncrementalDecoder(mbc.MultibyteIncrementalDecoder,
21 | codecs.IncrementalDecoder):
22 | codec = codec
23 |
24 | class StreamReader(Codec, mbc.MultibyteStreamReader, codecs.StreamReader):
25 | codec = codec
26 |
27 | class StreamWriter(Codec, mbc.MultibyteStreamWriter, codecs.StreamWriter):
28 | codec = codec
29 |
30 | def getregentry():
31 | return codecs.CodecInfo(
32 | name='big5hkscs',
33 | encode=Codec().encode,
34 | decode=Codec().decode,
35 | incrementalencoder=IncrementalEncoder,
36 | incrementaldecoder=IncrementalDecoder,
37 | streamreader=StreamReader,
38 | streamwriter=StreamWriter,
39 | )
40 |
--------------------------------------------------------------------------------
/python27/1.0/lib/encodings/cp932.py:
--------------------------------------------------------------------------------
1 | #
2 | # cp932.py: Python Unicode Codec for CP932
3 | #
4 | # Written by Hye-Shik Chang
5 | #
6 |
7 | import _codecs_jp, codecs
8 | import _multibytecodec as mbc
9 |
10 | codec = _codecs_jp.getcodec('cp932')
11 |
12 | class Codec(codecs.Codec):
13 | encode = codec.encode
14 | decode = codec.decode
15 |
16 | class IncrementalEncoder(mbc.MultibyteIncrementalEncoder,
17 | codecs.IncrementalEncoder):
18 | codec = codec
19 |
20 | class IncrementalDecoder(mbc.MultibyteIncrementalDecoder,
21 | codecs.IncrementalDecoder):
22 | codec = codec
23 |
24 | class StreamReader(Codec, mbc.MultibyteStreamReader, codecs.StreamReader):
25 | codec = codec
26 |
27 | class StreamWriter(Codec, mbc.MultibyteStreamWriter, codecs.StreamWriter):
28 | codec = codec
29 |
30 | def getregentry():
31 | return codecs.CodecInfo(
32 | name='cp932',
33 | encode=Codec().encode,
34 | decode=Codec().decode,
35 | incrementalencoder=IncrementalEncoder,
36 | incrementaldecoder=IncrementalDecoder,
37 | streamreader=StreamReader,
38 | streamwriter=StreamWriter,
39 | )
40 |
--------------------------------------------------------------------------------
/python27/1.0/lib/encodings/cp949.py:
--------------------------------------------------------------------------------
1 | #
2 | # cp949.py: Python Unicode Codec for CP949
3 | #
4 | # Written by Hye-Shik Chang
5 | #
6 |
7 | import _codecs_kr, codecs
8 | import _multibytecodec as mbc
9 |
10 | codec = _codecs_kr.getcodec('cp949')
11 |
12 | class Codec(codecs.Codec):
13 | encode = codec.encode
14 | decode = codec.decode
15 |
16 | class IncrementalEncoder(mbc.MultibyteIncrementalEncoder,
17 | codecs.IncrementalEncoder):
18 | codec = codec
19 |
20 | class IncrementalDecoder(mbc.MultibyteIncrementalDecoder,
21 | codecs.IncrementalDecoder):
22 | codec = codec
23 |
24 | class StreamReader(Codec, mbc.MultibyteStreamReader, codecs.StreamReader):
25 | codec = codec
26 |
27 | class StreamWriter(Codec, mbc.MultibyteStreamWriter, codecs.StreamWriter):
28 | codec = codec
29 |
30 | def getregentry():
31 | return codecs.CodecInfo(
32 | name='cp949',
33 | encode=Codec().encode,
34 | decode=Codec().decode,
35 | incrementalencoder=IncrementalEncoder,
36 | incrementaldecoder=IncrementalDecoder,
37 | streamreader=StreamReader,
38 | streamwriter=StreamWriter,
39 | )
40 |
--------------------------------------------------------------------------------
/python27/1.0/lib/encodings/cp950.py:
--------------------------------------------------------------------------------
1 | #
2 | # cp950.py: Python Unicode Codec for CP950
3 | #
4 | # Written by Hye-Shik Chang
5 | #
6 |
7 | import _codecs_tw, codecs
8 | import _multibytecodec as mbc
9 |
10 | codec = _codecs_tw.getcodec('cp950')
11 |
12 | class Codec(codecs.Codec):
13 | encode = codec.encode
14 | decode = codec.decode
15 |
16 | class IncrementalEncoder(mbc.MultibyteIncrementalEncoder,
17 | codecs.IncrementalEncoder):
18 | codec = codec
19 |
20 | class IncrementalDecoder(mbc.MultibyteIncrementalDecoder,
21 | codecs.IncrementalDecoder):
22 | codec = codec
23 |
24 | class StreamReader(Codec, mbc.MultibyteStreamReader, codecs.StreamReader):
25 | codec = codec
26 |
27 | class StreamWriter(Codec, mbc.MultibyteStreamWriter, codecs.StreamWriter):
28 | codec = codec
29 |
30 | def getregentry():
31 | return codecs.CodecInfo(
32 | name='cp950',
33 | encode=Codec().encode,
34 | decode=Codec().decode,
35 | incrementalencoder=IncrementalEncoder,
36 | incrementaldecoder=IncrementalDecoder,
37 | streamreader=StreamReader,
38 | streamwriter=StreamWriter,
39 | )
40 |
--------------------------------------------------------------------------------
/python27/1.0/lib/encodings/euc_jis_2004.py:
--------------------------------------------------------------------------------
1 | #
2 | # euc_jis_2004.py: Python Unicode Codec for EUC_JIS_2004
3 | #
4 | # Written by Hye-Shik Chang
5 | #
6 |
7 | import _codecs_jp, codecs
8 | import _multibytecodec as mbc
9 |
10 | codec = _codecs_jp.getcodec('euc_jis_2004')
11 |
12 | class Codec(codecs.Codec):
13 | encode = codec.encode
14 | decode = codec.decode
15 |
16 | class IncrementalEncoder(mbc.MultibyteIncrementalEncoder,
17 | codecs.IncrementalEncoder):
18 | codec = codec
19 |
20 | class IncrementalDecoder(mbc.MultibyteIncrementalDecoder,
21 | codecs.IncrementalDecoder):
22 | codec = codec
23 |
24 | class StreamReader(Codec, mbc.MultibyteStreamReader, codecs.StreamReader):
25 | codec = codec
26 |
27 | class StreamWriter(Codec, mbc.MultibyteStreamWriter, codecs.StreamWriter):
28 | codec = codec
29 |
30 | def getregentry():
31 | return codecs.CodecInfo(
32 | name='euc_jis_2004',
33 | encode=Codec().encode,
34 | decode=Codec().decode,
35 | incrementalencoder=IncrementalEncoder,
36 | incrementaldecoder=IncrementalDecoder,
37 | streamreader=StreamReader,
38 | streamwriter=StreamWriter,
39 | )
40 |
--------------------------------------------------------------------------------
/python27/1.0/lib/encodings/euc_jisx0213.py:
--------------------------------------------------------------------------------
1 | #
2 | # euc_jisx0213.py: Python Unicode Codec for EUC_JISX0213
3 | #
4 | # Written by Hye-Shik Chang
5 | #
6 |
7 | import _codecs_jp, codecs
8 | import _multibytecodec as mbc
9 |
10 | codec = _codecs_jp.getcodec('euc_jisx0213')
11 |
12 | class Codec(codecs.Codec):
13 | encode = codec.encode
14 | decode = codec.decode
15 |
16 | class IncrementalEncoder(mbc.MultibyteIncrementalEncoder,
17 | codecs.IncrementalEncoder):
18 | codec = codec
19 |
20 | class IncrementalDecoder(mbc.MultibyteIncrementalDecoder,
21 | codecs.IncrementalDecoder):
22 | codec = codec
23 |
24 | class StreamReader(Codec, mbc.MultibyteStreamReader, codecs.StreamReader):
25 | codec = codec
26 |
27 | class StreamWriter(Codec, mbc.MultibyteStreamWriter, codecs.StreamWriter):
28 | codec = codec
29 |
30 | def getregentry():
31 | return codecs.CodecInfo(
32 | name='euc_jisx0213',
33 | encode=Codec().encode,
34 | decode=Codec().decode,
35 | incrementalencoder=IncrementalEncoder,
36 | incrementaldecoder=IncrementalDecoder,
37 | streamreader=StreamReader,
38 | streamwriter=StreamWriter,
39 | )
40 |
--------------------------------------------------------------------------------
/python27/1.0/lib/encodings/euc_jp.py:
--------------------------------------------------------------------------------
1 | #
2 | # euc_jp.py: Python Unicode Codec for EUC_JP
3 | #
4 | # Written by Hye-Shik Chang
5 | #
6 |
7 | import _codecs_jp, codecs
8 | import _multibytecodec as mbc
9 |
10 | codec = _codecs_jp.getcodec('euc_jp')
11 |
12 | class Codec(codecs.Codec):
13 | encode = codec.encode
14 | decode = codec.decode
15 |
16 | class IncrementalEncoder(mbc.MultibyteIncrementalEncoder,
17 | codecs.IncrementalEncoder):
18 | codec = codec
19 |
20 | class IncrementalDecoder(mbc.MultibyteIncrementalDecoder,
21 | codecs.IncrementalDecoder):
22 | codec = codec
23 |
24 | class StreamReader(Codec, mbc.MultibyteStreamReader, codecs.StreamReader):
25 | codec = codec
26 |
27 | class StreamWriter(Codec, mbc.MultibyteStreamWriter, codecs.StreamWriter):
28 | codec = codec
29 |
30 | def getregentry():
31 | return codecs.CodecInfo(
32 | name='euc_jp',
33 | encode=Codec().encode,
34 | decode=Codec().decode,
35 | incrementalencoder=IncrementalEncoder,
36 | incrementaldecoder=IncrementalDecoder,
37 | streamreader=StreamReader,
38 | streamwriter=StreamWriter,
39 | )
40 |
--------------------------------------------------------------------------------
/python27/1.0/lib/encodings/euc_kr.py:
--------------------------------------------------------------------------------
1 | #
2 | # euc_kr.py: Python Unicode Codec for EUC_KR
3 | #
4 | # Written by Hye-Shik Chang
5 | #
6 |
7 | import _codecs_kr, codecs
8 | import _multibytecodec as mbc
9 |
10 | codec = _codecs_kr.getcodec('euc_kr')
11 |
12 | class Codec(codecs.Codec):
13 | encode = codec.encode
14 | decode = codec.decode
15 |
16 | class IncrementalEncoder(mbc.MultibyteIncrementalEncoder,
17 | codecs.IncrementalEncoder):
18 | codec = codec
19 |
20 | class IncrementalDecoder(mbc.MultibyteIncrementalDecoder,
21 | codecs.IncrementalDecoder):
22 | codec = codec
23 |
24 | class StreamReader(Codec, mbc.MultibyteStreamReader, codecs.StreamReader):
25 | codec = codec
26 |
27 | class StreamWriter(Codec, mbc.MultibyteStreamWriter, codecs.StreamWriter):
28 | codec = codec
29 |
30 | def getregentry():
31 | return codecs.CodecInfo(
32 | name='euc_kr',
33 | encode=Codec().encode,
34 | decode=Codec().decode,
35 | incrementalencoder=IncrementalEncoder,
36 | incrementaldecoder=IncrementalDecoder,
37 | streamreader=StreamReader,
38 | streamwriter=StreamWriter,
39 | )
40 |
--------------------------------------------------------------------------------
/python27/1.0/lib/encodings/gb18030.py:
--------------------------------------------------------------------------------
1 | #
2 | # gb18030.py: Python Unicode Codec for GB18030
3 | #
4 | # Written by Hye-Shik Chang
5 | #
6 |
7 | import _codecs_cn, codecs
8 | import _multibytecodec as mbc
9 |
10 | codec = _codecs_cn.getcodec('gb18030')
11 |
12 | class Codec(codecs.Codec):
13 | encode = codec.encode
14 | decode = codec.decode
15 |
16 | class IncrementalEncoder(mbc.MultibyteIncrementalEncoder,
17 | codecs.IncrementalEncoder):
18 | codec = codec
19 |
20 | class IncrementalDecoder(mbc.MultibyteIncrementalDecoder,
21 | codecs.IncrementalDecoder):
22 | codec = codec
23 |
24 | class StreamReader(Codec, mbc.MultibyteStreamReader, codecs.StreamReader):
25 | codec = codec
26 |
27 | class StreamWriter(Codec, mbc.MultibyteStreamWriter, codecs.StreamWriter):
28 | codec = codec
29 |
30 | def getregentry():
31 | return codecs.CodecInfo(
32 | name='gb18030',
33 | encode=Codec().encode,
34 | decode=Codec().decode,
35 | incrementalencoder=IncrementalEncoder,
36 | incrementaldecoder=IncrementalDecoder,
37 | streamreader=StreamReader,
38 | streamwriter=StreamWriter,
39 | )
40 |
--------------------------------------------------------------------------------
/python27/1.0/lib/encodings/gb2312.py:
--------------------------------------------------------------------------------
1 | #
2 | # gb2312.py: Python Unicode Codec for GB2312
3 | #
4 | # Written by Hye-Shik Chang
5 | #
6 |
7 | import _codecs_cn, codecs
8 | import _multibytecodec as mbc
9 |
10 | codec = _codecs_cn.getcodec('gb2312')
11 |
12 | class Codec(codecs.Codec):
13 | encode = codec.encode
14 | decode = codec.decode
15 |
16 | class IncrementalEncoder(mbc.MultibyteIncrementalEncoder,
17 | codecs.IncrementalEncoder):
18 | codec = codec
19 |
20 | class IncrementalDecoder(mbc.MultibyteIncrementalDecoder,
21 | codecs.IncrementalDecoder):
22 | codec = codec
23 |
24 | class StreamReader(Codec, mbc.MultibyteStreamReader, codecs.StreamReader):
25 | codec = codec
26 |
27 | class StreamWriter(Codec, mbc.MultibyteStreamWriter, codecs.StreamWriter):
28 | codec = codec
29 |
30 | def getregentry():
31 | return codecs.CodecInfo(
32 | name='gb2312',
33 | encode=Codec().encode,
34 | decode=Codec().decode,
35 | incrementalencoder=IncrementalEncoder,
36 | incrementaldecoder=IncrementalDecoder,
37 | streamreader=StreamReader,
38 | streamwriter=StreamWriter,
39 | )
40 |
--------------------------------------------------------------------------------
/python27/1.0/lib/encodings/gbk.py:
--------------------------------------------------------------------------------
1 | #
2 | # gbk.py: Python Unicode Codec for GBK
3 | #
4 | # Written by Hye-Shik Chang
5 | #
6 |
7 | import _codecs_cn, codecs
8 | import _multibytecodec as mbc
9 |
10 | codec = _codecs_cn.getcodec('gbk')
11 |
12 | class Codec(codecs.Codec):
13 | encode = codec.encode
14 | decode = codec.decode
15 |
16 | class IncrementalEncoder(mbc.MultibyteIncrementalEncoder,
17 | codecs.IncrementalEncoder):
18 | codec = codec
19 |
20 | class IncrementalDecoder(mbc.MultibyteIncrementalDecoder,
21 | codecs.IncrementalDecoder):
22 | codec = codec
23 |
24 | class StreamReader(Codec, mbc.MultibyteStreamReader, codecs.StreamReader):
25 | codec = codec
26 |
27 | class StreamWriter(Codec, mbc.MultibyteStreamWriter, codecs.StreamWriter):
28 | codec = codec
29 |
30 | def getregentry():
31 | return codecs.CodecInfo(
32 | name='gbk',
33 | encode=Codec().encode,
34 | decode=Codec().decode,
35 | incrementalencoder=IncrementalEncoder,
36 | incrementaldecoder=IncrementalDecoder,
37 | streamreader=StreamReader,
38 | streamwriter=StreamWriter,
39 | )
40 |
--------------------------------------------------------------------------------
/python27/1.0/lib/encodings/hz.py:
--------------------------------------------------------------------------------
1 | #
2 | # hz.py: Python Unicode Codec for HZ
3 | #
4 | # Written by Hye-Shik Chang
5 | #
6 |
7 | import _codecs_cn, codecs
8 | import _multibytecodec as mbc
9 |
10 | codec = _codecs_cn.getcodec('hz')
11 |
12 | class Codec(codecs.Codec):
13 | encode = codec.encode
14 | decode = codec.decode
15 |
16 | class IncrementalEncoder(mbc.MultibyteIncrementalEncoder,
17 | codecs.IncrementalEncoder):
18 | codec = codec
19 |
20 | class IncrementalDecoder(mbc.MultibyteIncrementalDecoder,
21 | codecs.IncrementalDecoder):
22 | codec = codec
23 |
24 | class StreamReader(Codec, mbc.MultibyteStreamReader, codecs.StreamReader):
25 | codec = codec
26 |
27 | class StreamWriter(Codec, mbc.MultibyteStreamWriter, codecs.StreamWriter):
28 | codec = codec
29 |
30 | def getregentry():
31 | return codecs.CodecInfo(
32 | name='hz',
33 | encode=Codec().encode,
34 | decode=Codec().decode,
35 | incrementalencoder=IncrementalEncoder,
36 | incrementaldecoder=IncrementalDecoder,
37 | streamreader=StreamReader,
38 | streamwriter=StreamWriter,
39 | )
40 |
--------------------------------------------------------------------------------
/python27/1.0/lib/encodings/iso2022_jp.py:
--------------------------------------------------------------------------------
1 | #
2 | # iso2022_jp.py: Python Unicode Codec for ISO2022_JP
3 | #
4 | # Written by Hye-Shik Chang
5 | #
6 |
7 | import _codecs_iso2022, codecs
8 | import _multibytecodec as mbc
9 |
10 | codec = _codecs_iso2022.getcodec('iso2022_jp')
11 |
12 | class Codec(codecs.Codec):
13 | encode = codec.encode
14 | decode = codec.decode
15 |
16 | class IncrementalEncoder(mbc.MultibyteIncrementalEncoder,
17 | codecs.IncrementalEncoder):
18 | codec = codec
19 |
20 | class IncrementalDecoder(mbc.MultibyteIncrementalDecoder,
21 | codecs.IncrementalDecoder):
22 | codec = codec
23 |
24 | class StreamReader(Codec, mbc.MultibyteStreamReader, codecs.StreamReader):
25 | codec = codec
26 |
27 | class StreamWriter(Codec, mbc.MultibyteStreamWriter, codecs.StreamWriter):
28 | codec = codec
29 |
30 | def getregentry():
31 | return codecs.CodecInfo(
32 | name='iso2022_jp',
33 | encode=Codec().encode,
34 | decode=Codec().decode,
35 | incrementalencoder=IncrementalEncoder,
36 | incrementaldecoder=IncrementalDecoder,
37 | streamreader=StreamReader,
38 | streamwriter=StreamWriter,
39 | )
40 |
--------------------------------------------------------------------------------
/python27/1.0/lib/encodings/iso2022_jp_1.py:
--------------------------------------------------------------------------------
1 | #
2 | # iso2022_jp_1.py: Python Unicode Codec for ISO2022_JP_1
3 | #
4 | # Written by Hye-Shik Chang
5 | #
6 |
7 | import _codecs_iso2022, codecs
8 | import _multibytecodec as mbc
9 |
10 | codec = _codecs_iso2022.getcodec('iso2022_jp_1')
11 |
12 | class Codec(codecs.Codec):
13 | encode = codec.encode
14 | decode = codec.decode
15 |
16 | class IncrementalEncoder(mbc.MultibyteIncrementalEncoder,
17 | codecs.IncrementalEncoder):
18 | codec = codec
19 |
20 | class IncrementalDecoder(mbc.MultibyteIncrementalDecoder,
21 | codecs.IncrementalDecoder):
22 | codec = codec
23 |
24 | class StreamReader(Codec, mbc.MultibyteStreamReader, codecs.StreamReader):
25 | codec = codec
26 |
27 | class StreamWriter(Codec, mbc.MultibyteStreamWriter, codecs.StreamWriter):
28 | codec = codec
29 |
30 | def getregentry():
31 | return codecs.CodecInfo(
32 | name='iso2022_jp_1',
33 | encode=Codec().encode,
34 | decode=Codec().decode,
35 | incrementalencoder=IncrementalEncoder,
36 | incrementaldecoder=IncrementalDecoder,
37 | streamreader=StreamReader,
38 | streamwriter=StreamWriter,
39 | )
40 |
--------------------------------------------------------------------------------
/python27/1.0/lib/encodings/iso2022_jp_2.py:
--------------------------------------------------------------------------------
1 | #
2 | # iso2022_jp_2.py: Python Unicode Codec for ISO2022_JP_2
3 | #
4 | # Written by Hye-Shik Chang
5 | #
6 |
7 | import _codecs_iso2022, codecs
8 | import _multibytecodec as mbc
9 |
10 | codec = _codecs_iso2022.getcodec('iso2022_jp_2')
11 |
12 | class Codec(codecs.Codec):
13 | encode = codec.encode
14 | decode = codec.decode
15 |
16 | class IncrementalEncoder(mbc.MultibyteIncrementalEncoder,
17 | codecs.IncrementalEncoder):
18 | codec = codec
19 |
20 | class IncrementalDecoder(mbc.MultibyteIncrementalDecoder,
21 | codecs.IncrementalDecoder):
22 | codec = codec
23 |
24 | class StreamReader(Codec, mbc.MultibyteStreamReader, codecs.StreamReader):
25 | codec = codec
26 |
27 | class StreamWriter(Codec, mbc.MultibyteStreamWriter, codecs.StreamWriter):
28 | codec = codec
29 |
30 | def getregentry():
31 | return codecs.CodecInfo(
32 | name='iso2022_jp_2',
33 | encode=Codec().encode,
34 | decode=Codec().decode,
35 | incrementalencoder=IncrementalEncoder,
36 | incrementaldecoder=IncrementalDecoder,
37 | streamreader=StreamReader,
38 | streamwriter=StreamWriter,
39 | )
40 |
--------------------------------------------------------------------------------
/python27/1.0/lib/encodings/iso2022_jp_2004.py:
--------------------------------------------------------------------------------
1 | #
2 | # iso2022_jp_2004.py: Python Unicode Codec for ISO2022_JP_2004
3 | #
4 | # Written by Hye-Shik Chang
5 | #
6 |
7 | import _codecs_iso2022, codecs
8 | import _multibytecodec as mbc
9 |
10 | codec = _codecs_iso2022.getcodec('iso2022_jp_2004')
11 |
12 | class Codec(codecs.Codec):
13 | encode = codec.encode
14 | decode = codec.decode
15 |
16 | class IncrementalEncoder(mbc.MultibyteIncrementalEncoder,
17 | codecs.IncrementalEncoder):
18 | codec = codec
19 |
20 | class IncrementalDecoder(mbc.MultibyteIncrementalDecoder,
21 | codecs.IncrementalDecoder):
22 | codec = codec
23 |
24 | class StreamReader(Codec, mbc.MultibyteStreamReader, codecs.StreamReader):
25 | codec = codec
26 |
27 | class StreamWriter(Codec, mbc.MultibyteStreamWriter, codecs.StreamWriter):
28 | codec = codec
29 |
30 | def getregentry():
31 | return codecs.CodecInfo(
32 | name='iso2022_jp_2004',
33 | encode=Codec().encode,
34 | decode=Codec().decode,
35 | incrementalencoder=IncrementalEncoder,
36 | incrementaldecoder=IncrementalDecoder,
37 | streamreader=StreamReader,
38 | streamwriter=StreamWriter,
39 | )
40 |
--------------------------------------------------------------------------------
/python27/1.0/lib/encodings/iso2022_jp_3.py:
--------------------------------------------------------------------------------
1 | #
2 | # iso2022_jp_3.py: Python Unicode Codec for ISO2022_JP_3
3 | #
4 | # Written by Hye-Shik Chang
5 | #
6 |
7 | import _codecs_iso2022, codecs
8 | import _multibytecodec as mbc
9 |
10 | codec = _codecs_iso2022.getcodec('iso2022_jp_3')
11 |
12 | class Codec(codecs.Codec):
13 | encode = codec.encode
14 | decode = codec.decode
15 |
16 | class IncrementalEncoder(mbc.MultibyteIncrementalEncoder,
17 | codecs.IncrementalEncoder):
18 | codec = codec
19 |
20 | class IncrementalDecoder(mbc.MultibyteIncrementalDecoder,
21 | codecs.IncrementalDecoder):
22 | codec = codec
23 |
24 | class StreamReader(Codec, mbc.MultibyteStreamReader, codecs.StreamReader):
25 | codec = codec
26 |
27 | class StreamWriter(Codec, mbc.MultibyteStreamWriter, codecs.StreamWriter):
28 | codec = codec
29 |
30 | def getregentry():
31 | return codecs.CodecInfo(
32 | name='iso2022_jp_3',
33 | encode=Codec().encode,
34 | decode=Codec().decode,
35 | incrementalencoder=IncrementalEncoder,
36 | incrementaldecoder=IncrementalDecoder,
37 | streamreader=StreamReader,
38 | streamwriter=StreamWriter,
39 | )
40 |
--------------------------------------------------------------------------------
/python27/1.0/lib/encodings/iso2022_jp_ext.py:
--------------------------------------------------------------------------------
1 | #
2 | # iso2022_jp_ext.py: Python Unicode Codec for ISO2022_JP_EXT
3 | #
4 | # Written by Hye-Shik Chang
5 | #
6 |
7 | import _codecs_iso2022, codecs
8 | import _multibytecodec as mbc
9 |
10 | codec = _codecs_iso2022.getcodec('iso2022_jp_ext')
11 |
12 | class Codec(codecs.Codec):
13 | encode = codec.encode
14 | decode = codec.decode
15 |
16 | class IncrementalEncoder(mbc.MultibyteIncrementalEncoder,
17 | codecs.IncrementalEncoder):
18 | codec = codec
19 |
20 | class IncrementalDecoder(mbc.MultibyteIncrementalDecoder,
21 | codecs.IncrementalDecoder):
22 | codec = codec
23 |
24 | class StreamReader(Codec, mbc.MultibyteStreamReader, codecs.StreamReader):
25 | codec = codec
26 |
27 | class StreamWriter(Codec, mbc.MultibyteStreamWriter, codecs.StreamWriter):
28 | codec = codec
29 |
30 | def getregentry():
31 | return codecs.CodecInfo(
32 | name='iso2022_jp_ext',
33 | encode=Codec().encode,
34 | decode=Codec().decode,
35 | incrementalencoder=IncrementalEncoder,
36 | incrementaldecoder=IncrementalDecoder,
37 | streamreader=StreamReader,
38 | streamwriter=StreamWriter,
39 | )
40 |
--------------------------------------------------------------------------------
/python27/1.0/lib/encodings/iso2022_kr.py:
--------------------------------------------------------------------------------
1 | #
2 | # iso2022_kr.py: Python Unicode Codec for ISO2022_KR
3 | #
4 | # Written by Hye-Shik Chang
5 | #
6 |
7 | import _codecs_iso2022, codecs
8 | import _multibytecodec as mbc
9 |
10 | codec = _codecs_iso2022.getcodec('iso2022_kr')
11 |
12 | class Codec(codecs.Codec):
13 | encode = codec.encode
14 | decode = codec.decode
15 |
16 | class IncrementalEncoder(mbc.MultibyteIncrementalEncoder,
17 | codecs.IncrementalEncoder):
18 | codec = codec
19 |
20 | class IncrementalDecoder(mbc.MultibyteIncrementalDecoder,
21 | codecs.IncrementalDecoder):
22 | codec = codec
23 |
24 | class StreamReader(Codec, mbc.MultibyteStreamReader, codecs.StreamReader):
25 | codec = codec
26 |
27 | class StreamWriter(Codec, mbc.MultibyteStreamWriter, codecs.StreamWriter):
28 | codec = codec
29 |
30 | def getregentry():
31 | return codecs.CodecInfo(
32 | name='iso2022_kr',
33 | encode=Codec().encode,
34 | decode=Codec().decode,
35 | incrementalencoder=IncrementalEncoder,
36 | incrementaldecoder=IncrementalDecoder,
37 | streamreader=StreamReader,
38 | streamwriter=StreamWriter,
39 | )
40 |
--------------------------------------------------------------------------------
/python27/1.0/lib/encodings/johab.py:
--------------------------------------------------------------------------------
1 | #
2 | # johab.py: Python Unicode Codec for JOHAB
3 | #
4 | # Written by Hye-Shik Chang
5 | #
6 |
7 | import _codecs_kr, codecs
8 | import _multibytecodec as mbc
9 |
10 | codec = _codecs_kr.getcodec('johab')
11 |
12 | class Codec(codecs.Codec):
13 | encode = codec.encode
14 | decode = codec.decode
15 |
16 | class IncrementalEncoder(mbc.MultibyteIncrementalEncoder,
17 | codecs.IncrementalEncoder):
18 | codec = codec
19 |
20 | class IncrementalDecoder(mbc.MultibyteIncrementalDecoder,
21 | codecs.IncrementalDecoder):
22 | codec = codec
23 |
24 | class StreamReader(Codec, mbc.MultibyteStreamReader, codecs.StreamReader):
25 | codec = codec
26 |
27 | class StreamWriter(Codec, mbc.MultibyteStreamWriter, codecs.StreamWriter):
28 | codec = codec
29 |
30 | def getregentry():
31 | return codecs.CodecInfo(
32 | name='johab',
33 | encode=Codec().encode,
34 | decode=Codec().decode,
35 | incrementalencoder=IncrementalEncoder,
36 | incrementaldecoder=IncrementalDecoder,
37 | streamreader=StreamReader,
38 | streamwriter=StreamWriter,
39 | )
40 |
--------------------------------------------------------------------------------
/python27/1.0/lib/encodings/latin_1.py:
--------------------------------------------------------------------------------
1 | """ Python 'latin-1' Codec
2 |
3 |
4 | Written by Marc-Andre Lemburg (mal@lemburg.com).
5 |
6 | (c) Copyright CNRI, All Rights Reserved. NO WARRANTY.
7 |
8 | """
9 | import codecs
10 |
11 | ### Codec APIs
12 |
13 | class Codec(codecs.Codec):
14 |
15 | # Note: Binding these as C functions will result in the class not
16 | # converting them to methods. This is intended.
17 | encode = codecs.latin_1_encode
18 | decode = codecs.latin_1_decode
19 |
20 | class IncrementalEncoder(codecs.IncrementalEncoder):
21 | def encode(self, input, final=False):
22 | return codecs.latin_1_encode(input,self.errors)[0]
23 |
24 | class IncrementalDecoder(codecs.IncrementalDecoder):
25 | def decode(self, input, final=False):
26 | return codecs.latin_1_decode(input,self.errors)[0]
27 |
28 | class StreamWriter(Codec,codecs.StreamWriter):
29 | pass
30 |
31 | class StreamReader(Codec,codecs.StreamReader):
32 | pass
33 |
34 | class StreamConverter(StreamWriter,StreamReader):
35 |
36 | encode = codecs.latin_1_decode
37 | decode = codecs.latin_1_encode
38 |
39 | ### encodings module API
40 |
41 | def getregentry():
42 | return codecs.CodecInfo(
43 | name='iso8859-1',
44 | encode=Codec.encode,
45 | decode=Codec.decode,
46 | incrementalencoder=IncrementalEncoder,
47 | incrementaldecoder=IncrementalDecoder,
48 | streamreader=StreamReader,
49 | streamwriter=StreamWriter,
50 | )
51 |
--------------------------------------------------------------------------------
/python27/1.0/lib/encodings/mbcs.py:
--------------------------------------------------------------------------------
1 | """ Python 'mbcs' Codec for Windows
2 |
3 |
4 | Cloned by Mark Hammond (mhammond@skippinet.com.au) from ascii.py,
5 | which was written by Marc-Andre Lemburg (mal@lemburg.com).
6 |
7 | (c) Copyright CNRI, All Rights Reserved. NO WARRANTY.
8 |
9 | """
10 | # Import them explicitly to cause an ImportError
11 | # on non-Windows systems
12 | from codecs import mbcs_encode, mbcs_decode
13 | # for IncrementalDecoder, IncrementalEncoder, ...
14 | import codecs
15 |
16 | ### Codec APIs
17 |
18 | encode = mbcs_encode
19 |
20 | def decode(input, errors='strict'):
21 | return mbcs_decode(input, errors, True)
22 |
23 | class IncrementalEncoder(codecs.IncrementalEncoder):
24 | def encode(self, input, final=False):
25 | return mbcs_encode(input, self.errors)[0]
26 |
27 | class IncrementalDecoder(codecs.BufferedIncrementalDecoder):
28 | _buffer_decode = mbcs_decode
29 |
30 | class StreamWriter(codecs.StreamWriter):
31 | encode = mbcs_encode
32 |
33 | class StreamReader(codecs.StreamReader):
34 | decode = mbcs_decode
35 |
36 | ### encodings module API
37 |
38 | def getregentry():
39 | return codecs.CodecInfo(
40 | name='mbcs',
41 | encode=encode,
42 | decode=decode,
43 | incrementalencoder=IncrementalEncoder,
44 | incrementaldecoder=IncrementalDecoder,
45 | streamreader=StreamReader,
46 | streamwriter=StreamWriter,
47 | )
48 |
--------------------------------------------------------------------------------
/python27/1.0/lib/encodings/punycode.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Thobian/XX-Net/dd2fac14824caa6d6a0289298c937d7bace8b6af/python27/1.0/lib/encodings/punycode.py
--------------------------------------------------------------------------------
/python27/1.0/lib/encodings/raw_unicode_escape.py:
--------------------------------------------------------------------------------
1 | """ Python 'raw-unicode-escape' Codec
2 |
3 |
4 | Written by Marc-Andre Lemburg (mal@lemburg.com).
5 |
6 | (c) Copyright CNRI, All Rights Reserved. NO WARRANTY.
7 |
8 | """
9 | import codecs
10 |
11 | ### Codec APIs
12 |
13 | class Codec(codecs.Codec):
14 |
15 | # Note: Binding these as C functions will result in the class not
16 | # converting them to methods. This is intended.
17 | encode = codecs.raw_unicode_escape_encode
18 | decode = codecs.raw_unicode_escape_decode
19 |
20 | class IncrementalEncoder(codecs.IncrementalEncoder):
21 | def encode(self, input, final=False):
22 | return codecs.raw_unicode_escape_encode(input, self.errors)[0]
23 |
24 | class IncrementalDecoder(codecs.IncrementalDecoder):
25 | def decode(self, input, final=False):
26 | return codecs.raw_unicode_escape_decode(input, self.errors)[0]
27 |
28 | class StreamWriter(Codec,codecs.StreamWriter):
29 | pass
30 |
31 | class StreamReader(Codec,codecs.StreamReader):
32 | pass
33 |
34 | ### encodings module API
35 |
36 | def getregentry():
37 | return codecs.CodecInfo(
38 | name='raw-unicode-escape',
39 | encode=Codec.encode,
40 | decode=Codec.decode,
41 | incrementalencoder=IncrementalEncoder,
42 | incrementaldecoder=IncrementalDecoder,
43 | streamwriter=StreamWriter,
44 | streamreader=StreamReader,
45 | )
46 |
--------------------------------------------------------------------------------
/python27/1.0/lib/encodings/shift_jis.py:
--------------------------------------------------------------------------------
1 | #
2 | # shift_jis.py: Python Unicode Codec for SHIFT_JIS
3 | #
4 | # Written by Hye-Shik Chang
5 | #
6 |
7 | import _codecs_jp, codecs
8 | import _multibytecodec as mbc
9 |
10 | codec = _codecs_jp.getcodec('shift_jis')
11 |
12 | class Codec(codecs.Codec):
13 | encode = codec.encode
14 | decode = codec.decode
15 |
16 | class IncrementalEncoder(mbc.MultibyteIncrementalEncoder,
17 | codecs.IncrementalEncoder):
18 | codec = codec
19 |
20 | class IncrementalDecoder(mbc.MultibyteIncrementalDecoder,
21 | codecs.IncrementalDecoder):
22 | codec = codec
23 |
24 | class StreamReader(Codec, mbc.MultibyteStreamReader, codecs.StreamReader):
25 | codec = codec
26 |
27 | class StreamWriter(Codec, mbc.MultibyteStreamWriter, codecs.StreamWriter):
28 | codec = codec
29 |
30 | def getregentry():
31 | return codecs.CodecInfo(
32 | name='shift_jis',
33 | encode=Codec().encode,
34 | decode=Codec().decode,
35 | incrementalencoder=IncrementalEncoder,
36 | incrementaldecoder=IncrementalDecoder,
37 | streamreader=StreamReader,
38 | streamwriter=StreamWriter,
39 | )
40 |
--------------------------------------------------------------------------------
/python27/1.0/lib/encodings/shift_jis_2004.py:
--------------------------------------------------------------------------------
1 | #
2 | # shift_jis_2004.py: Python Unicode Codec for SHIFT_JIS_2004
3 | #
4 | # Written by Hye-Shik Chang
5 | #
6 |
7 | import _codecs_jp, codecs
8 | import _multibytecodec as mbc
9 |
10 | codec = _codecs_jp.getcodec('shift_jis_2004')
11 |
12 | class Codec(codecs.Codec):
13 | encode = codec.encode
14 | decode = codec.decode
15 |
16 | class IncrementalEncoder(mbc.MultibyteIncrementalEncoder,
17 | codecs.IncrementalEncoder):
18 | codec = codec
19 |
20 | class IncrementalDecoder(mbc.MultibyteIncrementalDecoder,
21 | codecs.IncrementalDecoder):
22 | codec = codec
23 |
24 | class StreamReader(Codec, mbc.MultibyteStreamReader, codecs.StreamReader):
25 | codec = codec
26 |
27 | class StreamWriter(Codec, mbc.MultibyteStreamWriter, codecs.StreamWriter):
28 | codec = codec
29 |
30 | def getregentry():
31 | return codecs.CodecInfo(
32 | name='shift_jis_2004',
33 | encode=Codec().encode,
34 | decode=Codec().decode,
35 | incrementalencoder=IncrementalEncoder,
36 | incrementaldecoder=IncrementalDecoder,
37 | streamreader=StreamReader,
38 | streamwriter=StreamWriter,
39 | )
40 |
--------------------------------------------------------------------------------
/python27/1.0/lib/encodings/shift_jisx0213.py:
--------------------------------------------------------------------------------
1 | #
2 | # shift_jisx0213.py: Python Unicode Codec for SHIFT_JISX0213
3 | #
4 | # Written by Hye-Shik Chang
5 | #
6 |
7 | import _codecs_jp, codecs
8 | import _multibytecodec as mbc
9 |
10 | codec = _codecs_jp.getcodec('shift_jisx0213')
11 |
12 | class Codec(codecs.Codec):
13 | encode = codec.encode
14 | decode = codec.decode
15 |
16 | class IncrementalEncoder(mbc.MultibyteIncrementalEncoder,
17 | codecs.IncrementalEncoder):
18 | codec = codec
19 |
20 | class IncrementalDecoder(mbc.MultibyteIncrementalDecoder,
21 | codecs.IncrementalDecoder):
22 | codec = codec
23 |
24 | class StreamReader(Codec, mbc.MultibyteStreamReader, codecs.StreamReader):
25 | codec = codec
26 |
27 | class StreamWriter(Codec, mbc.MultibyteStreamWriter, codecs.StreamWriter):
28 | codec = codec
29 |
30 | def getregentry():
31 | return codecs.CodecInfo(
32 | name='shift_jisx0213',
33 | encode=Codec().encode,
34 | decode=Codec().decode,
35 | incrementalencoder=IncrementalEncoder,
36 | incrementaldecoder=IncrementalDecoder,
37 | streamreader=StreamReader,
38 | streamwriter=StreamWriter,
39 | )
40 |
--------------------------------------------------------------------------------
/python27/1.0/lib/encodings/string_escape.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Thobian/XX-Net/dd2fac14824caa6d6a0289298c937d7bace8b6af/python27/1.0/lib/encodings/string_escape.py
--------------------------------------------------------------------------------
/python27/1.0/lib/encodings/undefined.py:
--------------------------------------------------------------------------------
1 | """ Python 'undefined' Codec
2 |
3 | This codec will always raise a ValueError exception when being
4 | used. It is intended for use by the site.py file to switch off
5 | automatic string to Unicode coercion.
6 |
7 | Written by Marc-Andre Lemburg (mal@lemburg.com).
8 |
9 | (c) Copyright CNRI, All Rights Reserved. NO WARRANTY.
10 |
11 | """
12 | import codecs
13 |
14 | ### Codec APIs
15 |
16 | class Codec(codecs.Codec):
17 |
18 | def encode(self,input,errors='strict'):
19 | raise UnicodeError("undefined encoding")
20 |
21 | def decode(self,input,errors='strict'):
22 | raise UnicodeError("undefined encoding")
23 |
24 | class IncrementalEncoder(codecs.IncrementalEncoder):
25 | def encode(self, input, final=False):
26 | raise UnicodeError("undefined encoding")
27 |
28 | class IncrementalDecoder(codecs.IncrementalDecoder):
29 | def decode(self, input, final=False):
30 | raise UnicodeError("undefined encoding")
31 |
32 | class StreamWriter(Codec,codecs.StreamWriter):
33 | pass
34 |
35 | class StreamReader(Codec,codecs.StreamReader):
36 | pass
37 |
38 | ### encodings module API
39 |
40 | def getregentry():
41 | return codecs.CodecInfo(
42 | name='undefined',
43 | encode=Codec().encode,
44 | decode=Codec().decode,
45 | incrementalencoder=IncrementalEncoder,
46 | incrementaldecoder=IncrementalDecoder,
47 | streamwriter=StreamWriter,
48 | streamreader=StreamReader,
49 | )
50 |
--------------------------------------------------------------------------------
/python27/1.0/lib/encodings/unicode_escape.py:
--------------------------------------------------------------------------------
1 | """ Python 'unicode-escape' Codec
2 |
3 |
4 | Written by Marc-Andre Lemburg (mal@lemburg.com).
5 |
6 | (c) Copyright CNRI, All Rights Reserved. NO WARRANTY.
7 |
8 | """
9 | import codecs
10 |
11 | ### Codec APIs
12 |
13 | class Codec(codecs.Codec):
14 |
15 | # Note: Binding these as C functions will result in the class not
16 | # converting them to methods. This is intended.
17 | encode = codecs.unicode_escape_encode
18 | decode = codecs.unicode_escape_decode
19 |
20 | class IncrementalEncoder(codecs.IncrementalEncoder):
21 | def encode(self, input, final=False):
22 | return codecs.unicode_escape_encode(input, self.errors)[0]
23 |
24 | class IncrementalDecoder(codecs.IncrementalDecoder):
25 | def decode(self, input, final=False):
26 | return codecs.unicode_escape_decode(input, self.errors)[0]
27 |
28 | class StreamWriter(Codec,codecs.StreamWriter):
29 | pass
30 |
31 | class StreamReader(Codec,codecs.StreamReader):
32 | pass
33 |
34 | ### encodings module API
35 |
36 | def getregentry():
37 | return codecs.CodecInfo(
38 | name='unicode-escape',
39 | encode=Codec.encode,
40 | decode=Codec.decode,
41 | incrementalencoder=IncrementalEncoder,
42 | incrementaldecoder=IncrementalDecoder,
43 | streamwriter=StreamWriter,
44 | streamreader=StreamReader,
45 | )
46 |
--------------------------------------------------------------------------------
/python27/1.0/lib/encodings/unicode_internal.py:
--------------------------------------------------------------------------------
1 | """ Python 'unicode-internal' Codec
2 |
3 |
4 | Written by Marc-Andre Lemburg (mal@lemburg.com).
5 |
6 | (c) Copyright CNRI, All Rights Reserved. NO WARRANTY.
7 |
8 | """
9 | import codecs
10 |
11 | ### Codec APIs
12 |
13 | class Codec(codecs.Codec):
14 |
15 | # Note: Binding these as C functions will result in the class not
16 | # converting them to methods. This is intended.
17 | encode = codecs.unicode_internal_encode
18 | decode = codecs.unicode_internal_decode
19 |
20 | class IncrementalEncoder(codecs.IncrementalEncoder):
21 | def encode(self, input, final=False):
22 | return codecs.unicode_internal_encode(input, self.errors)[0]
23 |
24 | class IncrementalDecoder(codecs.IncrementalDecoder):
25 | def decode(self, input, final=False):
26 | return codecs.unicode_internal_decode(input, self.errors)[0]
27 |
28 | class StreamWriter(Codec,codecs.StreamWriter):
29 | pass
30 |
31 | class StreamReader(Codec,codecs.StreamReader):
32 | pass
33 |
34 | ### encodings module API
35 |
36 | def getregentry():
37 | return codecs.CodecInfo(
38 | name='unicode-internal',
39 | encode=Codec.encode,
40 | decode=Codec.decode,
41 | incrementalencoder=IncrementalEncoder,
42 | incrementaldecoder=IncrementalDecoder,
43 | streamwriter=StreamWriter,
44 | streamreader=StreamReader,
45 | )
46 |
--------------------------------------------------------------------------------
/python27/1.0/lib/encodings/utf_16_be.py:
--------------------------------------------------------------------------------
1 | """ Python 'utf-16-be' Codec
2 |
3 |
4 | Written by Marc-Andre Lemburg (mal@lemburg.com).
5 |
6 | (c) Copyright CNRI, All Rights Reserved. NO WARRANTY.
7 |
8 | """
9 | import codecs
10 |
11 | ### Codec APIs
12 |
13 | encode = codecs.utf_16_be_encode
14 |
15 | def decode(input, errors='strict'):
16 | return codecs.utf_16_be_decode(input, errors, True)
17 |
18 | class IncrementalEncoder(codecs.IncrementalEncoder):
19 | def encode(self, input, final=False):
20 | return codecs.utf_16_be_encode(input, self.errors)[0]
21 |
22 | class IncrementalDecoder(codecs.BufferedIncrementalDecoder):
23 | _buffer_decode = codecs.utf_16_be_decode
24 |
25 | class StreamWriter(codecs.StreamWriter):
26 | encode = codecs.utf_16_be_encode
27 |
28 | class StreamReader(codecs.StreamReader):
29 | decode = codecs.utf_16_be_decode
30 |
31 | ### encodings module API
32 |
33 | def getregentry():
34 | return codecs.CodecInfo(
35 | name='utf-16-be',
36 | encode=encode,
37 | decode=decode,
38 | incrementalencoder=IncrementalEncoder,
39 | incrementaldecoder=IncrementalDecoder,
40 | streamreader=StreamReader,
41 | streamwriter=StreamWriter,
42 | )
43 |
--------------------------------------------------------------------------------
/python27/1.0/lib/encodings/utf_16_le.py:
--------------------------------------------------------------------------------
1 | """ Python 'utf-16-le' Codec
2 |
3 |
4 | Written by Marc-Andre Lemburg (mal@lemburg.com).
5 |
6 | (c) Copyright CNRI, All Rights Reserved. NO WARRANTY.
7 |
8 | """
9 | import codecs
10 |
11 | ### Codec APIs
12 |
13 | encode = codecs.utf_16_le_encode
14 |
15 | def decode(input, errors='strict'):
16 | return codecs.utf_16_le_decode(input, errors, True)
17 |
18 | class IncrementalEncoder(codecs.IncrementalEncoder):
19 | def encode(self, input, final=False):
20 | return codecs.utf_16_le_encode(input, self.errors)[0]
21 |
22 | class IncrementalDecoder(codecs.BufferedIncrementalDecoder):
23 | _buffer_decode = codecs.utf_16_le_decode
24 |
25 | class StreamWriter(codecs.StreamWriter):
26 | encode = codecs.utf_16_le_encode
27 |
28 | class StreamReader(codecs.StreamReader):
29 | decode = codecs.utf_16_le_decode
30 |
31 | ### encodings module API
32 |
33 | def getregentry():
34 | return codecs.CodecInfo(
35 | name='utf-16-le',
36 | encode=encode,
37 | decode=decode,
38 | incrementalencoder=IncrementalEncoder,
39 | incrementaldecoder=IncrementalDecoder,
40 | streamreader=StreamReader,
41 | streamwriter=StreamWriter,
42 | )
43 |
--------------------------------------------------------------------------------
/python27/1.0/lib/encodings/utf_32_be.py:
--------------------------------------------------------------------------------
1 | """
2 | Python 'utf-32-be' Codec
3 | """
4 | import codecs
5 |
6 | ### Codec APIs
7 |
8 | encode = codecs.utf_32_be_encode
9 |
10 | def decode(input, errors='strict'):
11 | return codecs.utf_32_be_decode(input, errors, True)
12 |
13 | class IncrementalEncoder(codecs.IncrementalEncoder):
14 | def encode(self, input, final=False):
15 | return codecs.utf_32_be_encode(input, self.errors)[0]
16 |
17 | class IncrementalDecoder(codecs.BufferedIncrementalDecoder):
18 | _buffer_decode = codecs.utf_32_be_decode
19 |
20 | class StreamWriter(codecs.StreamWriter):
21 | encode = codecs.utf_32_be_encode
22 |
23 | class StreamReader(codecs.StreamReader):
24 | decode = codecs.utf_32_be_decode
25 |
26 | ### encodings module API
27 |
28 | def getregentry():
29 | return codecs.CodecInfo(
30 | name='utf-32-be',
31 | encode=encode,
32 | decode=decode,
33 | incrementalencoder=IncrementalEncoder,
34 | incrementaldecoder=IncrementalDecoder,
35 | streamreader=StreamReader,
36 | streamwriter=StreamWriter,
37 | )
38 |
--------------------------------------------------------------------------------
/python27/1.0/lib/encodings/utf_32_le.py:
--------------------------------------------------------------------------------
1 | """
2 | Python 'utf-32-le' Codec
3 | """
4 | import codecs
5 |
6 | ### Codec APIs
7 |
8 | encode = codecs.utf_32_le_encode
9 |
10 | def decode(input, errors='strict'):
11 | return codecs.utf_32_le_decode(input, errors, True)
12 |
13 | class IncrementalEncoder(codecs.IncrementalEncoder):
14 | def encode(self, input, final=False):
15 | return codecs.utf_32_le_encode(input, self.errors)[0]
16 |
17 | class IncrementalDecoder(codecs.BufferedIncrementalDecoder):
18 | _buffer_decode = codecs.utf_32_le_decode
19 |
20 | class StreamWriter(codecs.StreamWriter):
21 | encode = codecs.utf_32_le_encode
22 |
23 | class StreamReader(codecs.StreamReader):
24 | decode = codecs.utf_32_le_decode
25 |
26 | ### encodings module API
27 |
28 | def getregentry():
29 | return codecs.CodecInfo(
30 | name='utf-32-le',
31 | encode=encode,
32 | decode=decode,
33 | incrementalencoder=IncrementalEncoder,
34 | incrementaldecoder=IncrementalDecoder,
35 | streamreader=StreamReader,
36 | streamwriter=StreamWriter,
37 | )
38 |
--------------------------------------------------------------------------------
/python27/1.0/lib/encodings/utf_7.py:
--------------------------------------------------------------------------------
1 | """ Python 'utf-7' Codec
2 |
3 | Written by Brian Quinlan (brian@sweetapp.com).
4 | """
5 | import codecs
6 |
7 | ### Codec APIs
8 |
9 | encode = codecs.utf_7_encode
10 |
11 | def decode(input, errors='strict'):
12 | return codecs.utf_7_decode(input, errors, True)
13 |
14 | class IncrementalEncoder(codecs.IncrementalEncoder):
15 | def encode(self, input, final=False):
16 | return codecs.utf_7_encode(input, self.errors)[0]
17 |
18 | class IncrementalDecoder(codecs.BufferedIncrementalDecoder):
19 | _buffer_decode = codecs.utf_7_decode
20 |
21 | class StreamWriter(codecs.StreamWriter):
22 | encode = codecs.utf_7_encode
23 |
24 | class StreamReader(codecs.StreamReader):
25 | decode = codecs.utf_7_decode
26 |
27 | ### encodings module API
28 |
29 | def getregentry():
30 | return codecs.CodecInfo(
31 | name='utf-7',
32 | encode=encode,
33 | decode=decode,
34 | incrementalencoder=IncrementalEncoder,
35 | incrementaldecoder=IncrementalDecoder,
36 | streamreader=StreamReader,
37 | streamwriter=StreamWriter,
38 | )
39 |
--------------------------------------------------------------------------------
/python27/1.0/lib/encodings/utf_8.py:
--------------------------------------------------------------------------------
1 | """ Python 'utf-8' Codec
2 |
3 |
4 | Written by Marc-Andre Lemburg (mal@lemburg.com).
5 |
6 | (c) Copyright CNRI, All Rights Reserved. NO WARRANTY.
7 |
8 | """
9 | import codecs
10 |
11 | ### Codec APIs
12 |
13 | encode = codecs.utf_8_encode
14 |
15 | def decode(input, errors='strict'):
16 | return codecs.utf_8_decode(input, errors, True)
17 |
18 | class IncrementalEncoder(codecs.IncrementalEncoder):
19 | def encode(self, input, final=False):
20 | return codecs.utf_8_encode(input, self.errors)[0]
21 |
22 | class IncrementalDecoder(codecs.BufferedIncrementalDecoder):
23 | _buffer_decode = codecs.utf_8_decode
24 |
25 | class StreamWriter(codecs.StreamWriter):
26 | encode = codecs.utf_8_encode
27 |
28 | class StreamReader(codecs.StreamReader):
29 | decode = codecs.utf_8_decode
30 |
31 | ### encodings module API
32 |
33 | def getregentry():
34 | return codecs.CodecInfo(
35 | name='utf-8',
36 | encode=encode,
37 | decode=decode,
38 | incrementalencoder=IncrementalEncoder,
39 | incrementaldecoder=IncrementalDecoder,
40 | streamreader=StreamReader,
41 | streamwriter=StreamWriter,
42 | )
43 |
--------------------------------------------------------------------------------
/python27/1.0/lib/heapq.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Thobian/XX-Net/dd2fac14824caa6d6a0289298c937d7bace8b6af/python27/1.0/lib/heapq.py
--------------------------------------------------------------------------------
/python27/1.0/lib/json/tool.py:
--------------------------------------------------------------------------------
1 | r"""Command-line tool to validate and pretty-print JSON
2 |
3 | Usage::
4 |
5 | $ echo '{"json":"obj"}' | python -m json.tool
6 | {
7 | "json": "obj"
8 | }
9 | $ echo '{ 1.2:3.4}' | python -m json.tool
10 | Expecting property name enclosed in double quotes: line 1 column 3 (char 2)
11 |
12 | """
13 | import sys
14 | import json
15 |
16 | def main():
17 | if len(sys.argv) == 1:
18 | infile = sys.stdin
19 | outfile = sys.stdout
20 | elif len(sys.argv) == 2:
21 | infile = open(sys.argv[1], 'rb')
22 | outfile = sys.stdout
23 | elif len(sys.argv) == 3:
24 | infile = open(sys.argv[1], 'rb')
25 | outfile = open(sys.argv[2], 'wb')
26 | else:
27 | raise SystemExit(sys.argv[0] + " [infile [outfile]]")
28 | with infile:
29 | try:
30 | obj = json.load(infile)
31 | except ValueError, e:
32 | raise SystemExit(e)
33 | with outfile:
34 | json.dump(obj, outfile, sort_keys=True,
35 | indent=4, separators=(',', ': '))
36 | outfile.write('\n')
37 |
38 |
39 | if __name__ == '__main__':
40 | main()
41 |
--------------------------------------------------------------------------------
/python27/1.0/lib/linux/OpenSSL/SSL.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Thobian/XX-Net/dd2fac14824caa6d6a0289298c937d7bace8b6af/python27/1.0/lib/linux/OpenSSL/SSL.so
--------------------------------------------------------------------------------
/python27/1.0/lib/linux/OpenSSL/__init__.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) AB Strakt
2 | # See LICENSE for details.
3 |
4 | """
5 | pyOpenSSL - A simple wrapper around the OpenSSL library
6 | """
7 |
8 | import sys
9 |
10 | try:
11 | orig = sys.getdlopenflags()
12 | except AttributeError:
13 | from OpenSSL import crypto
14 | else:
15 | try:
16 | import DLFCN
17 | except ImportError:
18 | try:
19 | import dl
20 | except ImportError:
21 | try:
22 | import ctypes
23 | except ImportError:
24 | flags = 2 | 256
25 | else:
26 | flags = 2 | ctypes.RTLD_GLOBAL
27 | del ctypes
28 | else:
29 | flags = dl.RTLD_NOW | dl.RTLD_GLOBAL
30 | del dl
31 | else:
32 | flags = DLFCN.RTLD_NOW | DLFCN.RTLD_GLOBAL
33 | del DLFCN
34 |
35 | sys.setdlopenflags(flags)
36 | from OpenSSL import crypto
37 | sys.setdlopenflags(orig)
38 | del orig, flags
39 | del sys
40 |
41 | from OpenSSL import rand, SSL
42 | from OpenSSL.version import __version__
43 |
44 | __all__ = [
45 | 'rand', 'crypto', 'SSL', 'tsafe', '__version__']
46 |
--------------------------------------------------------------------------------
/python27/1.0/lib/linux/OpenSSL/crypto.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Thobian/XX-Net/dd2fac14824caa6d6a0289298c937d7bace8b6af/python27/1.0/lib/linux/OpenSSL/crypto.so
--------------------------------------------------------------------------------
/python27/1.0/lib/linux/OpenSSL/rand.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Thobian/XX-Net/dd2fac14824caa6d6a0289298c937d7bace8b6af/python27/1.0/lib/linux/OpenSSL/rand.so
--------------------------------------------------------------------------------
/python27/1.0/lib/linux/OpenSSL/version.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) AB Strakt
2 | # Copyright (C) Jean-Paul Calderone
3 | # See LICENSE for details.
4 |
5 | """
6 | pyOpenSSL - A simple wrapper around the OpenSSL library
7 | """
8 |
9 | __version__ = '0.13'
10 |
--------------------------------------------------------------------------------
/python27/1.0/lib/linux/gevent/__init__.py:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2009-2010 Denis Bilenko. See LICENSE for details.
2 | """
3 | gevent is a coroutine-based Python networking library that uses greenlet
4 | to provide a high-level synchronous API on top of libevent event loop.
5 |
6 | See http://www.gevent.org/ for the documentation.
7 | """
8 |
9 | version_info = (0, 13, 6)
10 | __version__ = '0.13.6'
11 | __changeset__ = '1734:6c834b912c36'
12 |
13 | __all__ = ['Greenlet',
14 | 'GreenletExit',
15 | 'spawn',
16 | 'spawn_later',
17 | 'spawn_link',
18 | 'spawn_link_value',
19 | 'spawn_link_exception',
20 | 'spawn_raw',
21 | 'joinall',
22 | 'killall',
23 | 'Timeout',
24 | 'with_timeout',
25 | 'getcurrent',
26 | 'sleep',
27 | 'kill',
28 | 'signal',
29 | 'fork',
30 | 'shutdown',
31 | 'core',
32 | 'reinit']
33 |
34 |
35 | import sys
36 | if sys.platform == 'win32':
37 | __import__('socket') # trigger WSAStartup call
38 | del sys
39 |
40 |
41 | from gevent import core
42 | core.EV_TIMEOUT = 0x01
43 | core.EV_READ = 0x02
44 | core.EV_WRITE = 0x04
45 | core.EV_SIGNAL = 0x08
46 | core.EV_PERSIST = 0x10
47 |
48 | from gevent.core import reinit
49 | from gevent.greenlet import Greenlet, joinall, killall
50 | spawn = Greenlet.spawn
51 | spawn_later = Greenlet.spawn_later
52 | spawn_link = Greenlet.spawn_link
53 | spawn_link_value = Greenlet.spawn_link_value
54 | spawn_link_exception = Greenlet.spawn_link_exception
55 | from gevent.timeout import Timeout, with_timeout
56 | from gevent.hub import getcurrent, GreenletExit, spawn_raw, sleep, kill, signal, shutdown
57 | try:
58 | from gevent.hub import fork
59 | except ImportError:
60 | __all__.remove('fork')
61 |
--------------------------------------------------------------------------------
/python27/1.0/lib/linux/gevent/core.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Thobian/XX-Net/dd2fac14824caa6d6a0289298c937d7bace8b6af/python27/1.0/lib/linux/gevent/core.so
--------------------------------------------------------------------------------
/python27/1.0/lib/linux/gevent/http.py:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2009-2010 Denis Bilenko. See LICENSE for details.
2 | from gevent import core
3 | from gevent.baseserver import BaseServer
4 |
5 |
6 | __all__ = ['HTTPServer']
7 |
8 |
9 | class HTTPServer(BaseServer):
10 | """An HTTP server based on libevent-http.
11 |
12 | *handle* is called with one argument: an :class:`gevent.core.http_request` instance.
13 | """
14 |
15 | default_response_headers = [('Connection', 'close')]
16 |
17 | def __init__(self, listener, handle=None, backlog=None, spawn='default', default_response_headers='default'):
18 | BaseServer.__init__(self, listener, handle=handle, backlog=backlog, spawn=spawn)
19 | self.http = None
20 | if default_response_headers != 'default':
21 | self.default_response_headers = default_response_headers
22 |
23 | def _on_request(self, request):
24 | spawn = self._spawn
25 | if spawn is None:
26 | self.handle(request)
27 | else:
28 | if self.full():
29 | self._on_full(request)
30 | else:
31 | spawn(self.handle, request)
32 |
33 | def _on_full(self, request):
34 | msg = 'Service Temporarily Unavailable'
35 | request.add_output_header('Connection', 'close')
36 | request.add_output_header('Content-type', 'text/plain')
37 | request.add_output_header('Content-length', str(len(msg)))
38 | request.send_reply(503, 'Service Unavailable', msg)
39 |
40 | def start_accepting(self):
41 | self.http = core.http(self._on_request, self.default_response_headers)
42 | self.http.accept(self.socket.fileno())
43 |
44 | def stop_accepting(self):
45 | self.http = None
46 |
--------------------------------------------------------------------------------
/python27/1.0/lib/linux/gevent/thread.py:
--------------------------------------------------------------------------------
1 | """Implementation of the standard :mod:`thread` module that spawns greenlets.
2 |
3 | .. note::
4 |
5 | This module is a helper for :mod:`gevent.monkey` and is not intended to be
6 | used directly. For spawning greenlets in your applications, prefer
7 | :class:`Greenlet` class.
8 | """
9 |
10 | __implements__ = ['allocate_lock',
11 | 'get_ident',
12 | 'exit',
13 | 'LockType',
14 | 'stack_size',
15 | 'start_new_thread']
16 |
17 | __imports__ = ['error']
18 |
19 | __thread__ = __import__('thread')
20 | error = __thread__.error
21 | from gevent.hub import getcurrent, GreenletExit
22 | from gevent.greenlet import Greenlet
23 | from gevent.coros import Semaphore as LockType
24 |
25 |
26 | def get_ident(gr=None):
27 | if gr is None:
28 | return id(getcurrent())
29 | else:
30 | return id(gr)
31 |
32 |
33 | def start_new_thread(function, args=(), kwargs={}):
34 | greenlet = Greenlet.spawn(function, *args, **kwargs)
35 | return get_ident(greenlet)
36 |
37 |
38 | def allocate_lock():
39 | return LockType(1)
40 |
41 |
42 | def exit():
43 | raise GreenletExit
44 |
45 |
46 | if hasattr(__thread__, 'stack_size'):
47 | _original_stack_size = __thread__.stack_size
48 |
49 | def stack_size(size=None):
50 | if size is None:
51 | return _original_stack_size()
52 | if size > _original_stack_size():
53 | return _original_stack_size(size)
54 | else:
55 | pass
56 | # not going to decrease stack_size, because otherwise other greenlets in this thread will suffer
57 | else:
58 | __implements__.remove('stack_size')
59 |
60 |
61 | __all__ = __implements__ + __imports__
62 |
63 | # XXX interrupt_main, _local
64 |
--------------------------------------------------------------------------------
/python27/1.0/lib/linux/greenlet/__init__.py:
--------------------------------------------------------------------------------
1 | def __bootstrap__():
2 | global __bootstrap__, __loader__, __file__
3 | import sysconfig, pkg_resources, imp
4 | __file__ = pkg_resources.resource_filename(__name__,'greenlet-%s.so' % sysconfig.get_platform().split('-')[-1])
5 | __loader__ = None; del __bootstrap__, __loader__
6 | imp.load_dynamic(__name__,__file__)
7 | try:
8 | __bootstrap__()
9 | except (ImportError, LookupError):
10 | raise ImportError('No module named %s' % __name__)
11 |
--------------------------------------------------------------------------------
/python27/1.0/lib/linux/greenlet/greenlet-i686.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Thobian/XX-Net/dd2fac14824caa6d6a0289298c937d7bace8b6af/python27/1.0/lib/linux/greenlet/greenlet-i686.so
--------------------------------------------------------------------------------
/python27/1.0/lib/linux/greenlet/greenlet-mips.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Thobian/XX-Net/dd2fac14824caa6d6a0289298c937d7bace8b6af/python27/1.0/lib/linux/greenlet/greenlet-mips.so
--------------------------------------------------------------------------------
/python27/1.0/lib/linux/greenlet/greenlet-x86_64.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Thobian/XX-Net/dd2fac14824caa6d6a0289298c937d7bace8b6af/python27/1.0/lib/linux/greenlet/greenlet-x86_64.so
--------------------------------------------------------------------------------
/python27/1.0/lib/noarch/pyasn1/__init__.py:
--------------------------------------------------------------------------------
1 | import sys
2 |
3 | # http://www.python.org/dev/peps/pep-0396/
4 | __version__ = '0.1.7'
5 |
6 | if sys.version_info[:2] < (2, 4):
7 | raise RuntimeError('PyASN1 requires Python 2.4 or later')
8 |
9 |
--------------------------------------------------------------------------------
/python27/1.0/lib/noarch/pyasn1/codec/__init__.py:
--------------------------------------------------------------------------------
1 | # This file is necessary to make this directory a package.
2 |
--------------------------------------------------------------------------------
/python27/1.0/lib/noarch/pyasn1/codec/ber/__init__.py:
--------------------------------------------------------------------------------
1 | # This file is necessary to make this directory a package.
2 |
--------------------------------------------------------------------------------
/python27/1.0/lib/noarch/pyasn1/codec/ber/eoo.py:
--------------------------------------------------------------------------------
1 | from pyasn1.type import base, tag
2 |
3 | class EndOfOctets(base.AbstractSimpleAsn1Item):
4 | defaultValue = 0
5 | tagSet = tag.initTagSet(
6 | tag.Tag(tag.tagClassUniversal, tag.tagFormatSimple, 0x00)
7 | )
8 | endOfOctets = EndOfOctets()
9 |
--------------------------------------------------------------------------------
/python27/1.0/lib/noarch/pyasn1/codec/cer/__init__.py:
--------------------------------------------------------------------------------
1 | # This file is necessary to make this directory a package.
2 |
--------------------------------------------------------------------------------
/python27/1.0/lib/noarch/pyasn1/codec/cer/decoder.py:
--------------------------------------------------------------------------------
1 | # CER decoder
2 | from pyasn1.type import univ
3 | from pyasn1.codec.ber import decoder
4 | from pyasn1.compat.octets import oct2int
5 | from pyasn1 import error
6 |
7 | class BooleanDecoder(decoder.AbstractSimpleDecoder):
8 | protoComponent = univ.Boolean(0)
9 | def valueDecoder(self, fullSubstrate, substrate, asn1Spec, tagSet, length,
10 | state, decodeFun, substrateFun):
11 | head, tail = substrate[:length], substrate[length:]
12 | if not head:
13 | raise error.PyAsn1Error('Empty substrate')
14 | byte = oct2int(head[0])
15 | # CER/DER specifies encoding of TRUE as 0xFF and FALSE as 0x0, while
16 | # BER allows any non-zero value as TRUE; cf. sections 8.2.2. and 11.1
17 | # in http://www.itu.int/ITU-T/studygroups/com17/languages/X.690-0207.pdf
18 | if byte == 0xff:
19 | value = 1
20 | elif byte == 0x00:
21 | value = 0
22 | else:
23 | raise error.PyAsn1Error('Boolean CER violation: %s' % byte)
24 | return self._createComponent(asn1Spec, tagSet, value), tail
25 |
26 | tagMap = decoder.tagMap.copy()
27 | tagMap.update({
28 | univ.Boolean.tagSet: BooleanDecoder()
29 | })
30 |
31 | typeMap = decoder.typeMap
32 |
33 | class Decoder(decoder.Decoder): pass
34 |
35 | decode = Decoder(tagMap, decoder.typeMap)
36 |
--------------------------------------------------------------------------------
/python27/1.0/lib/noarch/pyasn1/codec/der/__init__.py:
--------------------------------------------------------------------------------
1 | # This file is necessary to make this directory a package.
2 |
--------------------------------------------------------------------------------
/python27/1.0/lib/noarch/pyasn1/codec/der/decoder.py:
--------------------------------------------------------------------------------
1 | # DER decoder
2 | from pyasn1.type import univ
3 | from pyasn1.codec.cer import decoder
4 |
5 | tagMap = decoder.tagMap
6 | typeMap = decoder.typeMap
7 | Decoder = decoder.Decoder
8 |
9 | decode = Decoder(tagMap, typeMap)
10 |
--------------------------------------------------------------------------------
/python27/1.0/lib/noarch/pyasn1/codec/der/encoder.py:
--------------------------------------------------------------------------------
1 | # DER encoder
2 | from pyasn1.type import univ
3 | from pyasn1.codec.cer import encoder
4 |
5 | class SetOfEncoder(encoder.SetOfEncoder):
6 | def _cmpSetComponents(self, c1, c2):
7 | tagSet1 = isinstance(c1, univ.Choice) and \
8 | c1.getEffectiveTagSet() or c1.getTagSet()
9 | tagSet2 = isinstance(c2, univ.Choice) and \
10 | c2.getEffectiveTagSet() or c2.getTagSet()
11 | return cmp(tagSet1, tagSet2)
12 |
13 | tagMap = encoder.tagMap.copy()
14 | tagMap.update({
15 | # Overload CER encodrs with BER ones (a bit hackerish XXX)
16 | univ.BitString.tagSet: encoder.encoder.BitStringEncoder(),
17 | univ.OctetString.tagSet: encoder.encoder.OctetStringEncoder(),
18 | # Set & SetOf have same tags
19 | univ.SetOf().tagSet: SetOfEncoder()
20 | })
21 |
22 | typeMap = encoder.typeMap
23 |
24 | class Encoder(encoder.Encoder):
25 | def __call__(self, client, defMode=1, maxChunkSize=0):
26 | return encoder.Encoder.__call__(self, client, defMode, maxChunkSize)
27 |
28 | encode = Encoder(tagMap, typeMap)
29 |
--------------------------------------------------------------------------------
/python27/1.0/lib/noarch/pyasn1/compat/__init__.py:
--------------------------------------------------------------------------------
1 | # This file is necessary to make this directory a package.
2 |
--------------------------------------------------------------------------------
/python27/1.0/lib/noarch/pyasn1/compat/octets.py:
--------------------------------------------------------------------------------
1 | from sys import version_info
2 |
3 | if version_info[0] <= 2:
4 | int2oct = chr
5 | ints2octs = lambda s: ''.join([ int2oct(x) for x in s ])
6 | null = ''
7 | oct2int = ord
8 | octs2ints = lambda s: [ oct2int(x) for x in s ]
9 | str2octs = lambda x: x
10 | octs2str = lambda x: x
11 | isOctetsType = lambda s: isinstance(s, str)
12 | else:
13 | ints2octs = bytes
14 | int2oct = lambda x: ints2octs((x,))
15 | null = ints2octs()
16 | oct2int = lambda x: x
17 | octs2ints = lambda s: [ x for x in s ]
18 | str2octs = lambda x: x.encode()
19 | octs2str = lambda x: x.decode()
20 | isOctetsType = lambda s: isinstance(s, bytes)
21 |
--------------------------------------------------------------------------------
/python27/1.0/lib/noarch/pyasn1/debug.py:
--------------------------------------------------------------------------------
1 | import sys
2 | from pyasn1.compat.octets import octs2ints
3 | from pyasn1 import error
4 | from pyasn1 import __version__
5 |
6 | flagNone = 0x0000
7 | flagEncoder = 0x0001
8 | flagDecoder = 0x0002
9 | flagAll = 0xffff
10 |
11 | flagMap = {
12 | 'encoder': flagEncoder,
13 | 'decoder': flagDecoder,
14 | 'all': flagAll
15 | }
16 |
17 | class Debug:
18 | defaultPrinter = sys.stderr.write
19 | def __init__(self, *flags):
20 | self._flags = flagNone
21 | self._printer = self.defaultPrinter
22 | self('running pyasn1 version %s' % __version__)
23 | for f in flags:
24 | if f not in flagMap:
25 | raise error.PyAsn1Error('bad debug flag %s' % (f,))
26 | self._flags = self._flags | flagMap[f]
27 | self('debug category \'%s\' enabled' % f)
28 |
29 | def __str__(self):
30 | return 'logger %s, flags %x' % (self._printer, self._flags)
31 |
32 | def __call__(self, msg):
33 | self._printer('DBG: %s\n' % msg)
34 |
35 | def __and__(self, flag):
36 | return self._flags & flag
37 |
38 | def __rand__(self, flag):
39 | return flag & self._flags
40 |
41 | logger = 0
42 |
43 | def setLogger(l):
44 | global logger
45 | logger = l
46 |
47 | def hexdump(octets):
48 | return ' '.join(
49 | [ '%s%.2X' % (n%16 == 0 and ('\n%.5d: ' % n) or '', x)
50 | for n,x in zip(range(len(octets)), octs2ints(octets)) ]
51 | )
52 |
53 | class Scope:
54 | def __init__(self):
55 | self._list = []
56 |
57 | def __str__(self): return '.'.join(self._list)
58 |
59 | def push(self, token):
60 | self._list.append(token)
61 |
62 | def pop(self):
63 | return self._list.pop()
64 |
65 | scope = Scope()
66 |
--------------------------------------------------------------------------------
/python27/1.0/lib/noarch/pyasn1/error.py:
--------------------------------------------------------------------------------
1 | class PyAsn1Error(Exception): pass
2 | class ValueConstraintError(PyAsn1Error): pass
3 | class SubstrateUnderrunError(PyAsn1Error): pass
4 |
--------------------------------------------------------------------------------
/python27/1.0/lib/noarch/pyasn1/type/__init__.py:
--------------------------------------------------------------------------------
1 | # This file is necessary to make this directory a package.
2 |
--------------------------------------------------------------------------------
/python27/1.0/lib/noarch/pyasn1/type/error.py:
--------------------------------------------------------------------------------
1 | from pyasn1.error import PyAsn1Error
2 |
3 | class ValueConstraintError(PyAsn1Error): pass
4 |
--------------------------------------------------------------------------------
/python27/1.0/lib/noarch/pyasn1/type/namedval.py:
--------------------------------------------------------------------------------
1 | # ASN.1 named integers
2 | from pyasn1 import error
3 |
4 | __all__ = [ 'NamedValues' ]
5 |
6 | class NamedValues:
7 | def __init__(self, *namedValues):
8 | self.nameToValIdx = {}; self.valToNameIdx = {}
9 | self.namedValues = ()
10 | automaticVal = 1
11 | for namedValue in namedValues:
12 | if isinstance(namedValue, tuple):
13 | name, val = namedValue
14 | else:
15 | name = namedValue
16 | val = automaticVal
17 | if name in self.nameToValIdx:
18 | raise error.PyAsn1Error('Duplicate name %s' % (name,))
19 | self.nameToValIdx[name] = val
20 | if val in self.valToNameIdx:
21 | raise error.PyAsn1Error('Duplicate value %s=%s' % (name, val))
22 | self.valToNameIdx[val] = name
23 | self.namedValues = self.namedValues + ((name, val),)
24 | automaticVal = automaticVal + 1
25 | def __str__(self): return str(self.namedValues)
26 |
27 | def getName(self, value):
28 | if value in self.valToNameIdx:
29 | return self.valToNameIdx[value]
30 |
31 | def getValue(self, name):
32 | if name in self.nameToValIdx:
33 | return self.nameToValIdx[name]
34 |
35 | def __getitem__(self, i): return self.namedValues[i]
36 | def __len__(self): return len(self.namedValues)
37 |
38 | def __add__(self, namedValues):
39 | return self.__class__(*self.namedValues + namedValues)
40 | def __radd__(self, namedValues):
41 | return self.__class__(*namedValues + tuple(self))
42 |
43 | def clone(self, *namedValues):
44 | return self.__class__(*tuple(self) + namedValues)
45 |
46 | # XXX clone/subtype?
47 |
--------------------------------------------------------------------------------
/python27/1.0/lib/noarch/pyasn1/type/tagmap.py:
--------------------------------------------------------------------------------
1 | from pyasn1 import error
2 |
3 | class TagMap:
4 | def __init__(self, posMap={}, negMap={}, defType=None):
5 | self.__posMap = posMap.copy()
6 | self.__negMap = negMap.copy()
7 | self.__defType = defType
8 |
9 | def __contains__(self, tagSet):
10 | return tagSet in self.__posMap or \
11 | self.__defType is not None and tagSet not in self.__negMap
12 |
13 | def __getitem__(self, tagSet):
14 | if tagSet in self.__posMap:
15 | return self.__posMap[tagSet]
16 | elif tagSet in self.__negMap:
17 | raise error.PyAsn1Error('Key in negative map')
18 | elif self.__defType is not None:
19 | return self.__defType
20 | else:
21 | raise KeyError()
22 |
23 | def __repr__(self):
24 | s = '%r/%r' % (self.__posMap, self.__negMap)
25 | if self.__defType is not None:
26 | s = s + '/%r' % (self.__defType,)
27 | return s
28 |
29 | def clone(self, parentType, tagMap, uniq=False):
30 | if self.__defType is not None and tagMap.getDef() is not None:
31 | raise error.PyAsn1Error('Duplicate default value at %s' % (self,))
32 | if tagMap.getDef() is not None:
33 | defType = tagMap.getDef()
34 | else:
35 | defType = self.__defType
36 |
37 | posMap = self.__posMap.copy()
38 | for k in tagMap.getPosMap():
39 | if uniq and k in posMap:
40 | raise error.PyAsn1Error('Duplicate positive key %s' % (k,))
41 | posMap[k] = parentType
42 |
43 | negMap = self.__negMap.copy()
44 | negMap.update(tagMap.getNegMap())
45 |
46 | return self.__class__(
47 | posMap, negMap, defType,
48 | )
49 |
50 | def getPosMap(self): return self.__posMap.copy()
51 | def getNegMap(self): return self.__negMap.copy()
52 | def getDef(self): return self.__defType
53 |
--------------------------------------------------------------------------------
/python27/1.0/lib/noarch/pyasn1/type/useful.py:
--------------------------------------------------------------------------------
1 | # ASN.1 "useful" types
2 | from pyasn1.type import char, tag
3 |
4 | class GeneralizedTime(char.VisibleString):
5 | tagSet = char.VisibleString.tagSet.tagImplicitly(
6 | tag.Tag(tag.tagClassUniversal, tag.tagFormatSimple, 24)
7 | )
8 |
9 | class UTCTime(char.VisibleString):
10 | tagSet = char.VisibleString.tagSet.tagImplicitly(
11 | tag.Tag(tag.tagClassUniversal, tag.tagFormatSimple, 23)
12 | )
13 |
--------------------------------------------------------------------------------
/python27/1.0/lib/noarch/scrypto/__init__.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 |
3 | # Copyright (c) 2014 clowwindy
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in
13 | # all copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | # SOFTWARE.
22 |
23 | from __future__ import absolute_import, division, print_function, \
24 | with_statement
25 |
--------------------------------------------------------------------------------
/python27/1.0/lib/noarch/sortedcontainers/__init__.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | """
4 | sortedcontainers Sorted Container Types Library
5 | ===============================================
6 |
7 | SortedContainers is an Apache2 licensed containers library, written in
8 | pure-Python, and fast as C-extensions.
9 |
10 | Python's standard library is great until you need a sorted container type. Many
11 | will attest that you can get really far without one, but the moment you
12 | **really need** a sorted list, dict, or set, you're faced with a dozen
13 | different implementations, most using C-extensions without great documentation
14 | and benchmarking.
15 |
16 | Things shouldn't be this way. Not in Python.
17 |
18 | ::
19 |
20 | >>> from sortedcontainers import SortedList, SortedDict, SortedSet
21 | >>> sl = SortedList(xrange(10000000))
22 | >>> 1234567 in sl
23 | True
24 | >>> sl[7654321]
25 | 7654321
26 | >>> sl.add(1234567)
27 | >>> sl.count(1234567)
28 | 2
29 | >>> sl *= 3
30 | >>> len(sl)
31 | 30000003
32 |
33 | SortedContainers takes all of the work out of Python sorted types - making your
34 | deployment and use of Python easy. There's no need to install a C compiler or
35 | pre-build and distribute custom extensions. Performance is a feature and
36 | testing has 100% coverage with unit tests and hours of stress.
37 |
38 | :copyright: (c) 2014 by Grant Jenks.
39 | :license: Apache 2.0, see LICENSE for more details.
40 |
41 | """
42 |
43 | __title__ = 'sortedcontainers'
44 | __version__ = '0.9.4'
45 | __build__ = 0x000904
46 | __author__ = 'Grant Jenks'
47 | __license__ = 'Apache 2.0'
48 | __copyright__ = 'Copyright 2014 Grant Jenks'
49 |
50 | from .sortedlist import SortedList
51 | from .sortedset import SortedSet
52 | from .sorteddict import SortedDict
53 | from .sortedlistwithkey import SortedListWithKey
54 |
55 | __all__ = ['SortedList', 'SortedSet', 'SortedDict', 'SortedListWithKey']
56 |
--------------------------------------------------------------------------------
/python27/1.0/lib/noarch/utils.py:
--------------------------------------------------------------------------------
1 | import re
2 | import os
3 |
4 |
5 | g_ip_check = re.compile(r'^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$')
6 |
7 | def check_ip_valid(ip):
8 | ret = g_ip_check.match(ip)
9 | if ret is not None:
10 | "each item range: [0,255]"
11 | for item in ret.groups():
12 | if int(item) > 255:
13 | return 0
14 | return 1
15 | else:
16 | return 0
17 |
18 |
19 | def str2hex(data):
20 | return ":".join("{:02x}".format(ord(c)) for c in data)
21 |
22 |
23 | def generate_random_lowercase(n):
24 | min_lc = ord(b'a')
25 | len_lc = 26
26 | ba = bytearray(os.urandom(n))
27 | for i, b in enumerate(ba):
28 | ba[i] = min_lc + b % len_lc # convert 0..255 to 97..122
29 | #sys.stdout.buffer.write(ba)
30 | return ba
--------------------------------------------------------------------------------
/python27/1.0/lib/noarch/xconfig.py:
--------------------------------------------------------------------------------
1 |
2 |
3 | import json
4 | import os
5 |
6 |
7 |
8 | class Config(object):
9 | default_config = {}
10 | file_config = {}
11 |
12 | def __init__(self, config_path):
13 | self.config_path = config_path
14 |
15 | def load(self):
16 | if os.path.isfile(self.config_path):
17 | with file(self.config_path, 'r') as f:
18 | self.file_config = json.loads(f.read())
19 |
20 | for var_name in self.default_config:
21 | if self.file_config and var_name in self.file_config:
22 | setattr(self, var_name, self.file_config[var_name])
23 | else:
24 | setattr(self, var_name, self.default_config[var_name])
25 |
26 | # only save var not same with default
27 | def save(self):
28 | for var_name in self.default_config:
29 | if getattr(self, var_name, None) == self.default_config[var_name]:
30 | if var_name in self.file_config:
31 | del self.file_config[var_name]
32 | else:
33 | self.file_config[var_name] = getattr(self, var_name)
34 |
35 | with file(self.config_path, "w") as f:
36 | f.write(json.dumps(self.file_config, indent=2))
37 |
38 | def set_var(self, var_name, default_value):
39 | self.default_config[var_name] = default_value
40 |
41 |
--------------------------------------------------------------------------------
/python27/1.0/lib/noarch/yaml/loader.py:
--------------------------------------------------------------------------------
1 |
2 | __all__ = ['BaseLoader', 'SafeLoader', 'Loader']
3 |
4 | from reader import *
5 | from scanner import *
6 | from parser import *
7 | from composer import *
8 | from constructor import *
9 | from resolver import *
10 |
11 | class BaseLoader(Reader, Scanner, Parser, Composer, BaseConstructor, BaseResolver):
12 |
13 | def __init__(self, stream):
14 | Reader.__init__(self, stream)
15 | Scanner.__init__(self)
16 | Parser.__init__(self)
17 | Composer.__init__(self)
18 | BaseConstructor.__init__(self)
19 | BaseResolver.__init__(self)
20 |
21 | class SafeLoader(Reader, Scanner, Parser, Composer, SafeConstructor, Resolver):
22 |
23 | def __init__(self, stream):
24 | Reader.__init__(self, stream)
25 | Scanner.__init__(self)
26 | Parser.__init__(self)
27 | Composer.__init__(self)
28 | SafeConstructor.__init__(self)
29 | Resolver.__init__(self)
30 |
31 | class Loader(Reader, Scanner, Parser, Composer, Constructor, Resolver):
32 |
33 | def __init__(self, stream):
34 | Reader.__init__(self, stream)
35 | Scanner.__init__(self)
36 | Parser.__init__(self)
37 | Composer.__init__(self)
38 | Constructor.__init__(self)
39 | Resolver.__init__(self)
40 |
41 |
--------------------------------------------------------------------------------
/python27/1.0/lib/noarch/yaml/nodes.py:
--------------------------------------------------------------------------------
1 |
2 | class Node(object):
3 | def __init__(self, tag, value, start_mark, end_mark):
4 | self.tag = tag
5 | self.value = value
6 | self.start_mark = start_mark
7 | self.end_mark = end_mark
8 | def __repr__(self):
9 | value = self.value
10 | #if isinstance(value, list):
11 | # if len(value) == 0:
12 | # value = ''
13 | # elif len(value) == 1:
14 | # value = '<1 item>'
15 | # else:
16 | # value = '<%d items>' % len(value)
17 | #else:
18 | # if len(value) > 75:
19 | # value = repr(value[:70]+u' ... ')
20 | # else:
21 | # value = repr(value)
22 | value = repr(value)
23 | return '%s(tag=%r, value=%s)' % (self.__class__.__name__, self.tag, value)
24 |
25 | class ScalarNode(Node):
26 | id = 'scalar'
27 | def __init__(self, tag, value,
28 | start_mark=None, end_mark=None, style=None):
29 | self.tag = tag
30 | self.value = value
31 | self.start_mark = start_mark
32 | self.end_mark = end_mark
33 | self.style = style
34 |
35 | class CollectionNode(Node):
36 | def __init__(self, tag, value,
37 | start_mark=None, end_mark=None, flow_style=None):
38 | self.tag = tag
39 | self.value = value
40 | self.start_mark = start_mark
41 | self.end_mark = end_mark
42 | self.flow_style = flow_style
43 |
44 | class SequenceNode(CollectionNode):
45 | id = 'sequence'
46 |
47 | class MappingNode(CollectionNode):
48 | id = 'mapping'
49 |
50 |
--------------------------------------------------------------------------------
/python27/1.0/lib/pyexpat.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Thobian/XX-Net/dd2fac14824caa6d6a0289298c937d7bace8b6af/python27/1.0/lib/pyexpat.pyd
--------------------------------------------------------------------------------
/python27/1.0/lib/select.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Thobian/XX-Net/dd2fac14824caa6d6a0289298c937d7bace8b6af/python27/1.0/lib/select.pyd
--------------------------------------------------------------------------------
/python27/1.0/lib/shlex.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Thobian/XX-Net/dd2fac14824caa6d6a0289298c937d7bace8b6af/python27/1.0/lib/shlex.py
--------------------------------------------------------------------------------
/python27/1.0/lib/sre.py:
--------------------------------------------------------------------------------
1 | """This file is only retained for backwards compatibility.
2 | It will be removed in the future. sre was moved to re in version 2.5.
3 | """
4 |
5 | import warnings
6 | warnings.warn("The sre module is deprecated, please import re.",
7 | DeprecationWarning, 2)
8 |
9 | from re import *
10 | from re import __all__
11 |
12 | # old pickles expect the _compile() reconstructor in this module
13 | from re import _compile
14 |
--------------------------------------------------------------------------------
/python27/1.0/lib/struct.py:
--------------------------------------------------------------------------------
1 | from _struct import *
2 | from _struct import _clearcache
3 | from _struct import __doc__
4 |
--------------------------------------------------------------------------------
/python27/1.0/lib/unicodedata.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Thobian/XX-Net/dd2fac14824caa6d6a0289298c937d7bace8b6af/python27/1.0/lib/unicodedata.pyd
--------------------------------------------------------------------------------
/python27/1.0/lib/win32/OpenSSL/LIBEAY32.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Thobian/XX-Net/dd2fac14824caa6d6a0289298c937d7bace8b6af/python27/1.0/lib/win32/OpenSSL/LIBEAY32.dll
--------------------------------------------------------------------------------
/python27/1.0/lib/win32/OpenSSL/SSL.py:
--------------------------------------------------------------------------------
1 | def __bootstrap__():
2 | global __bootstrap__, __loader__, __file__
3 | import _memimporter, sys
4 | _memimporter.set_find_proc(lambda x: __loader__.get_data(r'%s%s' % (__loader__.prefix, x)))
5 | __file__ = r'%s%s.pyd' % (__loader__.prefix, __name__.split('.')[-1])
6 | mod = _memimporter.import_module(__loader__.get_data(__file__), 'init'+__name__.split('.')[-1], __name__, __file__)
7 | mod.__file__ = __file__
8 | mod.__loader__ = __loader__
9 | sys.modules[__name__] = mod
10 | del __bootstrap__, __loader__, __file__, _memimporter, sys
11 | __bootstrap__()
12 |
--------------------------------------------------------------------------------
/python27/1.0/lib/win32/OpenSSL/SSL.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Thobian/XX-Net/dd2fac14824caa6d6a0289298c937d7bace8b6af/python27/1.0/lib/win32/OpenSSL/SSL.pyd
--------------------------------------------------------------------------------
/python27/1.0/lib/win32/OpenSSL/SSLEAY32.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Thobian/XX-Net/dd2fac14824caa6d6a0289298c937d7bace8b6af/python27/1.0/lib/win32/OpenSSL/SSLEAY32.dll
--------------------------------------------------------------------------------
/python27/1.0/lib/win32/OpenSSL/__init__.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) AB Strakt
2 | # See LICENSE for details.
3 |
4 | """
5 | pyOpenSSL - A simple wrapper around the OpenSSL library
6 | """
7 | # eGenix: Load the embedded OpenSSL libraries rather than the system
8 | # provided ones.
9 | import sys
10 | import sysconfig
11 | import os
12 | import ctypes
13 |
14 |
15 | def load_openssl():
16 | import pkg_resources
17 | LIBEAY32_pathname = pkg_resources.resource_filename(__name__, 'LIBEAY32.dll')
18 | SSLEAY32_pathname = pkg_resources.resource_filename(__name__, 'SSLEAY32.dll')
19 | ctypes.cdll.LoadLibrary(LIBEAY32_pathname)
20 | ctypes.cdll.LoadLibrary(SSLEAY32_pathname)
21 |
22 | #load_openssl()
23 |
24 | del sys, sysconfig, os, ctypes
25 |
26 | from OpenSSL import crypto, rand, SSL
27 | from OpenSSL.version import __version__
28 |
29 | __all__ = [
30 | 'rand', 'crypto', 'SSL', 'tsafe', '__version__']
31 |
--------------------------------------------------------------------------------
/python27/1.0/lib/win32/OpenSSL/crypto.py:
--------------------------------------------------------------------------------
1 | def __bootstrap__():
2 | global __bootstrap__, __loader__, __file__
3 | import _memimporter, sys
4 | _memimporter.set_find_proc(lambda x: __loader__.get_data(r'%s%s' % (__loader__.prefix, x)))
5 | __file__ = r'%s%s.pyd' % (__loader__.prefix, __name__.split('.')[-1])
6 | mod = _memimporter.import_module(__loader__.get_data(__file__), 'init'+__name__.split('.')[-1], __name__, __file__)
7 | mod.__file__ = __file__
8 | mod.__loader__ = __loader__
9 | sys.modules[__name__] = mod
10 | del __bootstrap__, __loader__, __file__, _memimporter, sys
11 | __bootstrap__()
12 |
--------------------------------------------------------------------------------
/python27/1.0/lib/win32/OpenSSL/crypto.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Thobian/XX-Net/dd2fac14824caa6d6a0289298c937d7bace8b6af/python27/1.0/lib/win32/OpenSSL/crypto.pyd
--------------------------------------------------------------------------------
/python27/1.0/lib/win32/OpenSSL/rand.py:
--------------------------------------------------------------------------------
1 | def __bootstrap__():
2 | global __bootstrap__, __loader__, __file__
3 | import _memimporter, sys
4 | _memimporter.set_find_proc(lambda x: __loader__.get_data(r'%s%s' % (__loader__.prefix, x)))
5 | __file__ = r'%s%s.pyd' % (__loader__.prefix, __name__.split('.')[-1])
6 | mod = _memimporter.import_module(__loader__.get_data(__file__), 'init'+__name__.split('.')[-1], __name__, __file__)
7 | mod.__file__ = __file__
8 | mod.__loader__ = __loader__
9 | sys.modules[__name__] = mod
10 | del __bootstrap__, __loader__, __file__, _memimporter, sys
11 | __bootstrap__()
12 |
--------------------------------------------------------------------------------
/python27/1.0/lib/win32/OpenSSL/rand.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Thobian/XX-Net/dd2fac14824caa6d6a0289298c937d7bace8b6af/python27/1.0/lib/win32/OpenSSL/rand.pyd
--------------------------------------------------------------------------------
/python27/1.0/lib/win32/OpenSSL/tsafe.py:
--------------------------------------------------------------------------------
1 | from OpenSSL import SSL
2 | _ssl = SSL
3 | del SSL
4 |
5 | import threading
6 | _RLock = threading.RLock
7 | del threading
8 |
9 | class Connection:
10 | def __init__(self, *args):
11 | self._ssl_conn = apply(_ssl.Connection, args)
12 | self._lock = _RLock()
13 |
14 | for f in ('get_context', 'pending', 'send', 'write', 'recv', 'read',
15 | 'renegotiate', 'bind', 'listen', 'connect', 'accept',
16 | 'setblocking', 'fileno', 'shutdown', 'close', 'get_cipher_list',
17 | 'getpeername', 'getsockname', 'getsockopt', 'setsockopt',
18 | 'makefile', 'get_app_data', 'set_app_data', 'state_string',
19 | 'sock_shutdown', 'get_peer_certificate', 'get_peer_cert_chain', 'want_read',
20 | 'want_write', 'set_connect_state', 'set_accept_state',
21 | 'connect_ex', 'sendall'):
22 | exec("""def %s(self, *args):
23 | self._lock.acquire()
24 | try:
25 | return self._ssl_conn.%s(*args)
26 | finally:
27 | self._lock.release()\n""" % (f, f))
28 |
29 |
--------------------------------------------------------------------------------
/python27/1.0/lib/win32/OpenSSL/version.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) AB Strakt
2 | # Copyright (C) Jean-Paul Calderone
3 | # See LICENSE for details.
4 |
5 | """
6 | pyOpenSSL - A simple wrapper around the OpenSSL library
7 | """
8 |
9 | __version__ = '0.13.1'
10 |
--------------------------------------------------------------------------------
/python27/1.0/lib/win32/gevent/__init__.py:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2009-2012 Denis Bilenko. See LICENSE for details.
2 | """
3 | gevent is a coroutine-based Python networking library that uses greenlet
4 | to provide a high-level synchronous API on top of libev event loop.
5 |
6 | See http://www.gevent.org/ for the documentation.
7 | """
8 |
9 | from __future__ import absolute_import
10 |
11 | version_info = (1, 0, 1, 'final', 0)
12 | __version__ = '1.0.1'
13 | __changeset__ = '1.0.1-0-g747630a'
14 |
15 |
16 | __all__ = ['get_hub',
17 | 'Greenlet',
18 | 'GreenletExit',
19 | 'spawn',
20 | 'spawn_later',
21 | 'spawn_raw',
22 | 'iwait',
23 | 'wait',
24 | 'killall',
25 | 'Timeout',
26 | 'with_timeout',
27 | 'getcurrent',
28 | 'sleep',
29 | 'idle',
30 | 'kill',
31 | 'signal',
32 | 'fork',
33 | 'reinit']
34 |
35 |
36 | from gevent.hub import get_hub, iwait, wait
37 | from gevent.greenlet import Greenlet, joinall, killall
38 | spawn = Greenlet.spawn
39 | spawn_later = Greenlet.spawn_later
40 | from gevent.timeout import Timeout, with_timeout
41 | from gevent.hub import getcurrent, GreenletExit, spawn_raw, sleep, idle, kill, signal, reinit
42 | try:
43 | from gevent.os import fork
44 | except ImportError:
45 | __all__.remove('fork')
46 |
47 |
48 | # the following makes hidden imports visible to freezing tools like
49 | # py2exe. see https://github.com/surfly/gevent/issues/181
50 | def __dependencies_for_freezing():
51 | from gevent import core, resolver_thread, resolver_ares, socket,\
52 | threadpool, thread, threading, select, subprocess
53 | import pprint
54 | import traceback
55 | import signal
56 |
57 | del __dependencies_for_freezing
58 |
--------------------------------------------------------------------------------
/python27/1.0/lib/win32/gevent/_semaphore.py:
--------------------------------------------------------------------------------
1 | def __bootstrap__():
2 | global __bootstrap__, __loader__, __file__
3 | import _memimporter, sys
4 | _memimporter.set_find_proc(lambda x: __loader__.get_data(r'%s%s' % (__loader__.prefix, x)))
5 | __file__ = r'%s%s.pyd' % (__loader__.prefix, __name__.split('.')[-1])
6 | mod = _memimporter.import_module(__loader__.get_data(__file__), 'init'+__name__.split('.')[-1], __name__, __file__)
7 | mod.__file__ = __file__
8 | mod.__loader__ = __loader__
9 | sys.modules[__name__] = mod
10 | del __bootstrap__, __loader__, __file__, _memimporter, sys
11 | __bootstrap__()
12 |
--------------------------------------------------------------------------------
/python27/1.0/lib/win32/gevent/_semaphore.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Thobian/XX-Net/dd2fac14824caa6d6a0289298c937d7bace8b6af/python27/1.0/lib/win32/gevent/_semaphore.pyd
--------------------------------------------------------------------------------
/python27/1.0/lib/win32/gevent/_util.py:
--------------------------------------------------------------------------------
1 | def __bootstrap__():
2 | global __bootstrap__, __loader__, __file__
3 | import _memimporter, sys
4 | _memimporter.set_find_proc(lambda x: __loader__.get_data(r'%s%s' % (__loader__.prefix, x)))
5 | __file__ = r'%s%s.pyd' % (__loader__.prefix, __name__.split('.')[-1])
6 | mod = _memimporter.import_module(__loader__.get_data(__file__), 'init'+__name__.split('.')[-1], __name__, __file__)
7 | mod.__file__ = __file__
8 | mod.__loader__ = __loader__
9 | sys.modules[__name__] = mod
10 | del __bootstrap__, __loader__, __file__, _memimporter, sys
11 | __bootstrap__()
12 |
--------------------------------------------------------------------------------
/python27/1.0/lib/win32/gevent/_util.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Thobian/XX-Net/dd2fac14824caa6d6a0289298c937d7bace8b6af/python27/1.0/lib/win32/gevent/_util.pyd
--------------------------------------------------------------------------------
/python27/1.0/lib/win32/gevent/ares.py:
--------------------------------------------------------------------------------
1 | def __bootstrap__():
2 | global __bootstrap__, __loader__, __file__
3 | import _memimporter, sys
4 | _memimporter.set_find_proc(lambda x: __loader__.get_data(r'%s%s' % (__loader__.prefix, x)))
5 | __file__ = r'%s%s.pyd' % (__loader__.prefix, __name__.split('.')[-1])
6 | mod = _memimporter.import_module(__loader__.get_data(__file__), 'init'+__name__.split('.')[-1], __name__, __file__)
7 | mod.__file__ = __file__
8 | mod.__loader__ = __loader__
9 | sys.modules[__name__] = mod
10 | del __bootstrap__, __loader__, __file__, _memimporter, sys
11 | __bootstrap__()
12 |
--------------------------------------------------------------------------------
/python27/1.0/lib/win32/gevent/ares.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Thobian/XX-Net/dd2fac14824caa6d6a0289298c937d7bace8b6af/python27/1.0/lib/win32/gevent/ares.pyd
--------------------------------------------------------------------------------
/python27/1.0/lib/win32/gevent/core.py:
--------------------------------------------------------------------------------
1 | def __bootstrap__():
2 | global __bootstrap__, __loader__, __file__
3 | import _memimporter, sys
4 | _memimporter.set_find_proc(lambda x: __loader__.get_data(r'%s%s' % (__loader__.prefix, x)))
5 | __file__ = r'%s%s.pyd' % (__loader__.prefix, __name__.split('.')[-1])
6 | mod = _memimporter.import_module(__loader__.get_data(__file__), 'init'+__name__.split('.')[-1], __name__, __file__)
7 | mod.__file__ = __file__
8 | mod.__loader__ = __loader__
9 | sys.modules[__name__] = mod
10 | del __bootstrap__, __loader__, __file__, _memimporter, sys
11 | __bootstrap__()
12 |
--------------------------------------------------------------------------------
/python27/1.0/lib/win32/gevent/core.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Thobian/XX-Net/dd2fac14824caa6d6a0289298c937d7bace8b6af/python27/1.0/lib/win32/gevent/core.pyd
--------------------------------------------------------------------------------
/python27/1.0/lib/win32/gevent/coros.py:
--------------------------------------------------------------------------------
1 | # This module definitely remains in 1.0.x, probably in versions after that too.
2 | import warnings
3 | warnings.warn('gevent.coros has been renamed to gevent.lock', DeprecationWarning, stacklevel=2)
4 |
5 | from gevent.lock import *
6 | from gevent.lock import __all__
7 |
--------------------------------------------------------------------------------
/python27/1.0/lib/win32/gevent/resolver_thread.py:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2012 Denis Bilenko. See LICENSE for details.
2 | import _socket
3 | from gevent.hub import get_hub
4 |
5 |
6 | __all__ = ['Resolver']
7 |
8 |
9 | class Resolver(object):
10 |
11 | expected_errors = Exception
12 |
13 | def __init__(self, hub=None):
14 | if hub is None:
15 | hub = get_hub()
16 | self.pool = hub.threadpool
17 |
18 | def __repr__(self):
19 | return '' % (id(self), self.pool)
20 |
21 | def close(self):
22 | pass
23 |
24 | # from briefly reading socketmodule.c, it seems that all of the functions
25 | # below are thread-safe in Python, even if they are not thread-safe in C.
26 |
27 | def gethostbyname(self, *args):
28 | return self.pool.apply_e(self.expected_errors, _socket.gethostbyname, args)
29 |
30 | def gethostbyname_ex(self, *args):
31 | return self.pool.apply_e(self.expected_errors, _socket.gethostbyname_ex, args)
32 |
33 | def getaddrinfo(self, *args, **kwargs):
34 | return self.pool.apply_e(self.expected_errors, _socket.getaddrinfo, args, kwargs)
35 |
36 | def gethostbyaddr(self, *args, **kwargs):
37 | return self.pool.apply_e(self.expected_errors, _socket.gethostbyaddr, args, kwargs)
38 |
39 | def getnameinfo(self, *args, **kwargs):
40 | return self.pool.apply_e(self.expected_errors, _socket.getnameinfo, args, kwargs)
41 |
--------------------------------------------------------------------------------
/python27/1.0/lib/win32/gevent/threading.py:
--------------------------------------------------------------------------------
1 | from __future__ import absolute_import
2 |
3 |
4 | __implements__ = ['local',
5 | '_start_new_thread',
6 | '_allocate_lock',
7 | 'Lock',
8 | '_get_ident',
9 | '_sleep',
10 | '_DummyThread']
11 |
12 |
13 | import threading as __threading__
14 | _DummyThread_ = __threading__._DummyThread
15 | from gevent.local import local
16 | from gevent.thread import start_new_thread as _start_new_thread, allocate_lock as _allocate_lock, get_ident as _get_ident
17 | from gevent.hub import sleep as _sleep, getcurrent
18 | Lock = _allocate_lock
19 |
20 |
21 | def _cleanup(g):
22 | __threading__._active.pop(id(g))
23 |
24 |
25 | class _DummyThread(_DummyThread_):
26 | # instances of this will cleanup its own entry
27 | # in ``threading._active``
28 |
29 | def __init__(self):
30 | _DummyThread_.__init__(self)
31 | g = getcurrent()
32 | rawlink = getattr(g, 'rawlink', None)
33 | if rawlink is not None:
34 | rawlink(_cleanup)
35 |
--------------------------------------------------------------------------------
/python27/1.0/lib/win32/gevent/util.py:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2009 Denis Bilenko. See LICENSE for details.
2 | __all__ = ['wrap_errors']
3 |
4 | import sys
5 |
6 |
7 | class wrap_errors(object):
8 | """Helper to make function return an exception, rather than raise it.
9 |
10 | Because every exception that is unhandled by greenlet will be logged,
11 | it is desirable to prevent non-error exceptions from leaving a greenlet.
12 | This can done with simple ``try``/``except`` construct::
13 |
14 | def wrapped_func(*args, **kwargs):
15 | try:
16 | return func(*args, **kwargs)
17 | except (A, B, C), ex:
18 | return ex
19 |
20 | :class:`wrap_errors` provides a shortcut to write that in one line::
21 |
22 | wrapped_func = wrap_errors((A, B, C), func)
23 |
24 | It also preserves ``__str__`` and ``__repr__`` of the original function.
25 | """
26 | # QQQ could also support using wrap_errors as a decorator
27 |
28 | def __init__(self, errors, func):
29 | """Make a new function from `func', such that it catches `errors' (an
30 | Exception subclass, or a tuple of Exception subclasses) and return
31 | it as a value.
32 | """
33 | self.errors = errors
34 | self.func = func
35 |
36 | def __call__(self, *args, **kwargs):
37 | func = self.func
38 | try:
39 | return func(*args, **kwargs)
40 | except self.errors:
41 | return sys.exc_info()[1]
42 |
43 | def __str__(self):
44 | return str(self.func)
45 |
46 | def __repr__(self):
47 | return repr(self.func)
48 |
49 | def __getattr__(self, item):
50 | return getattr(self.func, item)
51 |
--------------------------------------------------------------------------------
/python27/1.0/lib/win32/gevent/wsgi.py:
--------------------------------------------------------------------------------
1 | from gevent.pywsgi import *
2 | import gevent.pywsgi as _pywsgi
3 | __all__ = _pywsgi.__all__
4 | del _pywsgi
5 |
--------------------------------------------------------------------------------
/python27/1.0/lib/win32/greenlet.py:
--------------------------------------------------------------------------------
1 | def __bootstrap__():
2 | global __bootstrap__, __loader__, __file__
3 | import _memimporter, sys
4 | _memimporter.set_find_proc(lambda x: __loader__.get_data(r'%s%s' % (__loader__.prefix, x)))
5 | __file__ = r'%s%s.pyd' % (__loader__.prefix, __name__.split('.')[-1])
6 | mod = _memimporter.import_module(__loader__.get_data(__file__), 'init'+__name__.split('.')[-1], __name__, __file__)
7 | mod.__file__ = __file__
8 | mod.__loader__ = __loader__
9 | sys.modules[__name__] = mod
10 | del __bootstrap__, __loader__, __file__, _memimporter, sys
11 | __bootstrap__()
12 |
--------------------------------------------------------------------------------
/python27/1.0/lib/win32/greenlet.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Thobian/XX-Net/dd2fac14824caa6d6a0289298c937d7bace8b6af/python27/1.0/lib/win32/greenlet.pyd
--------------------------------------------------------------------------------
/python27/1.0/lib/win32/systray/__init__.py:
--------------------------------------------------------------------------------
1 | # infi.systray
2 |
3 | from .traybar import SysTrayIcon
4 |
--------------------------------------------------------------------------------
/python27/1.0/lib/win32/unicodedata.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Thobian/XX-Net/dd2fac14824caa6d6a0289298c937d7bace8b6af/python27/1.0/lib/win32/unicodedata.lib
--------------------------------------------------------------------------------
/python27/1.0/lib/win32/unicodedata.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Thobian/XX-Net/dd2fac14824caa6d6a0289298c937d7bace8b6af/python27/1.0/lib/win32/unicodedata.pyd
--------------------------------------------------------------------------------
/python27/1.0/lib/wsgiref/__init__.py:
--------------------------------------------------------------------------------
1 | """wsgiref -- a WSGI (PEP 333) Reference Library
2 |
3 | Current Contents:
4 |
5 | * util -- Miscellaneous useful functions and wrappers
6 |
7 | * headers -- Manage response headers
8 |
9 | * handlers -- base classes for server/gateway implementations
10 |
11 | * simple_server -- a simple BaseHTTPServer that supports WSGI
12 |
13 | * validate -- validation wrapper that sits between an app and a server
14 | to detect errors in either
15 |
16 | To-Do:
17 |
18 | * cgi_gateway -- Run WSGI apps under CGI (pending a deployment standard)
19 |
20 | * cgi_wrapper -- Run CGI apps under WSGI
21 |
22 | * router -- a simple middleware component that handles URL traversal
23 | """
24 |
--------------------------------------------------------------------------------
/python27/1.0/lib/xml/__init__.py:
--------------------------------------------------------------------------------
1 | """Core XML support for Python.
2 |
3 | This package contains four sub-packages:
4 |
5 | dom -- The W3C Document Object Model. This supports DOM Level 1 +
6 | Namespaces.
7 |
8 | parsers -- Python wrappers for XML parsers (currently only supports Expat).
9 |
10 | sax -- The Simple API for XML, developed by XML-Dev, led by David
11 | Megginson and ported to Python by Lars Marius Garshol. This
12 | supports the SAX 2 API.
13 |
14 | etree -- The ElementTree XML library. This is a subset of the full
15 | ElementTree XML release.
16 |
17 | """
18 |
19 |
20 | __all__ = ["dom", "parsers", "sax", "etree"]
21 |
22 | _MINIMUM_XMLPLUS_VERSION = (0, 8, 4)
23 |
24 |
25 | try:
26 | import _xmlplus
27 | except ImportError:
28 | pass
29 | else:
30 | try:
31 | v = _xmlplus.version_info
32 | except AttributeError:
33 | # _xmlplus is too old; ignore it
34 | pass
35 | else:
36 | if v >= _MINIMUM_XMLPLUS_VERSION:
37 | import sys
38 | _xmlplus.__path__.extend(__path__)
39 | sys.modules[__name__] = _xmlplus
40 | else:
41 | del v
42 |
--------------------------------------------------------------------------------
/python27/1.0/lib/xml/dom/NodeFilter.py:
--------------------------------------------------------------------------------
1 | # This is the Python mapping for interface NodeFilter from
2 | # DOM2-Traversal-Range. It contains only constants.
3 |
4 | class NodeFilter:
5 | """
6 | This is the DOM2 NodeFilter interface. It contains only constants.
7 | """
8 | FILTER_ACCEPT = 1
9 | FILTER_REJECT = 2
10 | FILTER_SKIP = 3
11 |
12 | SHOW_ALL = 0xFFFFFFFFL
13 | SHOW_ELEMENT = 0x00000001
14 | SHOW_ATTRIBUTE = 0x00000002
15 | SHOW_TEXT = 0x00000004
16 | SHOW_CDATA_SECTION = 0x00000008
17 | SHOW_ENTITY_REFERENCE = 0x00000010
18 | SHOW_ENTITY = 0x00000020
19 | SHOW_PROCESSING_INSTRUCTION = 0x00000040
20 | SHOW_COMMENT = 0x00000080
21 | SHOW_DOCUMENT = 0x00000100
22 | SHOW_DOCUMENT_TYPE = 0x00000200
23 | SHOW_DOCUMENT_FRAGMENT = 0x00000400
24 | SHOW_NOTATION = 0x00000800
25 |
26 | def acceptNode(self, node):
27 | raise NotImplementedError
28 |
--------------------------------------------------------------------------------
/python27/1.0/lib/xml/etree/__init__.py:
--------------------------------------------------------------------------------
1 | # $Id: __init__.py 3375 2008-02-13 08:05:08Z fredrik $
2 | # elementtree package
3 |
4 | # --------------------------------------------------------------------
5 | # The ElementTree toolkit is
6 | #
7 | # Copyright (c) 1999-2008 by Fredrik Lundh
8 | #
9 | # By obtaining, using, and/or copying this software and/or its
10 | # associated documentation, you agree that you have read, understood,
11 | # and will comply with the following terms and conditions:
12 | #
13 | # Permission to use, copy, modify, and distribute this software and
14 | # its associated documentation for any purpose and without fee is
15 | # hereby granted, provided that the above copyright notice appears in
16 | # all copies, and that both that copyright notice and this permission
17 | # notice appear in supporting documentation, and that the name of
18 | # Secret Labs AB or the author not be used in advertising or publicity
19 | # pertaining to distribution of the software without specific, written
20 | # prior permission.
21 | #
22 | # SECRET LABS AB AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
23 | # TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANT-
24 | # ABILITY AND FITNESS. IN NO EVENT SHALL SECRET LABS AB OR THE AUTHOR
25 | # BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
26 | # DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
27 | # WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
28 | # ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
29 | # OF THIS SOFTWARE.
30 | # --------------------------------------------------------------------
31 |
32 | # Licensed to PSF under a Contributor Agreement.
33 | # See http://www.python.org/psf/license for licensing details.
34 |
--------------------------------------------------------------------------------
/python27/1.0/lib/xml/etree/cElementTree.py:
--------------------------------------------------------------------------------
1 | # Wrapper module for _elementtree
2 |
3 | from _elementtree import *
4 |
--------------------------------------------------------------------------------
/python27/1.0/lib/xml/parsers/__init__.py:
--------------------------------------------------------------------------------
1 | """Python interfaces to XML parsers.
2 |
3 | This package contains one module:
4 |
5 | expat -- Python wrapper for James Clark's Expat parser, with namespace
6 | support.
7 |
8 | """
9 |
--------------------------------------------------------------------------------
/python27/1.0/lib/xml/parsers/expat.py:
--------------------------------------------------------------------------------
1 | """Interface to the Expat non-validating XML parser."""
2 | __version__ = '$Revision: 17640 $'
3 |
4 | from pyexpat import *
5 |
--------------------------------------------------------------------------------
/python27/1.0/msvcr90.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Thobian/XX-Net/dd2fac14824caa6d6a0289298c937d7bace8b6af/python27/1.0/msvcr90.dll
--------------------------------------------------------------------------------
/python27/1.0/python.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Thobian/XX-Net/dd2fac14824caa6d6a0289298c937d7bace8b6af/python27/1.0/python.exe
--------------------------------------------------------------------------------
/python27/1.0/python27.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Thobian/XX-Net/dd2fac14824caa6d6a0289298c937d7bace8b6af/python27/1.0/python27.dll
--------------------------------------------------------------------------------
/python27/1.0/pythonw.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Thobian/XX-Net/dd2fac14824caa6d6a0289298c937d7bace8b6af/python27/1.0/pythonw.exe
--------------------------------------------------------------------------------
/start.bat:
--------------------------------------------------------------------------------
1 | SET PYTHONPATH=
2 | "%~dp0python27/1.0/python.exe" "%~dp0launcher/start.py"
3 | pause
4 |
--------------------------------------------------------------------------------
/start.command:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | cd "$(dirname "$0")"
3 | /usr/bin/python2.7 launcher/start.py
4 |
--------------------------------------------------------------------------------
/start.lnk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Thobian/XX-Net/dd2fac14824caa6d6a0289298c937d7bace8b6af/start.lnk
--------------------------------------------------------------------------------
/start.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | SCRIPTPATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
4 | cd $SCRIPTPATH
5 |
6 | if python -V | grep -q "Python 3" ;then
7 | PYTHON="python2"
8 | else
9 | PYTHON="python"
10 | fi
11 |
12 |
13 |
14 | # launch xx-net service by ignore hungup signal
15 | function launchWithNoHungup() {
16 | nohup ${PYTHON} launcher/start.py 2&> /dev/null &
17 | }
18 |
19 | # launch xx-net service by hungup signal
20 | function launchWithHungup() {
21 | ${PYTHON} launcher/start.py
22 | }
23 |
24 | # get operating system name
25 | os_name=`uname -s`
26 |
27 | # Darwin for os x
28 | if [ $os_name = 'Darwin' ];then
29 | launchWithNoHungup
30 | else
31 | launchWithHungup
32 | fi
--------------------------------------------------------------------------------
/start.vbs:
--------------------------------------------------------------------------------
1 | Set oShell = CreateObject ("Wscript.Shell")
2 |
3 | strPath = Wscript.ScriptFullName
4 | Set objFSO = CreateObject("Scripting.FileSystemObject")
5 | Set objFile = objFSO.GetFile(strPath)
6 | strFolder = objFSO.GetParentFolderName(objFile)
7 |
8 | Dim strArgs
9 | quo = """"
10 | strArgs = quo & strFolder & "/python27/1.0/pythonw.exe" & quo & " " & quo & strFolder & "/launcher/start.py " & quo
11 | oShell.Run strArgs, 0, false
--------------------------------------------------------------------------------
/x_tunnel/__init__.py:
--------------------------------------------------------------------------------
1 | __all__ = ["local", "start"]
--------------------------------------------------------------------------------
/x_tunnel/babel.config:
--------------------------------------------------------------------------------
1 | # Extraction from Python source files
2 | #[python: **.py]
3 |
4 | # Extraction from HTML and YAML templates
5 | [jinja2: **/web_ui/**.html]
6 | [jinja2: **/web_ui/**.yaml]
7 |
8 | encoding = utf-8
9 |
--------------------------------------------------------------------------------
/x_tunnel/local/__init__.py:
--------------------------------------------------------------------------------
1 | __all__ = ["local", "start"]
--------------------------------------------------------------------------------
/x_tunnel/local/global_var.py:
--------------------------------------------------------------------------------
1 |
2 | protocol_version = 1
3 | last_refresh_time = 0
4 | cert = None
5 | data_path = None
6 | config = None
7 | proxy = None
8 | session = None
9 | socks5_server = None
10 | last_api_error = ""
11 |
12 | quota_list = {}
13 | quota = 0
14 |
15 | server_host = ""
16 | server_port = 0
17 | balance = 0
18 |
--------------------------------------------------------------------------------
/x_tunnel/pybabel_update.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 |
4 | pybabel extract -F babel.config -o lang/messages.pot .
5 |
6 | #pybabel update -l de_DE -d ./lang -i ./lang/messages.pot
7 | #pybabel update -l en_US -d ./lang -i ./lang/messages.pot
8 | #pybabel update -l es_VE -d ./lang -i ./lang/messages.pot
9 | #pybabel update -l fa_IR -d ./lang -i ./lang/messages.pot
10 | #pybabel update -l ja_JP -d ./lang -i ./lang/messages.pot
11 | pybabel update -l zh_CN -d ./lang -i ./lang/messages.pot
12 |
13 | #msgfmt lang/zh_CN/LC_MESSAGES/messages.po -o lang/zh_CN/LC_MESSAGES/messages.mo
14 | sed -i -e '/#.*$/d' lang/zh_CN/LC_MESSAGES/messages.po
15 |
--------------------------------------------------------------------------------
/x_tunnel/start.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # coding:utf-8
3 |
4 | import os
5 | import sys
6 |
7 |
8 | __file__ = os.path.abspath(__file__)
9 | if os.path.islink(__file__):
10 | __file__ = getattr(os, 'readlink', lambda x: x)(__file__)
11 |
12 | current_path = os.path.dirname(os.path.abspath(__file__))
13 | sys.path.append(current_path)
14 | import local.client as client
15 |
16 |
17 | def main():
18 | try:
19 | client.main()
20 | except KeyboardInterrupt:
21 | sys.exit()
22 |
23 | if __name__ == "__main__":
24 | main()
25 |
--------------------------------------------------------------------------------
/x_tunnel/web_ui/menu.yaml:
--------------------------------------------------------------------------------
1 | module_title: X-Tunnel
2 | menu_sort_id: 3
3 | sub_menus: {
4 | 1:{
5 | title: {{ _( "Config" ) }},
6 | url: config
7 | },
8 | 2:{
9 | title: {{ _("Log") }},
10 | url: logging
11 | }
12 | }
--------------------------------------------------------------------------------