Description Details Author(s) Examples
The main function - read_pcap
returns a hybrid S3 crafter
object with the with callable internal methods and accessible variables.
Callable internal methods & accesible variables of the crafter
object:
packet_count
Total packets in capture
get_ips(src_or_dst)
Retrieve a data frame of IP addresses.
"src_or_dst
" can be one of "src
", "dst
" or "all
"
packet_info()
Retrieve a data frame of high-level packet information
get_payload(num)
Retrieve the payload of a specific packet number
get_layer(layer_name)
Get all the packets from a layer,
"layer_name
" can be one of TCP, IP, ICMP
summary()
Prints summary information about the packet capture
Bob Rudis (@hrbrmstr)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | ncap <- read_pcap(system.file("pcaps/Ncapture.pcap", package="crafter"))
# get overall capture summary
summary(ncap)
# same thing
ncap$summary()
# high level packet info
ncap_info <- ncap$packet_info()
head(ncap_info)
# retrieve specific layers
ncap_ip <- ncap$get_layer("IP")
head(ncap_ip)
ncap_tcp <- ncap$get_layer("TCP")
head(ncap_tcp)
# get the IPs from the capture
ncap$get_ips("all")
# get packet payload
ncap$get_payload(7119)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.