Python: 为什么 flawfinder 模块在 cmd windows 中不工作?

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

Python flawfinder 模块在 bash 中工作但在 Windows 命令命令行中不工作。以下是我遵循的步骤:

  1. Python 安装路径 - C/Users/xyz/AppData/Local/Programs/Python/Python37-32/python

    pip install flawfinder

  2. 当我在命令行中输入 flawfinder 时,出现以下错误:

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

对于Windows推荐的方法是安装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.

但它也可以通过 运行 作为脚本与 python 一起使用。

  • 下载 flawfinder.py 脚本 from here
  • 运行 它像往常一样在您的 cmd 提示符中使用 python,

    python flawfinder [options] [source_code_file]+

自 2.0.16 版于 2021 年 5 月 31 日发布以来,flawfinder 也可按预期在 windows 上运行。