Paul has also used keyhole plates let into the back of the uprights which slip over a screw or nail in the wall.
He shows how to make and use them here:
You need to be a bit luckier as to where solid bearing in the wall is, but molly bolts often work for light duty and would be hidden.
A well stocked hardware store will have plates and mollys.
For your brick wall, drill holes and plug them with wood, then screw into the wood.