mirror of
https://github.com/pavel-odintsov/fastnetmon.git
synced 2024-09-21 02:17:16 +00:00
Adjusted tool naming
This commit is contained in:
parent
495ecda9e4
commit
964f1f1e3f
@ -83,7 +83,7 @@ switch($ACTION_ATTACK){
|
||||
break;
|
||||
case 'unban':
|
||||
try{
|
||||
$desc = 'FastNetMon Guard: IP '. $IP_ATTACK .' remove from blacklist.';
|
||||
$desc = 'FastNetMon Community: IP '. $IP_ATTACK .' remove from blacklist.';
|
||||
$conn->connect(); //Try conect or catch NetconfException (Wrong username, Timeout, Device not found, etc)
|
||||
$locked = $conn->lock_config(); //Equivalent of "configure exclusive" on Juniper CLI
|
||||
if($locked){
|
||||
|
@ -79,7 +79,7 @@ if ( $API->connect( $cfg[ ip_mikrotik ], $cfg[ api_user ], $cfg[ api_pass ] ) )
|
||||
}
|
||||
if ( $ACTION_ATTACK == "unban" ) {
|
||||
// remove the blackhole rule
|
||||
$comment_rule = 'FastNetMon Guard: IP ' . $IP_ATTACK . ' remove from blacklist ';
|
||||
$comment_rule = 'FastNetMon Community: IP ' . $IP_ATTACK . ' remove from blacklist ';
|
||||
$API->write( '/ip/route/print', false );
|
||||
$API->write( '?dst-address=' . $IP_ATTACK . "/32" );
|
||||
$ID_ARRAY = $API->read();
|
||||
|
@ -75,7 +75,7 @@ elif action == "ban":
|
||||
|
||||
sys.exit(0)
|
||||
elif action == "attack_details":
|
||||
subject = "Fastnetmon Guard: IP %(client_ip_as_string)s blocked because %(data_direction)s attack with power %(pps_as_string)d pps" % {
|
||||
subject = "Fastnetmon Community: IP %(client_ip_as_string)s blocked because %(data_direction)s attack with power %(pps_as_string)d pps" % {
|
||||
'client_ip_as_string': client_ip_as_string,
|
||||
'data_direction': data_direction,
|
||||
'pps_as_string' : pps_as_string,
|
||||
|
Loading…
Reference in New Issue
Block a user