Python:scapy的输出无法存储在文本文件中?

发布于 2024-09-14 06:36:38 字数 1730 浏览 2 评论 0原文

从命令提示符 (Windows XP) 运行 scapy 时,无法存储输出。当在命令提示符下执行以下命令时:

scapy >C:\dir.txt 

出现以下错误:

C:\automation\atg\GeneralFiles_AC\ScapyExe>scapy >C:\dir.txt INFO:
Can't import python gnuplot wrapper . Won't be able to plot. INFO:
Can't import PyX. Won't be able to use psdump() or pdfdump(). INFO: No
IPv6 support in kernel WARNING: No route found for IPv6 destination :: (no default route?)
C:\Python26\lib\site-packages\scapy\crypto\cert.py:6:
DeprecationWarning?: the sh a module is deprecated; use the hashlib module instead
import os, sys, math, socket, struct, sha, hmac, string, time 
C:\Python26\lib\site-packages\scapy\crypto\cert.py:7: DeprecationWarning?: The popen2 module is deprecated. Use the subprocess module. 
import random, popen2, tempfile 
Traceback (most recent call last): 
File "C:\Python26\Scripts\\scapy", line 25, in <module> 
interact() 
File "C:\Python26\lib\site-packages\scapy\main.py", line 293, in interact 
readline.read_history_file(conf.histfile) 
File "C:\Python26\lib\site-packages\pyreadline\rlmain.py", line 183, in read_history_file 
self._history.read_history_file(filename) 
File "C:\Python26\lib\site-packages\pyreadline\lineeditor\history.py", line 70, in read_history_file 
self.add_history(lineobj.ReadLineTextBuffer?(ensure_unicode(line.rstrip()))) 
File "C:\Python26\lib\site-packages\pyreadline\unicode_helper.py", line 20, in ensure_unicode 
return text.decode(pyreadline_codepage, "replace") 
TypeError?: decode() argument 1 must be string, not None 

C:\automation\atg\GeneralFiles_AC\ScapyExe> 

系统规格:
操作系统:Windows XP
scapy 版本:2.1.1-dev(使用 scapy-7a97e2f3db67.zip)
Python:2.6(PythonWin?)

When runnning scapy from command prompt (windows XP), the output cannot be stored. When the following command is executed in command prompt:

scapy >C:\dir.txt 

The following error shows up:

C:\automation\atg\GeneralFiles_AC\ScapyExe>scapy >C:\dir.txt INFO:
Can't import python gnuplot wrapper . Won't be able to plot. INFO:
Can't import PyX. Won't be able to use psdump() or pdfdump(). INFO: No
IPv6 support in kernel WARNING: No route found for IPv6 destination :: (no default route?)
C:\Python26\lib\site-packages\scapy\crypto\cert.py:6:
DeprecationWarning?: the sh a module is deprecated; use the hashlib module instead
import os, sys, math, socket, struct, sha, hmac, string, time 
C:\Python26\lib\site-packages\scapy\crypto\cert.py:7: DeprecationWarning?: The popen2 module is deprecated. Use the subprocess module. 
import random, popen2, tempfile 
Traceback (most recent call last): 
File "C:\Python26\Scripts\\scapy", line 25, in <module> 
interact() 
File "C:\Python26\lib\site-packages\scapy\main.py", line 293, in interact 
readline.read_history_file(conf.histfile) 
File "C:\Python26\lib\site-packages\pyreadline\rlmain.py", line 183, in read_history_file 
self._history.read_history_file(filename) 
File "C:\Python26\lib\site-packages\pyreadline\lineeditor\history.py", line 70, in read_history_file 
self.add_history(lineobj.ReadLineTextBuffer?(ensure_unicode(line.rstrip()))) 
File "C:\Python26\lib\site-packages\pyreadline\unicode_helper.py", line 20, in ensure_unicode 
return text.decode(pyreadline_codepage, "replace") 
TypeError?: decode() argument 1 must be string, not None 

C:\automation\atg\GeneralFiles_AC\ScapyExe> 

system specifications:
OS: windows XP
scapy version: 2.1.1-dev (using scapy-7a97e2f3db67.zip)
Python: 2.6 (PythonWin?)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

音盲 2024-09-21 06:36:38

请在此处查看有关安装 Windows 可选软件包的文档

Check out the documentation on installing optional packages for Windows here.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文