Using Kepler's Third Law, the mass of a planet is related to the orbital period and distance of its satellite.  Since Mercury and Venus are the only two planets without satellites, flybys of artificial spacecraft were able to make the equivalent gravimetric measurements in the 1960's.