05 2016 档案
摘要:UNIX套接字用于在用一台机器上运行的进程之间通信。UNIX套接字比因特网域套接字的效率更高。UNIX与套接字提供和
数据报两种接口,UNIX域数据报服务是可靠的,就不会丢失消息也不会传递出错。UNIX域套接字是套接字和管道之间的混合物。
实现IPC的好方法。。。
阅读全文
摘要:#coding:utf-8__author__ = 'hdfs'try: name=['9','7'] name[3] 1/0except IndexError,e: print(e)except Exception,e: print(e)finally: print('End...>>>')cla
阅读全文
摘要:[similarface@InnerTest vsftpd]$ ll total 48 -rw------- 1 root root 125 Mar 23 02:26 ftpusers -rw-r--r-- 1 root root 12288 May 27 14:47 logins.db -rw-r--r-- 1 root root 34 May 27 14:40 login_us...
阅读全文
摘要:#coding:utf-8 __author__ = 'similarface' import argparse import socket import errno from time import time as now DEFAULT_TIMEOUT = 120 DEFAULT_SERVER_HOST = 'localhost' DEFAULT_SERVER_PORT = 80 cla...
阅读全文
摘要:#coding:utf-8 #!/usr/bin/env python import os import argparse import socket import struct import select import time # ICMP_ECHO_REQUEST = 8 # Platform specific #超时时间 DEFAULT_TIMEOUT = 2 #ping到次数 D...
阅读全文
摘要:浏览器访问:http://localhost:8800 --> 会跳转到:http://www.23mofang.com
阅读全文
摘要:#!/usr/bin/python #coding:utf-8 __author__ = 'similarface' import time import sys,datetime,re,subprocess #发送邮件 from itertools import islice import commands,optparse,os,xlrd import sys import smtplib ...
阅读全文
摘要:#coding:utf-8 __author__ = 'similarface' import os,socket,threading,SocketServer SERVER_HOST='localhost' SERVER_PORT=0 BUF_SIZE=1024 ECHO_MSG='HELLO' class ThreadClient(): def __init__(self,ip,...
阅读全文
摘要:#coding:utf-8 __author__ = 'similarface' import os,socket,threading,SocketServer SERVER_HOST='localhost' SERVER_PORT=0 BUF_SIZE=1024 ECHO_MSG='HELLO' class ForkedClient(): def __init__(self,ip,...
阅读全文
摘要:www.python.org的IP地址:103.245.222.223
阅读全文
摘要:#coding:utf-8 __author__ = 'similarface' #!/usr/bin/env python import socket #二进制和ASCII互转及其它进制转换 from binascii import hexlify def get_remote_machine_info(remote_host): ''' 获取根据域名获取IP地址 :...
阅读全文
摘要:nginx 像网卡那样可以 start stop restart staus 方便管理
阅读全文
摘要:[root@nginx ~]# #默认启动方式 [root@nginx ~]# which nginx /sbin/nginx [root@nginx ~]# nginx [root@nginx ~]# #另行指定配置文件 [root@nginx ~]# nginx -c /tmp/nginx.conf [root@nginx ~]# #另行指定配置文件 [root@nginx ~]# ngi...
阅读全文
浙公网安备 33010602011771号