With the engine off, pump the brake pedal a few times to relieve any vacuum. Press the brake pedal steadily and see if it slowly sinks. If it does then either there is a leak or the master cylinder is knackered. New cylinders are the right way to go, they start at about 60 quid up. Some recon kits are available, but usually the inside of the master cylinder is pitted. Usual cause of failed master cylinder is lack of servicing, ie no brake fluid changes every two years. Secondhand cylinder might be ok, might not, depends on you, the car and finance.
I would - but I wouldn't replace brake components on it with secondhand ones. Especially as the labour of fitting and bleeding (IME) outweighs the savings over buying new (and with second hand you may need to repeat the labour sooner).
MotorsForum website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.