예제 #1
0
        public void Gets_Display_Name()
        {
            var stream = TestHelper.GetTestDataStream("test.pst");
            var reader = new PstReader(stream);

            var messageStore = new MessageStore(0x21, reader);

            Assert.AreEqual("Outlook Data File", messageStore.DisplayName);
        }
예제 #2
0
        public void Gets_Subfolders()
        {
            var stream = TestHelper.GetTestDataStream("test.pst");
            var reader = new PstReader(stream);
            var folder = new Folder(0x122, reader);

            var subfolders = folder.Folders;

            Assert.Greater(subfolders.Count, 0);
        }
예제 #3
0
        public void Gets_Record_Key()
        {
            var expectedBytes = new byte[]
            {
                0x97, 0x7b, 0x45, 0xcb, 0xdb, 0xc2, 0x82, 0x43,
                0x92, 0x10, 0x55, 0x19, 0xe9, 0x93, 0x28, 0xfa
            };
            var stream = TestHelper.GetTestDataStream("test.pst");
            var reader = new PstReader(stream);

            var messageStore = new MessageStore(0x21, reader);

            CollectionAssert.AreEqual(expectedBytes, messageStore.RecordKey);
        }
예제 #4
0
        public void Finds_Block_By_Nid()
        {
            var blockData = new byte[]
            {
                0xa6, 0x01, 0xec, 0xbc, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb5, 0x02, 0x06, 0x00,
                0x40, 0x00, 0x00, 0x00, 0x34, 0x0e, 0x02, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x38, 0x0e, 0x03, 0x00,
                0x00, 0x00, 0x00, 0x00, 0xf9, 0x0f, 0x02, 0x01, 0x60, 0x00, 0x00, 0x00, 0x01, 0x30, 0x1f, 0x00,
                0x80, 0x00, 0x00, 0x00, 0x16, 0x34, 0x02, 0x01, 0xa0, 0x01, 0x00, 0x00, 0xdf, 0x35, 0x03, 0x00,
                0xff, 0x00, 0x00, 0x00, 0xe0, 0x35, 0x02, 0x01, 0xc0, 0x00, 0x00, 0x00, 0xe2, 0x35, 0x02, 0x01,
                0x20, 0x01, 0x00, 0x00, 0xe3, 0x35, 0x02, 0x01, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x35, 0x02, 0x01,
                0x40, 0x01, 0x00, 0x00, 0xe5, 0x35, 0x02, 0x01, 0x60, 0x01, 0x00, 0x00, 0xe6, 0x35, 0x02, 0x01,
                0x80, 0x01, 0x00, 0x00, 0xe7, 0x35, 0x02, 0x01, 0xe0, 0x00, 0x00, 0x00, 0x33, 0x66, 0x0b, 0x00,
                0x01, 0x00, 0x00, 0x00, 0xfa, 0x66, 0x03, 0x00, 0x11, 0x00, 0x0e, 0x00, 0xfc, 0x66, 0x03, 0x00,
                0xde, 0x89, 0x02, 0x00, 0xff, 0x67, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x97, 0x7b, 0x45, 0xcb,
                0xdb, 0xc2, 0x82, 0x43, 0x92, 0x10, 0x55, 0x19, 0xe9, 0x93, 0x28, 0xfa, 0x4f, 0x00, 0x75, 0x00,
                0x74, 0x00, 0x6c, 0x00, 0x6f, 0x00, 0x6f, 0x00, 0x6b, 0x00, 0x20, 0x00, 0x44, 0x00, 0x61, 0x00,
                0x74, 0x00, 0x61, 0x00, 0x20, 0x00, 0x46, 0x00, 0x69, 0x00, 0x6c, 0x00, 0x65, 0x00, 0x01, 0x00,
                0x00, 0x00, 0x77, 0xc3, 0x5d, 0xd5, 0x33, 0x8a, 0x5f, 0x44, 0x9d, 0x2d, 0x4b, 0x44, 0xdd, 0xcc,
                0xbd, 0x48, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x97, 0x7b, 0x45, 0xcb, 0xdb, 0xc2,
                0x82, 0x43, 0x92, 0x10, 0x55, 0x19, 0xe9, 0x93, 0x28, 0xfa, 0x22, 0x80, 0x00, 0x00, 0x00, 0x00,
                0x00, 0x00, 0x97, 0x7b, 0x45, 0xcb, 0xdb, 0xc2, 0x82, 0x43, 0x92, 0x10, 0x55, 0x19, 0xe9, 0x93,
                0x28, 0xfa, 0x42, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x97, 0x7b, 0x45, 0xcb, 0xdb, 0xc2,
                0x82, 0x43, 0x92, 0x10, 0x55, 0x19, 0xe9, 0x93, 0x28, 0xfa, 0x62, 0x80, 0x00, 0x00, 0x00, 0x00,
                0x00, 0x00, 0x97, 0x7b, 0x45, 0xcb, 0xdb, 0xc2, 0x82, 0x43, 0x92, 0x10, 0x55, 0x19, 0xe9, 0x93,
                0x28, 0xfa, 0xa2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x97, 0x7b, 0x45, 0xcb, 0xdb, 0xc2,
                0x82, 0x43, 0x92, 0x10, 0x55, 0x19, 0xe9, 0x93, 0x28, 0xfa, 0xc2, 0x80, 0x00, 0x00, 0x00, 0x00,
                0x00, 0x00, 0x97, 0x7b, 0x45, 0xcb, 0xdb, 0xc2, 0x82, 0x43, 0x92, 0x10, 0x55, 0x19, 0xe9, 0x93,
                0x28, 0xfa, 0xe2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x97, 0x7b, 0x45, 0xcb, 0xdb, 0xc2,
                0x82, 0x43, 0x92, 0x10, 0x55, 0x19, 0xe9, 0x93, 0x28, 0xfa, 0x02, 0x81, 0x00, 0x00, 0x00, 0x00,
                0x00, 0x00, 0x97, 0x7b, 0x45, 0xcb, 0xdb, 0xc2, 0x82, 0x43, 0x92, 0x10, 0x55, 0x19, 0xe9, 0x93,
                0x28, 0xfa, 0x43, 0x00, 0x08, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x14, 0x00, 0x9c, 0x00,
                0xac, 0x00, 0xce, 0x00, 0xe6, 0x00, 0xfe, 0x00, 0x16, 0x01, 0x2e, 0x01, 0x46, 0x01, 0x5e, 0x01,
                0x76, 0x01, 0x8e, 0x01, 0xa6, 0x01
            };

            var input  = TestHelper.GetTestDataStream("test.pst");
            var reader = new PstReader(input);

            var node  = reader.FindNode(0x21);
            var block = reader.FindBlock(node.DataBid);

            Assert.IsNotNull(block);
            Assert.AreEqual(0x1c6, block.Length);
            Assert.AreEqual(0x8aa0, block.Signature);
            Assert.AreEqual(0xc8632127, block.Crc);
            CollectionAssert.AreEqual(blockData, block.Data);
        }
예제 #5
0
 public void Validates_Header()
 {
     var input  = TestHelper.GetTestDataStream("test.pst");
     var reader = new PstReader(input);
 }
예제 #6
0
파일: PstFile.cs 프로젝트: adam-mccoy/pst
 public PstFile(Stream input)
 {
     _input     = input;
     _pstReader = new PstReader(_input);
     _isOpen    = true;
 }