Search code examples
pythonpython-3.xflawfinder

Python: Why flawfinder module is not working in cmd windows?


Python flawfinder module is working in bash but not working in Windows command commandline. Here are the steps I followed:

  1. Python installation path - C/Users/xyz/AppData/Local/Programs/Python/Python37-32/python

    pip install flawfinder

  2. When I type flawfinder in commandline, it gives below error:

    flawfinder is not recognized as an internal or external command, operable program or batch file.


Solution

  • For Windows the recommended way is to install Cygwin and install flawfinder on top of it. This is the usual way. From Docs,

    Flawfinder works on Unix-like systems (it’s been tested on GNU/Linux), and on Windows by using Cygwin.

    But it can also be made to work with python by running it as a script.

    • Download the flawfinder.py script from here
    • Run it with python as usual in your cmd prompt like,

      python flawfinder [options] [source_code_file]+