コード例 #1
0
ファイル: Program.cs プロジェクト: moisesbaez/opensim-bot
        static void Main(string[] args)
        {
            LoginManager.Connect(firstName, lastName, password, Client);

            Detection.FindObjects(Client);
            Detection.DetectSteg(Client);
            Extraction.ExtractSteg();

            Console.WriteLine("\nFinished Analyzing. Press enter to logout...");
            Console.ReadLine();
            Client.Network.Logout();
        }
コード例 #2
0
        public static void DetectSteg(GridClient Client)
        {
            int count = 1;

            Console.WriteLine("Found: " + foundPrims.Count + " objects");

            foreach (Primitive p in foundPrims)
            {
                Console.Write(count + ". Analyzing texture...");
                UUID textureID = p.Textures.DefaultTexture.TextureID;
                DownloadHandle.Reset();

                Client.Assets.RequestImage(textureID, ImageType.Normal, ImageReceived);
                if (DownloadHandle.WaitOne(1000, false))
                {
                    if (resultState == TextureRequestState.Finished)
                    {
                        if (asset != null && asset.Decode())
                        {
                            string s    = "";
                            var    file = asset.AssetData;
                            for (int i = 0; i < file.Length; i++)
                            {
                                s += String.Format("{0:X2}", file[i]);
                            }

                            if (s.IndexOf("504B0304") != -1)
                            {
                                Extraction.DownloadSteg(asset.AssetData, asset.AssetID, Client);
                            }
                            else
                            {
                                Console.WriteLine("Nothing found.");
                            }
                        }
                    }
                }
                count++;
            }
        }