コード例 #1
0
 public VSettings(Form1 context, VConsole con, VPin pm, VLogger log)
 {
     ctx        = context;
     console    = con;
     pinManager = pm;
     logger     = log;
 }
コード例 #2
0
 public VDump(Form1 context, VConsole con, VLogger log)
 {
     ctx       = context;
     console   = con;
     logger    = log;
     dumpFiles = new List <string>();
     fName     = new List <string>();
 }
コード例 #3
0
ファイル: Tunnel.cs プロジェクト: Neths/C-Sharp-Proxy-Server
 public Tunnel(Mode protMode, ProxyServer.Mode httpMode, ProxyServer.Mode httpsMode, Form1 context, Socket httpClient, VConsole con)
 {
     Protocol = protMode;
     http     = httpMode;
     https    = httpsMode;
     ctx      = context;
     console  = con;
     client   = httpClient;
 }
コード例 #4
0
ファイル: VInject.cs プロジェクト: Neths/C-Sharp-Proxy-Server
 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));
 }
コード例 #5
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"
     });
 }
コード例 #6
0
 public Response(int _statusCode, string _httpMessage, string _version, VDictionary _headers, string _body, byte[] fullBytes, VConsole con, VMitm mitmHttp)
 {
     statusCode  = _statusCode;
     httpMessage = _httpMessage;
     version     = _version;
     bodyText    = _body;
     body        = fullBytes;
     console     = con;
     mitm        = mitmHttp;
     headers     = _headers;
 }
コード例 #7
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();
     }
 }
コード例 #8
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));
        }
コード例 #9
0
ファイル: VLogger.cs プロジェクト: Neths/C-Sharp-Proxy-Server
 public VLogger(VConsole con)
 {
     console = con;
 }
コード例 #10
0
ファイル: VFilter.cs プロジェクト: Neths/C-Sharp-Proxy-Server
 public VFilter(Form1 context, VConsole conmod)
 {
     ctx     = context;
     logger  = ctx.LogMod;
     console = conmod;
 }
コード例 #11
0
 public VHelp(Form1 context, VConsole con)
 {
     ctx     = context;
     console = con;
 }
コード例 #12
0
 public VSslHandler(Form1 context, VConsole con)
 {
     ctx     = context;
     console = con;
 }
コード例 #13
0
 public void SetConsole(VConsole cInterface)
 {
     console = cInterface;
 }