如何为python的msfrpc插件创建许多虚拟控制台?

2024-03-29 10:57:52 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在尝试用python的msfrpc插件创建几个虚拟控制台。但是,每当我创建一个新控制台时,我都会收到一个back error\u backtrace

import msfrpc

client = msfrpc.Msfrpc({})
client.login('msf','123')

res = client.call('console.create')
console_id = res['id']

res2 = client.call('console.create')
console_id2= res2['id']
print res2

错误:

and res2 ={'error_backtrace':
("lib/msf/core/rpc/v10/rpc_console.rb:15:inrpc_create'", "lib/msf/core/rpc/v10/service.rb:152:in block in process'",
"lib/ruby/1.9.1/timeout.rb:68:intimeout'", "lib/msf/core/rpc/v10/service.rb:152:in process'",
"lib/msf/core/rpc/v10/service.rb:90:inon_request_uri'", "lib/msf/core/rpc/v10/service.rb:72:in block in start'",
"lib/rex/proto/http/handler/proc.rb:38:incall'", "lib/rex/proto/http/handler/proc.rb:38:in on_request'",
"lib/rex/proto/http/server.rb:365:indispatch_request'", "lib/rex/proto/http/server.rb:299:in on_client_data'",
"lib/rex/proto/http/server.rb:158:inblock in start'", "lib/rex/io/stream_server.rb:48:in call'",
"lib/rex/io/stream_server.rb:48:inon_client_data'", "lib/rex/io/stream_server.rb:192:in block in monitor_clients'",
"lib/rex/io/stream_server.rb:190:ineach'", "lib/rex/io/stream_server.rb:190:in monitor_clients'",
"lib/rex/io/stream_server.rb:73:inblock in start'", "lib/rex/thread_factory.rb:22:in call'",
"lib/rex/thread_factory.rb:22:inblock in spawn'", "lib/msf/core/thread_manager.rb:100:in call'",
"lib/msf/core/thread_manager.rb:100:inblock in spawn'"), 'error_message': 'wrong number of arguments (2 for 1)', 'error_class': 'ArgumentError', 'error_string': 'wrong number of arguments (2 for 1)', 'error': True}`

有什么解决办法吗?这是正确的方法还是有其他方法来解决这个问题?如何创建多个控制台?在


Tags: iniocoreclientstreamserverliberror