Training for a Marathon While Injured

Earlier this summer, I injured both my hamstring and adductor.  Strained them to the point where I walked with a limp for a solid week.  The injury happened two months before my marathon, when I was supposed to be running higher mileage.  How am I training for a marathon while