Inject code and replicate target's console.