Esempio n. 1
0
 public NotAdmin(MinaryMain minaryObj)
 {
     this.minaryObj         = minaryObj;
     this.CurrentState      = MinaryState.NotAdmin;
     this.Bt_Attack_Click  += this.Bt_Attack_Click_Event;
     this.Bt_ScanLan_Click += this.Bt_ScanLan_Click_Event;
 }
Esempio n. 2
0
        public static IMinaryState GetMinaryEventBase(MinaryMain minaryObj)
        {
            MinaryState state = DetermineSystemState();

            if ((state & MinaryState.NetworkMissing) == MinaryState.NetworkMissing)
            {
                return(new NetworkMissing(minaryObj));
            }
            else if ((state & MinaryState.NPcapMissing) == MinaryState.NPcapMissing)
            {
                return(new NPcapMissing(minaryObj));
            }
            else if ((state & MinaryState.NotAdmin) == MinaryState.NotAdmin)
            {
                return(new NotAdmin(minaryObj));
            }
            else if ((state & MinaryState.ApeBinaryMissing) == MinaryState.ApeBinaryMissing)
            {
                return(new ApeNotInstalled(minaryObj));
            }
            else if ((state & MinaryState.SnifferMissing) == MinaryState.SnifferMissing)
            {
                return(new SnifferNotInstalled(minaryObj));
            }
            else if ((state & MinaryState.HttpProxyMissing) == MinaryState.HttpProxyMissing)
            {
                return(new HttpReverseProxyNotInstalled(minaryObj));
            }

            return(new StateOk(minaryObj));
        }
Esempio n. 3
0
 public WinPcapMissing(MinaryMain minaryObj)
 {
     this.minaryObj         = minaryObj;
     this.CurrentState      = MinaryState.WinPcapMissing;
     this.Bt_Attack_Click  += this.Bt_Attack_Click_Event;
     this.Bt_ScanLan_Click += this.Bt_ScanLan_Click_Event;
 }
Esempio n. 4
0
 public ApeNotInstalled(MinaryMain minaryObj)
 {
     this.minaryObj         = minaryObj;
     this.CurrentState      = MinaryState.NetworkMissing;
     this.Bt_Attack_Click  += this.Bt_Attack_Click_Event;
     this.Bt_ScanLan_Click += this.Bt_ScanLan_Click_Event;
 }
Esempio n. 5
0
 public StateOk(MinaryMain minaryObj)
 {
     this.minaryObj         = minaryObj;
     this.CurrentState      = MinaryState.StateOk;
     this.Bt_Attack_Click  += this.Bt_Attack_Click_Event;
     this.Bt_ScanLan_Click += this.Bt_ScanLan_Click_Event;
 }
Esempio n. 6
0
        public static void Main(string[] args)
        {
            OperatingSystem operatingSystem        = Environment.OSVersion;
            Version         operatingSystemVersion = operatingSystem.Version;

            Application.SetCompatibleTextRenderingDefault(false);

            // Initialization
            Directory.SetCurrentDirectory(Application.StartupPath);
            DirectoryChecks(Application.StartupPath);

            Application.CurrentCulture = System.Globalization.CultureInfo.CreateSpecificCulture("en-US");
            Application.EnableVisualStyles();

            // Load GUI
            try
            {
                var minaryGuiObj = new MinaryMain(args);
                minaryGuiObj.LoadAllFormElements();
                minaryGuiObj.StartAllHandlers();
                minaryGuiObj.StartBackgroundThreads();
                minaryGuiObj.PreRun();
                minaryGuiObj.SetMinaryState();
                Application.Run(minaryGuiObj);
            }
            catch (Exception ex)
            {
                var message = $"Minary: The following error occured: {ex.Message}\r\n\r\nStacktrace: {ex.StackTrace}";
                MessageDialog.Inst.ShowError(string.Empty, message, null);
            }
        }
Esempio n. 7
0
        public LoadTemplate(MinaryMain minaryMain, string templateFileName)
        {
            this.InitializeComponent();

            this.minaryMain       = minaryMain;
            this.templateFileName = templateFileName;
        }
Esempio n. 8
0
        public ArpScan(MinaryMain owner)
        {
            this.InitializeComponent();

            DataGridViewCheckBoxColumn columnAttack = new DataGridViewCheckBoxColumn();

            columnAttack.DataPropertyName = "Attack";
            columnAttack.Name             = "Attack";
            columnAttack.HeaderText       = "Attack";
            columnAttack.Visible          = true;
            columnAttack.Width            = 72;
            this.dgv_Targets.Columns.Add(columnAttack);

            DataGridViewTextBoxColumn columnIp = new DataGridViewTextBoxColumn();

            columnIp.DataPropertyName = "IpAddress";
            columnIp.Name             = "IpAddress";
            columnIp.HeaderText       = "IP address";
            columnIp.ReadOnly         = true;
            columnIp.MinimumWidth     = 130;
            this.dgv_Targets.Columns.Add(columnIp);

            DataGridViewTextBoxColumn columnMac = new DataGridViewTextBoxColumn();

            columnMac.DataPropertyName = "MacAddress";
            columnMac.Name             = "MacAddress";
            columnMac.HeaderText       = "Mac address";
            columnMac.ReadOnly         = true;
            columnMac.MinimumWidth     = 150;
            this.dgv_Targets.Columns.Add(columnMac);

            DataGridViewTextBoxColumn columnVendor = new DataGridViewTextBoxColumn();

            columnVendor.DataPropertyName = "Vendor";
            columnVendor.Name             = "Vendor";
            columnVendor.HeaderText       = "Vendor";
            columnVendor.ReadOnly         = true;
            columnVendor.AutoSizeMode     = DataGridViewAutoSizeColumnMode.Fill;
            columnVendor.MinimumWidth     = 180;
            this.dgv_Targets.Columns.Add(columnVendor);

            this.dgv_Targets.DataSource = this.TargetList;
            this.dgv_Targets.CurrentCellDirtyStateChanged += new EventHandler(this.DGV_CurrentCellDirtyStateChanged);
            this.dgv_Targets.CellValueChanged             += new DataGridViewCellEventHandler(this.DGV_CellValueChanged);
            this.dgv_Targets.CellClick += new DataGridViewCellEventHandler(this.DGV_CellClick);

            // Set the owner to keep this form in the foreground/topmost
            this.Owner = owner;

            // Keep Minary's main object
            this.minaryMain = owner;

            // Create member objects
            this.arpScanner = new Task.ArpScan();

            // Register observers
            this.arpScanner.AddObserverCurrentIp(this);
            this.arpScanner.AddObserverArpResponse(this);
        }
Esempio n. 9
0
        public CreateCertificate(MinaryMain minaryMain)
        {
            this.InitializeComponent();

            this.minaryMain               = minaryMain;
            this.dtp_BeginDate.Value      = DateTime.Now.AddDays(-1);
            this.dtp_ExpirationDate.Value = DateTime.Now.AddYears(2);
        }
Esempio n. 10
0
 public HandlerNamedPipe(MinaryMain minaryMain)
 {
     this.minaryMain             = minaryMain;
     this.IsBeepOn               = false;
     this.tabPageCatalog         = this.minaryMain.PluginHandler.TabPagesCatalog;
     this.inputDataQueue         = new ConcurrentQueue <string>();
     this.processInputDataThread = new Thread(this.DataProcessingThread);
     this.processInputDataThread.Start();
 }
        public NetworkInterfaceHandler(MinaryMain minaryMain)
        {
            this.minaryInstance = minaryMain;
            this.Interfaces     = new ArrayList();
            this.LoadInterfaces();

            // Register callback to handle network address changes
            NetworkChange.NetworkAddressChanged += new NetworkAddressChangedEventHandler(this.AddressChangedCallback);
        }
        public SimpleGuiUserControl(MinaryMain minaryObj)
        {
            InitializeComponent();

            // Params
            this.minaryObj = minaryObj;

            // DataGridView columns declaration
            var columnIpAddress = new DataGridViewTextBoxColumn();

            columnIpAddress.DataPropertyName = "IpAddress";
            columnIpAddress.Name             = "IpAddress";
            columnIpAddress.HeaderText       = "IP Adresse";
            columnIpAddress.Visible          = true;
            columnIpAddress.ReadOnly         = true;
            columnIpAddress.Width            = 200;
            this.dgv_SimpleGui.Columns.Add(columnIpAddress);

            var columnMacAddress = new DataGridViewImageColumn();

            columnMacAddress.DataPropertyName = "MacAddress";
            columnMacAddress.Name             = "MacAddress";
            columnMacAddress.HeaderText       = "MacAddress";
            columnMacAddress.Visible          = false;
            columnMacAddress.ReadOnly         = true;
            columnMacAddress.Width            = 200;
            this.dgv_SimpleGui.Columns.Add(columnMacAddress);

            var columnAttack = new DataGridViewCheckBoxColumn();

            columnAttack.DataPropertyName = "Attack";
            columnAttack.Name             = "Attack";
            columnAttack.HeaderText       = "Attack";
            columnAttack.Visible          = true;
            columnAttack.Width            = 100;
            this.dgv_SimpleGui.Columns.Add(columnAttack);

            var columnLastSeen = new DataGridViewTextBoxColumn();

            columnLastSeen.DataPropertyName        = "LastSeen";
            columnLastSeen.Name                    = "LastSeen";
            columnLastSeen.HeaderText              = "Last seen";
            columnLastSeen.Visible                 = true;
            columnLastSeen.ReadOnly                = true;
            columnLastSeen.Width                   = 100;
            columnLastSeen.AutoSizeMode            = DataGridViewAutoSizeColumnMode.Fill;
            columnLastSeen.DefaultCellStyle.Format = "yyyy.MM.dd HH:mm:ss";
            this.dgv_SimpleGui.Columns.Add(columnLastSeen);

            // Initialize DGV data source list
            this.dgv_SimpleGui.DataSource = this.targetStringList;
        }
Esempio n. 13
0
        public ManageServerCertificates(MinaryMain minaryMain)
        {
            this.InitializeComponent();

            DataGridViewTextBoxColumn columnServerName = new DataGridViewTextBoxColumn();

            columnServerName.DataPropertyName = "ServerName";
            columnServerName.Name             = "ServerName";
            columnServerName.HeaderText       = "Server name";
            columnServerName.ReadOnly         = true;
            columnServerName.AutoSizeMode     = DataGridViewAutoSizeColumnMode.Fill;
            this.dgv_ServerCertificates.Columns.Add(columnServerName);

            DataGridViewTextBoxColumn columnStartDate = new DataGridViewTextBoxColumn();

            columnStartDate.DataPropertyName = "StartDate";
            columnStartDate.Name             = "StartDate";
            columnStartDate.HeaderText       = "Start date";
            columnStartDate.ReadOnly         = true;
            columnStartDate.Width            = 200;
            this.dgv_ServerCertificates.Columns.Add(columnStartDate);

            DataGridViewTextBoxColumn columnExpirationDate = new DataGridViewTextBoxColumn();

            columnExpirationDate.DataPropertyName = "ExpirationDate";
            columnExpirationDate.Name             = "ExpirationDate";
            columnExpirationDate.HeaderText       = "Expiration date";
            columnExpirationDate.ReadOnly         = true;
            columnExpirationDate.Width            = 200;
            this.dgv_ServerCertificates.Columns.Add(columnExpirationDate);

            DataGridViewTextBoxColumn columnFileName = new DataGridViewTextBoxColumn();

            columnFileName.DataPropertyName = "FileName";
            columnFileName.Name             = "FileName";
            columnFileName.HeaderText       = "File name";
            columnFileName.ReadOnly         = true;
            columnFileName.Visible          = false;
            columnFileName.Width            = 0;
            this.dgv_ServerCertificates.Columns.Add(columnFileName);

            this.certificateRecords = new BindingList <CertificateRecord>();
            this.dgv_ServerCertificates.DataSource = this.certificateRecords;

            this.minaryMain = minaryMain;
            this.RefreshCertificateListing();
        }
Esempio n. 14
0
        public GuiSimpleUserControl(MinaryMain minaryObj)
        {
            InitializeComponent();

            // Params
            this.minaryObj = minaryObj;

            // DataGridView columns declaration
            var columnIpAddress = new DataGridViewTextBoxColumn();

            columnIpAddress.DataPropertyName = "IpAddress";
            columnIpAddress.Name             = "IpAddress";
            columnIpAddress.HeaderText       = "IP Adresse";
            columnIpAddress.Visible          = true;
            columnIpAddress.ReadOnly         = true;
            columnIpAddress.Width            = 200;
            this.dgv_GuiSimple.Columns.Add(columnIpAddress);

            var columnMacAddress = new DataGridViewImageColumn();

            columnMacAddress.DataPropertyName = "MacAddress";
            columnMacAddress.Name             = "MacAddress";
            columnMacAddress.HeaderText       = "MacAddress";
            columnMacAddress.Visible          = false;
            columnMacAddress.ReadOnly         = true;
            columnMacAddress.Width            = 200;
            this.dgv_GuiSimple.Columns.Add(columnMacAddress);

            var columnAttack = new DataGridViewCheckBoxColumn();

            columnAttack.DataPropertyName = "Attack";
            columnAttack.Name             = "Attack";
            columnAttack.HeaderText       = "Attack";
            columnAttack.Visible          = true;
            columnAttack.Width            = 100;
            this.dgv_GuiSimple.Columns.Add(columnAttack);

            var columnLastSeen = new DataGridViewTextBoxColumn();

            columnLastSeen.DataPropertyName        = "LastSeen";
            columnLastSeen.Name                    = "LastSeen";
            columnLastSeen.HeaderText              = "Last seen time";
            columnLastSeen.Visible                 = true;
            columnLastSeen.ReadOnly                = true;
            columnLastSeen.Width                   = 300;
            columnLastSeen.DefaultCellStyle.Format = "yyyy.MM.dd HH:mm:ss";
            this.dgv_GuiSimple.Columns.Add(columnLastSeen);

            var columnLastSeenSpan = new DataGridViewTextBoxColumn();

            columnLastSeenSpan.DataPropertyName = "LastSeenSpan";
            columnLastSeenSpan.Name             = "LastSeenSpan";
            columnLastSeenSpan.HeaderText       = "Last seen since (hours:minutes:seconds)";
            columnLastSeenSpan.Visible          = true;
            columnLastSeenSpan.ReadOnly         = true;
            columnLastSeenSpan.Width            = 30;
            columnLastSeenSpan.AutoSizeMode     = DataGridViewAutoSizeColumnMode.Fill;
            this.dgv_GuiSimple.Columns.Add(columnLastSeenSpan);

            // Initialize DGV data source list
            this.dgv_GuiSimple.DataSource = this.targetStringList;

            // Create member objects
            this.arpScanner = new ArpScan();

            // Register observers
            this.arpScanner.AddObserverArpResponse(this);
        }
Esempio n. 15
0
 public AttackServiceHandler(MinaryMain minaryInstance)
 {
     this.minaryInstance = minaryInstance;
 }
Esempio n. 16
0
 public Calls(MinaryMain minaryMain, MinaryTemplateData minaryTemplate)
 {
     this.minaryMain     = minaryMain;
     this.minaryTemplate = minaryTemplate;
     this.arpScanHandler = minaryMain.ArpScanHandler;
 }
Esempio n. 17
0
 public TemplateHandler(Minary.Form.MinaryMain minaryMain)
 {
     this.minaryMain = minaryMain;
 }
Esempio n. 18
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CreateTemplate"/> class.
 ///
 /// </summary>
 public CreateTemplate(MinaryMain minaryMain)
 {
     this.InitializeComponent();
     this.minaryMain = minaryMain;
     this.taskLayerCreateTemplate = new Task.TemplateHandler(this.minaryMain);
 }
Esempio n. 19
0
 public HandlerMessageQueue(MinaryMain minaryMain)
 {
     this.minaryMain     = minaryMain;
     this.IsBeepOn       = false;
     this.tabPageCatalog = this.minaryMain.PluginHandler.TabPagesCatalog;
 }