Enhancing some code

As an (old) novice I am just at the beginning of the various and rich path that is (ethical) hacking and pentesting, which includes also some coding (also a noobie in that ah, ah) I found this and I thought that it might be of some interest: