提交 cb6c17a6 authored 作者: Brian West's avatar Brian West

Tired of this

上级 f03e9fe8
#!/usr/bin/perl
# Fsck Friendly Scanner
#
use Data::Dumper;
require ESL;
$| = 1;
my $c = new ESL::ESLconnection("localhost", "8021", "ClueCon");
$c->events("plain", "CUSTOM sofia::register");
while ($c->connected()) {
my $event = $c->recvEvent();
my $user_agent = $event->getHeader('user-agent');
my $network_ip = $event->getHeader('network-ip');
if ($user_agent =~ m/friendly-scanner/) {
system("/sbin/iptables -I INPUT -s $network_ip -j DROP");
}
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论