If your generator was connected to mains when they came back on it would probably just kill your generator. It is the least robust device in the chain. The next step is blowing up the transformer on the pole which is a spectacular light show. It is also very expensive, and will piss off your entire neighborhood who were just about to get power back and now have to wait for the power company to fix the transformer you blew up by being a dumb ass. Finally it is possible that you would trip out the switch yard which is going to make even more people angry. The biggest risk is you putting power back on the lines that people are working on. That transformer on the pole works both directions. It drops the usual 13.8kV on your local power lines to the 240/120V in your house. It will also turn the 120/240 from your generator into 13.8 on the lines that are being worked on. 13.8 will kill you before you even know you touched it. That is why line workers go through multiple tests before they get near lines they are working on. They will notice there is power on lines that are supposed to be dead. They will find where that power is coming from. They will fine you lots of money. There may be criminal charges.