feat: setup spoofer
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#include <memory>
|
||||
|
||||
#include "utils.h"
|
||||
#include "spoofer.h"
|
||||
#include "log-sink.h"
|
||||
#include "proxy-configurator.h"
|
||||
#include "cache-cleaner.h"
|
||||
@@ -81,11 +82,16 @@ bool run()
|
||||
mitmConfig.threadCount = 255;
|
||||
mitmConfig.caName = utils::randomizeString(32);
|
||||
proxy = new TinyMITMProxy(mitmConfig);
|
||||
proxy->addLogSink(std::make_shared<ConOutSink>());
|
||||
|
||||
mainLog.info("Creating configurator and setting proxy addr");
|
||||
conf = new ProxyConfigurator();
|
||||
conf->setProxy("127.0.0.1", 44444);
|
||||
|
||||
mainLog.info("Instantiating spoofer and registering proxy listeners");
|
||||
Spoofer* spoofer = new Spoofer();
|
||||
spoofer->registerListeners(proxy);
|
||||
|
||||
mainLog.info("Starting proxy");
|
||||
if (!proxy->init())
|
||||
{
|
||||
@@ -117,7 +123,6 @@ int main()
|
||||
/*
|
||||
handlers for cleaning proxy conf on exit / crash / taskkill / whatever
|
||||
*/
|
||||
|
||||
SetConsoleCtrlHandler(consoleHandler, TRUE);
|
||||
StartWatchdog();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user