Hello.
I have a problem can not run.
I'm not understand.
Help me please.
How to use and detail ?
Thanks.
#!/usr/bin/python2.5
import py_net_libs
class dissect:
def __init__(self,pkt,offset):
self.pkt, self.offset = py_net_libs.arp_dissect(pkt,offset)
self.next = None
def format(self):
mac_s, mac_d, ip_src, ip_dst = '','','',''
for n in (self.pkt[5]): mac_s = mac_s + '%02x:' % n
for n in (self.pkt[7]): mac_d = mac_d + '%02x:' % n
for n in (self.pkt[6]): ip_src = ip_src + '%d.' % n
for n in (self.pkt[8]): ip_dst = ip_dst + '%d.' % n
return [ 'HW Type = 0x%02x' % self.pkt[0],
'Protocol Type = 0x%x' % self.pkt[1],
'HW Address Lenght = %d' % self.pkt[2],
'Procol Address Length = %d' % self.pkt[3],
'OP code = %x' % self.pkt[4],
'Sender HW Addr = %s'% mac_s [:-1],
'Sender IP Addr = %s'% ip_src[:-1],
'Target HW Addr = %s'% mac_d [:-1],
'Target IP Addr = %s'% ip_dst[:-1] ]
_
แสดงเส้นทาง! เพิ่มแผนที่และทิศทางไปสู่งานปาร์ตี้ของคุณ
http://www.microsoft.com/windows/windowslive/products/events.aspx--
http://mail.python.org/mailman/listinfo/python-list