Some of these pictures and descriptions may give away plot details that you might not want to know before watching the film.
This is the movie that shows how they faked the moon landing by faking a Mars landing. The three astronauts who were forced to play along with the fake mission finally escape the abandoned base where the fake mars set was located but they crash land their jet in the desert and set out in three different directions. One of the Austronauts, played by James Brolin, ducks into a cave to hide from two helicopters that are searching for him. When he gets to the back of the cave he hears rattling and sees a rattlesnake nearby that is coming towards him. He wraps his bandana around his hand and uses it to distract the snake while he picks up a rock in the other hand and smashes its head, killing it. Then he takes his signal mirror and cuts open the snake's belly and starts eating it raw. He's been in the desert for a while without food or water so this makes sense. In fact, for once the entire snake scene makes sense (unlike a lot of other things that happen in the movie.) It's possible he could encounter a rattlesnake in a cave. It makes sense that he kills it since it was endangering his life and the way he kills it makes sense, too, although making the snake strike at his hand wrapped only in thin cotton made no sense - that is much too dangerous. Why not just dangle the loose material from your hand if you must distract the snake? The snake really does strike the hand, too, but when you freeze it you can see that the hand is a fake hand and the snake strikes beyond the material which proves my point that it's a really stupid thing to do.
The live snake we see is different from the one he supposedy kills. I can't tell for sure what kind of rattlesnake the live snake is. It looks like they put a dead snake - probably a Southern Pacific Rattlesnake - down for him to crush with the rock. It also looks like they cut open the belly of a real dead snake in one shot, but I'll bet in the shot of him gnawing on snake meat that they put something other than dead snake inside a dead or fake snake for him to chew on.