I have a shared hosting and some wordpress websites on that. Recently sometimes when I visit my websites, popup opens. So I opened template directory of one wordpress website in
I know this answer is very late but I'll share my experience to help any one who has this problem. cause of this issue can be a plugin that you downloaded from outside of wordpress.org or some body has access to your wordpress admin account and you doesn't already close editor.php in appearance tab or hacker has your ftp user and password or ... to solve this create a full backup first and save it in your computer in case of doing any mistake and then:
functions.php
file and delete all extra code inserted by malware. you can search for wp_vcd
or wp-tmp
words to find the code.wp-include
and wp-admin
folder and all files in public_html except wp-content folder
and .htaccess
file and wp-config.php
file. after that replace deleted files and folder with downloaded wordpress.hope this little guide can help someone.