Skip to content

Commit 4c15a37

Browse files
author
=
committed
show warning if hcxdumptool is running on a shared interface
1 parent cb3a5ba commit 4c15a37

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

hcxdumptool.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5913,6 +5913,7 @@ fprintf(stdout, "\nThis is a highly experimental penetration testing tool!\n"
59135913
"Not understanding what you were doing is not going to work as an excuse!\n\n");
59145914
if(vmflag == false) fprintf(stdout, "Failed to set virtual MAC!\n");
59155915
if((bpf.len == 0) && (rcascanmode == 0)) fprintf(stderr, "BPF is unset! Make sure hcxdumptool is running in a 100%% controlled environment!\n\n");
5916+
if((ifakttype & IF_IS_SHARED) == IF_IS_SHARED) fprintf(stderr, "Warning:\n%s is running on a shared interface!\nThis is not recommended because it leads to unwanted behavor!\n\n", basename(argv[0]));
59165917
fprintf(stdout, "starting...\033[?25l\n");
59175918
nanosleep(&tspecifo, &tspeciforem);
59185919

@@ -5964,8 +5965,8 @@ if((monitormodeflag == true) || (interfacelistflag == true) || (interfaceinfofla
59645965
fprintf(stdout, "\n\033[?25h");
59655966
fprintf(stdout, "%u Packet(s) captured by kernel\n", lStats.tp_packets);
59665967
fprintf(stdout, "%u Packet(s) dropped by kernel\n", lStats.tp_drops);
5967-
if(errorcount > 0) fprintf(stderr, "%u ERROR(s) during runtime (mostly caused by a broken driver)\n", errorcount);
5968-
if(errortxcount > 0) fprintf(stderr, "%u TX ERROR(s) during runtime (mostly caused by a broken driver)\n", errortxcount);
5968+
if(errorcount > 0) fprintf(stderr, "%u ERROR(s) during runtime (mostly caused by a broken driver or a shared interface)\n", errorcount);
5969+
if(errortxcount > 0) fprintf(stderr, "%u TX ERROR(s) during runtime (mostly caused by a broken driver or a shared interface)\n", errortxcount);
59695970
if(rcascanmode == RCASCAN_ACTIVE)
59705971
{
59715972
if(beaconrcascancount == 0) fprintf(stderr, "0 BEACONs received (monitor mode is possibly not working)\n");

0 commit comments

Comments
 (0)