|
@@ -16,6 +16,23 @@ CWinApp theApp;
|
|
|
|
|
|
using namespace std;
|
|
using namespace std;
|
|
|
|
|
|
|
|
+void Split(std::string str1, std::string str2, std::vector<std::string> &vt)
|
|
|
|
+{
|
|
|
|
+ if ( str1.size() == 0 || str2.size() == 0 )
|
|
|
|
+ return;
|
|
|
|
+
|
|
|
|
+ int npos = str1.find(str2);
|
|
|
|
+ while( std::string::npos != npos )
|
|
|
|
+ {
|
|
|
|
+ vt.push_back(str1.substr(0, npos));
|
|
|
|
+ str1 = str1.substr(npos + str2.size());
|
|
|
|
+ npos = str1.find(str2);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if ( str1.size() )
|
|
|
|
+ vt.push_back(str1);
|
|
|
|
+}
|
|
|
|
+
|
|
int _tmain(int argc, TCHAR* argv[], TCHAR* envp[])
|
|
int _tmain(int argc, TCHAR* argv[], TCHAR* envp[])
|
|
{
|
|
{
|
|
int nRetCode = 0;
|
|
int nRetCode = 0;
|
|
@@ -37,6 +54,8 @@ int _tmain(int argc, TCHAR* argv[], TCHAR* envp[])
|
|
{
|
|
{
|
|
std::string data;
|
|
std::string data;
|
|
winssh2.ssh2_execute_command("ls", data);
|
|
winssh2.ssh2_execute_command("ls", data);
|
|
|
|
+ std::vector<std::string> strList;
|
|
|
|
+ Split(data, "\n", strList);
|
|
winssh2.ssh2_execute_command("md5sum /scbc_data/exchange/BAK_RT2841_2851_dailybuild/DailyBuild_RT2851_1231/USB/V8-T851T01-debug123103.img", data, 100000);
|
|
winssh2.ssh2_execute_command("md5sum /scbc_data/exchange/BAK_RT2841_2851_dailybuild/DailyBuild_RT2851_1231/USB/V8-T851T01-debug123103.img", data, 100000);
|
|
winssh2.ssh2_execute_command("sha1sum /scbc_data/exchange/BAK_RT2841_2851_dailybuild/DailyBuild_RT2851_1231/USB/V8-T851T01-debug123103.img", data, 10000);
|
|
winssh2.ssh2_execute_command("sha1sum /scbc_data/exchange/BAK_RT2841_2851_dailybuild/DailyBuild_RT2851_1231/USB/V8-T851T01-debug123103.img", data, 10000);
|
|
winssh2.ssh2_execute_command("sha256sum /scbc_data/exchange/BAK_RT2841_2851_dailybuild/DailyBuild_RT2851_1231/USB/V8-T851T01-debug123103.img", data, 10000);
|
|
winssh2.ssh2_execute_command("sha256sum /scbc_data/exchange/BAK_RT2841_2851_dailybuild/DailyBuild_RT2851_1231/USB/V8-T851T01-debug123103.img", data, 10000);
|