资源简介
下载此项目需要结合本人的博客去操作,博客地址,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::endl;
std::cerr << “ SecureUploader local_file username@host:/destination_path“ << std::endl;
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 “ << dest.toStdString() << std::endl;
showSyntax();
}
} else {
std::cerr << “SecureUploader: Error invalid parameter “ << dest.toStdString() << std::endl;
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个文件信息
相关资源
- Ubuntu下操作Excel,qt代码
- PSFTP.EXE 工具
- Qt图片浏览器 --基于Qt的Graphics View f
- qtnribbon2破解
- Qt软件开发 完整项目代码
- MQTT_3.1protocol_Specific中文版
- 在QT中使用RTP进行视频的采集和传输
- Mini6410 Qt4和Qtopia编程开发指南
- Qt实现Code39条形码
- qt_ffmpeg_mp4_export_and_import.zip
- QT5.5入门与项目实战
- Huffman Compress 霍夫曼编码 压缩 解压缩
- 基于QT的黑白棋游戏设计和实现
- Qt写的连连看小游戏
- QTranslate_6.7.2.7z
- Qt基于FFmpeg播放本地 H.264H264文件
- QT编的MP3播放器
- linux系统的二级文件系统(QT实现了简
- QT生成DLL库文件的方法和使用方法详解
- QT+opencv+OCR 身份证号码,银行卡号识别
- Qt实现的简单的中国象棋程序
- Qt时钟Demo,在原来基础上添加了秒针
- 基于Qt和opencv的身份证号码识别系统
- Notepad++ ftp/sftp 插件
- 基于FFmpeg4.0.2的AAC编码器
- Qt写的Windows下屏幕录制程序源码
- QT旅游攻略软件程序源代码
- mp4_play.zip
- ffmpeg+qt的简单播放器
- MyPeppa_Release_V1.0.rar
评论
共有 条评论