I am by no means an electrician, my experience does not extend past swapping old light fixtures for new. We just moved into a house that was built in 1907, so I'm not surprised by anything I've come across thus far, however I've heard mixed answers from people I know about this one.
I am trying to just change our dining room light, and upon removing the old fixture, I discovered just 2 wires. Both are covered in a cloth which I've read was common way back in the day. The fixture itself was mounted directly to some joists I'm assuming, as I see no box; only two holes through the wood where each wire comes out. One is wrapped in a thicker material further back.
It would obviously be best to hire a professional to rewire this I'm sure, but is there any clear and present danger to maybe just getting a pancake box and mounting it to the joists? And what's the best way to identify which wire is which, as the old light fixture's wires weren't color-coded either.