易截截图软件、单文件、免安装、纯绿色、仅160KB

Python Firewall Win32 (pyfw

Python Firewall Win32 (pyfw-win32)
pyfw-win32是一个可用Python脚本开发数据包过滤(防火墙)的模块。底层使用C语言编写的NDIS中间层驱动(NDIS IMD)提供支持,上层提供Python开发接口。可用Python脚本处理所有逻辑问题,而不必关心底层实现,达到快速、灵活开发的目的。
Google 项目托管:
http://code.google.com/p/pyfw-win32/
作者:dahubaobao
MSN: dahu_baobao@hotmail.com


相关文档:

Python入门的36个例子 之 27

源代码下载:下载地址在这里
e.g.1
# 030
aFile = file(r'C:\temp.txt', 'a')
aFile.write('又添加了一行。')
aFile.close()

output:
e.g.2
# 030
aFile = file(r'C:\temp.txt', 'a')
aFile.write('又添加了一行。')
aFile.close()

output:
e.g.3
实现根据原始文件有没有最后一行空行的情况来进行&ldqu ......

Python入门的36个例子 之 29

源代码下载:下载地址在这里
# 033
class Person:
age = 22
def sayHello(self): # 方法与函数的区别在于需要一个self参数
print 'Hello!'
# end of def
# end of class # 这是我良好的编程风格
p = Person()
print p.age
p.sayHello()

output:
22
Hello! ......

Python入门的36个例子 之 32

源代码下载:下载地址在这里
A Byte Of Python
中关于继承有这样的文字:
Suppose you want to write a program which has to keep track of the
teachers and students in a college. They have some common
characteristics such as name, age and address. They also have specific
characteristics such as sala ......

Python入门的36个例子 之 34

源代码下载:下载地址在这里
raise有两个参数,第一个是由我们自己定义的异常类型,第二个是关于此异常的少量说明信息。
# 038
def getAge():
age = input('Input your age:')
if (age < 0 or age > 160):
raise 'BadAgeError', 'It is impossible!!!!!'
# end of if
return age
# ......

Python Raw Socket使用示例(发送TCP SYN数据包)

说实话,Python真的不太适合做这种二进制的东西,天生没有指针,导致在C/C++很容易的东西在Python下就很麻烦。不过好像3.1有了原生的bytes类型,不知道能不能改变现状。
import sys
import time
import socket
import struct
import random
def SendPacketData (Buffer = None , DestIP = "127.0.0.1" , DestPort = 0 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号