You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#!/usr/bin/python
# coding:utf-8
from pocsuite.api.cannon import Cannon
info = {"pocname": "modules\dlink_command_php_exec_noauth.py", #应该是py文件名
"pocstring": "dlink_command_php_exec_noauth.py",
"mode": "verify"
}
target = "www.baidu.com"
invoker = Cannon(target, info) # 生成用来引用 Pocsuite 的实例
result = invoker.run() # 调用 Pocsuite, result 保存了 Pocsuite 执行的返回结果
print result
遇到的错误如下:
Traceback (most recent call last):
dlink_command_php_exec_noauth.py
File "D:/BitTorrentSync/Python_Code/scoutproject/scout/callpocsuite.py", line 9, in <module>
invoker = Cannon(target, info) # 生成用来引用 Pocsuite 的实例
<code object <module> at 025185C0, file "dlink_command_php_exec_noauth.py", line 1>
File "C:\Python27\lib\site-packages\pocsuite-2.0.4.1-py2.7.egg\pocsuite\api\cannon.py", line 45, in __init__
self.registerPoc()
File "C:\Python27\lib\site-packages\pocsuite-2.0.4.1-py2.7.egg\pocsuite\api\cannon.py", line 62, in registerPoc
importer.load_module(self.moduleName)
File "C:\Python27\lib\site-packages\pocsuite-2.0.4.1-py2.7.egg\pocsuite\lib\core\common.py", line 60, in load_module
exec code in mod.__dict__ #exec语句将字符串str当成有效Python代码来执行 ,in后边的内容是指定该语句的全局和局部命名空间。
File "dlink_command_php_exec_noauth.py", line 1, in <module>
NameError: name 'dlink_command_php_exec_noauth' is not defined
The text was updated successfully, but these errors were encountered:
我使用了以下代码调用 cannon API :
遇到的错误如下:
The text was updated successfully, but these errors were encountered: