Exemplo n.º 1
0
        /// <summary>
        /// Create single instance
        /// </summary>
        /// <returns></returns>  
        public static TaskFacade getInstance(IPlugin pPlugin)
        {
            if (cInstance == null)
            cInstance = new TaskFacade(pPlugin);

              return (cInstance);
        }
Exemplo n.º 2
0
        public PluginDNSPoisonUC(PluginParameters pPluginParams)
        {
            InitializeComponent();

              #region DATAGRID HEADERS

              DataGridViewTextBoxColumn cHostNameCol = new DataGridViewTextBoxColumn();
              cHostNameCol.DataPropertyName = "HostName";
              cHostNameCol.Name = "HostName";
              cHostNameCol.HeaderText = "Host name";
              cHostNameCol.ReadOnly = true;
              cHostNameCol.Width = 296;
              DGV_Spoofing.Columns.Add(cHostNameCol);

              DataGridViewTextBoxColumn cIPAddressCol = new DataGridViewTextBoxColumn();
              cIPAddressCol.DataPropertyName = "IPAddress";
              cIPAddressCol.Name = "IPAddress";
              cIPAddressCol.HeaderText = "Spoofed IP address";
              cIPAddressCol.ReadOnly = true;
              cIPAddressCol.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
              DGV_Spoofing.Columns.Add(cIPAddressCol);

              cDNSPoisonRecords = new BindingList<DNSPoisonRecord>();
              DGV_Spoofing.DataSource = cDNSPoisonRecords;

              #endregion

              /*
               * Plugin configuration
               */
              cPluginParams = pPluginParams;
              String lBaseDir = String.Format(@"{0}\", (pPluginParams != null) ? pPluginParams.PluginDirectoryFullPath : Directory.GetCurrentDirectory());
              String lSessionDir = (pPluginParams != null) ? pPluginParams.SessionDirectoryFullPath : String.Format("{0}sessions", lBaseDir);
              Config = new PluginProperties()
              {
            BaseDir = lBaseDir,
            SessionDir = lSessionDir,
            PluginName = "DNS Poison",
            PluginDescription = "Poisoning systems DNS request and servers DNS responses.",
            PluginVersion = "0.11",
            Ports = "",
            IsActive = true
              };

              // Get object instance from the lower layer
              cTask = TaskFacade.getInstance(this);

              // Register at the observable
              DomainFacade.getInstance(this).addObserver(this);
        }