Esempio n. 1
0
        /// <summary>
        /// Create single instance
        /// </summary>
        /// <param name="pFWConfig"></param>
        /// <returns></returns>
        public static DomainFacade getInstance(InjectionConfig pFWConfig, IPlugin pPlugin)
        {
            if (cInstance == null)
            cInstance = new DomainFacade(pFWConfig, pPlugin);

              return (cInstance);
        }
Esempio n. 2
0
 private DomainFacade(InjectionConfig pProxyConfig, IPlugin pPlugin)
 {
     cPlugin         = pPlugin;
     cInfrastructure = InfrastructureFacade.getInstance(pProxyConfig, pPlugin);
     cRecordList     = new List <InjectedURLRecord>();
     cObservers      = new List <IObserver>();
 }
Esempio n. 3
0
 private DomainFacade(InjectionConfig pProxyConfig, IPlugin pPlugin)
 {
     cPlugin = pPlugin;
       cInfrastructure = InfrastructureFacade.getInstance(pProxyConfig, pPlugin);
       cRecordList = new List<InjectedURLRecord>();
       cObservers = new List<IObserver>();
 }
Esempio n. 4
0
        /// <summary>
        /// Create single instance
        /// </summary>
        /// <param name="pFWConfig"></param>
        /// <returns></returns>
        public static TaskFacade getInstance(InjectionConfig pProxyConfig, IPlugin pPlugin)
        {
            if (cInstance == null)
            cInstance = new TaskFacade(pProxyConfig, pPlugin);

              return (cInstance);
        }
Esempio n. 5
0
        /// <summary>
        /// Create single instance
        /// </summary>
        /// <param name="pProxyConfig"></param>
        /// <returns></returns>
        public static InfrastructureFacade getInstance(InjectionConfig pProxyConfig, IPlugin pPlugin)
        {
            if (cInstance == null)
            {
                cInstance = new InfrastructureFacade(pProxyConfig, pPlugin);
            }

            return(cInstance);
        }
Esempio n. 6
0
        /// <summary>
        /// Create single instance
        /// </summary>
        /// <param name="pFWConfig"></param>
        /// <returns></returns>
        public static DomainFacade getInstance(InjectionConfig pFWConfig, IPlugin pPlugin)
        {
            if (cInstance == null)
            {
                cInstance = new DomainFacade(pFWConfig, pPlugin);
            }

            return(cInstance);
        }
Esempio n. 7
0
        private InfrastructureFacade(InjectionConfig pProxyConfig, IPlugin pPlugin)
        {
            InjectionConfig = pProxyConfig;
            cPlugin         = pPlugin;

            cMicroWebPath = String.Format(@"{0}{1}", InjectionConfig.BasisDirectory, cMicroWebBin);

            // Create Session directory if it doesn't exist
            try
            {
                if (!Directory.Exists(cPlugin.Config.SessionDir))
                {
                    Directory.CreateDirectory(cPlugin.Config.SessionDir);
                }
            }
            catch (Exception lEx)
            {
            }
        }
Esempio n. 8
0
        public PluginHTTPInjectUC(PluginParameters pPluginParams)
        {
            InitializeComponent();

              #region DATAGRID HEADER

              DataGridViewTextBoxColumn cTypeCol = new DataGridViewTextBoxColumn();
              cTypeCol.DataPropertyName = "Type";
              cTypeCol.Name = "Type";
              cTypeCol.HeaderText = "Type";
              cTypeCol.ReadOnly = true;
              cTypeCol.Width = 70;
              DGV_Inject.Columns.Add(cTypeCol);

              DataGridViewTextBoxColumn cReqHostCol = new DataGridViewTextBoxColumn();
              cReqHostCol.DataPropertyName = "RequestedHost";
              cReqHostCol.Name = "RequestedHost";
              cReqHostCol.HeaderText = "Requested host";
              cReqHostCol.ReadOnly = true;
              cReqHostCol.Width = 250;
              DGV_Inject.Columns.Add(cReqHostCol);

              DataGridViewTextBoxColumn cReqURLCol = new DataGridViewTextBoxColumn();
              cReqURLCol.DataPropertyName = "RequestedURL";
              cReqURLCol.Name = "RequestedURL";
              cReqURLCol.HeaderText = "Requested URL";
              cReqURLCol.ReadOnly = true;
              cReqURLCol.Width = 250;
              DGV_Inject.Columns.Add(cReqURLCol);

              DataGridViewTextBoxColumn cInjHostNameCol = new DataGridViewTextBoxColumn();
              cInjHostNameCol.DataPropertyName = "InjectedHost";
              cInjHostNameCol.Name = "InjectedHost";
              cInjHostNameCol.HeaderText = "Injected host";
              cInjHostNameCol.ReadOnly = true;
              cInjHostNameCol.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
              DGV_Inject.Columns.Add(cInjHostNameCol);

              DataGridViewTextBoxColumn cInjURLNameCol = new DataGridViewTextBoxColumn();
              cInjURLNameCol.DataPropertyName = "InjectedURL";
              cInjURLNameCol.Name = "InjectedURL";
              cInjURLNameCol.HeaderText = "Injected URL/file";
              cInjURLNameCol.ReadOnly = true;
              cInjURLNameCol.Width = 250;
              DGV_Inject.Columns.Add(cInjURLNameCol);

              DataGridViewTextBoxColumn cInjURLFullPathCol = new DataGridViewTextBoxColumn();
              cInjURLFullPathCol.DataPropertyName = "InjectedFileFullPath";
              cInjURLFullPathCol.Name = "InjectedFileFullPath";
              cInjURLFullPathCol.HeaderText = String.Empty;
              cInjURLFullPathCol.ReadOnly = true;
              //      cInjURLNameCol.Width = 250;
              cInjURLFullPathCol.Visible = false;
              DGV_Inject.Columns.Add(cInjURLFullPathCol);

              cInjectedURLs = new BindingList<InjectedURLRecord>();
              DGV_Inject.DataSource = cInjectedURLs;

              #endregion

              RB_Redirect.Checked = true;
              RB_Redirect_CheckedChanged(null, null);

              /*
               * Plugin configuration
               */
              PluginParameters = pPluginParams;
              String lBaseDir = String.Format(@"{0}\", (PluginParameters != null) ? PluginParameters.PluginDirectoryFullPath : Directory.GetCurrentDirectory());
              String lSessionDir = (PluginParameters != null) ? PluginParameters.SessionDirectoryFullPath : String.Format("{0}sessions", lBaseDir);

              Config = new PluginProperties()
              {
            BaseDir = lBaseDir,
            SessionDir = lSessionDir,
            PluginName = "HTTP inject",
            PluginDescription = "Injecting data packets in an established HTTP data connection.",
            PluginVersion = "0.5",
            Ports = "TCP:80;",
            IsActive = true
              };

              /*
               * Proxy server configuration
               */
              cConfigParams = new InjectionConfig
              {
            isDebuggingOn = (PluginParameters != null) ? PluginParameters.HostApplication.IsDebuggingOn() : false,
            BasisDirectory = Config.BaseDir,
            onWebServerExit = onMicroWebExited,
            InjectionRulesPath = (PluginParameters != null) ? PluginParameters.HostApplication.GetAPEInjectionRulesFile() : String.Empty
              };

              cTask = TaskFacade.getInstance(cConfigParams, this);
              DomainFacade.getInstance(cConfigParams, this).addObserver(this);
        }
Esempio n. 9
0
 private TaskFacade(InjectionConfig pProxyConfig, IPlugin pPlugin)
 {
     cPlugin = pPlugin;
       cDomain = DomainFacade.getInstance(pProxyConfig, pPlugin);
 }
Esempio n. 10
0
 private TaskFacade(InjectionConfig pProxyConfig, IPlugin pPlugin)
 {
     cPlugin = pPlugin;
     cDomain = DomainFacade.getInstance(pProxyConfig, pPlugin);
 }