From 8e09d29df19312583747a3de00fe4269c17e6586 Mon Sep 17 00:00:00 2001 From: Marc Date: Sat, 11 Dec 2021 15:24:52 +0000 Subject: examples: Remove capture filter from parser examples --- examples/parse_beacon/parse_beacon.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'examples/parse_beacon') diff --git a/examples/parse_beacon/parse_beacon.c b/examples/parse_beacon/parse_beacon.c index 4e320b7..2a61c5f 100644 --- a/examples/parse_beacon/parse_beacon.c +++ b/examples/parse_beacon/parse_beacon.c @@ -109,12 +109,11 @@ void handle_pkt(unsigned char *args, const struct pcap_pkthdr *header, const uns } void helpexit() { - fprintf(stderr, "[!] Usage: ./parse_eapol --file \n"); + fprintf(stderr, "[!] Usage: ./parse_beacon --file \n"); exit(EXIT_FAILURE); } int main(int argc, char **argv) { - struct bpf_program *filter = NULL; pcap_t *handle = NULL; pcap_dumper_t *dumper = NULL; char errbuf[PCAP_ERRBUF_SIZE]; @@ -141,12 +140,6 @@ int main(int argc, char **argv) { exit(EXIT_FAILURE); } - if ((filter = malloc(sizeof(struct bpf_program))) == NULL) { - fprintf(stderr, "[!] There was an error allocating memory for the filter.\n"); - pcap_close(handle); - exit(EXIT_FAILURE); - } - printf("[+] Setup Complete\n"); dumper = pcap_dump_open(handle, "/tmp/parse_beacon.pcap"); -- cgit 1.4.1