This kind of virus is called “malware”.
Google will not show in their search results websites that link to dangerous website (or if they do, they will block that website access).
Using Monitor Backlinks, you are automatically notified via e-mail when Google marks your website that it has a malware.
If you don’t, you will have to visit your website to see the Google screen.
What if you work on different sites or you are on vacation?
Is it worth it to get your website removed from Google search index?