- Notifications
You must be signed in to change notification settings - Fork54
Home
Lorenzo Mangani edited this pageJun 2, 2019 ·8 revisions

webShark for NodeJS
Development Guide & Quick Reference
The following examples extracted fromtests illustrate the baselinesharkd
JSON API usage
This command should be executed to retrieve the results of any operation.
{"req":"status"}
{"frames":0,"duration":0.0}
{"req": "load", "file": capture_file('dhcp.pcap')}
{"req":"status"}, {"frames":4,"duration":0.070345000,"filename":"dhcp.pcap","filesize":1400}
{"req":"analyse"}
{"frames":4,"protocols": ["frame","eth","ethertype","ip","udp","dhcp"],"first":1102274184.317452908,"last":1102274184.387798071}
{"req":"check"}
{"req":"check","filter":"ip","field":"ip"}
{"err":0,"filter":"ok","field":"ok"}
{"req":"complete"}
{"req":"complete","field":"frame.le"}
{"req":"complete","pref":"tcp."}
{"req":"frames"}
{"req":"tap"}
{"req":"tap","tap0":"conv:Ethernet","tap1":"endpt:TCP"}
{"req":"follow","follow":"UDP","filter":"frame.number==1"}
{"req":"iograph"}
{"req":"iograph","graph0":"max:udp.length","filter0":"udp.length"}
{"req":"iograph","graph0":"packets","graph1":"bytes"},
{"req":"intervals"}
{"req":"intervals","interval":1},{"req":"intervals","filter":"frame.number <= 2"}
{"req":"frame","frame":2}
{"req":"frame","frame":2,"proto":True}
{"req":"setcomment","frame":99999,"comment":"meh\nbaz"}
{"req":"setconf","name":"tcp.check_checksum","value":"TRUE"}
{"req":"dumpconf"}
{"req":"download","token":"ssl-secrets"}
{"req":"bye"}