public static bool ResetPassword(PSTFile pst) { var pc = new PropertyContext(SpecialNIDs.NID_MESSAGE_STORE, pst); var offset = pc.BTH.Root.BlankPassword(pst); return false; }
public NamedToPropertyLookup(PSTFile pst) { this.PC = new PropertyContext(NamedToPropertyLookup.NODE_ID, pst); this._GUIDs = this.PC.Properties[0x0002].Data; this._entries = this.PC.Properties[0x0003].Data; this._string = this.PC.Properties[0x0004].Data; this.Lookup = new Dictionary<ushort, NAMEID>(); for (int i = 0; i < this._entries.Length; i += 8) { var cur = new NAMEID(this._entries, i, this); this.Lookup.Add(cur.PropIndex, cur); } }
public MailStore(PSTFile pst) { this._pc = new PropertyContext(SpecialNIDs.NID_MESSAGE_STORE, pst); this.RootFolder = new EntryID(this._pc.BTH.GetExchangeProperties()[0x35e0].Data); }
public Message(uint NID, IPMItem item, PSTFile pst) { this._IPMItem = item; this.Data = BlockBO.GetNodeData(NID, pst); this.NID = NID; //this.MessagePC = new PropertyContext(this.Data); foreach(var subNode in this.Data.SubNodeData) { var temp = new NID(subNode.Key); switch(temp.Type) { case NDB.NID.NodeType.ATTACHMENT_TABLE: this.AttachmentTable = new TableContext(subNode.Value); break; case NDB.NID.NodeType.ATTACHMENT_PC: this.AttachmentPC = new PropertyContext(subNode.Value); this.Attachments = new List<Attachment>(); foreach(var row in this.AttachmentTable.RowMatrix.Rows) { this.Attachments.Add(new Attachment(row)); } break; case NDB.NID.NodeType.RECIPIENT_TABLE: this.RecipientTable = new TableContext(subNode.Value); foreach(var row in this.RecipientTable.RowMatrix.Rows) { var recipient = new Recipient(row); switch(recipient.Type) { case Recipient.RecipientType.TO: this.To.Add(recipient); break; case Recipient.RecipientType.FROM: this.From.Add(recipient); break; case Recipient.RecipientType.CC: this.CC.Add(recipient); break; case Recipient.RecipientType.BCC: this.BCC.Add(recipient); break; } } break; } } foreach(var prop in this._IPMItem.PC.Properties) { if (prop.Value.Data == null) continue; switch(prop.Key) { case 0x17: this.Imporance = (Importance) BitConverter.ToInt16(prop.Value.Data, 0); break; case 0x36: this.Sensitivity = (Sensitivity) BitConverter.ToInt16(prop.Value.Data, 0); break; case 0x37: this.Subject = Encoding.Unicode.GetString(prop.Value.Data); if (this.Subject.Length > 0) { var chars = this.Subject.ToCharArray(); if (chars[0] == 0x001) { var length = (int)chars[1]; int i = 0; if (length > 1) i++; this.SubjectPrefix = this.Subject.Substring(2, length-1); this.Subject = this.Subject.Substring(2 + length-1); } } break; case 0x39: this.ClientSubmitTime = DateTime.FromFileTimeUtc(BitConverter.ToInt64(prop.Value.Data, 0)); break; case 0x42: this.SentRepresentingName = Encoding.Unicode.GetString(prop.Value.Data); break; case 0x70: this.ConversationTopic = Encoding.Unicode.GetString(prop.Value.Data); break; case 0x1a: this.MessageClass = Encoding.Unicode.GetString(prop.Value.Data); break; case 0xc1a: this.SenderName = Encoding.Unicode.GetString(prop.Value.Data); break; case 0xe06: this.MessageDeliveryTime = DateTime.FromFileTimeUtc(BitConverter.ToInt64(prop.Value.Data, 0)); break; case 0xe07: this.MessageFlags = BitConverter.ToUInt32(prop.Value.Data, 0); this.Read = (this.MessageFlags & 0x1) != 0; this.Unsent = (this.MessageFlags & 0x8) != 0; this.Unmodified = (this.MessageFlags & 0x2) != 0; this.HasAttachments = (this.MessageFlags & 0x10) != 0; this.FromMe = (this.MessageFlags & 0x20) != 0; this.IsFAI = (this.MessageFlags & 0x40) != 0; this.NotifyReadRequested = (this.MessageFlags & 0x100) != 0; this.NotifyUnreadRequested = (this.MessageFlags & 0x200) != 0; this.EverRead = (this.MessageFlags & 0x400) != 0; break; case 0xe08: this.MessageSize = BitConverter.ToUInt32(prop.Value.Data, 0); break; case 0xe23: this.InternetArticalNumber = BitConverter.ToUInt32(prop.Value.Data, 0); break; case 0xe27: //unknown break; case 0xe29: //nextSentAccount, ignore this, string break; case 0xe62: //unknown break; case 0xe79: //trusted sender break; case 0x1000: this.BodyPlainText = Encoding.Unicode.GetString(prop.Value.Data); break; case 0x1009: this.BodyCompressedRTF = prop.Value.Data.RangeSubset(4, prop.Value.Data.Length - 4); break; case 0x1035: this.InternetMessageID = Encoding.Unicode.GetString(prop.Value.Data); break; case 0x10F3: this.UrlCompositeName = Encoding.Unicode.GetString(prop.Value.Data); break; case 0x10F4: this.AttributeHidden = prop.Value.Data[0] == 0x01; break; case 0x10F5: //unknown break; case 0x10F6: this.ReadOnly = prop.Value.Data[0] == 0x01; break; case 0x3007: this.CreationTime = DateTime.FromFileTimeUtc(BitConverter.ToInt64(prop.Value.Data, 0)); break; case 0x3008: this.LastModificationTime = DateTime.FromFileTimeUtc(BitConverter.ToInt64(prop.Value.Data, 0)); break; case 0x300B: //seach key break; case 0x3fDE: this.CodePage = BitConverter.ToUInt32(prop.Value.Data, 0); break; case 0x3ff1: //localeID break; case 0x3ff8: this.CreatorName = Encoding.Unicode.GetString(prop.Value.Data); break; case 0x3ff9: //creator entryid break; case 0x3ffa: //last modifier name break; case 0x3ffb: //last modifier entryid break; case 0x3ffd: this.NonUnicodeCodePage = BitConverter.ToUInt32(prop.Value.Data, 0); break; case 0x4019: //unknown break; case 0x401a: //sentrepresentingflags break; case 0x619: //userentryid break; default: break; } } }
public IPMItem(PSTFile pst, uint nid) { this._nid = nid; this.PC = new PropertyContext(nid, pst); this.MessageClass = Encoding.Unicode.GetString(this.PC.Properties[0x1a].Data); }