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

831 Views Asked by At

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.

2

There are 2 best solutions below

0
Abhinav Kinagi On BEST ANSWER

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]+

0
spoorcc On

Since version 2.0.16 released 2021-05-31 flawfinder also works on windows as expected.