示例#1
0
 public VInject(VConsole con, VRegEx rx, VMitm mitm, VDependencyWatcher dw, Form1 ctx)
 {
     console = con;
     reg     = rx;
     dw.AddCondition(() => mitm.CheckServiceState(VMitm.InjectServices.AutoInjection) && autoPayload == "", ctx.CreateLog("Auto injection is enabled, but no payload is set", VLogger.LogLevel.warning));
     dw.AddCondition(() => mitm.CheckServiceState(VMitm.InjectServices.MatchInjection) && payloadReplace.Count == 0, ctx.CreateLog("Match Injection is enabled, but no payload is set", VLogger.LogLevel.warning));
     dw.AddCondition(() => mitm.CheckServiceState(VMitm.InjectServices.MediaInjection) && mediaReplace.Count == 0, ctx.CreateLog("Media Injection is enabled, but no file is set", VLogger.LogLevel.warning));
     dw.AddCondition(() => !mitm.IsAllOfflineI() && !mitm.started, ctx.CreateLog("One or more injection service is enabled, but mitm service is not running!", VLogger.LogLevel.warning));
     dw.AddCondition(() => mitm.CheckServiceState(VMitm.InjectServices.MatchInjection) && mitm.CheckServiceState(VMitm.InjectServices.AutoInjection), ctx.CreateLog("Both Match and Auto injection is enabled, this may produce unexpected results!", VLogger.LogLevel.warning));
 }
示例#2
0
 public VSslCertification(VLogger log, VConsole con, VDependencyWatcher vdw)
 {
     logger  = log;
     console = con;
     self    = this;
     vdw.AddCondition(() => { return(UseCASign && !File.Exists("certs\\AHROOT.pfx")); }, new VLogger.LogObj()
     {
         ll      = VLogger.LogLevel.warning,
         message = "CA Signing is enabled, but the root CA Cert is not found at its location"
     });
 }
示例#3
0
 public ProxyServer(string ipAddress, int portNumber, int pendingLimit, VConsole consoleMod, Form1 context)
 {
     ipv4Addr = ipAddress;
     port     = portNumber;
     pclimit  = pendingLimit;
     console  = consoleMod;
     ctx      = context;
     dw       = context.VdwMod;
     dw.AddCondition(() => httpMode == Mode.MITM && !ctx.mitmHttp.started, ctx.CreateLog("MITM mode is set for http, but mitm service is not enabled!", VLogger.LogLevel.warning));
     dw.AddCondition(() => httpsMode == Mode.MITM && !ctx.mitmHttp.started, ctx.CreateLog("MITM mode is set for https, but mitm service is not enabled", VLogger.LogLevel.warning));
     dw.AddCondition(() => httpsMode == Mode.MITM && !ctx.CertMod.Started, ctx.CreateLog("MITM mode is set for https, but SSL Certification service is not started!", VLogger.LogLevel.warning));
     dw.AddCondition(() => ctx.mitmHttp.started && httpMode != Mode.MITM && httpsMode != Mode.MITM, ctx.CreateLog("MITM Service is running but no protocol modes set to MITM mode", VLogger.LogLevel.warning));
     if (autoClean)
     {
         _timer          = new System.Windows.Forms.Timer();
         _timer.Tick    += new EventHandler(AutoClean);
         _timer.Interval = 10 * 60 * 1000;
         _timer.Start();
     }
 }
示例#4
0
        public VMitm(Form1 context, VConsole con)
        {
            ctx     = context;
            console = con;
            for (int i = 0; i < dumpServices.Length; i++)
            {
                dState.Add(false);
            }

            for (int i = 0; i < blockServices.Length; i++)
            {
                bState.Add(false);
            }

            for (int i = 0; i < injectServices.Length; i++)
            {
                iState.Add(false);
            }

            dw = ctx.VdwMod;
            dw.AddCondition(() => !IsAllOfflineD() && !dump.Started, ctx.CreateLog("One or more dump service is active, but Dump Manager is not enabled", VLogger.LogLevel.warning));
        }