You are here

function httpbl_help in http:BL 8

Same name and namespace in other branches
  1. 7 httpbl.module \httpbl_help()

Implements hook_help().

File

./httpbl.module, line 40
Implements Project Honeypot's http:BL for Drupal. It provides IP-based blacklisting through http:BL and allows linking to a honeypot.

Code

function httpbl_help($route_name, RouteMatchInterface $route_match) {
  switch ($route_name) {
    case 'help.page.httpbl':
      $url = Url::fromUri('http://www.projecthoneypot.org/httpbl.php');
      $output = '';
      $output .= '<h3>' . t('About Http:BL') . '</h3>';
      $output .= '<p>' . t('The Http:BL module helps you block nuisance traffic from your site by implementing "http:BL," a blocking service that\'s provided externally by Project Honey Pot. You can also return the favor and make Project Honeypot better, by capturing and reporting nascent evil doers that are not yet in Project Honey Pot\'s database. For more in-depth information, visit the <a href="@httpbl" target=_blank>Project Honey Pot http:BL homepage</a>.', array(
        '@httpbl' => $url
          ->getUri(),
      )) . '</p>';
      $output .= '<h3>' . t('Uses') . '</h3>';
      $output .= '<dl>';
      $output .= '<dt>' . t('<strong>Block all malicious traffic before it gets into your site (page request blocking)</strong>') . '</dt>';
      $output .= '<dd>' . t('Project Honey Pot tracks harvesters, comment spammers, and other suspicious visitors to websites. Http:BL allows website administrators to take advantage of the data generated by Project Honey Pot in order to keep suspicious and malicious web robots off their sites, by providing data back about the IP addresses of visitors to your website. Http:BL will grey-list or blacklist traffic, based on Project Honey Pot\'s assessment of risk.  Blacklisted traffic can optionally be Auto-Banned (added to banned IPs in the Core Ban module), banning them from future visits.') . '</dd>';
      $output .= '<dt>' . t('<strong>Session White-listing</strong>') . '</dt>';
      $output .= '<dd>' . t('Because sometimes innocent, real people get stuck with tarnished IPs, Http:BL gives people with grey-listed IPs the opportunity to white-list themselves on a per session basis, by responding to a simple challenge that spiders and spam-bots will usually fail.') . '</dd>';
      $output .= '<dt>' . t('<strong>Administer Evaluated Hosts (new in D8!)</strong>') . '</dt>';

      // @todo More later.
      $output .= '<dd>' . t('Now in D8, IP data is captured as evaluated Host entities, allowing them to be managed without direct database access.') . '</dd>';
      $output .= '<dt>' . t('<strong>Identify blocked traffic</strong>') . '</dt>';
      $output .= '<dd>' . t('Http:BL includes log messaging and Views reporting capability that will help you identify grey and blacklisted traffic, and review those IPs against Project Honeypot\'s database to see why they were banned.  In other words, if you\'re ever asked, "Why was this person blocked?" (a sensitive issue in some environments), you have resources available to help you answer the question, armed with factual details. If your site receives extremely heavy traffic, you can improve performance by keeping logging options set to a minimum level. You\'ll still have Views reporting access for revealing the blocked traffic. ') . '</dd>';
      $output .= '<dt>' . t('<strong>Block Comments only</strong>') . '</dt>';
      $output .= '<dd>' . t('Http:BL can be set for only checking and blocking comments only from malicious IPs.  Instead of refusing those IPs access to your site, just deny them access to commenting.  Any comments added by malicious IPs will be over-written with a message indicating the comment was blocked, for easy identification by admin and comment approvers.') . '</dd>';
      $output .= '<dt>' . t('<strong>Set up a Honey Pot (spammer trap)</strong>') . '</dt>';
      $output .= '<dd>' . t('You can set up honeypot traps (hidden links) that will report any IPs clicking them to Project Honeypot.  You give back to the project by helping to identify new and/or previously unidentified nuisance IPs that are not yet in the Project Honeypot database. Depending on your account settings (at Project Honeypot), you may receive notices letting you know that your site caught a new trouble-maker.  Stick a feather in your cap because you helped eliminate garbage not only from your site, but other\'s as well!') . '</dd>';
      $url = Url::fromUri('https://www.drupal.org/project/httpbl/issues/2992062');
      $output .= '<h3>' . t('Issues/Restrictions') . '</h3>';
      $output .= '<dl>';
      $output .= '<dt>' . t('<strong><a href="@httpbl" target=_blank>Issue #2992062</a>', array(
        '@httpbl' => $url
          ->getUri(),
      )) . '</strong></dt>';
      $output .= '<dd>' . t('Fatal errors have been reported when using this module for blocking page requests while the core extension Internal Page Cache (page_cache) is enabled.  Configuration for blocking page requests while using page_cache is still currently allowed (not prevented), but not recommended.</ br><strong>Recommended restrictions:</strong> Configure Http:BL to \'Block Comments only\' (see above) or uninstall Internal Page Cache if page request blocking is desired.<p>There are no reported conflicts with core extension Dynamic Internal Page Cache (dynamic_page_cache) when using Http:BL configured to block all page requests.</p>') . '</dd>';
      return $output;
    case 'httpbl.admin_config':
      $output = '<p>' . t('Configure http:BL settings for blocking page requests or comment submissions, to limit malicious traffic.') . '</p>';
      return $output;
  }
  return;
}