Function Hook_health_check_security->isLikelyWebShell

Definitions

sources/hooks/systems/health_checks/security.php

  • Find if a file is a likely webshell.
  • Visibility: protected
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: string

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$file PATH No No required parameter N/A N/A Relative file path
$c string No No required parameter N/A N/A File contents

Returns

  • Trigger that found it (null: nothing)
  • Type: ?string
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Find if a file is a likely webshell.
 *
 * @param  PATH $file Relative file path
 * @param  string $c File contents
 * @return ?string Trigger that found it (null: nothing)
 */

protected function isLikelyWebShell(string $file, string $c) : ?string