|
@@ -13,7 +13,7 @@ int main(int argc, char *argv[]) {
|
|
}
|
|
}
|
|
|
|
|
|
const string interface = argv[1];
|
|
const string interface = argv[1];
|
|
- Sniffer sniffer(interface);
|
|
|
|
|
|
+ Sniffer *sniffer = new Sniffer(interface);
|
|
thread snifferThread(&Sniffer::startSniffing, sniffer);
|
|
thread snifferThread(&Sniffer::startSniffing, sniffer);
|
|
|
|
|
|
try {
|
|
try {
|
|
@@ -25,5 +25,6 @@ int main(int argc, char *argv[]) {
|
|
}
|
|
}
|
|
|
|
|
|
snifferThread.join();
|
|
snifferThread.join();
|
|
|
|
+ delete (sniffer);
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|