BugkuCTF: 眼见非实(ISCCCTF)

拿到文件发现没有扩展名:

linux下file命令输出:

Zip archive data, at least v2.0 to extract

是个zip压缩文件,在解压一波后打开出现个word:

对这个word文件进行file命令:

Zip archive data, at least v1.0 to extract

看来zip对文件的压缩是以v+数字代表的层数
解压后发现customXml文件夹,搜索一波,没有思路,至此,我就不会了

之后看了一波攻略,输入命令:

grep 'flag' -r 眼见非实

快速搜索在目录下面的含有关键字的文件:

                       grep -r 目录名

找到答案:

                 

CustomXMLPart存储数据

假设两种情形:

1、当有一些数据要使用,但不想让用户直接看到,常规的方式是放在一个表里,然后隐藏

2、当数据来自服务器、远端服务器,但文档要带到一个离线环境中使用

此时可以考虑在工作簿中创建一个CustomXMLPart,要创建它非常简单,可以使用CustomXMLParts接口的Add方法创建CustomXMLPart,CustomXMLPart接口和CustomXMLParts接口定义在 using Microsoft.Office.Core; 命名空间下,其中CustomXMLPart的定义如下:

 public interface _CustomXMLParts : _IMsoDispObj, IEnumerable
 {         
          dynamic Application { get; }
          int Count { get; }
          int Creator { get; }
          dynamic Parent { get; }
          CustomXMLPart this[object Index] { get; }
          CustomXMLPart Add(string XML = "", object SchemaCollection = Type.Missing);
          //Add方法的一个重要参数是接收一个XML文本
          IEnumerator GetEnumerator();
          CustomXMLPart SelectByID(string Id);
          CustomXMLParts SelectByNamespace(string NamespaceURI);
 }

经过一些函数操作可以将excel转化为xml文件:

表转化为xml文件,存在customXml文件夹下

猜你喜欢

转载自blog.csdn.net/changer_WE/article/details/85108567