|
@@ -15,17 +15,18 @@ int main(int argc, char *argv[]) {
|
|
|
exit(EXIT_FAILURE);
|
|
|
}
|
|
|
|
|
|
- const string innerInterface = Config::getValue("innerInterface");
|
|
|
- const string outerInterface = Config::getValue("outerInterface");
|
|
|
- const string filter = Config::getValue("filter");
|
|
|
+ CovertChannel *covertchannel = nullptr;
|
|
|
+ if (Config::getValue("activateCovertChannel") == "true") {
|
|
|
+ const string innerInterface = Config::getValue("innerInterface");
|
|
|
+ const string outerInterface = Config::getValue("outerInterface");
|
|
|
+ const string filter = Config::getValue("filter");
|
|
|
+ covertchannel = new ForwardChannel(innerInterface, outerInterface, filter);
|
|
|
+ }
|
|
|
|
|
|
// check if userStorage is add specified location
|
|
|
// if not create one
|
|
|
UserManager::init(Config::getValue("userdatabase"));
|
|
|
|
|
|
- CovertChannel *covertchannel = new ForwardChannel(innerInterface, outerInterface, filter);
|
|
|
- covertchannel->startSniffing();
|
|
|
-
|
|
|
try {
|
|
|
io_service io_service;
|
|
|
Server server(io_service);
|
|
@@ -34,6 +35,9 @@ int main(int argc, char *argv[]) {
|
|
|
cerr << e.what() << endl;
|
|
|
}
|
|
|
|
|
|
- delete (covertchannel);
|
|
|
+ if (covertchannel == nullptr) {
|
|
|
+ delete (covertchannel);
|
|
|
+ }
|
|
|
+
|
|
|
return 0;
|
|
|
}
|