enjoiz/XXEinjector

undefined method `chomp' for nil:NilClass

xiaoyanguoke opened this issue · 4 comments

ruby XXEinjector.rb --host=192.168.1.45 --path=/etc --file=./req.txt
出现如下问题:
XXEinjector.rb:238:in block in <main>': undefined method chomp' for nil:NilClass (NoMethodError)
from XXEinjector.rb:237:in loop' from XXEinjector.rb:237:in

Request file needs to be well-formated. The easiest way is to export HTTP request to file from tools like Burp Suite. If the issue persist please create new Issue and attach your request file as without it I cannot help.

@xiaoyanguoke 你解决了吗?

@hadesleejs 没有解决呢,没有去测试呢

XFSZ commented

@xiaoyanguoke @leejshades 这个是因为 那一行的判断 出错了,字符串为空的话 就没法chomp 但是他就是利用chomp 判断是不是 应该break 所以只要那个判断改了就行了
break if File.readlines($file)[z].chomp.empty
改成
break if File.readlines($file)[z].empty