A man has admitted attacking a woman who was heard desperately screaming at him to “get out” of her house after he broke in during the night.