Villagers who gathered to poke at a crocodile in Indonesia were in for a scare after the giant reptile charged at them from a swamp that formed after the area flooded.