root@bt:~# ./phemail.py -g0@*******.com
Gathering emails from domain: ******.com
Traceback (most recent call last):
File "./phemail.py", line 206, in <module>
gatherEmails(domain[0],domain[1],p)
File "./phemail.py", line 51, in gatherEmails
namesurname = re.sub(' -.*','',a.text.encode('utf8'))
AttributeError: 'NoneType' object has no attribute 'encode'
Why is a.text NoneType type?
a.texthas no value (None)There is probably something wrong with the line where you initialize your
avariable.I would not advice doing things as root by the way.