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

problem CannotSendRequest #24

Open
wapik opened this issue Oct 5, 2018 · 2 comments
Open

problem CannotSendRequest #24

wapik opened this issue Oct 5, 2018 · 2 comments

Comments

@wapik
Copy link

wapik commented Oct 5, 2018

...

client = MsfRpcClient('password')

# cb - callback function, executes when data arrives to console
console = MsfRpcConsole(client, cb=read_console)

...

console.execute('use auxiliary/scanner/smb/smb_ms17_010')
console.execute('set RHOSTS 192.168.0.0/24')
console.execute('set THREADS 20')
console.execute('run')

...
exploit = client.modules.use('exploit', 'windows/smb/ms17_010_psexec')

Exception in thread Thread-101:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 1082, in run
self.function(*self.args, **self.kwargs)
File "build/bdist.linux-x86_64/egg/metasploit/msfconsole.py", line 60, in _poller
d = self.console.read()
File "build/bdist.linux-x86_64/egg/metasploit/msfrpc.py", line 1907, in read
return self.rpc.call(MsfRpcMethod.ConsoleRead, self.cid)
File "build/bdist.linux-x86_64/egg/metasploit/msfrpc.py", line 237, in call
self.client.request('POST', self.uri, packb(l), self._headers)
File "/usr/lib/python2.7/httplib.py", line 1039, in request
self._send_request(method, url, body, headers)
File "/usr/lib/python2.7/httplib.py", line 1067, in _send_request
self.putrequest(method, url, **skips)
File "/usr/lib/python2.7/httplib.py", line 921, in putrequest
raise CannotSendRequest()
CannotSendRequest

help me
what is the reason?

@shobhitmittal
Copy link

Is your msfrpc server running locally with the port as 55553 and password as 'password'??

@RainyBow
Copy link

Do you try to run a lot of "client.modules.use" in thread ?

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

3 participants