我现在已经连续第二天与它斗争了。没有真正提供的代码片段,因为我不知道这个异常发生在哪里。我有这个 Arachni 安全扫描工具(用ruby编写;可以找到here),当我尝试在网站上启动它时,它会抛出错误消息{{ 1}}
然后有一个巨大的堆栈跟踪,并没有告诉我任何有用的东西:
[utilities#exception_jail:428] [Encoding::CompatibilityError] incompatible encoding with this operation: UTF-16
只是为了增加+2美分 - 我对Ruby完全不熟悉并且对错误处理系统了解不多。我曾尝试在网上进行研究并得知这个特殊的错误会被抛出一次2个不同的编码英语 - 异类字符串(例如 [-] [utilities#exception_jail:428] D:/arachni-1.5.1-0.5.12-windows-x86_64/system/ruby/lib/ruby/gems/2.2.0/gems/arachni-1.5.1/lib/arachni/parser/nodes/with_value.rb:22:in `strip'
[-] [utilities#exception_jail:428] D:/arachni-1.5.1-0.5.12-windows-x86_64/system/ruby/lib/ruby/gems/2.2.0/gems/arachni-1.5.1/lib/arachni/parser/nodes/with_value.rb:22:in `value='
[-] [utilities#exception_jail:428] D:/arachni-1.5.1-0.5.12-windows-x86_64/system/ruby/lib/ruby/gems/2.2.0/gems/arachni-1.5.1/lib/arachni/parser/nodes/with_value.rb:18:in `initialize'
[-] [utilities#exception_jail:428] D:/arachni-1.5.1-0.5.12-windows-x86_64/system/ruby/lib/ruby/gems/2.2.0/gems/arachni-1.5.1/lib/arachni/parser/sax.rb:58:in `new'
[-] [utilities#exception_jail:428] D:/arachni-1.5.1-0.5.12-windows-x86_64/system/ruby/lib/ruby/gems/2.2.0/gems/arachni-1.5.1/lib/arachni/parser/sax.rb:58:in `text'
[-] [utilities#exception_jail:428] D:/arachni-1.5.1-0.5.12-windows-x86_64/system/ruby/lib/ruby/gems/2.2.0/gems/arachni-1.5.1/lib/arachni/parser.rb:70:in `sax_html'
[-] [utilities#exception_jail:428] D:/arachni-1.5.1-0.5.12-windows-x86_64/system/ruby/lib/ruby/gems/2.2.0/gems/arachni-1.5.1/lib/arachni/parser.rb:70:in `block in parse'
[-] [utilities#exception_jail:428] D:/arachni-1.5.1-0.5.12-windows-x86_64/system/ruby/lib/ruby/gems/2.2.0/gems/arachni-1.5.1/lib/arachni/support/cache/base.rb:108:in `call'
[-] [utilities#exception_jail:428] D:/arachni-1.5.1-0.5.12-windows-x86_64/system/ruby/lib/ruby/gems/2.2.0/gems/arachni-1.5.1/lib/arachni/support/cache/base.rb:108:in `fetch'
[-] [utilities#exception_jail:428] D:/arachni-1.5.1-0.5.12-windows-x86_64/system/ruby/lib/ruby/gems/2.2.0/gems/arachni-1.5.1/lib/arachni/parser.rb:66:in `parse'
[-] [utilities#exception_jail:428] D:/arachni-1.5.1-0.5.12-windows-x86_64/system/ruby/lib/ruby/gems/2.2.0/gems/arachni-1.5.1/lib/arachni/parser.rb:243:in `document'
[-] [utilities#exception_jail:428] D:/arachni-1.5.1-0.5.12-windows-x86_64/system/ruby/lib/ruby/gems/2.2.0/gems/arachni-1.5.1/lib/arachni/parser.rb:423:in `paths'
[-] [utilities#exception_jail:428] D:/arachni-1.5.1-0.5.12-windows-x86_64/system/ruby/lib/ruby/gems/2.2.0/gems/arachni-1.5.1/lib/arachni/page.rb:309:in `paths'
[-] [utilities#exception_jail:428] D:/arachni-1.5.1-0.5.12-windows-x86_64/system/ruby/lib/ruby/gems/2.2.0/gems/arachni-1.5.1/lib/arachni/framework/parts/data.rb:207:in `push_paths_from_page'
[-] [utilities#exception_jail:428] D:/arachni-1.5.1-0.5.12-windows-x86_64/system/ruby/lib/ruby/gems/2.2.0/gems/arachni-1.5.1/lib/arachni/framework/parts/audit.rb:98:in `audit_page'
[-] [utilities#exception_jail:428] D:/arachni-1.5.1-0.5.12-windows-x86_64/system/ruby/lib/ruby/gems/2.2.0/gems/arachni-1.5.1/lib/arachni/framework/parts/audit.rb:228:in `audit_queues'
[-] [utilities#exception_jail:428] D:/arachni-1.5.1-0.5.12-windows-x86_64/system/ruby/lib/ruby/gems/2.2.0/gems/arachni-1.5.1/lib/arachni/framework/parts/audit.rb:202:in `block in audit'
[-] [utilities#exception_jail:428] D:/arachni-1.5.1-0.5.12-windows-x86_64/system/ruby/lib/ruby/gems/2.2.0/gems/arachni-1.5.1/lib/arachni/framework/parts/audit.rb:177:in `loop'
[-] [utilities#exception_jail:428] D:/arachni-1.5.1-0.5.12-windows-x86_64/system/ruby/lib/ruby/gems/2.2.0/gems/arachni-1.5.1/lib/arachni/framework/parts/audit.rb:177:in `audit'
[-] [utilities#exception_jail:428] D:/arachni-1.5.1-0.5.12-windows-x86_64/system/ruby/lib/ruby/gems/2.2.0/gems/arachni-1.5.1/lib/arachni/framework.rb:117:in `block in run'
[-] [utilities#exception_jail:428] D:/arachni-1.5.1-0.5.12-windows-x86_64/system/ruby/lib/ruby/gems/2.2.0/gems/arachni-1.5.1/lib/arachni/utilities.rb:425:in `call'
[-] [utilities#exception_jail:428] D:/arachni-1.5.1-0.5.12-windows-x86_64/system/ruby/lib/ruby/gems/2.2.0/gems/arachni-1.5.1/lib/arachni/utilities.rb:425:in `exception_jail'
[-] [utilities#exception_jail:428] D:/arachni-1.5.1-0.5.12-windows-x86_64/system/ruby/lib/ruby/gems/2.2.0/gems/arachni-1.5.1/lib/arachni/framework.rb:117:in `run'
[-] [utilities#exception_jail:428] D:/arachni-1.5.1-0.5.12-windows-x86_64/system/ruby/lib/ruby/gems/2.2.0/gems/arachni-1.5.1/ui/cli/framework.rb:80:in `block in run'
经过 UTF-8 和< strong> UTF-16 编码系统)正相互比较。我试图想出可能导致这种情况的猜测:
ё
,这是根据this的最新稳定版本。 Arachni使用 UTF-8 编码系统,与Ruby的编码系统没有区别如果有人遇到过类似的东西(对于Arachni工具没有必要,但可能是一般的)并且可以导航到正确的方向,那将节省我生命的一半。