Refactor malware.c and introduce new scanner type "sock". Bugs 1418 and 1396