mirror of https://github.com/tp4a/teleport
pull/105/head
parent
313366e200
commit
7c2e352a0f
|
@ -69,7 +69,7 @@ int AppDelegate_start_ssh_client (void *_self, const char* cmd_line, const char*
|
|||
[menu setDelegate:self];
|
||||
|
||||
|
||||
http_rpc_start((__bridge void*)self);
|
||||
//http_rpc_start((__bridge void*)self);
|
||||
|
||||
NSString *resPath = [[NSBundle mainBundle] resourcePath];
|
||||
std::string cpp_res_path = [resPath cStringUsingEncoding:NSUTF8StringEncoding];
|
||||
|
|
|
@ -7,6 +7,10 @@
|
|||
|
||||
#include <teleport_const.h>
|
||||
|
||||
#ifndef MAX_PATH
|
||||
# define MAX_PATH 1024
|
||||
#endif
|
||||
|
||||
#include "../AppDelegate-C-Interface.h"
|
||||
|
||||
#include "ts_http_rpc.h"
|
||||
|
@ -97,9 +101,6 @@ drivestoredirect:s:*\n\
|
|||
password 51:b:%s\n\
|
||||
";
|
||||
|
||||
//password 51:b:01000000D08C9DDF0115D1118C7A00C04FC297EB0100000052A9E191EA75A948B359790578C9371A0000000008000000700073007700000003660000A8000000100000000A1DCCD2E50775CA25EC3857164B34DC0000000004800000A000000010000000FCE1A645B9B61AA450946BB6F955058108020000D83591CA47562D6DDAA689F050AE145039EBE22E00D1D3AEAA98373C7B63C3E8E7149072DF989EA43EFCE20513AD3D27B11BE7F17066A688E1DCE828AF85460AAC327B38E90776DB962888E4393D19637578984B19A187AAD95F6D2726ADE7DD315FF56C15FF5B3031014EDDCC3C24D1B81779AFDB006EE575F5BEFB8D2D2138D9D9D642BBB251CC5ED7226968764856EC660A646BACE748A13D6002A9A537AA70710615650B9387EED66DE28BD57B304BBDD7B581B943DA628EB0289E30A8BA784B76F7885BECCAB4FEF7820E97EE3C6E036EEAF6EAA669288DF2FCACC9BEC045C907EBBDE87AFB8CC6B07A600BD63AC891B61D95C2265DD9FD5E635D61BFBF5EDC28311375066611C610FB533D64515B643C82F57D9B183B05C156D91BC0974D38E546022B139E82452E6F1EDF76E52F732C3904E5E433F8F3D488DB0698427DBB0791A9F207F8CB6654CB8410BAF4A59C4F9E821E589ABC1E6E6E1D432181B690408F6884FE1007895A4D26D4A5A2C7458EE747DA35D44AC9FB08AB5477EA3E7CCDB3E37EE20FAFD0D0CF9584E420598B7003B347943AC28048F45E0FD21AD08148FFADCE0E7877219259A7BE722FFAE845A429BA2CF0A71F2D19EA7495530FABDB5106E8D404A38A7E6394C38457640EA7398C5D55F0C4D342CC6A39C77E10A2A5145AEA40B14F5C7C3760334D83C9BE748383FADE231248537353817D51F7B44F61B406ABC61400000071C354139F458B02D978015F785B97F7F6B307380\n\
|
||||
//password 51:b:01000000";
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -184,7 +185,7 @@ bool TsHttpRpc::init(const char* ip, int port)
|
|||
|
||||
char addr[128] = { 0 };
|
||||
if (0 == strcmp(ip, "127.0.0.1") || 0 == strcmp(ip, "localhost"))
|
||||
ex_strformat(addr, 128, ":%d", port);
|
||||
ex_strformat(addr, 128, "127.0.0.1:%d", port);
|
||||
else
|
||||
ex_strformat(addr, 128, "%s:%d", ip, port);
|
||||
|
||||
|
@ -543,7 +544,7 @@ void TsHttpRpc::_rpc_func_run_client(const ex_astr& func_args, ex_astr& buf)
|
|||
ex_astr sid = jsRoot["session_id"].asCString();
|
||||
|
||||
ex_wstr w_exe_path;
|
||||
WCHAR w_szCommandLine[MAX_PATH] = { 0 };
|
||||
wchar_t w_szCommandLine[MAX_PATH] = { 0 };
|
||||
|
||||
|
||||
ex_wstr w_sid;
|
||||
|
@ -552,8 +553,8 @@ void TsHttpRpc::_rpc_func_run_client(const ex_astr& func_args, ex_astr& buf)
|
|||
ex_astr2wstr(teleport_ip, w_teleport_ip);
|
||||
ex_wstr w_real_host_ip;
|
||||
ex_astr2wstr(real_host_ip, w_real_host_ip);
|
||||
WCHAR w_port[32] = { 0 };
|
||||
swprintf_s(w_port, _T("%d"), teleport_port);
|
||||
wchar_t w_port[32] = { 0 };
|
||||
ex_wcsformat(w_port, 32, L"%d", teleport_port);
|
||||
|
||||
ex_wstr tmp_rdp_file; // for .rdp file
|
||||
|
||||
|
|
|
@ -638,7 +638,7 @@ class DoGetRecordDataHandler(TPBaseJsonHandler):
|
|||
|
||||
if protocol_type == TP_PROTOCOL_TYPE_RDP:
|
||||
data_list, data_size, err = record.read_rdp_record_data(record_id, offset)
|
||||
elif protocol_type == TP_PROTOCOL_TYPE_RDP:
|
||||
elif protocol_type == TP_PROTOCOL_TYPE_SSH:
|
||||
data_list, data_size, err = record.read_ssh_record_data(record_id, offset)
|
||||
else:
|
||||
self.write_json(TPE_NOT_EXISTS)
|
||||
|
|
Loading…
Reference in New Issue