You asked
What should I look for in a used leica m9 p sensor to avoid buying one with dust or dark spots?
Here is what the site says about that.
From Leica M9-P: Leica M9-P: A rangefinder by Leica with a 18-megapixel full frame sensor, announced in 2011. An M9 with a sapphire-glass screen and no red dot. Specs - Maker: Leica - Mount: Leica M - Sensor: Full frame, 36 x 24mm, crop factor 1.0 - Resolution: 18 megapixels - Stabilisation: none in the body; use stabilised lenses for slow shutter speeds - Announced: 2011 - Type: rangefinder Focal lengths on it Full frame ...
From Buying used: Checking a camera body: - Shutter count. Shutters wear out eventually. Ask for the count, or read it from a test photo's metadata with an online tool where the brand supports it, and compare with the rated life for that model. - The sensor. Take a photo of a plain sky at f/16 and look for dark spots (dust is fixable; scratches are not). - Ports, buttons and dials. Try every button, the card ...
Quoted from this site's pages.
Ask next
From these pages
This answer is for the question above. Each answer is written for the exact question in its address, so a question with its details in it (a budget, what you shoot, what you already have) gets an answer about those details. An answer draws on all 15 pages of the guide and its catalogue of 320 cameras and 1050 lenses. Another question gets its own answer at its own address, as words after /ask/. Or fill in your own: /ask/which-camera-for-{what-you-shoot}-under-{budget}-euros or /ask/which-lens-for-{what-you-shoot}-on-{your-camera}.