Skip to content

Errors due to Request being timeout #12

@a0xnirudh

Description

@a0xnirudh

While most of the sites return proper errors while testing for sql injection, some sites will not respond anything back making the program wait for so long. This can lead to urllib2 Timeout exception (which is not handled properly) and program exits.

Traceback (most recent call last):
  File "WebXploiter.py", line 112, in <module>
    main()
  File "WebXploiter.py", line 104, in main
    webxpoit.sql.execute_all_func(args.u)
  File "/home/lucif3r/Documents/Projects/finalproject/WebXploiter/Modules/A1_injection/sql.py", line 22, in execute_all_func
    self.check_user_agent(target)
  File "/home/lucif3r/Documents/Projects/finalproject/WebXploiter/Modules/A1_injection/sql.py", line 49, in check_user_agent
    flag = str(urllib2.urlopen(req).read())
  File "/usr/lib/python2.7/urllib2.py", line 127, in urlopen
    return _opener.open(url, data, timeout)
  File "/usr/lib/python2.7/urllib2.py", line 410, in open
    response = meth(req, response)
  File "/usr/lib/python2.7/urllib2.py", line 523, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python2.7/urllib2.py", line 442, in error
    result = self._call_chain(*args)
  File "/usr/lib/python2.7/urllib2.py", line 382, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 629, in http_error_302
    return self.parent.open(new, timeout=req.timeout)
  File "/usr/lib/python2.7/urllib2.py", line 410, in open
    response = meth(req, response)
  File "/usr/lib/python2.7/urllib2.py", line 523, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python2.7/urllib2.py", line 448, in error
    return self._call_chain(*args)
  File "/usr/lib/python2.7/urllib2.py", line 382, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 531, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 408: REQUEST_TIMEOUT

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions