您可能需要安装My :: Module模块

时间:2016-05-21 01:56:22

标签: java perl

我现在在Web漏洞扫描程序项目中工作,所以我将我的perl脚本运行到我的java中perl脚本是来自kali linux的uniscan开源工具,所以当我点击去运行脚本时出现此消息

  

无法在@INC中找到Uniscan / Crawler.pm(您可能需要安装   Uniscan :: Crawler模块)(@ INC包含:./ Uniscan C:/ Perl64 / site / lib   C:/ Perl64 / lib。)在C:\ uniscan \ uniscan.pl第25行.BEGIN失败 - 编译   在test \ uniscan.pl第25行中止。

然而,当我运行hello world脚本时,它在我的控制台中正确显示没有问题。所以这是我在java中调用perl脚本的代码

try {
                String[] commande = {"perl", "C:\\uniscan\uniscan.pl"};
                Process p = Runtime.getRuntime().exec(commande);
                AfficheurFlux fluxSortie = new AfficheurFlux(p.getInputStream());
                AfficheurFlux fluxErreur = new AfficheurFlux(p.getErrorStream());

                new Thread(fluxSortie).start();
                new Thread(fluxErreur).start();

                p.waitFor();
            } catch (IOException e) {
                e.printStackTrace();
            } catch (InterruptedException e) {
                e.printStackTrace();
            }

并且uniscan的代码是here

我需要帮助,我被阻止是为了我下周的最后学位

1 个答案:

答案 0 :(得分:1)

程序依赖于在模块搜索路径(<div class="container"> first number : <input class="form-control" id="num1" /> <br>second number : <input class="form-control" id="num2" /> <br> <select id="mathtype"> <option value="add">addition</option> <option value="sub">subtraction</option> <option value="mul">multiplication</option> </select> <br> <br> <button class="btn btn-primary" onclick="submit()">submit</button> <br> <br> <input type="text" id="output"> </div>)中找到的脚本目录,但不能确保这一点。

如果您从脚本的目录运行脚本,它可以正常工作,因为默认情况下@INC位于.。但是您从不同的目录运行脚本。

删除以下无用的行:

@INC

将其替换为以下内容:

use lib "./Uniscan";
相关问题