我有一个文件,试图了解其结构和格式。它是NEC LT380投影仪控制系统的专有驱动程序文件,其中包含基本信息,例如TCP端口号和投影仪接受的诸如打开/关闭电源,开关输入和纵横比等可用命令。

我对该文件进行了一些测试,并确定了一些内容:


文件内容如下:http://codepad.org/0pzGkLgT(您需要保存将该内容放入文件中,然后使用gzip软件将其打开)。
我可以确定该文件已压缩,提取后该zip文件包含一个没有扩展名的文件。
这是提取文件的内容:http://codepad.org/yvuceZcD(要阅读此内容,请使用十六进制查看器打开)
在线TrID文件标识符似乎将提取的文件标识为ABR或Adobe Photoshop Brush,这当然是不正确的。
然后,我使用文本编辑器打开了提取的文件,它只显示了一堆十六进制字符串。
这促使我在HexEdit中打开十六进制文件。这次,我能够看到一些人类可读的语法和代码。

文件的开头和结尾包含一些不可读的字符串和一些语法,例如“ Culture = neutral,PublicKeyToken = null”。这些语法似乎表明它与.NET有关,但我不确定哪种类型的.NET文件。在文件的中间部分,有一堆经过进一步研究的代码看起来像是python代码。示例:

def ReadAspectRatio(自身,限定词,上下文):

此外,在同一文件上,我发现了一些标签:**<</Type/Catalog/Pages 2 0 R/Lang(en-US) >>**,通常在PDF文件中找到。使用PDF修复工具,我能够将该文件流恢复并重建为正确的PDF文件,其中包含几页投影机命令和端口信息。

问题:


您是否可以确定这是哪种文件?或者对该文件做了什么,因为在一个文件中似乎有3种不同的东西:.NET内容(可能是清单文件或对.NET程序集的引用),对设备执行set / read / write命令的python代码以及最后是PDF流。在文件的开头和结尾处是否存在混淆或文件连接方法或哈希值?
我正在寻找重新创建和模拟文件的方法。当前,如果我只是打开提取的文件,请通过在适当的python代码中添加一些简单的额外选项/命令来编辑文件的中间部分,将其保存并gzip压缩回去,这是行不通的。

谢谢!

评论

如果您将文件上传到支持二进制文件的站点,将会有所帮助;我们不能真正使用codepad.org十六进制转储(嗯,我们可以使用xxd -r -p,但是为什么需要额外的步骤,导致生成的gzip文件仍然被截断。完整的文件会更有用)。无论如何,这种格式似乎是某种序列化。在文件中也有文件名,例如“ nec_1_548.py”和“ nec_1_548_v1_0_0_0.pdf”,因此该文件似乎具有各种序列化的内容,其中一些是字符串,另一些是(python和PDF)文件。 br />
感谢您的回复!原始文件在这里:bit.ly/1zM3rsV我还向我的帖子中添加了一些额外的信息,简而言之,该文件包含一些内容:.NET标记,其中可能包含清单或对.NET程序集的引用,一些python代码,以及PDF流。

您可以随时致电Extron并检查更新的驱动程序或下载它们提供的配置软件以更改设备的功能。我一直都在做。

#1 楼

该文件似乎是二进制序列化的.NET文件(概念上类似于Python pickle或Java序列化流),并且似乎没有以任何方式混淆。我使用Microsoft的流格式规范中的引用手动解析了前几条记录,然后该格式签出。该文件存储一个类型为“ Extron.Configuration.Drivers.DriverFileAsset”的单个对象,其中包含18个不同类型的类成员。

基于它包含.NET类库标识符的事实,我猜想这种格式。在标头中,然后通过检查文件格式规范来验证猜测。

我整理了这种格式的解析器,尽管它不完整。该文件的转储如下所示:

Binary Serialization Format
@0
  SerializedStreamHeader(TopId=1, HeaderId=-1, MajorVersion=1, MinorVersion=0)
@17
  BinaryLibrary(LibraryId=2, LibraryName='Extron.Configuration.Drivers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null')
@106
  BinaryLibrary(LibraryId=3, LibraryName='Extron.Configuration.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null')
@192
  BinaryLibrary(LibraryId=4, LibraryName='Extron.Configuration.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null')
@283
  BinaryLibrary(LibraryId=5, LibraryName='WindowsBase, Version=3.0.0.0, Culture=Neutral, PublicKeyToken=31bf3856ad364e35')
@367
  ClassWithMembersAndTypes LibraryId=2 ObjectId=1 Name=Extron.Configuration.Drivers.DriverFileAsset:
      Extron.Configuration.Core.Assets.AssetBase`1[[Extron.Configuration.Contracts.Assets.IResourceAsset, Extron.Configuration.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]] _manifest
          MemberReference(IdRef=6)
      Extron.Configuration.Contracts.Enumeration.DriverPackageStateEnum _packageState
          ClassWithMembers LibraryId=4 ObjectId=-7 Name=Extron.Configuration.Contracts.Enumeration.DriverPackageStateEnum:
              value__ = 0
      System.Collections.ObjectModel.ObservableCollection`1[[Extron.Configuration.Contracts.Assets.IAsset, Extron.Configuration.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]] _internalChildCollection
          MemberReference(IdRef=8)
      System.Version DriverDescriptorAsset+_fileVersion
          MemberReference(IdRef=9)
      System.Version DriverDescriptorAsset+_schemaVersion
          MemberReference(IdRef=10)
      System.Version DriverDescriptorAsset+_minAPIVersion
          MemberReference(IdRef=11)
      String DriverDescriptorAsset+_manufacturerName
          BinaryObjectString(ObjectId=12, Value='NEC')
      String DriverDescriptorAsset+_deviceTypeName
          BinaryObjectString(ObjectId=13, Value='Video Projector')
      String DriverDescriptorAsset+_filename
          BinaryObjectString(ObjectId=14, Value='\\usa-home10\home\wes minner\programming\reviews\nec_1_548 [nec lt280]\finished\nec_1_548_v1_0_0.pkp')
      Int32 DriverDescriptorAsset+_contentHashCode
          0
      System.Collections.ObjectModel.ObservableCollection`1[[Extron.Configuration.Contracts.Assets.IAsset, Extron.Configuration.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]] DriverDescriptorAsset+_internalChildCollection
          MemberReference(IdRef=8)
      System.Collections.ObjectModel.ObservableCollection`1[[Extron.Configuration.Contracts.Assets.IAsset, Extron.Configuration.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]] AssetBase+_internalChildCollection
          MemberReference(IdRef=8)
      String AssetBase+_defaultName
          BinaryObjectString(ObjectId=16, Value='nec_1_548')
      String AssetBase+_name
          MemberReference(IdRef=16)
      System.Guid AssetBase+_guid
          SystemClassWithMembers ObjectId=-17 Name=System.Guid:
              _a = 2458436383
              _b = 50071
              _c = 18042
              _d = 169
              _e = 134
              _f = 255
              _g = 167
              _h = 142
              _i = 29
              _j = 19
              _k = 168
      System.Nullable`1[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] AssetBase+_maxChildCount
          ObjectNull()
      Boolean AssetBase+_disableChildAssetParenting
          False
      Extron.Configuration.Contracts.Assets.IAsset AssetBase+_parentAsset
          ObjectNull()
@2396
  ClassWithMembersAndTypes LibraryId=3 ObjectId=6 Name=Extron.Configuration.Core.Assets.AssetBase`1[[Extron.Configuration.Contracts.Assets.IResourceAsset, Extron.Configuration.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]:
      System.Collections.ObjectModel.ObservableCollection`1[[Extron.Configuration.Contracts.Assets.IResourceAsset, Extron.Configuration.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]] _internalChildCollection
          MemberReference(IdRef=18)
      System.Collections.ObjectModel.ObservableCollection`1[[Extron.Configuration.Contracts.Assets.IAsset, Extron.Configuration.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]] AssetBase+_internalChildCollection
          ObjectNull()
      String AssetBase+_defaultName
          ObjectNull()
      String AssetBase+_name
          ObjectNull()
      System.Guid AssetBase+_guid
          ClassWithId ObjectId=-19 Name=System.Guid:
              _a = 2458436383
              _b = 50071
              _c = 18042
              _d = 169
              _e = 134
              _f = 255
              _g = 167
              _h = 142
              _i = 29
              _j = 19
              _k = 168
      System.Nullable`1[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] AssetBase+_maxChildCount
          ObjectNull()
      Boolean AssetBase+_disableChildAssetParenting
          False
      Extron.Configuration.Contracts.Assets.IAsset AssetBase+_parentAsset
          ObjectNull()
@3412
  ClassWithMembers LibraryId=5 ObjectId=8 Name=System.Collections.ObjectModel.ObservableCollection`1[[Extron.Configuration.Contracts.Assets.IAsset, Extron.Configuration.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]:
      _monitor = MemberReference(IdRef=20)
      Collection`1+items = MemberReference(IdRef=21)
@3653
  SystemClassWithMembers ObjectId=9 Name=System.Version:
      _Major = 1
      _Minor = 0
      _Build = 0
      _Revision = -1
@3724
  ClassWithId ObjectId=10 Name=System.Version:
      _Major = 1
      _Minor = 0
      _Build = 0
      _Revision = -1
@3749
  ClassWithId ObjectId=11 Name=System.Version:
      _Major = 1
      _Minor = 0
      _Build = 0
      _Revision = -1
@3774
  ClassWithMembers LibraryId=5 ObjectId=18 Name=System.Collections.ObjectModel.ObservableCollection`1[[Extron.Configuration.Contracts.Assets.IResourceAsset, Extron.Configuration.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]:
      _monitor = MemberReference(IdRef=22)
      Collection`1+items = MemberReference(IdRef=23)
@4023
  ClassWithMembers LibraryId=5 ObjectId=20 Name=System.Collections.ObjectModel.ObservableCollection`1+SimpleMonitor[[Extron.Configuration.Contracts.Assets.IAsset, Extron.Configuration.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]:
      _busyCount = 0
@4255
  SystemClassWithMembers ObjectId=21 Name=System.Collections.Generic.List`1[[Extron.Configuration.Contracts.Assets.IAsset, Extron.Configuration.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]:
      _items = MemberReference(IdRef=24)
      _size = 6
      _version = 6
@4469
  ClassWithMembers LibraryId=5 ObjectId=22 Name=System.Collections.ObjectModel.ObservableCollection`1+SimpleMonitor[[Extron.Configuration.Contracts.Assets.IResourceAsset, Extron.Configuration.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]:
      _busyCount = 0
@4709
  SystemClassWithMembers ObjectId=23 Name=System.Collections.Generic.List`1[[Extron.Configuration.Contracts.Assets.IResourceAsset, Extron.Configuration.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]:
      _items = MemberReference(IdRef=25)
      _size = 2
      _version = 2
@4931
  BinaryArray(ObjectId=24, BinaryArrayTypeEnum=<BinaryArrayType.Single: 0>, Rank=1, Lengths=(8,), LowerBounds=None, TypeEnum=<BinaryType.Class: 4>, AdditionalTypeInfo=ClassTypeInfo(TypeName='Extron.Configuration.Contracts.Assets.IAsset', LibraryId=4))
      MemberReference(IdRef=26)
      MemberReference(IdRef=27)
      MemberReference(IdRef=28)
      MemberReference(IdRef=29)
      MemberReference(IdRef=30)
      MemberReference(IdRef=31)
      ObjectNullMultiple256(NullCount=2)
@5027
  BinaryArray(ObjectId=25, BinaryArrayTypeEnum=<BinaryArrayType.Single: 0>, Rank=1, Lengths=(4,), LowerBounds=None, TypeEnum=<BinaryType.Class: 4>, AdditionalTypeInfo=ClassTypeInfo(TypeName='Extron.Configuration.Contracts.Assets.IResourceAsset', LibraryId=4))
      MemberReference(IdRef=32)
      MemberReference(IdRef=33)
      ObjectNullMultiple256(NullCount=2)
@5111
  ClassWithMembersAndTypes LibraryId=3 ObjectId=26 Name=Extron.Configuration.Core.Assets.RevisionHistoryAsset:
      DateTime _date
          2014-08-01 02:08:28.537000
      String _author
          BinaryObjectString(ObjectId=34, Value='ngupta')
      System.Version _version
          MemberReference(IdRef=35)
      String _notes
          BinaryObjectString(ObjectId=36, Value='')
      System.Collections.ObjectModel.ObservableCollection`1[[Extron.Configuration.Contracts.Assets.IAsset, Extron.Configuration.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]] _internalChildCollection
          MemberReference(IdRef=37)
      System.Collections.ObjectModel.ObservableCollection`1[[Extron.Configuration.Contracts.Assets.IAsset, Extron.Configuration.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]] AssetBase+_internalChildCollection
          MemberReference(IdRef=37)
      String AssetBase+_defaultName
          BinaryObjectString(ObjectId=38, Value='Creation')
      String AssetBase+_name
          MemberReference(IdRef=38)
      System.Guid AssetBase+_guid
          ClassWithId ObjectId=-39 Name=System.Guid:
              _a = 2458436383
              _b = 50071
              _c = 18042
              _d = 169
              _e = 134
              _f = 255
              _g = 167
              _h = 142
              _i = 29
              _j = 19
              _k = 168
      System.Nullable`1[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] AssetBase+_maxChildCount
          ObjectNull()
      Boolean AssetBase+_disableChildAssetParenting
          False
      Extron.Configuration.Drivers.DriverFileAsset AssetBase+_parentAsset
          MemberReference(IdRef=1)
@6090
  ClassWithId ObjectId=27 Name=Extron.Configuration.Core.Assets.RevisionHistoryAsset:
      DateTime _date
          2014-08-01 02:08:28.537000
      String _author
          BinaryObjectString(ObjectId=34, Value='ngupta')
      System.Version _version
          MemberReference(IdRef=35)
      String _notes
          BinaryObjectString(ObjectId=36, Value='')
      System.Collections.ObjectModel.ObservableCollection`1[[Extron.Configuration.Contracts.Assets.IAsset, Extron.Configuration.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]] _internalChildCollection
          MemberReference(IdRef=37)
      System.Collections.ObjectModel.ObservableCollection`1[[Extron.Configuration.Contracts.Assets.IAsset, Extron.Configuration.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]] AssetBase+_internalChildCollection
          MemberReference(IdRef=37)
      String AssetBase+_defaultName
          BinaryObjectString(ObjectId=38, Value='Creation')
      String AssetBase+_name
          MemberReference(IdRef=38)
      System.Guid AssetBase+_guid
          ClassWithId ObjectId=-39 Name=System.Guid:
              _a = 2458436383
              _b = 50071
              _c = 18042
              _d = 169
              _e = 134
              _f = 255
              _g = 167
              _h = 142
              _i = 29
              _j = 19
              _k = 168
      System.Nullable`1[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] AssetBase+_maxChildCount
          ObjectNull()
      Boolean AssetBase+_disableChildAssetParenting
          False
      Extron.Configuration.Drivers.DriverFileAsset AssetBase+_parentAsset
          MemberReference(IdRef=1)
@6195
  ClassWithMembersAndTypes LibraryId=3 ObjectId=28 Name=Extron.Configuration.Core.Assets.AssetBase`1[[Extron.Configuration.Contracts.Assets.Drivers.IDriverCommandAsset, Extron.Configuration.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]:
      System.Collections.ObjectModel.ObservableCollection`1[[Extron.Configuration.Contracts.Assets.Drivers.IDriverCommandAsset, Extron.Configuration.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]] _internalChildCollection
          MemberReference(IdRef=48)
      System.Collections.ObjectModel.ObservableCollection`1[[Extron.Configuration.Contracts.Assets.IAsset, Extron.Configuration.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]] AssetBase+_internalChildCollection
          ObjectNull()
      String AssetBase+_defaultName
          BinaryObjectString(ObjectId=49, Value='DriverCommands')
      String AssetBase+_name
          MemberReference(IdRef=49)
      System.Guid AssetBase+_guid
          ClassWithId ObjectId=-50 Name=System.Guid:
              _a = 2458436383
              _b = 50071
              _c = 18042
              _d = 169
              _e = 134
              _f = 255
              _g = 167
              _h = 142
              _i = 29
              _j = 19
              _k = 168
      System.Nullable`1[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] AssetBase+_maxChildCount
          ObjectNull()
      Boolean AssetBase+_disableChildAssetParenting
          False
      Extron.Configuration.Drivers.DriverFileAsset AssetBase+_parentAsset
          MemberReference(IdRef=1)
@7264
  ClassWithMembersAndTypes LibraryId=3 ObjectId=29 Name=Extron.Configuration.Core.Assets.AssetBase`1[[Extron.Configuration.Contracts.Assets.Protocols.IProtocolAsset, Extron.Configuration.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]:
      System.Collections.ObjectModel.ObservableCollection`1[[Extron.Configuration.Contracts.Assets.Protocols.IProtocolAsset, Extron.Configuration.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]] _internalChildCollection
          MemberReference(IdRef=52)
      System.Collections.ObjectModel.ObservableCollection`1[[Extron.Configuration.Contracts.Assets.IAsset, Extron.Configuration.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]] AssetBase+_internalChildCollection
          ObjectNull()
      String AssetBase+_defaultName
          BinaryObjectString(ObjectId=53, Value='SupportedProtocols')
      String AssetBase+_name
          MemberReference(IdRef=53)
      System.Guid AssetBase+_guid
          ClassWithId ObjectId=-54 Name=System.Guid:
              _a = 2458436383
              _b = 50071
              _c = 18042
              _d = 169
              _e = 134
              _f = 255
              _g = 167
              _h = 142
              _i = 29
              _j = 19
              _k = 168
      System.Nullable`1[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] AssetBase+_maxChildCount
          ObjectNull()
      Boolean AssetBase+_disableChildAssetParenting
          False
      Extron.Configuration.Drivers.DriverFileAsset AssetBase+_parentAsset
          MemberReference(IdRef=1)
@8331
  ClassWithMembersAndTypes LibraryId=3 ObjectId=30 Name=Extron.Configuration.Core.Assets.AssetBase`1[[Extron.Configuration.Contracts.Assets.Drivers.IDriverModelAsset, Extron.Configuration.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]:
      System.Collections.ObjectModel.ObservableCollection`1[[Extron.Configuration.Contracts.Assets.Drivers.IDriverModelAsset, Extron.Configuration.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]] _internalChildCollection
          MemberReference(IdRef=56)
      System.Collections.ObjectModel.ObservableCollection`1[[Extron.Configuration.Contracts.Assets.IAsset, Extron.Configuration.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]] AssetBase+_internalChildCollection
          ObjectNull()
      String AssetBase+_defaultName
          BinaryObjectString(ObjectId=57, Value='SupportedModels')
      String AssetBase+_name
          MemberReference(IdRef=57)
      System.Guid AssetBase+_guid
          ClassWithId ObjectId=-58 Name=System.Guid:
              _a = 2458436383
              _b = 50071
              _c = 18042
              _d = 169
              _e = 134
              _f = 255
              _g = 167
              _h = 142
              _i = 29
              _j = 19
              _k = 168
      System.Nullable`1[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] AssetBase+_maxChildCount
          ObjectNull()
      Boolean AssetBase+_disableChildAssetParenting
          False
      Extron.Configuration.Drivers.DriverFileAsset AssetBase+_parentAsset
          MemberReference(IdRef=1)
@9397
  ClassWithMembersAndTypes LibraryId=3 ObjectId=31 Name=Extron.Configuration.Core.Assets.AssetBase`1[[Extron.Configuration.Contracts.Assets.Automation.IParamAsset, Extron.Configuration.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]:
      System.Collections.ObjectModel.ObservableCollection`1[[Extron.Configuration.Contracts.Assets.Automation.IParamAsset, Extron.Configuration.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]] _internalChildCollection
          MemberReference(IdRef=60)
      System.Collections.ObjectModel.ObservableCollection`1[[Extron.Configuration.Contracts.Assets.IAsset, Extron.Configuration.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]] AssetBase+_internalChildCollection
          ObjectNull()
      String AssetBase+_defaultName
          BinaryObjectString(ObjectId=61, Value='DriverParams')
      String AssetBase+_name
          MemberReference(IdRef=61)
      System.Guid AssetBase+_guid
          ClassWithId ObjectId=-62 Name=System.Guid:
              _a = 2458436383
              _b = 50071
              _c = 18042
              _d = 169
              _e = 134
              _f = 255
              _g = 167
              _h = 142
              _i = 29
              _j = 19
              _k = 168
      System.Nullable`1[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] AssetBase+_maxChildCount
          ObjectNull()
      Boolean AssetBase+_disableChildAssetParenting
          False
      Extron.Configuration.Drivers.DriverFileAsset AssetBase+_parentAsset
          MemberReference(IdRef=1)
@10454
  ClassWithMembersAndTypes LibraryId=3 ObjectId=32 Name=Extron.Configuration.Core.Assets.Resource.StreamResourceAsset:
      System.Collections.ObjectModel.ObservableCollection`1[[Extron.Configuration.Contracts.Assets.IAsset, Extron.Configuration.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]] _internalChildCollection
          MemberReference(IdRef=64)
      String ResourceAssetBase+_key
          BinaryObjectString(ObjectId=65, Value='nec_1_548_v1_0_0.pdf')
      Object ResourceAssetBase+_content
          MemberReference(IdRef=66)
      Object ResourceAssetBase+_tag
          BinaryObjectString(ObjectId=67, Value='nec_1_548_v1_0_0.pdf')
      System.Collections.ObjectModel.ObservableCollection`1[[Extron.Configuration.Contracts.Assets.IAsset, Extron.Configuration.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]] ResourceAssetBase+_internalChildCollection
          MemberReference(IdRef=64)
      System.Collections.ObjectModel.ObservableCollection`1[[Extron.Configuration.Contracts.Assets.IAsset, Extron.Configuration.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]] AssetBase+_internalChildCollection
          MemberReference(IdRef=64)
      String AssetBase+_defaultName
          BinaryObjectString(ObjectId=69, Value='nec_1_548_v1_0_0.pdf')
      String AssetBase+_name
          BinaryObjectString(ObjectId=70, Value='nec_1_548_v1_0_0.pdf')
      System.Guid AssetBase+_guid
          ClassWithId ObjectId=-71 Name=System.Guid:
              _a = 2458436383
              _b = 50071
              _c = 18042
              _d = 169
              _e = 134
              _f = 255
              _g = 167
              _h = 142
              _i = 29
              _j = 19
              _k = 168
      System.Nullable`1[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] AssetBase+_maxChildCount
          ObjectNull()
      Boolean AssetBase+_disableChildAssetParenting
          False
      Extron.Configuration.Core.Assets.AssetBase`1[[Extron.Configuration.Contracts.Assets.IResourceAsset, Extron.Configuration.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]] AssetBase+_parentAsset
          MemberReference(IdRef=6)
@11913
  ClassWithId ObjectId=33 Name=Extron.Configuration.Core.Assets.Resource.StreamResourceAsset:
      System.Collections.ObjectModel.ObservableCollection`1[[Extron.Configuration.Contracts.Assets.IAsset, Extron.Configuration.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]] _internalChildCollection
          MemberReference(IdRef=64)
      String ResourceAssetBase+_key
          BinaryObjectString(ObjectId=65, Value='nec_1_548_v1_0_0.pdf')
      Object ResourceAssetBase+_content
          MemberReference(IdRef=66)
      Object ResourceAssetBase+_tag
          BinaryObjectString(ObjectId=67, Value='nec_1_548_v1_0_0.pdf')
      System.Collections.ObjectModel.ObservableCollection`1[[Extron.Configuration.Contracts.Assets.IAsset, Extron.Configuration.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]] ResourceAssetBase+_internalChildCollection
          MemberReference(IdRef=64)
      System.Collections.ObjectModel.ObservableCollection`1[[Extron.Configuration.Contracts.Assets.IAsset, Extron.Configuration.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]] AssetBase+_internalChildCollection
          MemberReference(IdRef=64)
      String AssetBase+_defaultName
          BinaryObjectString(ObjectId=69, Value='nec_1_548_v1_0_0.pdf')
      String AssetBase+_name
          BinaryObjectString(ObjectId=70, Value='nec_1_548_v1_0_0.pdf')
      System.Guid AssetBase+_guid
          ClassWithId ObjectId=-71 Name=System.Guid:
              _a = 2458436383
              _b = 50071
              _c = 18042
              _d = 169
              _e = 134
              _f = 255
              _g = 167
              _h = 142
              _i = 29
              _j = 19
              _k = 168
      System.Nullable`1[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] AssetBase+_maxChildCount
          ObjectNull()
      Boolean AssetBase+_disableChildAssetParenting
          False
      Extron.Configuration.Core.Assets.AssetBase`1[[Extron.Configuration.Contracts.Assets.IResourceAsset, Extron.Configuration.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]] AssetBase+_parentAsset
          MemberReference(IdRef=6)
@12046
  ClassWithId ObjectId=35 Name=System.Version:
      _Major = 1
      _Minor = 0
      _Build = 0
      _Revision = -1
@12071
  ClassWithId ObjectId=37 Name=System.Collections.ObjectModel.ObservableCollection`1[[Extron.Configuration.Contracts.Assets.IAsset, Extron.Configuration.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]:
      _monitor = MemberReference(IdRef=20)
      Collection`1+items = MemberReference(IdRef=21)
@12090
  ClassWithId ObjectId=42 Name=System.Version:
      _Major = 1
      _Minor = 0
      _Build = 0
      _Revision = -1
@12115
  ClassWithId ObjectId=44 Name=System.Collections.ObjectModel.ObservableCollection`1[[Extron.Configuration.Contracts.Assets.IAsset, Extron.Configuration.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]:
      _monitor = MemberReference(IdRef=20)
      Collection`1+items = MemberReference(IdRef=21)
@12134
  ClassWithMembers LibraryId=5 ObjectId=48 Name=System.Collections.ObjectModel.ObservableCollection`1[[Extron.Configuration.Contracts.Assets.Drivers.IDriverCommandAsset, Extron.Configuration.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]:
      _monitor = MemberReference(IdRef=86)
      Collection`1+items = MemberReference(IdRef=87)
@12396
  ClassWithMembers LibraryId=5 ObjectId=52 Name=System.Collections.ObjectModel.ObservableCollection`1[[Extron.Configuration.Contracts.Assets.Protocols.IProtocolAsset, Extron.Configuration.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]:
      _monitor = MemberReference(IdRef=88)
      Collection`1+items = MemberReference(IdRef=89)
@12655
  ClassWithMembers LibraryId=5 ObjectId=56 Name=System.Collections.ObjectModel.ObservableCollection`1[[Extron.Configuration.Contracts.Assets.Drivers.IDriverModelAsset, Extron.Configuration.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]:
      _monitor = MemberReference(IdRef=90)
      Collection`1+items = MemberReference(IdRef=91)
@12915
  ClassWithMembers LibraryId=5 ObjectId=60 Name=System.Collections.ObjectModel.ObservableCollection`1[[Extron.Configuration.Contracts.Assets.Automation.IParamAsset, Extron.Configuration.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]:
      _monitor = MemberReference(IdRef=92)
      Collection`1+items = MemberReference(IdRef=93)
@13172
  ClassWithId ObjectId=64 Name=System.Collections.ObjectModel.ObservableCollection`1[[Extron.Configuration.Contracts.Assets.IAsset, Extron.Configuration.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]:
      _monitor = MemberReference(IdRef=20)
      Collection`1+items = MemberReference(IdRef=21)


如果您首先导入驱动程序的库,则可以使用某些.NET函数来加载文件。否则,您可以使用规范(非常易于阅读)来分解文件并提取所需的内容。


如您所述,其中嵌套了更多文件。因此,您的第一步应该是解析序列化的流以提取所有内容,然后解析每个类成员的内容(其中一些是完整的文件,例如PDF和PKP文件)。

评论


感谢您的见解!我已经安装了Visual Studio for Desktop,但并不熟悉它,但是您能够共享解析器或列出以类似于您的转储格式打开文件的步骤吗?

–斯科特
15年1月12日在8:40

@斯科特:当然可以;我已将代码上传到GitHub。请记住,我只是解析了格式的一小部分,足以显示上面的内容。您可能需要扩展它以适用于整个文件。

–nneonneo
15年1月12日在18:03

谢谢!我希望python脚本对我有意义。 :)

–斯科特
15年1月13日在5:42

#2 楼

通常,我不相信Google搜索“ xyz文件格式”,因为它们会返回各种不道德的“如果您有xyz文件,请在此处下载我们的注册表清理器”网站。但是在这种情况下,链接之一是http://extension.nirsoft.net/pkp,该文件声称.pkp文件可能是Visual Studio打包项目-实际上,鉴于文件内容,这听起来很明智。

此外,文件中的字符串之一是它曾经拥有的完整路径:\usa-home10\home\wes minner\programming\reviews\nec_1_548 [nec lt280]\finished\nec_1_548_v 1_0_0.pkp,并且许多字符串都包含公司名称Extron。搜寻wes minner extron的人的这个LinkedIn个人资料,其工作描述为“使用Python编写和查看设备驱动程序”。

我建议您尝试以下操作之一:


获取Visual Studio的副本,并检查它是否可以将您的文件导入为项目文件
使用LinkedIn个人资料联系创建文件的人,并询问他文件的类型;这可能比使用公司的官方渠道之一产生更好的结果。

似乎有时也有非技术性的逆向工程方法...

评论


感谢Guntram的额外提示!我尝试使用Visual Studio打开文件,但没有走运,它显示的内容与我使用HexEdit打开文件时相同。我怀疑那些代码块(python和PDF)是用我不知道的东西组合和打包的。

–斯科特
2015年1月5日14:05

关于您的建议,请联系做出此决定的开发人员,当我用尽所有选择时,我将尽力做到这一点。但我怀疑他是否会回答,因为在我看来,该驱动程序的目的是使它晦涩难懂,以免阻止修改,否则它将以易于编辑的XML或JSON文件形式包含键值对信息。我可能又错了。

–斯科特
2015年1月5日14:09