예제 #1
0
        public void openRecovery(String fileName)
        {
            isParsing = false;
            edbParserManager.colse();
            HexReader hexReader = new HexReader(fileName);
            long      signature = hexReader.readLong(4);

            if (signature != 6736818458095L)
            {
                MessageBox.Show("Please open the correct file", "This file is not ESE database", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            hexReader.close();


            InputUTCTimeForm inputUTCTimeForm = new InputUTCTimeForm();
            DialogResult     dialogResut      = inputUTCTimeForm.ShowDialog();

            if (dialogResut == DialogResult.OK)
            {
                // Read the contents of testDialog's TextBox.
                UTCTime = inputUTCTimeForm.getUTCTime();
                String[] Time = UTCTime.Replace("UTC-", "").Replace("UTC+", "").Split(':');

                if (Time.Length == 1)
                {
                    UTCAddHour = Time[0];
                }
                else if (Time.Length == 2)
                {
                    UTCAddHour   = Time[0];
                    UTCAddMinute = Time[1];
                }
            }
            edbParserManager.init(fileName);
            edbParserManager.setUTCTime(UTCAddHour, UTCAddMinute);
            edbParserManager.parseDatabaseHeader();
            edbParserManager.makeTable();
            edbParserManager.findTablePage();
            openFileUsingParsing();
        }
예제 #2
0
        private void buttonFilePath_Click(object sender, EventArgs e)
        {
            OpenFileDialog open = new OpenFileDialog();

            open.Title = "Select Windows.edb file";
            if (open.ShowDialog() == DialogResult.OK)
            {
                HexReader hexReader = new HexReader(open.FileName);
                long      signature = hexReader.readLong(4);
                if (signature != 6736818458095L)
                {
                    MessageBox.Show("Please open the correct file", "This file is not ESE database", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    this.filePath             = "";
                    this.textBoxFilePath.Text = this.filePath;
                    hexReader.close();
                    return;
                }
                this.filePath             = open.FileName;
                this.textBoxFilePath.Text = this.filePath;
                int status = hexReader.readInt(0x34);
                if (status == 2)
                {
                    this.labelFileStatus.Text  = "File status : Dirty";
                    radioButtonParsing.Checked = true;
                }
                else
                {
                    this.labelFileStatus.Text = "File status : Clean";
                    DateTime currTime = DateTime.Now;
                    String   time     = currTime.ToString("yyyy") + "_" + currTime.ToString("MM") + "_" + currTime.ToString("dd") + "__" + currTime.ToString("HH_mm_ss");
                    workingDirectory             = Path.GetTempPath() + @"WinSearchDBAnalyzer" + time + @"\" + Path.GetFileName(textBoxFilePath.Text);
                    textBoxWorkingDirectory.Text = workingDirectory;
                }
                hexReader.close();
            }
        }