It all depends on how your state treats such tickets. Many states simply issue a ticket that you have to pay. Others make you get it tested and written off. Some may send you to a state ref...
Find out what your state declares as an illegal modified exhaust. Is your exhaust modified? Yes, is it illegal? Might not be.