These questions are obviously off-topic, but that doesn't mean they do not get posted at a steady rate.
It would be helpful if there was a canonical reference (such as, oh, I suppose, this question? Provided I get good answers) explaining how
- posting malicious code on Stack Overflow is not welcome
- attempting to remove malware by hoping to find and revert all changes made by the intruder is misdirected and a fine example of the XY Problem
- the only sane solution is to roll back to a clean check-out from version control or (if you don't have version control, and have not yet been fired or shot for that reason) known-good backups, of course only after you have identified and patched the intrusion vector
The search https://stackoverflow.com/search?q=hacked+site currently seems to bring up a high-precision sample of these questions; but to keep this question self-contained, I am linking a few here as examples.
- Best methods to clean up a hacked site with no clean version available? (unusually good question for this category!)
- what does this script do? - hacked site
- https://stackoverflow.com/questions/25813662/wordpress-site-hacked