Recently, the PAMELA collaboration published the cosmic nuclei and electron spectra with high precision, together with the cosmic antiproton data updated, and the Fermi-LAT collaboration also updated the measurement of the total e þ e À spectrum to lower energies. In this paper we develop a Markov Chain Monte Carlo (MCMC) package CosRayMC, based on the Galactic Propagation (GALPROP) cosmic ray propagation model to study the implications of these new data. It is found that if only the background electrons and secondary positrons are considered, the fit is very bad with 2 red % 3:39. Taking into account the extra e þ e À sources of pulsars or dark matter annihilation we can give much better fit to these data, with the minimum 2 red % 1:04. This means the extra sources are necessary with a very high significance in order to fit the data. However, the data show little difference between pulsar and dark matter scenarios. Both the background and extra source parameters are well constrained with this MCMC method. The antiproton data can further constrain the branching ratio of dark matter annihilation into quarks to be B q < 0:5% at 2 confidence level. The possible systematical uncertainties of the present study are discussed.