function drush_httpbl_mho in http:BL 8
Command handler. Make dummy evalutated hosts (for testing).
File
- drush/
httpbl.drush.inc, line 152 - Drush integration for the httpbl module.
Code
function drush_httpbl_mho($max = 255, $status = 0, $offset = 300, $pattern = '127.0.1.') {
$limit = 255;
$max <= $limit ?: ($max = $limit);
$logMessage = t('Making @max hosts of status @stat to expire in @time seconds, with pattern @pat.', [
'@max' => $max,
'@stat' => $status,
'@time' => $offset,
'@pat' => $pattern,
]);
// Get Evaluator service and whitelist this IP.
$httpblEvaluator = \Drupal::service('httpbl.evaluator');
$command = $httpblEvaluator
->makeHosts($max, $status, $offset, $pattern);
drush_log(dt($logMessage), 'ok');
return $command;
}