Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

requests.get 301重定向问题 #52

Open
ycdxsb opened this issue Aug 25, 2021 · 3 comments
Open

requests.get 301重定向问题 #52

ycdxsb opened this issue Aug 25, 2021 · 3 comments

Comments

@ycdxsb
Copy link

ycdxsb commented Aug 25, 2021

在使用的时候发现有的时候会出现这个问题

Traceback (most recent call last):
  File "vulmap.py", line 67, in <module>
    core.control_options(args)  # 运行核心选项控制方法用于处理不同选项并开始扫描
  File "/root/shell/core/core.py", line 78, in control_options
    core.control_webapps("file", args.file, args.app, "poc")
  File "/root/shell/core/core.py", line 186, in control_webapps
    if survival_check(furl) == "f":  # 如果存活检测失败就跳过
  File "/root/shell/module/allcheck.py", line 105, in survival_check
    elif _http_conn(url) == "s":
  File "/root/shell/module/allcheck.py", line 93, in _http_conn
    requests.get(target, timeout=timeout, headers=headers, verify=False)
  File "/root/shell/thirdparty/requests/api.py", line 76, in get
    return request('get', url, params=params, **kwargs)
  File "/root/shell/thirdparty/requests/api.py", line 61, in request
    return session.request(method=method, url=url, **kwargs)
  File "/root/shell/thirdparty/requests/sessions.py", line 542, in request
    resp = self.send(prep, **send_kwargs)
  File "/root/shell/thirdparty/requests/sessions.py", line 677, in send
    history = [resp for resp in gen]
  File "/root/shell/thirdparty/requests/sessions.py", line 677, in <listcomp>
    history = [resp for resp in gen]
  File "/root/shell/thirdparty/requests/sessions.py", line 166, in resolve_redirects
    raise TooManyRedirects('Exceeded {} redirects.'.format(self.max_redirects), response=resp)
thirdparty.requests.exceptions.TooManyRedirects: Exceeded 30 redirects.
@zhzyker
Copy link
Owner

zhzyker commented Aug 25, 2021

  File "/root/shell/module/allcheck.py", line 93, in _http_conn
    requests.get(target, timeout=timeout, headers=headers, verify=False)

看起来常规请求就出错了,可能没有try好,我得找个站复现一下

@ycdxsb
Copy link
Author

ycdxsb commented Aug 25, 2021

我这有一个,你可以看下

python3 vulmap.py -u http://172.104.12.102:8090/

                                +---------------+
 How to find vulnerabilities?   |    vulmap     |
                                +---------------+
    (╯▔^▔)╯                        \ (•◡ •) /
     \   |                            |   /
 ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄
Traceback (most recent call last):
  File "vulmap.py", line 67, in <module>
    core.control_options(args)  # 运行核心选项控制方法用于处理不同选项并开始扫描
  File "/root/test/core/core.py", line 61, in control_options
    if survival_check(args.url) == "f":  # 检查目标存活状态
  File "/root/test/module/allcheck.py", line 105, in survival_check
    elif _http_conn(url) == "s":
  File "/root/test/module/allcheck.py", line 93, in _http_conn
    requests.get(target, timeout=timeout, headers=headers, verify=False)
  File "/root/test/thirdparty/requests/api.py", line 76, in get
    return request('get', url, params=params, **kwargs)
  File "/root/test/thirdparty/requests/api.py", line 61, in request
    return session.request(method=method, url=url, **kwargs)
  File "/root/test/thirdparty/requests/sessions.py", line 542, in request
    resp = self.send(prep, **send_kwargs)
  File "/root/test/thirdparty/requests/sessions.py", line 677, in send
    history = [resp for resp in gen]
  File "/root/test/thirdparty/requests/sessions.py", line 677, in <listcomp>
    history = [resp for resp in gen]
  File "/root/test/thirdparty/requests/sessions.py", line 166, in resolve_redirects
    raise TooManyRedirects('Exceeded {} redirects.'.format(self.max_redirects), response=resp)
thirdparty.requests.exceptions.TooManyRedirects: Exceeded 30 redirects.

@zhzyker
Copy link
Owner

zhzyker commented Aug 25, 2021

没有try完整石锤了,之前在 #30 中没有修复完整

后续补全, 现在有个--check off 选项可以跳过存货检测来暂时正常扫描

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants