資源簡介
下載此項目需要結合本人的博客去操作,博客地址,https://blog.csdn.net/qq_37602761/article/details/83587775

代碼片段和文件信息
/**************************************************************************
**
**?This?file?is?part?of?QSsh
**
**?Copyright?(c)?2012?LVK
**
**?Contact:?andres.pagliano@lvklabs.com
**
**?GNU?Lesser?General?Public?License?Usage
**
**?This?file?may?be?used?under?the?terms?of?the?GNU?Lesser?General?Public
**?License?version?2.1?as?published?by?the?Free?Software?Foundation?and
**?appearing?in?the?file?LICENSE.LGPL?included?in?the?packaging?of?this?file.
**?Please?review?the?following?information?to?ensure?the?GNU?Lesser?General
**?Public?License?version?2.1?requirements?will?be?met:
**?http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
**************************************************************************/
#include?
#include?
#include?
#include?
#include?
//#include?“securefileuploader.h“
//void?showSyntax();
//QString?getPassword();
//void?upload(const?QString?&orig?const?QString?&dest?const?QString?passwd);
int?main(int?argc?char?*argv[])
{
????QCoreApplication?a(argc?argv);
//????if?(argc?!=?3)?{
//????????showSyntax();
//????}
//????QString?orig?=?argv[1];
//????QString?dest?=?argv[2];
//????//QString?passwd?=?getPassword();
//????upload(orig?dest?“123456“);
????SZRSFtpTools?sftpClient;
????sftpClient.setSftpInfo(“192.168.0.118““szsh““szsh123“);
//????for?(int?i?=?0?;?i?1000;i++)
//????{
//????}
//????QStringList?downLoadFiles;
//????downLoadFiles?<“/home/xiao/1.txt“?<“/home/xiao/remote“;
????//sftpClient.downLoadFile(“G:/GO““/home/xiao/1.txt“);
//????sftpClient.downLoadFiles(“G:/GO“downLoadFiles);
????QStringList?upLoadFiles;
????upLoadFiles?<“G:/GO/1.txt“?<“G:/GO/remote“;
????sftpClient.uploadFiles(“/home/szsh“upLoadFiles);
????//sftpClient.uploadFile(“/home/xiao““G:/GO/1.txt“);
????return?a.exec();
}
/*void?showSyntax()
{
????std::cerr?<“Syntax:?“?<????std::cerr?<“?????????SecureUploader?local_file?username@host:/destination_path“?<????exit(1);
}
QString?getPassword()
{
????std::cout?<“Password?(Warning?password?will?be?echoed):?“;
????std::string?passwd;
????std::cin?>>?passwd;
????return?QString::fromStdString(passwd).trimmed();
}
void?upload(const?QString?&orig?const?QString?&dest?const?QString?passwd)
{
????//?Parse?destination?with?format?“username@host:/destination“
????QStringList?l1?=?dest.split(“@“);
????if?(l1.size()?==?2)?{
????????QStringList?l2?=?l1[1].split(“:“);
????????if?(l2.size()?==?2)?{
????????????static?SecureFileUploader?uploader;
????????????uploader.upload(orig?l2[1]?l2[0]?l1[0]?passwd);
????????}?else?{
????????????std::cerr?<“SecureUploader:??Error?invalid?parameter?“?<????????????showSyntax();
????????}
????}?else?{
????????std::cerr?<“SecureUploader:??Error?invalid?parameter?“?<????????showSyntax();
????}
}*/
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
????.......??????3329??2016-07-03?18:37??QSsh-master\.gitignore
?????文件?????????85??2018-10-29?12:13??QSsh-master\examples\examples.pro
?????文件???????2922??2018-10-30?14:29??QSsh-master\examples\SecureUploader\main.cpp
?????文件???????6892??2018-10-31?11:41??QSsh-master\examples\SecureUploader\securefileuploader.cpp
?????文件???????2586??2018-10-31?11:41??QSsh-master\examples\SecureUploader\securefileuploader.h
?????文件????????738??2018-10-31?11:36??QSsh-master\examples\SecureUploader\SecureUploader.pro
?????文件???????1327??2018-10-31?11:50??QSsh-master\examples\SecureUploader\SZRSFtpTools.cpp
?????文件???????1075??2018-10-31?11:50??QSsh-master\examples\SecureUploader\SZRSFtpTools.h
????.......????????59??2016-07-03?18:37??QSsh-master\examples\ssh\errorhandling\errorhandling.pro
????.......??????7352??2016-07-03?18:37??QSsh-master\examples\ssh\errorhandling\main.cpp
????.......??????6486??2016-07-03?18:37??QSsh-master\examples\ssh\remoteprocess\argumentscollector.cpp
????.......??????1990??2016-07-03?18:37??QSsh-master\examples\ssh\remoteprocess\argumentscollector.h
????.......??????1777??2016-07-03?18:37??QSsh-master\examples\ssh\remoteprocess\main.cpp
????.......???????153??2016-07-03?18:37??QSsh-master\examples\ssh\remoteprocess\remoteprocess.pro
????.......?????12830??2016-07-03?18:37??QSsh-master\examples\ssh\remoteprocess\remoteprocesstest.cpp
????.......??????2647??2016-07-03?18:37??QSsh-master\examples\ssh\remoteprocess\remoteprocesstest.h
????.......??????6769??2016-07-03?18:37??QSsh-master\examples\ssh\sftp\argumentscollector.cpp
????.......??????1972??2016-07-03?18:37??QSsh-master\examples\ssh\sftp\argumentscollector.h
?????文件???????1776??2018-10-29?16:01??QSsh-master\examples\ssh\sftp\main.cpp
????.......??????1406??2016-07-03?18:37??QSsh-master\examples\ssh\sftp\parameters.h
????.......???????146??2016-07-03?18:37??QSsh-master\examples\ssh\sftp\sftp.pro
????.......?????24930??2016-07-03?18:37??QSsh-master\examples\ssh\sftp\sftptest.cpp
????.......??????3901??2016-07-03?18:37??QSsh-master\examples\ssh\sftp\sftptest.h
????.......??????1458??2016-07-03?18:37??QSsh-master\examples\ssh\sftpfsmodel\main.cpp
????.......???????174??2016-07-03?18:37??QSsh-master\examples\ssh\sftpfsmodel\sftpfsmodel.pro
????.......??????4246??2016-07-03?18:37??QSsh-master\examples\ssh\sftpfsmodel\window.cpp
????.......??????1828??2016-07-03?18:37??QSsh-master\examples\ssh\sftpfsmodel\window.h
????.......??????5728??2016-07-03?18:37??QSsh-master\examples\ssh\sftpfsmodel\window.ui
????.......??????1746??2016-07-03?18:37??QSsh-master\examples\ssh\shell\main.cpp
????.......??????3691??2016-07-03?18:37??QSsh-master\examples\ssh\shell\shell.cpp
............此處省略141個文件信息
評論
共有 條評論