hey guys,
i have a problem.. i have this chunk of text like this.....
No. Time Source Destination Protocol Info
2 0.005318 192.168.110.33 192.168.110.44 ICMP Echo (ping) request
Frame 2 (98 bytes on wire, 98 bytes captured)
Ethernet II, Src: Cisco-Li_4d:e1:30 (00:1c:10:4d:e1:30), Dst: IntelCor_4d:77:83 (00:13:02:4d:77:83)
Internet Protocol, Src: 192.168.110.33 (192.168.110.33), Dst: 192.168.110.44 (192.168.110.44)
Internet Control Message Protocol
No. Time Source Destination Protocol Info
3 0.998730 192.168.110.33 192.168.110.44 DHCP DHCP Offer - Transaction ID 0x9e0e832
Frame 3 (347 bytes on wire, 347 bytes captured)
Ethernet II, Src: Cisco-Li_4d:e1:30 (00:1c:10:4d:e1:30), Dst: IntelCor_4d:77:83 (00:13:02:4d:77:83)
Internet Protocol, Src: 192.168.110.33 (192.168.110.33), Dst: 192.168.110.44 (192.168.110.44)
User Datagram Protocol, Src Port: bootps (67), Dst Port: bootpc (68)
Bootstrap Protocol
No. Time Source Destination Protocol Info
4 0.998917 0.0.0.0 255.255.255.255 DHCP DHCP Request - Transaction ID 0x9e0e832
Frame 4 (348 bytes on wire, 348 bytes captured)
Ethernet II, Src: IntelCor_4d:77:83 (00:13:02:4d:77:83), Dst: Broadcast (ff:ff:ff:ff:ff:ff)
Internet Protocol, Src: 0.0.0.0 (0.0.0.0), Dst: 255.255.255.255 (255.255.255.255)
User Datagram Protocol, Src Port: bootpc (68), Dst Port: bootps (67)
Bootstrap Protocol
basically i'm trying to extract the DHCP server and the the IP address its giving me... sp i want to look for the text between "DHCP Offer" and "bootstrap" and then from that chunk get the part between "Internet Protocol) Src:" and "("
temp = re.findall("DHCP\s+Offer(.)Bootstrap", text)
print (temp)
name=re.findall("(Internet Protocol)\sSrc:.[(]", temp)
print name
but i think its not reading past the 1st line between the srearch words