我正在研究这本书:实用安全自动化和测试。在第 [124] 页上,有一个使用 RIDE 和 SSHLibrary 的脚本。
但我使用的是 Eclipse,所以我尝试安装它。
点安装轮
pip install --upgrade robotframework-sshlibrary
成功了,现在您可以开始编辑 .robot 脚本了。
我做到了这一点:(所以它与书不同,但这适用于 Eclipse)
*** Settings ***
Library SSHLibrary
*** Variables ***
${HOST_URL} http://demo.testfire.net
${output}= Execute Command python sqlmap.py -u ${HOST_URL} --batch --banner
*** Test Cases ***
SQL Injection Testing
Should Not Contain ${output} vulnerable
现在的问题是:它说“通过”,但是当我更改 host_url 时我确信它应该失败,它也说“通过”。换句话说:它似乎没有检查或做任何事情。
我不知道我在这里做错了什么。需要帮忙。