def check_install(): try: br=webdriver.Chrome() except Exception, e: print e try: br=webdriver.PhantomJS() except Exception, e: print e print_warn('No browser is installed correctly!')
def request_and_verify(case): vul = case.vul method = case.method url = case.url headers = case.headers body = case.body args = case.args old_param = args[2] old_value = args[3] print 'Verify case use:\n%s' % url # time out with gevent.Timeout(20, False) as t: resp = make_request(method, url, headers, body) if resp: if Verify.verify(resp, args): poc = gen_poc(method, url, body, old_param, old_value) print_warn('Found %s in %s' % (vul, poc)) result = (vul, url, poc) return result # count++ when error happened else: Verify.ERROR_COUNT += 1