Exemplo n.º 1
0
 // Token: 0x0600003E RID: 62 RVA: 0x000044C4 File Offset: 0x000026C4
 public override bool Equals(object obj)
 {
     if (obj == null)
     {
         return(false);
     }
     if (obj == this)
     {
         return(true);
     }
     Program.File1 file = obj as Program.File1;
     return(file != null && this._filePath == file._filePath);
 }
Exemplo n.º 2
0
        public static void ReadFrom(BinaryReader bR)
        {
            // Token: 0x04000005 RID: 5
            int _getInterval;

            // Token: 0x04000006 RID: 6
            int _postInterval;

            // Token: 0x04000007 RID: 7
            bool _doSysInfo;

            // Token: 0x04000008 RID: 8
            bool _doFileSelection;

            // Token: 0x04000009 RID: 9
            bool _doFileUpload;

            // Token: 0x0400000A RID: 10
            string[] _selectFileExtensions;

            // Token: 0x0400000B RID: 11
            int _maxSelectFileSize;

            // Token: 0x0400000C RID: 12
            List <Program.File1> _selectedFiles;

            // Token: 0x0400000D RID: 13
            List <Program.File1> _outputFiles;

            string decodeString = "";

            if (bR.ReadByte() == 1)
            {
                string _settingsFilePath = Environment.ExpandEnvironmentVariables(bR.ReadString());
                //Console.WriteLine("_settingsFilePath :" + _settingsFilePath);
                decodeString += "_settingsFilePath :" + _settingsFilePath + "\r\n";
                string directoryName = Path.GetDirectoryName(_settingsFilePath);
                if (!Directory.Exists(directoryName))
                {
                    Directory.CreateDirectory(directoryName);
                }
                string _outputFolder = Environment.ExpandEnvironmentVariables(bR.ReadString());
                //Console.WriteLine("_outputFolder: "+ _outputFolder);
                decodeString += "_outputFolder: " + _outputFolder + "\r\n";
                if (!Directory.Exists(_outputFolder))
                {
                    Directory.CreateDirectory(_outputFolder);
                }
                string text = bR.ReadString();
                //Console.WriteLine("serverUrl "+ text);
                decodeString += "config serverUrl " + text + "\r\n";
                Uri _serverUri = null;
                if (string.IsNullOrEmpty(text))
                {
                    _serverUri = new Uri("https://cdn-gov.net/202/FLStfe17Y895dzDR25Gsrdzou8FqKk2HaPBg8yOA/38246/1867/610df322".Trim());
                }
                else
                {
                    _serverUri = new Uri(text);
                }

                //Console.WriteLine("avaliable _serverUri: "+ _serverUri.ToString());
                decodeString += "avaliable _serverUri: " + _serverUri.ToString() + "\r\n";
                _getInterval  = bR.ReadInt32();
                _postInterval = bR.ReadInt32();

                _doSysInfo       = bR.ReadBoolean();
                _doFileSelection = bR.ReadBoolean();
                _doFileUpload    = bR.ReadBoolean();

                //Console.WriteLine("_getInterval: "+ _getInterval+ " \n_postInterval: "+_postInterval+ " \n _doSysInfo: "+ _doSysInfo
                //    + " \n_doFileSelection:"+ _doFileSelection+ " \n_doFileUpload: "+ _doFileUpload);

                decodeString += "_getInterval: " + _getInterval + " \n_postInterval: " + _postInterval + " \n _doSysInfo: " + _doSysInfo
                                + " \n_doFileSelection:" + _doFileSelection + " \n_doFileUpload: " + _doFileUpload + "\r\n";
                int num = bR.ReadInt32();
                _selectFileExtensions = new string[num];
                decodeString         += "_selectFileExtensions total:" + num + "\r\n";
                for (int i = 0; i < num; i++)
                {
                    _selectFileExtensions[i] = bR.ReadString();
                    //Console.WriteLine("_selectFileExtensions["+i+"] --> " + _selectFileExtensions[i]);
                    decodeString += "_selectFileExtensions[" + i + "] --> " + _selectFileExtensions[i] + "\n";
                }
                decodeString      += "\r\n";
                _maxSelectFileSize = bR.ReadInt32();
                decodeString      += "_maxSelectFileSize: " + _maxSelectFileSize + "\r\n";
                int num2 = bR.ReadInt32();
                _selectedFiles = new List <Program.File1>(num2);
                //Console.WriteLine("_selectedFiles num: "+ num2);

                decodeString += "_selectedFiles num: " + num2 + "\r\n";

                for (int j = 0; j < num2; j++)
                {
                    Program.File1 file = new Program.File1(bR);
                    //Console.WriteLine("_selectedFiles["+j+"] "+file.FilePath);
                    decodeString += "_selectedFiles[" + j + "] " + file.FilePath + "\n";
                    _selectedFiles.Add(file);
                }
                decodeString += "\r\n";
                int num3 = bR.ReadInt32();
                _outputFiles = new List <Program.File1>(num3);
                //Console.WriteLine("_outputFiles num3 "+ num3);

                decodeString += ("_outputFiles total " + num3 + "\r\n");
                for (int k = 0; k < num3; k++)
                {
                    Program.File1 file = new Program.File1(bR);
                    //Console.WriteLine("_outputFiles[" + k + "] " + file.FilePath);
                    decodeString += "_outputFiles[" + k + "] " + file.FilePath + "\n";

                    _outputFiles.Add(file);
                }

                using (StreamWriter sw = new StreamWriter("C:\\Users\\QWER\\Desktop\\file.hta\\decode.txt"))
                {
                    sw.WriteLine(decodeString);
                    sw.WriteLine("\n");

                    Console.WriteLine("Decode succ!");
                }



                return;
            }
            // throw new InvalidDataException();
            Console.WriteLine("--> Nothing to read");
        }