Binwalk How to install and use Windows

Source: Internet
Author: User

78116795

.

Binwalk How to install and use Windows

Binwalk is a file analysis tool designed to assist researchers in the analysis, extraction and reverse engineering of documents. Easy to use, fully automated scripts, and through custom signatures, extraction rules and plug-in modules, and importantly, can be easily extended.

The above is the introduction of Binwalk. Binwalk in the Kali installed by default, in other versions of the installation of Linux is also very simple, and in Windows sleepy, novice Baidu under the "Binwalk Windows installation" and other words are not necessarily a solution.

and I also searched on the internet for a long time, basically did not see the Windows common exe, MSI form, only find tar.gz form, after decompression for docs and src folder, SRC has a python common setup.py, under the cmd input setup.py Install after the installation magic, after looking for a python-magic module installed, import magic when the hint is missing libmagic, after a tinker, I did not get.

After, I opened https://pypi.python.org/pypi to search Binwalk module, is also only tar.gz, after decompression, setup.py install, it is not prompted what error, installation all the way smoothly, Unfortunately, I went to the Python installation directory, I found an egg file and a binwalk suffix file, no other, also can not afford the feeling.

----------------------------------------------------------------------------------------

Well, formally introduced in Windows installation of the way, with Binwalk on GitHub on the project to install its source code is the simplest, the introduction said that Windows optional Feature support is the most poor, nevertheless, still enough.

GitHub Project: Https://github.com/devttys0/binwalk

Binwalk's Wiki:https://github.com/devttys0/binwalk/wiki

----------------------------------------------------------------------------------------

You need to have Python installed before installing on Windows (version 2, 3 doesn't matter)

Enter in cmd

git clone https://github.com/devttys0/binwalkcd binwalkpython setup.py Install

(If you do not have Git installed, you can directly access the project address, click on the inside of the download zip download and then unzip it)

After installation, input import Binwalk in Python will not error, indicating that you can call Binwalk in Python (use the wiki provided by yourself), to use to achieve our analysis of the file.

But we like the use of Linux Binwalk, but also want to achieve the same effect on Windows, the Python installation directory in script that the Binwalk file (no suffix) is actually a py file, In the script folder to run it with Python, you can achieve the effect, but in the script folder outside the worry, because the CMD can not run the file without suffix, and Python binwalk this way does not work (because the path must be specified Binwalk, But if the designation is also very troublesome, and if modified to binwalk.py, a run will error, in short headache.

----------------------------------------------------------------------------------------

I first seriously write blog, poor wording, if there is insufficient to write, and there is a better way also please advise, thank you.

Here is my own solution, is to write a bat batch file to run.

Create a new folder and add the path of the folder to the system variable path (which can be run directly in cmd). )

Create a new binwalk.bat file in the folder

@echo Offecho * suggest:you ' d better to input the parameters enclosed in double Quotes.echo * made by Pcatpython "%~dp0\p _binwalk.py "%1%2%3%4%5%6%7%8%9

Create a new p_binwalk.py file (it is very simple to write, it may be rewritten when the ability grows)

#-*-Coding:utf-8-*-# author:pcat# http://pcat.cnblogs.comimport sysimport binwalkif __name__ = = "__main__":    lst=s YS.ARGV    If Len (LST) <2:        print ("No files.")        Exit ()    try:        if lst[1][0]== '-':            Binwalk.scan (*lst[2:],signature=lst[1])        elif lst[1][0]!= '-':            Binwalk.scan (*lst[1:],signature=true)    except:        Pass

As long as the path to this folder exists in the system variable path and the 2 files, then you can use Binwalk in cmd like Linux.

:)

-- UPDATE------------------------------------------------------------------------- - - - - - - - - - - -

* Another type of single-file notation

Imitate my own another article Uncompyle2 Windows installation and Use methods

Create a new folder and add the path of the folder to the system variable path (which can be run directly in cmd). )

Create a new binwalk.bat file in the folder (in fact, whatever you like, you can name it)

:: Author: [Email protected]:: Http://pcat.cnblogs.com@echo offecho * suggest:you ' d better to input the parameters Enclos Ed in Double Quotes.echo * made by Pcatecho * ***********************************************************************if Defined python_home (    python "%python_home%\scripts\binwalk"%1%2%3%4%5%6%7%8%9) Else (    echo "You need to s ET python_home ")

(in which you have to set the Python_home this system variable, if your python2.7 is installed by default, the general Python_home set C:\Python27)

As long as the path to this folder exists in the system variable path and the bat file, then you can use Binwalk in cmd like Linux.

--UPDATE------------------------------------------------------------------------- - - - - - - - - - - -

* Binwalk Common commands

-e decomposition of the compressed package

Binwalk-e Pcat.bin

-D or--dd break down some type of file (enclosed in double quotes in Windows)

Binwalk-d=jpeg Pcat.bin

-m recursive decomposition of scanned files (to be used with-e or-D)

Binwalk-em Pcat.bins

Binwalk How to install and use Windows

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.