How to pass smog test?

So I have a Honda Civic ek hatch with d16y7 engine and it's straight piped which means it's missing o2 sensor causing the check engine light on and I need to get plates for it what's the best way to get around this? The exhaust has no cat. Will I need to replace the whole exhaust?

Yep. Your won't pass a smog inspection with a missing catalytic converter and O2 sensor. You'll have to put it back in factory original condition, and THEN make certain that everything is working properly BEFORE you take it in to get smogged.

That's what happens to idiots that mess with their car.

Yep.
Silly modification in the first place.
You also would need to declare that to your insurance.

Hi yes most certainly a whole new exhaust system with cats.

In order to stop violating federal law (It's unfortunate that the Feds don't lock up knuckleheads like you.), you'll be replacing the whole thing along with the cat and O2 sensors.

I'm sure your neighbors just LOVE you and your obnoxious Fartmobile! How to pass smog test - 1

Yes replace all. Pricey mistake on your part.

Depending on the laws where you live… In CA for example, the engine must be the same one from the factory or a replacement of the same CI and all of the components must be OEM

After the mistake in straight piping your civic in your state that has emissions testing as it comes back to haunt you when its time for an emissions test and physical inspection of the hatchback before the DMV could even allow the renewal of insurance and registeration. It could be costly to put the exhaust back including a new catalytic converter and 02 sensors.