Category Archives: Linux Commands

What’s happening on MySQL: MySQL commands from the command line

A site is seeing issues that are most likely their bad code (known history), lots of errant php and loads of db activity, so to check this out I used PHPmyadmin on the server and a bunch of commands from here, so thanks to that person for making that page 🙂


php file infection

this will strip a text section out of all files when run the the directory

find . -name “*.php” -exec sed -i ‘s/<?php $irmsykfenq.*$soyyhllyjf-1; ?>//’ ‘{}’ \;

the blue text is your from and to, in that you should have an example of the inserted text to copy the start and the end section, kinda like

$irmsykfenq. lots of clever code here $soyyhllyjf-1;

so you run that and it removes your definers and everything in between.