Active defence code