When I face this kind of problem, I'd rummage through my box of "keepable" wall warts for the right voltage and a current compliance that is higher.
Then I'd test it a little bit with various loads to make sure I know it can handle the load (lots of big resistors here -- in this case I'd look for a \$22\:\Omega\$ resistor rated for \$10\:\textrm{W}\$ or better.)
Assuming it passes that test, then I'd rummage in a few small drawers with solderable plugs and see if I have one that fits the router or modem power input snugly to the outer diameter (but not too snugly) and also grabs the inner pin correctly, as well. If I have one, I'd use it. If not, I'd go buy a re-supply of them and wait for arrival.
That in hand, with solder and wire etc., I'd just cut off the old wall wart end and solder on a new one designed to fit. (Verifying that the polarity is correct, obviously.) And then I'd label that adapter for the unit.
Finally, I'd check things out and make sure things are functioning correctly.
It's really not that much work, or that hard to do.
And no, a \$5\:\textrm{V}\$ DC supply isn't going to do anything good with a device expecting a DC \$12\:\textrm{V}\$ supply.