We present a publicly available code called Hammurabi for generating mock polarized observations of Galactic synchrotron emission for telescopes like LOFAR, SKA, Planck and WMAP, based on model inputs for the Galactic magnetic field (GMF), the cosmic-ray density distribution and the thermal electron density. We also present mock UHECR deflection measure (UDM) maps based on model inputs for the GMF. In future, when UHECR sources are identified, this will allow us to define UDM as a GMF probe in a similar way as polarized radio sources permit us to define rotation measures. To demonstrate the codes abilities mock observations are compared to real data as a means to constrain the input parameters of our simulations with a focus on large-scale magnetic field properties. As expected, attempts at trying to model the synchrotron, UHECR deflection and RM input parameters, show that any additional observational data set greatly increases the constraints on the models. The hammurabi code addresses this by allowing to perform simulations of several different data sets simultaneously, providing the means for a more reliable constraint of the magnetized inter-stellar-medium.