コード例 #1
0
        public void ListDumpers()
        {
            console.WriteLine("==Dump Manager Dump Files List==", console.GetIntercativeGroup());
            if (Dir != "")
            {
                console.WriteLine("Relative directory: " + Dir, console.GetIntercativeGroup());
            }

            foreach (string file in dumpFiles)
            {
                int    index = GetFileIndex(file);
                string fname = "";
                foreach (string entry in fName)
                {
                    if (GetFId(entry) == index)
                    {
                        fname = GetFName(entry);
                    }
                }

                string output = file;
                if (Dir != "")
                {
                    output = new FileInfo(file).Name;
                }
                if (fname != "")
                {
                    output += " - " + fname;
                }

                console.WriteLine(output, console.GetIntercativeGroup());
            }

            console.WriteLine("==End of Dump Files list==", console.GetIntercativeGroup());
        }
コード例 #2
0
ファイル: VLogger.cs プロジェクト: Neths/C-Sharp-Proxy-Server
 public void WriteLine(string text)
 {
     if (selfInteractive)
     {
         console.WriteLine(text, "ig.logger");
     }
     else
     {
         console.WriteLine(text, console.GetIntercativeGroup());
     }
 }
コード例 #3
0
        public void ListAll(string state)
        {
            state = state.ToLower();
            int index = 0;

            if (state == "online")
            {
                bool written = false;
                console.Write("\r\n");

                foreach (string s in blockServices)
                {
                    if (bState[index])
                    {
                        console.Write("MITM" + s.Substring(4) + ", ");
                        if (!written)
                        {
                            written = true;
                        }
                    }
                    index++;
                }

                index = 0;

                foreach (string s in dumpServices)
                {
                    if (dState[index])
                    {
                        console.Write("MITM" + s.Substring(4) + ", ");
                        if (!written)
                        {
                            written = true;
                        }
                    }
                    index++;
                }

                index = 0;

                foreach (string s in injectServices)
                {
                    if (iState[index])
                    {
                        if (injectServices.Length - 1 > index)
                        {
                            console.Write("MITM" + s.Substring(4) + ", ");
                        }
                        else
                        {
                            console.Write("MITM" + s.Substring(4));
                        }
                        if (!written)
                        {
                            written = true;
                        }
                    }

                    index++;
                }

                if (!written)
                {
                    console.WriteLine("No services are online at this moment!", console.GetIntercativeGroup());
                }

                if (written)
                {
                    console.Write("\r\n");
                }
            }
            else if (state == "offline")
            {
                bool written = false;
                console.Write("\r\n");

                foreach (string s in blockServices)
                {
                    if (!bState[index])
                    {
                        console.Write("MITM" + s.Substring(4) + ", ");
                        if (!written)
                        {
                            written = true;
                        }
                    }
                    index++;
                }

                index = 0;

                foreach (string s in dumpServices)
                {
                    if (!dState[index])
                    {
                        console.Write("MITM" + s.Substring(4) + ", ");
                        if (!written)
                        {
                            written = true;
                        }
                    }
                    index++;
                }

                index = 0;

                foreach (string s in injectServices)
                {
                    if (!iState[index])
                    {
                        if (injectServices.Length - 1 > index)
                        {
                            console.Write("MITM" + s.Substring(4) + ", ");
                        }
                        else
                        {
                            console.Write("MITM" + s.Substring(4));
                        }
                        if (!written)
                        {
                            written = true;
                        }
                    }
                    index++;
                }

                if (!written)
                {
                    console.WriteLine("No services are offline at this moment!", console.GetIntercativeGroup());
                }

                if (written)
                {
                    console.Write("\r\n");
                }
            }
            else
            {
                logger.Log("Invalid state parameter!", VLogger.LogLevel.error);
            }
        }
コード例 #4
0
 private void WriteLine(string message)
 {
     console.Clear();
     console.WriteLine(message, console.GetIntercativeGroup());
 }