我不能用ettercap过滤器。我正在写我能想到的最简单的过滤器:
if (ip.proto == TCP){
msg("Ran Filter\n");
}但即使这样也行不通。当我使用etterfilter编译它并运行:
sudo ettercap -F /tmp/filter.ef -T -M arp -i wlan1 /192.168.1.6/ //没有打印msg。通过分组可视化,我确实看到了TCP数据包,但是即使ettercap说“从/tmp/filter.ef加载的内容过滤器”,过滤器似乎也不起作用。
为了解决这个问题,我尝试启用ip_forward,并尝试删除/etc/etter.conf中的"#“号,这样它将使用iptables作为它的redir_command (第168-169行)
你知道如何使过滤起作用吗?
我在Ubuntu12.10上使用ettercap NG-0.7.4.2
发布于 2013-02-08 14:01:45
终于找到了答案。问题是因为ettercap中有个bug!从手册页:
You can also load a script without enabling it by appending :0 to the filename根据守则:
/* enable a loaded filter script? */
uint8_t f_enabled = 0;
/* is there a :0 or :1 appended to the filename? */
if ( (opt_end-optarg >=2) && *(opt_end-2) == ':' ) {
*(opt_end-2) = '\0';
f_enabled = !( *(opt_end-1) == '0' );
}从代码中可以看到,与手册页的内容相反,您必须将":1“附加到过滤器的文件名中,以便加载它。否则,不使用筛选器。
那为什么这事会发生在我身上?这是因为我使用的是0.7.4.2版本,这是我在Ubuntu上apt-get install ettercap时下载的版本。这是反对ettercap网站的,声明"The latest Ettercap release is: 0.7.4.1"
解决该错误的修补程序被发送给ettercap开发人员。
https://askubuntu.com/questions/251866
复制相似问题