There are multiple places that sell brake master cylinder fitting kits. A simple Google search should give you a load of options. I've never used one so I don't have a preference that I can recommend. Good luck.
I'm assuming you rounded off the nuts on the pipes? Three options I can see...
1. Did you get the old fittings loose? If so and if the pipe and flare are not mangled, you can probably just tighten the old fittings with pliers or vice-grips and they should still work fine.
2. Replace the entire pipe, those are available but not sure how hard they would be to route. It looks like you could probably route them without removing anything else but not 100% sure.
3. Assuming the nuts just fit over the pipe and are held there by the flare (looks that way to me): cut off the flare, remove and replace the fitting, and re-flare the end. It looks like you have enough pipe to be able to lose the 1/4" or so and still flex enough to make a good connection. But not ideal because you need flare tools and have to do the flare correctly... if you try it, get some pipe the same size and practice until you can do it reliably. Take the old fittings to the FLAPS and see what they have, otherwise go to google or a junkyard.
I'd probably try #2 first, see if you can remove the old pipes easily and then get new ones, or junkyard if you're on a budget. Usually best to just do things right the first time with the brakes.