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

WP Plugin scan error "URL can't contain control characters." #22

Open
Inigo-van-Dijk opened this issue Sep 23, 2020 · 6 comments
Open

Comments

@Inigo-van-Dijk
Copy link

Issue Details

CMSmap Version: 1.0
CMS Type: WordPress
CMS Version: 5.5.1
Plugin Name: ...
OS Information: Ubuntu 18.04/Apache/2.4.29

Steps to reproduce the issue

Fresh install, run it on my WP installation

Expected behaviour

Run the scanner

What went wrong

Python error:
Traceback (most recent call last):
File "/usr/local/Cellar/[email protected]/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.8/site-packages/cmsmap/lib/threadscanner.py", line 30, in run
requester.request(self.url + self.pluginPath + plugin + self.pluginPathEnd, data=None)
File "/usr/local/lib/python3.8/site-packages/cmsmap/lib/requester.py", line 31, in request
self.response = urllib.request.urlopen(self.req)
File "/usr/local/Cellar/[email protected]/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 222, in urlopen
return opener.open(url, data, timeout)
File "/usr/local/Cellar/[email protected]/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 525, in open
response = self._open(req, data)
File "/usr/local/Cellar/[email protected]/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 542, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
File "/usr/local/Cellar/[email protected]/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 502, in _call_chain
result = func(*args)
File "/usr/local/Cellar/[email protected]/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 1393, in https_open
return self.do_open(http.client.HTTPSConnection, req,
File "/usr/local/Cellar/[email protected]/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 1350, in do_open
h.request(req.get_method(), req.selector, req.data, headers,
File "/usr/local/Cellar/[email protected]/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/http/client.py", line 1255, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/local/Cellar/[email protected]/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/http/client.py", line 1266, in _send_request
self.putrequest(method, url, **skips)
File "/usr/local/Cellar/[email protected]/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/http/client.py", line 1100, in putrequest
self._validate_path(url)
File "/usr/local/Cellar/[email protected]/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/http/client.py", line 1200, in _validate_path
raise InvalidURL(f"URL can't contain control characters. {url!r} "
http.client.InvalidURL: URL can't contain control characters. '/wp-content/plugins/worprees plugin bug dar/' (found at least ' ')

@valentin-oprea
Copy link

Is anything improved? Still having the same issue. Running cmsmap under Kali Windows with python3

[-] Searching Wordpress Plugins ...
79%Exception in thread Thread-5:
Traceback (most recent call last):
File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/home/cadobe/cmsmap/cmsmap/lib/threadscanner.py", line 30, in run
requester.request(self.url + self.pluginPath + plugin + self.pluginPathEnd, data=None)
File "/home/cadobe/cmsmap/cmsmap/lib/requester.py", line 31, in request
self.response = urllib.request.urlopen(self.req)
File "/usr/lib/python3.8/urllib/request.py", line 222, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python3.8/urllib/request.py", line 525, in open
response = self._open(req, data)
File "/usr/lib/python3.8/urllib/request.py", line 542, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain
result = func(*args)
File "/usr/lib/python3.8/urllib/request.py", line 1379, in http_open
return self.do_open(http.client.HTTPConnection, req)
File "/usr/lib/python3.8/urllib/request.py", line 1350, in do_open
h.request(req.get_method(), req.selector, req.data, headers,
File "/usr/lib/python3.8/http/client.py", line 1255, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib/python3.8/http/client.py", line 1266, in _send_request
self.putrequest(method, url, **skips)
File "/usr/lib/python3.8/http/client.py", line 1100, in putrequest
self._validate_path(url)
File "/usr/lib/python3.8/http/client.py", line 1200, in _validate_path
raise InvalidURL(f"URL can't contain control characters. {url!r} "
http.client.InvalidURL: URL can't contain control characters. '/wp-content/plugins/worprees plugin bug dar/' (found at least ' ')
98%

Stays forever on 98%

@apalazzi
Copy link

Same issue here, a workaround is to edit the file cmsmap/data/wp_plugins_small.txt at line 362 and replace the spaces with dashes or underscores - don't know whic one is the correct fix, thoug.

I also suspect that it should be "wordpress plugin bug dar" and not "wordprees plugin bug dar"

@szrobert84
Copy link

To fix this error change the cmsmap/data/wp_plugins_small.txt at line 362 and replace from wordprees plugin bug dar to wordpress_plugin_bug_da that should solve the problem. I hope it helps.

@Gromek1982
Copy link

The file you're mentioning is missing from the data folder. Do I need to download it from anywhere ?

@555krhariharan555
Copy link

@szrobert84 Cool !! That solved the issue

@JawadPy
Copy link

JawadPy commented Apr 25, 2022

Not found
image

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

7 participants