In both cases I only realized the buggers were in there after about three fish had disappeared during the nights over a two week period and each time I found the half eaten fish a few days later.
One night I could make out a star fish like shape on the glass and was shocked to see him sticking to the front glass and literally waving at me. The next night I patiently fed him some shrimp to keep him full and build some level of trust over the coming days. He soon came out on command and would quickly pick up the shrimp and then dart into the rocks. With some trust built up I then tried some shrimp in a net and he went in but shot out the moment I tried to pull up the net. After that he would never come out if I was close by the glass. They are as smart as people say they are.
I then started building a trap with a one foot long clear cylinder with a closed side and a hinged door I made on the other side. I tied a shrimp to the far end using tiny holes I had drilled and some string. The door was on a long 10ft string that I held at a distance
I waited up for several hour with the red lights on for the little bugger to come out. I was able to pull shut the opening and lift the cylinder out the moment he grabbed the shrimp as he was in too far to get out in time. Next I made a bowl of rice and enjoyed some fresh Calamari

. Nah same fate but they both got the one finger solute as they swirled down the bowl. It may sound cruel but my brother had a commercial tank that was wiped out to the tune of several thousand dollars by one of these buggers. They eat non stop and will take down fish much larger than them.
If you have never seen this video it is an eye opener to how deadly they are in an aquarium.
Octopus in Aquarium
The ones in my tank could spread out in the palm of my hand and not reach the edges. The head about 3/4" across but they easily take out 4" Tangs like they were nothing.