Python 提供了两个基本的 socket 模块:
Socket它提供了标准的BSD Socket API。SocketServer它提供了服务器重心,可以简化网络服务器的开发。
下面讲解下 Socket模块功能。
| ### COMPILE PHP 8.0 RHEL/(CentOS?) 6 ### | |
| # You can find PHP 8.0 repository here: | |
| # https://pkgs.dyn.su/el6-extras/x86_64 | |
| # installing dependencies | |
| # https://coderwall.com/p/ggmpfa/php-configuration-error-and-solutions-in-rpm | |
| yum install -y autoconf autotools gmp-devel libcurl-devel postgresql postgresql-devel sqlite sqlite-devel \ | |
| libxslt-devel net-snmp-devel readline-devel aspell aspell-devel unixODBC-devel libicu-devel libc-client-devel \ | |
| freetype-devel libXpm-devel libpng-devel libvpx-devel enchant-devel libmcrypt-devel libmemcached-devel \ |
| grep -lr --include=*.php "eval(base64_decode" /home | |
| find /home -type f -name '*.php' | xargs grep -l "eval *(" --color | |
| find /home -type f -name '*.php' | xargs grep -l "base64_decode *(" --color | |
| find /home -type f -name '*.php' | xargs grep -l "gzinflate *(" --color | |
| find /home -type f -name '*.php' | xargs grep -l "outdo" --color | |
| find /home -type f -name '*.php' | xargs grep -l "eval*_POST" --color | |
| find /home -type f -name '*.php' | xargs grep -l "$ptzrw" --color | |
| find /home/*/domains/*/public_html/wp-content/uploads -type f -name '*.php' | |
| find /home/ -type d -perm 777 -exec find {} -name "*.php" \; |
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| __author__ = "Adrien Pujol - http://www.crashdump.fr/" | |
| __copyright__ = "Copyright 2013, Adrien Pujol" | |
| __license__ = "Mozilla Public License" | |
| __version__ = "0.3" | |
| __email__ = "[email protected]" | |
| __status__ = "Development" | |
| __doc__ = "Check a TLS certificate validity." |
| # Nginx can serve FLV/MP4 files by pseudo-streaming way without any specific media-server software. | |
| # To do the custom build we use 2 modules: --with-http_secure_link_module --with-http_flv_module | |
| # This module "secure-link" helps you to protect links from stealing away. | |
| # | |
| # NOTE: see more details at coderwall: http://coderwall.com/p/3hksyg | |
| cd /usr/src | |
| wget http://nginx.org/download/nginx-1.5.13.tar.gz | |
| tar xzvf ./nginx-1.5.13.tar.gz && rm -f ./nginx-1.5.13.tar.gz |