In the attackInjection_POST method, when the statement 'u = urllib2.urlopen(req)' triggers a 500 error, and HTTPError exception is thrown. This then leaves the 'u' variable unset, and causes issues later on. Attached is a patch to resolve this issue.
Traceback (most recent call last):
File "/usr/lib64/python2.5/threading.py", line 460, in __bootstrap
self.run()
File "powerfuzzer/powerfuzzer.py", line 174, in run
self.attack()
File "powerfuzzer/powerfuzzer.py", line 258, in attack
self.attackPOST(form)
File "powerfuzzer/powerfuzzer.py", line 374, in attackPOST
if self.doInjection==1: self.attackInjection_POST(form)
File "powerfuzzer/powerfuzzer.py", line 920, in attackInjection_POST
if u.code==500:
UnboundLocalError: local variable 'u' referenced before assignment
Logged In: YES
user_id=875832
Originator: YES
File Added: powerfuzzer-HTTPError-500-take2.patch
A cleaner patch that fixes this issue everywhere.