Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
所以我想使用 sqlmap 制作一个自动 SQL 注入器。我想要做的是在发现一个 SQL 漏洞链接后,它将启动带有参数的 sqlmap [-u %s(vulnerable link)] 这很好。我想我会用 os.system 来做(如果有更好的方法请告诉我)。那部分没问题。 但在那之后,sqlmap 会为您提供数据库名称。如何捕获该数据库名称?或者也许将所有输出保存到一个 txt 文件并让它搜索数据库名称。(但它可能是坏的)
不确定它会对您有所帮助,但您可以导出 Python 脚本的所有 Python 输出。为此,您可以设置sys.stdout为文件对象。这里有一个例子:
sys.stdout
import sys sys.stdout = open('file', 'w') print 'test'