Ejemplo n.º 1
0
        public string getData(int id, ColType.TYPE type)
        {
            string value = "";

            foreach (Item item in this.dataList)
            {
                item.setIdType(id, type);
                if (item.getColumnName().Contains("System_Search_AutoSummary"))
                {
                    if (this.isWin10)
                    {
                        value += item.getDecompressText();
                    }
                    else
                    {
                        value += (item.getDeobfuscation());
                    }
                }
                else
                {
                    value += item.getValue();
                }
            }
            return(value);
        }
Ejemplo n.º 2
0
 public void setColumnNameAndType(string columnName, ColType.TYPE type)
 {
     foreach (Item item in this.dataList)
     {
         item.setColumnName(columnName);
         item.setColumnType(type);
     }
 }
Ejemplo n.º 3
0
        public string getData(int id, ColType.TYPE type)
        {
            string value = "";

            foreach (Item item in this.dataList)
            {
                item.setIdType(id, type);
                value += item.getValue();
            }

            return(value);
        }
Ejemplo n.º 4
0
 public Item(HexReader hexReader, int id, string columnName, ColType.TYPE type, int maxLength, int offset, int size)
 {
     this.hexReader  = hexReader;
     this.id         = id;
     this.columnName = columnName;
     this.offset     = offset;
     this.size       = size;
     this.maxLength  = maxLength;
     this.type       = type;
     if (this.id >= 0x100)
     {
         this.taggedDataItemFlag = hexReader.readByteDump(offset, 1)[0];
         this.offset++;
         this.size--;
     }
     else
     {
         this.taggedDataItemFlag = 0;
     }
 }
Ejemplo n.º 5
0
        public Dictionary <int, Item> getRecord(int recordOffset, int recordSize, int jumpSize)
        {
            //레코드 파싱 시작
            Dictionary <int, Item> record = new Dictionary <int, Item>();
            int   parsingOffset           = recordOffset + jumpSize;
            byte  lastFixedItemID         = this.hexReader.readByteDump(parsingOffset, 1)[0];
            byte  lastVariableItemID      = this.hexReader.readByteDump(parsingOffset + 1, 1)[0];
            short firstVariableIDOffset   = this.hexReader.readShort(parsingOffset + 2);
            short firstVariableDataOffset = (short)((lastVariableItemID - 0x80 + 1) * 2);
            short firstTaggedIDOffset     = firstVariableIDOffset;
            short firstTaggedDataOffset   = 0;



            int    id         = 0;
            string columnName = "";

            ColType.TYPE type                   = ColType.TYPE.UNKNOWN_TYPE;
            int          spaceUsage             = 0;
            int          itemOffset             = 0;
            int          itemSize               = 0;
            short        itemID                 = 0;
            int          fixedItemPosition      = 4;
            int          variableItemPosition   = 0;
            int          taggedDataItemPosition = 0;

            short variableItemOffset       = 0;
            short nextVariableItemOffset   = 0;
            short taggedDataItemOffset     = 0;
            short nextTaggedDataItemOffset = 0;

            //하나의 row에 있는 여러 항목 중 각 칼럼에 해당하는 항목 파싱
            foreach (Column column in columnList)
            {
                id         = column.getID();
                type       = (ColType.TYPE)column.getType();
                spaceUsage = column.getSpaceUsage();
                columnName = column.getName();
                //Item item;

                if (id >= 0 && id < 0x80 && id <= lastFixedItemID)    //fixed items 파싱

                {
                    itemOffset         = parsingOffset + fixedItemPosition;
                    itemSize           = column.getSpaceUsage();
                    fixedItemPosition += itemSize;
                    if (!column.getIgnore())
                    {
                        Item item = new Item(this.hexReader, id, columnName, type, spaceUsage, itemOffset, itemSize);
                        item.UTCTime(UTCAddHour, UTCAddMinute);
                        record.Add(id, item);
                    }
                }
                else if (id >= 0x80 && id < 0x100 && id <= lastVariableItemID)   //variable items 파싱
                {
                    nextVariableItemOffset = this.hexReader.readShort(parsingOffset + firstVariableIDOffset + variableItemPosition);
                    if (nextVariableItemOffset >= 0)
                    {
                        itemOffset         = parsingOffset + firstVariableIDOffset + firstVariableDataOffset + variableItemOffset;
                        itemSize           = nextVariableItemOffset - variableItemOffset;
                        variableItemOffset = nextVariableItemOffset;
                        if (id == lastVariableItemID)
                        {
                            firstTaggedIDOffset = (short)(firstVariableIDOffset + firstVariableDataOffset + nextVariableItemOffset);
                        }

                        if (!column.getIgnore())
                        {
                            Item item = new Item(this.hexReader, id, columnName, type, spaceUsage, itemOffset, itemSize);
                            item.UTCTime(UTCAddHour, UTCAddMinute);
                            record.Add(id, item);
                        }
                    }
                    variableItemPosition += 2;
                }
                else if (id >= 0x100 && id < 0xFFFF)       //tagged data items 파싱
                {
                    taggedDataItemOffset = this.hexReader.readShort(parsingOffset + firstTaggedIDOffset + taggedDataItemPosition + 2);
                    itemID = this.hexReader.readShort(parsingOffset + firstTaggedIDOffset + taggedDataItemPosition);
                    if (itemID == id)
                    {
                        if (firstTaggedDataOffset == 0)
                        { //First
                            firstTaggedDataOffset = this.hexReader.readShort(parsingOffset + firstTaggedIDOffset + 2);
                        }
                        taggedDataItemPosition += 4;
                        itemOffset              = parsingOffset + firstTaggedIDOffset + taggedDataItemOffset;
                        if (firstTaggedDataOffset == taggedDataItemPosition)
                        { //Last
                            itemSize = recordSize - (jumpSize + firstTaggedIDOffset + taggedDataItemOffset);
                        }
                        else
                        {
                            nextTaggedDataItemOffset = this.hexReader.readShort(parsingOffset + firstTaggedIDOffset + taggedDataItemPosition + 2);
                            itemSize = nextTaggedDataItemOffset - taggedDataItemOffset;
                        }
                        if (!column.getIgnore())
                        {
                            Item item = new Item(this.hexReader, id, columnName, type, spaceUsage, itemOffset, itemSize);
                            item.UTCTime(UTCAddHour, UTCAddMinute);
                            record.Add(id, item);
                        }
                    }
                }
                if ((itemOffset + itemSize) - recordOffset >= recordSize)
                {
                    break;
                }
            }
            return(record);
        }
Ejemplo n.º 6
0
 public void setIdType(int id, ColType.TYPE type)
 {
     this.id   = id;
     this.type = type;
 }
Ejemplo n.º 7
0
 public void setColumnType(ColType.TYPE type)
 {
     this.type = type;
 }