Saturday, 15 August 2015

networking - Scanning a port for a particular packet, and create an XML based on the data in the packet -



networking - Scanning a port for a particular packet, and create an XML based on the data in the packet -

i need create program/script scans outgoing traffic on computer, searches snmp trap packet (which on port 162), , based on description within particular packet, xml several fields created, using info in packet in 1 of fields.

i've looked @ different port scanning solutions, haven't found utilize particular purpose.

can point me right direction? start, , tools should use?

i think should utilize pcap library.

basically have filter packets destination port 162 (look @ pcap_compile() , pcap_set_filter() functions) , dissect snmp frame of every packet returned pcap_next.

if useful found, dump content or whatever.

look @ "actual sniffing" section in page linked above. code in grab info destination or source port 23 (look @ filter_exp string). start there , tune according needs.

update

if sense more comfortable python, interface libpcap exists , it's called pcapy

perl offers same features net::pcap library

and ruby binding

and many other modern languages....

xml networking udp snmp

No comments:

Post a Comment