mirror of https://github.com/tp4a/teleport
add a testssh tool.
parent
04309f8fbf
commit
92da225dc4
|
@ -30,8 +30,12 @@
|
|||
<file url="file://$PROJECT_DIR$/server/tp_core/core/ts_web_rpc.cpp" charset="GBK" />
|
||||
<file url="file://$PROJECT_DIR$/server/tp_core/core/ts_web_rpc.h" charset="GBK" />
|
||||
<file url="file://$PROJECT_DIR$/server/tp_core/protocol/rdp/librdp/core/config.h" charset="GBK" />
|
||||
<file url="file://$PROJECT_DIR$/server/tp_core/protocol/rdp/librdp/rdp/x224.cpp" charset="GBK" />
|
||||
<file url="file://$PROJECT_DIR$/server/tp_core/protocol/rdp/membuf.cpp" charset="GBK" />
|
||||
<file url="file://$PROJECT_DIR$/server/tp_core/protocol/rdp/membuf.h" charset="GBK" />
|
||||
<file url="file://$PROJECT_DIR$/server/tp_core/protocol/rdp/rdp_conn.cpp" charset="GBK" />
|
||||
<file url="file://$PROJECT_DIR$/server/tp_core/protocol/rdp/rdp_conn.h" charset="GBK" />
|
||||
<file url="file://$PROJECT_DIR$/server/tp_core/protocol/rdp/rdp_package.h" charset="GBK" />
|
||||
<file url="file://$PROJECT_DIR$/server/tp_core/protocol/rdp/rdp_proxy.cpp" charset="GBK" />
|
||||
<file url="file://$PROJECT_DIR$/server/tp_core/protocol/rdp/rdp_session.cpp" charset="GBK" />
|
||||
<file url="file://$PROJECT_DIR$/server/tp_core/protocol/rdp/rdp_session.h" charset="GBK" />
|
||||
|
|
|
@ -36,7 +36,7 @@ endif()
|
|||
add_subdirectory(server/tp_core/core)
|
||||
add_subdirectory(server/tp_core/protocol/ssh)
|
||||
add_subdirectory(server/tp_core/protocol/telnet)
|
||||
#add_subdirectory(server/testssh/testssh)
|
||||
add_subdirectory(server/tp_core/testssh)
|
||||
|
||||
if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/server/tp_core/protocol/rdp")
|
||||
add_subdirectory(server/tp_core/protocol/rdp)
|
||||
|
|
|
@ -6,3 +6,12 @@
|
|||
|
||||
// TODO: reference any additional headers you need in STDAFX.H
|
||||
// and not in this file
|
||||
|
||||
#ifdef _DEBUG
|
||||
# pragma comment(lib, "debug/ssh.lib")
|
||||
#else
|
||||
# pragma comment(lib, "release/ssh.lib")
|
||||
#endif
|
||||
#pragma comment(lib, "libeay32.lib")
|
||||
#pragma comment(lib, "ws2_32.lib")
|
||||
|
||||
|
|
|
@ -1,18 +1,10 @@
|
|||
// testssh.cpp : Defines the entry point for the console application.
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
//#include "stdafx.h"
|
||||
|
||||
#include <libssh/libssh.h>
|
||||
|
||||
#ifdef _DEBUG
|
||||
# pragma comment(lib, "debug/ssh.lib")
|
||||
#else
|
||||
# pragma comment(lib, "release/ssh.lib")
|
||||
#endif
|
||||
#pragma comment(lib, "libeay32.lib")
|
||||
#pragma comment(lib, "ws2_32.lib")
|
||||
|
||||
#include <ex.h>
|
||||
|
||||
void show_usage() {
|
||||
printf("Usage:\n");
|
||||
|
@ -103,8 +95,8 @@ int main(int argc, char** argv)
|
|||
retry_count += 1;
|
||||
if (retry_count >= 5)
|
||||
break;
|
||||
//ex_sleep_ms(500);
|
||||
Sleep(500);
|
||||
ex_sleep_ms(500);
|
||||
// Sleep(500);
|
||||
rc = ssh_userauth_kbdint(sess, nullptr, nullptr);
|
||||
continue;
|
||||
}
|
||||
|
@ -144,7 +136,8 @@ int main(int argc, char** argv)
|
|||
retry_count += 1;
|
||||
if (retry_count >= 3)
|
||||
break;
|
||||
Sleep(100);
|
||||
ex_sleep_ms(100);
|
||||
// Sleep(100);
|
||||
rc = ssh_userauth_password(sess, nullptr, password);
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue