Spitting explosive rocks (BotW)
Spitting Weapons back (BotW)
In Skyward Sword, Rock Octoroks are Octoroks that adapted from water to land and have the ability to spit rocks. They sleep with rocks on their head as camouflage until it senses nearby prey and attack by spitting a rock. Link can deflect the rock back at them with a Shield to defeat them.
Breath of the Wild
Hyrule Compendium Entry
In Breath of the Wild, Rock Octoroks live in both volcanic and cold Regions, such as Eldin Canyon and Gerudo Highlands. They inhale massive loads of air and then spit out an explosive fire rock at their target. Getting too close to one causes it to take cover and hide underground with the rock on its head as protection. Link can defeat them by placing a Remote Bomb in its path while it inhales air and detonating the Bomb after the Octorok swallows it. If a Rock Octorok swallows a Rusty Weapon or Shield, it will shoot it back out as a clean counterpart.
There is a 50% chance that the item will be of the "Traveler's" quality after being cleaned, a 35% chance that it will be "Soldier's", a 10% chance that it will be "Knight's", and a 5% chance that it will be of the "Royal" quality.