pythonѧϰ±Ê¼Ç——pcap×¥°ü
½ñÌì¿´¿´ÈçºÎÓÃpythonʵÏÖ×¥°ü¡£
ÒÔÇ°ÎÒÃÇÔøÓùýwinpcapʵÏÖ×¥°ü£¬Æäʵ½ñÌìÎÒÃÇ»¹ÊÇÓÃËü£¬Ö»²»¹ýÊÇËüÔÚpythonϵÄÄ£¿é£¬ÔÚÓÃ֮ǰÎÒÃDZØÐëÏÈÏÂÔØÁ½¸ö¿â£¬pcap¿âºÍdpkt¿â£¬Õâ¸ö¿ÉÒÔÔÚGoogle codeÀïºÜÈÝÒ×ÕÒµ½£¬ÐèҪעÒâµÄÊÇpcapÖ»Ö§³Öµ½python2.5 £¬ËùÒÔÎÒÃÇÒªÓÃ2.5À´±àд¡£
°²×°ÍêÁ½¸ö¿âÒÔºó£¬ÎÒÃǾÍÏÈÀ´ÈÏʶһÏÂÁ½¸ö¿â¡£
Ê×ÏÈ¿´pcap¡£
ÎÒÃÇÔÚÃüÁîÐÐÊäÈ룺import pcapÈç¹û»Ø³µºóûÓгö´íÐÅÏ¢£¬Ôò˵Ã÷ÎÒÃÇ°²×°³É¹¦ÁË£¬È»ºóÎÒÃÇÀûÓÃhelpÃüÁîÀ´²é¿´Ò»Ï°ïÖúÐÅÏ¢¡£
Ä£¿éµÄ˵Ã÷£ºThis module provides a high level interface to packet capture systems.All packets on the network, even those destined for other hosts, areaccessible through this mechanism.
¹ØÓÚËüµÄÀ࣬ÕâÀïֻ˵ÏÂ×îÖØÒªµÄÒ»¸öpcapÀࣺ
class pcap(__builtin__.object)
pcap(name=None, snaplen=65535, promisc=True, immediate=False, timeout_ms=None) -> packet capture object¡£Open a handle to a packet capture descriptor.
name -- name of a network interface or dumpfile to open,
or None to open the first available up interface
snaplen -- maximum number of bytes to capture for each packet
promisc -- boolean to specify promiscuous mode sniffing
immediate -- disable buffering, if possible
timeout_ms -- requests for the next packet will return None if the timeout
(in milliseconds) is reached and no packets were received
(Default: no timeout)
ÎÒÃÇÔÚÒ»°ãʹÓõÄʱºò£¬²ÎÊý¶¼¿ÉÊ¡ÂÔ£¬È磺p=pcap.pcap( )
PcapµÄ·½·¨Öг£ÓõÄÊÇsetfilter£¨£©ÉèÖùýÂË£¬¿ÉÒÔʹÐÒ飬¶Ë¿Ú¡£
ÁíÍâÒ»¸ö¿âÊÇdpkt¿â£¬ÊÇÓÃÀ´½âÎöÎÒÃÇ×¥µ½µÄ°üµÄ£¬ºÃÎÒÃÇ¿´Ò»¸ö¼òµ
Ïà¹ØÎĵµ£º
http://sourceforge.net/projects/pyexcelerator/
12ÔÂ2ÈÕ
python ¶ÁдExcelÎļþ£¨×ªÌû limodou£©
http://www.lexicon.net/sjmachin/xlrd.htm
Õâ¸ö°üÊÇÓÃÀ´¶ÁExcelÎļþµÄ
ÔÚ·¢ÏÖ xlrd Ö®ºó²»¾Ã¾Í·¢ÏÖÁË pyExcelerator
£¬ËüÓë xlrd ²»Í¬£¬ËüÖ÷ÒªÊÇÓÃÀ´Ð´ Excel Îļþ£¬µ±È»¶ÁÒ²ÊÇûÓÐÎÊÌâµÄ¡£ÏÂÃæ¾ÍËüµÄʹÓüòµ¥µØ½éÉ ......
ÒÔÏÂÊÇÒ»¸öͨ¹ýminidomÄ£¿éдÎļþµÄÍêÕûʾÀý£¬ÊÇÔÚ×î½ü×öµÄÏîÄ¿WalleÉÏÃæÓõ½µÄ,Õâ¸öʾÀýµÄÄ¿µÄÊÇÉú³ÉÒ»¸öÈçϵĸñʽµÄxml£¬Îļþ¸ñʽΪÎÞBOM utf-8¡£
Éú³ÉxmlÎļþ¸ñʽ£º
<?xml version="1.0" encoding="utf-8"?>
<coverages>
<coverage>
  ......
Ò»¡¢¼ò½é
py2exeÊÇÒ»¸ö½«python½Å±¾×ª»»³ÉwindowsÉϵĿɶÀÁ¢Ö´ÐеĿÉÖ´ÐгÌÐò(*.exe)µÄ¹¤¾ß£¬ÕâÑù£¬Äã¾Í¿ÉÒÔ²»ÓÃ×°python¶øÔÚwindowsϵͳÉÏÔËÐÐÕâ¸ö¿ÉÖ´ÐгÌÐò¡£
py2exeÒѾ±»ÓÃÓÚ´´½¨wxPython,Tkinter,Pmw,PyGTK,pygame,win32com clientºÍserver,ºÍÆäËüµÄ¶ÀÁ¢³ÌÐò¡£py2exeÊÇ·¢²¼ÔÚ¿ªÔ´Ðí¿É֤ϵġ£
¶þ¡¢°²×°py2exe
......
ÓÃPythonµ¼³öQQ¿Õ¼äµÄÈÕÖ¾µ½WordPress
ÎÄÕÂÀ´Ô´£ºhttp://www.keakon.cn/bbs/thread-964-1-1.html·½·¨ºÜ¼òµ¥£¬ÕÒ³öÈÕÖ¾µÄµØÖ·£¬ÔÙ±éÀúÁгöÈÕÖ¾µÄÄÚÈÝ¡£
ÒòΪµ¥´¿µ¼³öûÓ㬻¹µÃת»»³ÉÆäËû¸ñʽ£¬ËùÒÔÎÒ±£´æµ½Ò»¸öÁбíÀÿƪÈÕÖ¾¶¼¶ÔÓ¦ÆäÖеÄÒ»¸ö×ÖµäÔªËØ£¬×ÖµäµÄÊôÐÔ¶¼ÓÃunicode±àÂë¡£
È»ºódump³öÀ´£¬¿ÉÒÔ·½±ãÒÔºóÓÃPyth ......