IANAL, but from all of the cop shows on TV, if the lawyer was provided the evidence and did not break laws themself OR as long as the lawyer did not entice someone else to commit the offense or provide instructions on what to do, then typically the judge allows the evidence.