about summary refs log tree commit diff stats
path: root/examples/parse_beacon
diff options
context:
space:
mode:
Diffstat (limited to 'examples/parse_beacon')
-rw-r--r--examples/parse_beacon/parse_beacon.c9
1 files changed, 1 insertions, 8 deletions
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
109} 109}
110 110
111void helpexit() { 111void helpexit() {
112 fprintf(stderr, "[!] Usage: ./parse_eapol --file <file.pcap>\n"); 112 fprintf(stderr, "[!] Usage: ./parse_beacon --file <file.pcap>\n");
113 exit(EXIT_FAILURE); 113 exit(EXIT_FAILURE);
114} 114}
115 115
116int main(int argc, char **argv) { 116int main(int argc, char **argv) {
117 struct bpf_program *filter = NULL;
118 pcap_t *handle = NULL; 117 pcap_t *handle = NULL;
119 pcap_dumper_t *dumper = NULL; 118 pcap_dumper_t *dumper = NULL;
120 char errbuf[PCAP_ERRBUF_SIZE]; 119 char errbuf[PCAP_ERRBUF_SIZE];
@@ -141,12 +140,6 @@ int main(int argc, char **argv) {
141 exit(EXIT_FAILURE); 140 exit(EXIT_FAILURE);
142 } 141 }
143 142
144 if ((filter = malloc(sizeof(struct bpf_program))) == NULL) {
145 fprintf(stderr, "[!] There was an error allocating memory for the filter.\n");
146 pcap_close(handle);
147 exit(EXIT_FAILURE);
148 }
149
150 printf("[+] Setup Complete\n"); 143 printf("[+] Setup Complete\n");
151 144
152 dumper = pcap_dump_open(handle, "/tmp/parse_beacon.pcap"); 145 dumper = pcap_dump_open(handle, "/tmp/parse_beacon.pcap");