Add NO_EICAR()

Create issue
Issue #7 new
Chad Nelson created an issue

Add NO_EICAR() method to class _ClamdGeneric().

def NO_EICAR(self):
        """
        returns NO_EICAR test string
        """
        # No_Eicar test string (encoded for skipping virus scanners)
        # Return a str with python2 and bytes with python3

        # B64 without the final newline to avoid clam picking it up in pyc file
        no_eicar_b64 = 'no virus here='

        NO_EICAR = base64.b64decode(no_eicar_b64.encode('ascii'))
        return NO_EICAR

And in example.py

print('{0}\n'.format(cd.scan_stream(cd.NO_EICAR())))

Comments (0)

  1. Log in to comment