Of course it works. The real question, however, is how long this will go on until it smells like burnt plastic and, in the worst case, the hut burns down!
Buy a suitable power supply that has all the necessary cables and plugs. Everything else is rubbish.