We are concerned with the retrieval of the unknown cross section of a homogeneous cylindrical obstacle embedded in a homogeneous medium and illuminated by time-harmonic electromagnetic line sources. The dielectric parameters of the obstacle and embedding materials are known and piecewise constant. That is, the shape (here, the contour) of the obstacle is sufficient for its full characterization. The inverse scattering problem is then to determine the contour from the knowledge of the scattered field measured for several locations of the sources and/or frequencies. An iterative process is implemented: given an initial contour, this contour is progressively evolved such as to minimize the residual in the data fit. This algorithm presents two main important points. The first concerns the choice of the transformation enforced on the contour. We will show that this involves the design of a velocity field whose expression only requires the resolution of an adjoint problem at each step. The second concerns the use of a level-set function in order to represent the obstacle. This level-set function will be of great use to handle in a natural way splitting or merging of obstacles along the iterative process. The evolution of this level-set is controlled by a Hamilton-Jacobi-type equation which will be solved by using an appropriate finite-difference scheme. Numerical results of inversion obtained from both noiseless and noisy synthetic data illustrate the behaviour of the algorithm for a variety of obstacles.