Rabies virus are transferred through biting of the infected animals because these are excreted through saliva. Non biting spread of these viruses is theoretical. It is believed that saliva of the infected dogs can infect nail and if dog scratches humans with these infected nails then rabies can be transmitted. Anyhow, if infected dog scratches you then get medical attention immediately.