In NY? Check into this. I might be misremembering, but ISTR that you
can get an inspection waiver if you spend more than $300 trying to get
the vehicle to pass inspection.
If you have a car that you can't sell to a private party in good
conscience, then do what everyone else does: take it to a dealer and
trade it