All of those pictures are from irresponsible keepers who left their live rats in with their snakes for hours-days. The feeder got hungry and went for the only other edible thing in the enclosure.
A well fed and watered feeder will most likely spend its time grooming or exploring the enclosure. And a responsible feeding would be to take out the feeder if the snake does not eat within 10-30 minutes of putting in the rat.
In conclusion, it is unlikely for a rat to attack your snake unless you just neglect and leave it for extended periods of time.
Sent from my DROID RAZR using Tapatalk 2