hhucn / webvulnscan

automated web application vulnerability scanner
MIT License
38 stars 27 forks source link

Simplify form.py #54

Open phihag opened 11 years ago

phihag commented 11 years ago

Some methods in form.py are unnecessarily complex. For example,

def get_input_elements(self):
    for form_input in self.document.findall('.//input'):
        yield form_input

can be written as

get_input_elements = lambda self: self.document.findall('input')

(or slightly longer). We should also unify textareas and inputs here.