diff options
| author | Marc <foxtrot@malloc.me> | 2021-12-11 15:24:52 +0000 |
|---|---|---|
| committer | Marc <foxtrot@malloc.me> | 2021-12-11 15:24:52 +0000 |
| commit | 8e09d29df19312583747a3de00fe4269c17e6586 (patch) | |
| tree | 335d413c994671515ef971a4c42ed6048deacf3a /examples/parse_beacon | |
| parent | d40ddfe15dacab59b2911b59adb0d087b94ccc03 (diff) | |
| download | libwifi-8e09d29df19312583747a3de00fe4269c17e6586.tar.gz libwifi-8e09d29df19312583747a3de00fe4269c17e6586.tar.bz2 libwifi-8e09d29df19312583747a3de00fe4269c17e6586.zip | |
examples: Remove capture filter from parser examples
Diffstat (limited to 'examples/parse_beacon')
| -rw-r--r-- | examples/parse_beacon/parse_beacon.c | 9 |
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 | ||
| 111 | void helpexit() { | 111 | void 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 | ||
| 116 | int main(int argc, char **argv) { | 116 | int 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"); |
