mirror of
https://github.com/maxDcb/C2Core
synced 2026-06-08 15:48:01 +00:00
29 lines
622 B
C++
29 lines
622 B
C++
#include "../IpConfig.hpp"
|
|
|
|
bool testIpConfig();
|
|
|
|
int main()
|
|
{
|
|
bool res;
|
|
std::cout << "[+] testIpConfig" << std::endl;
|
|
res = testIpConfig();
|
|
if (res)
|
|
std::cout << "[+] Sucess" << std::endl;
|
|
else
|
|
std::cout << "[-] Failed" << std::endl;
|
|
return !res;
|
|
}
|
|
|
|
bool testIpConfig()
|
|
{
|
|
std::unique_ptr<IpConfig> mod = std::make_unique<IpConfig>();
|
|
std::vector<std::string> cmd = {"ipConfig"};
|
|
C2Message msg, ret;
|
|
mod->init(cmd, msg);
|
|
mod->process(msg, ret);
|
|
|
|
std::cout << "[+] ipConfig output: " << ret.returnvalue() << std::endl;
|
|
|
|
return !ret.returnvalue().empty();
|
|
}
|