wzao1515's Blog

Week 2

Published: 06/06/2019

As described last week, this week I mainly focused on solving the environment setup and enhance the test files to support Windows commands. I have made a pull request at https://github.com/intel/cve-bin-tool/pull/146.

The thing that I did is that under Windows, the header (magic byte) of the compiled binary file is not same as it's in Linux, it is 'MZ\x90\x00'. Besides, the "rm" command should be replaced with "erase" under Windows.

In this week, I will try to rewrite "string" and "file" command in C and test them in both Linux and Windows. In Linux, I hope it could run the whole process and scan for different type of files like rpm, tar... And in Windows, since extractor is not implemented, I will just test its parsing functionality. After that, I will start implementing the extractor under Windows, the first goal would be zip. Some test cases are need, ideally would be curl. The problem that I might encounter is how to extend Python with C. There are two ways but I'm not sure which one would be ideal. I asked John for his help, so I might wait for him first.

View Blog Post

Week 1

Published: 05/29/2019

It's a great pleasure to work on this project! I talked to Terri and we fixed down this week's plan.

Earlier in this week, I set up the Windows environment for the binary tool, like installed Mingw for gcc, make, and some python modules. In the following days, I will work on comping up with Windows test cases. In addition, when I was testing the program, I found that previously it is using many subprocess calls like "rm", which is not compatible in Windows. Therefore, it would be ideal to modify those test files. My idea is to make an abstract test class first, and then when user runs the test, it will check the operating system first, and then decide to extend the subclass to test, which is exactly like the factory mode in design pattern.

Besides, we talked about future plans. Both we decide to keep the plan in proposal first, and we could adjust the plan according to needs. And the priority of the task might be changed since some tasks are not important like extracting an rpm file on Windows.

In the nutshell, I'm really excited! Definitely going to do a good job on this!

View Blog Post