People do internet-wide scans all the time, for black hat and white hat reasons. I'm not aware of anyone doing this for research purposes ever having seen any legal consequences. But you usually get some angry emails to your abuse address.
Of course this doesn't mean that some court somewhere may think this is illegal. But it's a common and widespread practice.
The law (in the US) pretty much defines hacking as accessing a system you don't have authorization to access. Very vague. Even a second of access to something you don't have permission to do is illegal.
Of course this doesn't mean that some court somewhere may think this is illegal. But it's a common and widespread practice.