commit e7a06273acb382d55e48b4ac4ba7cd4633ddecbc Author: dmy@lab Date: Wed Apr 8 23:44:53 2015 +0800 一个Qt写的简单加密聊天程序 Signed-off-by: dmy@lab diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2b0de7a --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +LanPaper.pro.* \ No newline at end of file diff --git a/Client.cpp b/Client.cpp new file mode 100644 index 0000000..7c30db9 --- /dev/null +++ b/Client.cpp @@ -0,0 +1,62 @@ +#include "Client.h" + +Client::Client(QObject *parent) : + QObject(parent) +{ + tcpSocket = new QTcpSocket(this); + connect(tcpSocket,SIGNAL(connected()),this,SLOT(connected()) ); +} + + +void Client::sendMessage(const QString& message) +{ + Secret* secret=new Secret; + QString encodedText=secret->getEncodeString(message); + this->message=encodedText; + //qDebug()<tcpSocket->close(); + this->startConnection(); + this->socketState=QTcpSocket::ConnectingState; + this->trialCount=1; + this->timer=this->startTimer(1000); + //qDebug()<<"start timer"<<"\n"; + +} + +void Client::connected() +{ + tcpSocket->write(message.toUtf8()); + tcpSocket->waitForBytesWritten(10*1000); + //tcpSocket->write("\n\n\n\n\n"); + tcpSocket->waitForBytesWritten(10*1000); + this->socketState=QTcpSocket::ConnectedState; + emit this->connectionSuccess(true); + this->killTimer(this->timer); + this->tcpSocket->close(); +} + +void Client::startConnection() +{ + //qDebug()<tcpSocket->connectToHost(Config::getDesIP(),QString(Config::getDesPort()).toInt() ); +} + +void Client::timerEvent(QTimerEvent *e) +{ + //qDebug()<<"try"<trialCount<<"\n"; + if(this->trialCount==6) + { + this->tcpSocket->close(); + this->killTimer(this->timer); + emit this->connectionSuccess(false); + + } + if(this->socketState==QTcpSocket::ConnectingState) + { + //this->tcpSocket->close(); + //this->startConnection(); + this->trialCount+=1; + } + +} diff --git a/Client.h b/Client.h new file mode 100644 index 0000000..ca60370 --- /dev/null +++ b/Client.h @@ -0,0 +1,36 @@ +#ifndef CLIENT_H +#define CLIENT_H + +#include +#include +#include +#include +#include "Config.h" +#include "LanPaper.h" +class LanPaper; +class Client : public QObject +{ + Q_OBJECT + +public: + explicit Client(QObject *parent = 0); + void sendMessage(const QString& message); +signals: + void connectionSuccess(bool success); +private: + void startConnection(); +private: + QTcpSocket* tcpSocket; + QString message; + QTcpSocket::SocketState socketState; + int trialCount; + int timer; + void timerEvent(QTimerEvent *); + +public slots: +private slots: + void connected(); + +}; + +#endif // CLIENT_H diff --git a/Config.cpp b/Config.cpp new file mode 100644 index 0000000..f9af94d --- /dev/null +++ b/Config.cpp @@ -0,0 +1,83 @@ +#include "Config.h" +QHash* Config::hash=NULL; +Config::Config() +{ +} + + +QString Config::getSrcIP() +{ + Config::read(); + if(NULL!=Config::hash&&Config::hash->contains("SrcIP")) + { + return (*hash)["SrcIP"]; + } + return ""; +} +QString Config::getSrcPort() +{ + Config::read(); + if(NULL!=Config::hash&&Config::hash->contains("SrcPort")) + { + return (*hash)["SrcPort"]; + } + return ""; +} +QString Config::getDesIP() +{ + Config::read(); + if(NULL!=Config::hash&&Config::hash->contains("DesIP")) + { + return (*hash)["DesIP"]; + } + return ""; +} + +QString Config::getDesPort() +{ + Config::read(); + if(NULL!=Config::hash&&Config::hash->contains("DesPort")) + { + return (*hash)["DesPort"]; + } + return ""; +} + +void Config::read() +{ + QString filePath="./rc.svt"; + if(!QFile::exists(filePath)) + { + return; + } + if(Config::hash!=NULL) + { + return; + } + Config::hash=new QHash; + QFile file(filePath); + QString line; + QStringList sep; + QString key; + QString value; + file.open(QFile::ReadOnly); + if(file.isOpen()) + { + QTextStream reader(&file); + while( (line=reader.readLine())!=NULL) + { + sep=line.split('#'); + if(sep.length()!=2) + { + continue; + } + key=sep.at(0).trimmed(); + value=sep.at(1).trimmed(); + if(!Config::hash->contains(key)) + { + Config::hash->insert(key,value); + } + } + file.close(); + } +} diff --git a/Config.h b/Config.h new file mode 100644 index 0000000..11bdd24 --- /dev/null +++ b/Config.h @@ -0,0 +1,21 @@ +#ifndef CONFIG_H +#define CONFIG_H +#include +#include +#include +#include +#include +class Config +{ +public: + Config(); + static QString getSrcIP(); + static QString getSrcPort(); + static QString getDesIP(); + static QString getDesPort(); + static void read(); +private: + static QHash* hash; + +}; +#endif // CONFIG_H diff --git a/LanPaper.cpp b/LanPaper.cpp new file mode 100644 index 0000000..f57b0e9 --- /dev/null +++ b/LanPaper.cpp @@ -0,0 +1,148 @@ +#include "LanPaper.h" + +LanPaper::LanPaper(QWidget *parent) : + QMainWindow(parent),server(new Server(this)) +{ + setupUi(this); + this->server->listen(QHostAddress(Config::getSrcIP()),QString(Config::getSrcPort()).toInt() ); + //install message key filter + this->pTEMessage->installEventFilter(this); + this->installEventFilter(this); + this->trayIco=new TrayIco(this); + connect(this->actionAbout,SIGNAL(triggered()),this,SLOT(aboutClick()) ); + QScrollBar* scrollBar=this->pTEChatText->verticalScrollBar(); + scrollBar->setTracking(true); + +} + + +void LanPaper::addChatContentToThereSide(const QString& content) +{ + QTime time=QTime::currentTime(); + QString displayTime=QString("%1:%2:%3").arg(time.hour()).arg(time.minute()).arg(time.second()); + this->pTEChatText->appendPlainText(displayTime+":There"); + this->pTEChatText->appendPlainText(content); + this->pTEChatText->appendPlainText(" "); + if(this->isHidden()||this->isMinimized()||!this->isWindowsActivated()) + { + this->trayIco->setFlash(true); + } + this->scrollToBottom(); +} + +QString LanPaper::getMessage() +{ + return this->pTEMessage->toPlainText(); +} + +void LanPaper::on_pBTSendMessage_clicked() +{ + + QString text=this->pTEMessage->toPlainText(); + if(text.trimmed()=="") + { + QMessageBox::information(this,"warning","no empty message allowed."); + return; + } + this->addChatContentToMeSide(text); + this->client=new Client(this); + connect(this->client,SIGNAL(connectionSuccess(bool)),this,SLOT(clientSuccess(bool)) ); + this->client->sendMessage(text); + this->pBTSendMessage->setEnabled(false); + +} + +void LanPaper::addChatContentToMeSide(const QString& content) +{ + QTime time=QTime::currentTime(); + QString displayTime=QString("%1:%2:%3").arg(time.hour()).arg(time.minute()).arg(time.second()); + this->pTEChatText->appendPlainText(" Me:"+displayTime); + this->pTEChatText->appendPlainText(" "+content); + this->pTEChatText->appendPlainText(" "); + this->scrollToBottom(); +} + +bool LanPaper::eventFilter(QObject *obj, QEvent *event) +{ + if(obj==this->pTEMessage) + { + if(event->type()==QEvent::KeyPress) + { + QKeyEvent* keyEvent=(QKeyEvent*)event; + if(keyEvent->key()==Qt::Key_Return||keyEvent->key()==Qt::Key_Enter) + { + this->on_pBTSendMessage_clicked(); + event->accept(); + return true; + } + } + } + if(obj==this) + { + if(event->type()==QEvent::WindowActivate) + { + this->trayIco->setFlash(false); + } + } + return false; +} + +void LanPaper::changeEvent(QEvent *e) +{ + if((e->type()==QEvent::WindowStateChange)&&this->isMinimized()) + { + this->hide(); + } +} + +void LanPaper::aboutClick() +{ + QString srcIP=Config::getSrcIP(); + QString srcPort=Config::getSrcPort(); + QString desIP=Config::getDesIP(); + QString desPort=Config::getDesPort(); + QString info; + info=QString("src %1:%2\n des %3:%4").arg(srcIP).arg(srcPort).arg(desIP).arg(desPort); + QMessageBox::about(this,"about",info); +} + +void LanPaper::clientSuccess(bool success) +{ + if(success) + { + this->pTEMessage->setPlainText(""); + } + else + { + QMessageBox::warning(this,"warning","message send failed."); + } + this->pBTSendMessage->setEnabled(true); + this->pTEMessage->setFocus(); + this->client->deleteLater(); +} + +bool LanPaper::isWindowsActivated() +{ + if(this->isActiveWindow()) + { + return true; + } + if(this->pTEChatText->isActiveWindow()) + { + return true; + } + if(this->pTEChatText->isActiveWindow()) + { + return true; + } + return false; +} + + +void LanPaper::scrollToBottom() +{ + QScrollBar* scrollBar=this->pTEChatText->verticalScrollBar(); + scrollBar->setValue(scrollBar->maximum()); +} + + diff --git a/LanPaper.h b/LanPaper.h new file mode 100644 index 0000000..2360caf --- /dev/null +++ b/LanPaper.h @@ -0,0 +1,44 @@ +#ifndef LANPAPER_H +#define LANPAPER_H + +#include "Server.h" +#include "ui_LanPaper.h" +#include +#include "Client.h" +#include +#include +#include "TrayIco.h" +#include "Config.h" +#include +//#include "Secret.h" +class Server; +class TrayIco; +class Client; +class LanPaper : public QMainWindow, private Ui::LanPaper +{ + Q_OBJECT + +public: + explicit LanPaper(QWidget *parent = 0); + void addChatContentToThereSide(const QString &content); + QString getMessage(); +private: + void addChatContentToMeSide(const QString& content); + virtual bool eventFilter(QObject *, QEvent *); + virtual void changeEvent(QEvent *); + bool isWindowsActivated(); + void scrollToBottom(); +private slots: + void on_pBTSendMessage_clicked(); + void aboutClick(); + void clientSuccess(bool success); + +private: + Server* server; + TrayIco* trayIco; + Client *client; +}; + +#endif // LANPAPER_H + + diff --git a/LanPaper.pro b/LanPaper.pro new file mode 100644 index 0000000..f4aca09 --- /dev/null +++ b/LanPaper.pro @@ -0,0 +1,40 @@ +#------------------------------------------------- +# +# Project created by QtCreator 2013-12-01T10:03:18 +# +#------------------------------------------------- + +QT += core gui network + +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +TARGET = LanPaper +TEMPLATE = app +LIBS+=-static +#LIBS+=C:/Qt5Lib/plugins/imageformats/libqico.a + +SOURCES += main.cpp\ + LanPaper.cpp \ + Server.cpp \ + ThreadedServerConnection.cpp \ + Client.cpp \ + TrayIco.cpp \ + Secret.cpp \ + Config.cpp + +HEADERS += LanPaper.h \ + Server.h \ + ThreadedServerConnection.h \ + Client.h \ + TrayIco.h \ + Secret.h \ + Config.h + +FORMS += LanPaper.ui + +RESOURCES += \ + resource.qrc + +#QTPLUGIN+=qico + +#CONFIG += staticlib diff --git a/LanPaper.ui b/LanPaper.ui new file mode 100644 index 0000000..5feef7c --- /dev/null +++ b/LanPaper.ui @@ -0,0 +1,81 @@ + + + LanPaper + + + + 0 + 0 + 582 + 706 + + + + LanPaper + + + + + + 10 + 30 + 281 + 631 + + + + true + + + + + + 310 + 30 + 261 + 121 + + + + + + + 400 + 160 + 91 + 41 + + + + Send + + + + + + + + 0 + 0 + 582 + 21 + + + + + More + + + + + + + + about + + + + + + + diff --git a/Secret.cpp b/Secret.cpp new file mode 100644 index 0000000..642d533 --- /dev/null +++ b/Secret.cpp @@ -0,0 +1,133 @@ +#include "Secret.h" + +Secret::Secret(): + secretkey(NULL) +{ + this->secretkey=new char[36]; + this->secretkey[0]=0x2b; + this->secretkey[1]=0xef; + this->secretkey[2]=0x33; + this->secretkey[3]=0xaf; + this->secretkey[4]=0x2b; + this->secretkey[5]=0x4c; + this->secretkey[6]=0x91; + this->secretkey[7]=0xb6; + this->secretkey[8]=0xac; + this->secretkey[9]=0xe5; + this->secretkey[10]=0xca; + this->secretkey[11]=0x21; + this->secretkey[12]=0xc4; + this->secretkey[13]=0xb5; + this->secretkey[14]=0xbe; + this->secretkey[15]=0x5d; + this->secretkey[16]=0x7c; + this->secretkey[17]=0x3c; + this->secretkey[18]=0xc3; + this->secretkey[19]=0x16; + this->secretkey[20]=0x29; + this->secretkey[21]=0x7b; + this->secretkey[22]=0x8a; + this->secretkey[23]=0x99; + this->secretkey[24]=0x3e; + this->secretkey[25]=0x90; + this->secretkey[26]=0xce; + this->secretkey[27]=0x37; + this->secretkey[28]=0xf8; + this->secretkey[29]=0x8f; + this->secretkey[30]=0xec; + this->secretkey[31]=0x84; + this->secretkey[32]=0xcf; + this->secretkey[33]=0xf1; + this->secretkey[34]=0x74; + this->secretkey[35]=0x26; + +} + +Secret::~Secret() +{ + if(NULL!=this->secretkey) + { + delete[] this->secretkey; + } +} + + +QByteArray Secret::getEncodeString(const QString& str) +{ + QByteArray data(str.toUtf8()); + QDate currentDate=QDate::currentDate(); + int day; + day=currentDate.day()%16+1; + QByteArray newData; + int keyInd=0; + //newData.reserve(data.size()+data.size()/day+10); + for(int i=0;isecretkey[keyInd%36]) )+500); + keyInd++; + //qDebug()<secretkey[keyInd%1]<<"\n"; + //newData.push_back( (data.at(i))+00); + + if(i%day==0) + { + QTime t; + t= QTime::currentTime(); + for(int k=0;k<3;k++) + { + qsrand(t.msec()+t.second()*1000); + int n = qrand(); + QByteArray md5=QCryptographicHash::hash(QString("%1").arg(n).toLatin1(), QCryptographicHash::Md5); + newData.push_back(md5[0]); + newData.push_back(md5[1]); + newData.push_back(md5[2]); + newData.push_back(md5[3]); + newData.push_back(md5[4]); + newData.push_back(md5[5]); + qsrand(t.msec()+t.second()*1000+n); + md5=QCryptographicHash::hash(QString("%1").arg(n).toLatin1(), QCryptographicHash::Md5); + newData.push_back(md5[6]); + newData.push_back(md5[7]); + newData.push_back(md5[8]); + newData.push_back(md5[9]); + newData.push_back(md5[10]); + newData.push_back(md5[11]); + md5=QCryptographicHash::hash(QString("%1").arg(n).toLatin1(), QCryptographicHash::Md5); + newData.push_back(md5[12]); + newData.push_back(md5[0]); + newData.push_back(md5[2]); + newData.push_back(md5[4]); + newData.push_back(md5[6]); + newData.push_back(md5[8]); + } + } + } + return newData.toHex(); +} + +QString Secret::getDecodeString(const QByteArray& code) +{ + QByteArray data=QByteArray::fromHex(code); + QByteArray newData; + QDate currentDate=QDate::currentDate(); + int day; + day=currentDate.day()%16+1; + int keyInd=0; + for(int i=0;isecretkey[keyInd%36])); + keyInd++; + + } + if(i%day==0) + { + i+=54; + continue; + } + + } + //return data; + return QString(newData); + +} diff --git a/Secret.h b/Secret.h new file mode 100644 index 0000000..26424f3 --- /dev/null +++ b/Secret.h @@ -0,0 +1,21 @@ +#ifndef SECRET_H +#define SECRET_H + +#include +#include +#include +#include +#include +class Secret +{ +public: + Secret(); + ~Secret(); + QByteArray getEncodeString(const QString& str); + QString getDecodeString(const QByteArray& code); +private: + char* secretkey; + +}; + +#endif // SECRET_H diff --git a/Server.cpp b/Server.cpp new file mode 100644 index 0000000..70815f1 --- /dev/null +++ b/Server.cpp @@ -0,0 +1,73 @@ +#include "Server.h" + + +Server::Server(QObject *parent) : + QTcpServer(parent) +{ + connect(this,SIGNAL(newConnection()), this,SLOT(newConnection()) ); +} + + +void Server::newConnection() +{ + this->tcpSocket=this->nextPendingConnection(); + if(this->tcpSocket!=NULL) + { + this->tcpSocket=tcpSocket; + connect(this->tcpSocket,SIGNAL(readyRead()),this,SLOT(readyRead()) ); + } + else + { + QMessageBox::aboutQt(0); + } +} + +void Server::readyRead() +{ + QByteArray data=this->tcpSocket->readAll(); + if(this->receivedData.size()==0)//first section of data + { + this->timer=this->startTimer(1000*10); + } + this->receivedData.push_back(data); +// char a1=data.at(data.size()-1); +// char a2=data.at(data.size()-2); +// char a3=data.at(data.size()-3); +// char a4=data.at(data.size()-4); +// char a5=data.at(data.size()-5); + if(this->tcpSocket->atEnd()) + //if(data.at(data.size()-1)=='\n'&&data.at(data.size()-2)=='\n'&&data.at(data.size()-3)=='\n'&&data.at(data.size()-4)=='\n'&&data.at(data.size()-5)=='\n') + { + //this->receivedData.remove(this->receivedData.size()-5,5); + // QByteArray f=this->receivedData; + LanPaper *mainWin=(LanPaper *)(this->parent()); + if(NULL!=mainWin) + { + //tcpSocket->waitForReadyRead(5*1000); + //qDebug()<<"read buff"<tcpSocket->readBufferSize()<<"\n"; + //this->tcpSocket->setReadBufferSize(1024*100); + //QByteArray data=this->tcpSocket->readAll(); + //qDebug()<receivedData); + mainWin->addChatContentToThereSide(decodedText); + this->resetConnection(); + this->killTimer(this->timer); + } + + } +} + +void Server::timerEvent(QTimerEvent *e) +{ + this->killTimer(this->timer); + this->resetConnection(); + //qDebug()<<"recei failed\n"; +} + +void Server::resetConnection() +{ + this->receivedData.clear(); + this->tcpSocket->close(); + this->tcpSocket->deleteLater(); +} diff --git a/Server.h b/Server.h new file mode 100644 index 0000000..1e2ed68 --- /dev/null +++ b/Server.h @@ -0,0 +1,31 @@ +#ifndef SERVER_H +#define SERVER_H + +#include +#include +#include "LanPaper.h" +#include "ThreadedServerConnection.h" +#include +#include "Secret.h" +class Server : public QTcpServer +{ + Q_OBJECT +public: + explicit Server(QObject *parent = 0); +private: + virtual void timerEvent(QTimerEvent *); + void resetConnection(); +private: + QByteArray receivedData; + int timer; +protected: + QTcpSocket* tcpSocket; +signals: + +public slots: +private slots: + void newConnection(); + void readyRead(); +}; + +#endif // SERVER_H diff --git a/ThreadedServerConnection.cpp b/ThreadedServerConnection.cpp new file mode 100644 index 0000000..8a93ee0 --- /dev/null +++ b/ThreadedServerConnection.cpp @@ -0,0 +1,30 @@ +#include "ThreadedServerConnection.h" + +ThreadedServerConnection::ThreadedServerConnection(int socketDescriptor, const QString &fortune, QObject *parent) : + QThread(parent), socketDescriptor(socketDescriptor), text(fortune) +{ +} + + +void ThreadedServerConnection::run() +{ + QTcpSocket tcpSocket; +//! [1] //! [2] + if (!tcpSocket.setSocketDescriptor(socketDescriptor)) { + emit error(tcpSocket.error()); + return; + } +//! [2] //! [3] + + QByteArray block; + QDataStream out(&block, QIODevice::WriteOnly); + out.setVersion(QDataStream::Qt_5_1); + //out << (quint16)0; + out << text; + //out.device()->seek(0); + //out << (quint16)(block.size() - sizeof(quint16)); +//! [3] //! [4] + tcpSocket.write(block); + tcpSocket.disconnectFromHost(); + tcpSocket.waitForDisconnected(); +} diff --git a/ThreadedServerConnection.h b/ThreadedServerConnection.h new file mode 100644 index 0000000..eed61f6 --- /dev/null +++ b/ThreadedServerConnection.h @@ -0,0 +1,23 @@ +#ifndef THREADEDSERVERCONNECTION_H +#define THREADEDSERVERCONNECTION_H + +#include +#include +#include +#include +class ThreadedServerConnection : public QThread +{ + Q_OBJECT +public: + explicit ThreadedServerConnection(int socketDescriptor, const QString &fortune, QObject *parent=0); + void run(); +signals: + void error(QTcpSocket::SocketError socketError); +private: + int socketDescriptor; + QString text; +public slots: + +}; + +#endif // THREADEDSERVERCONNECTION_H diff --git a/TrayIco.cpp b/TrayIco.cpp new file mode 100644 index 0000000..5cbb05e --- /dev/null +++ b/TrayIco.cpp @@ -0,0 +1,56 @@ +#include "TrayIco.h" + +TrayIco::TrayIco(QObject *parent) : + QObject(parent),normalIcon(":/ico/smileico"),flashIcon(":/ico/flashsmileico"),timer(0) + //QObject(parent),normalIcon("c:/bpa/emoticon.ico"),flashIcon("c:/bpa/big_smile.ico"),timer(0) +{ + this->trayIco.setIcon(this->normalIcon); + this->trayIco.show(); + connect(&this->trayIco,SIGNAL(activated(QSystemTrayIcon::ActivationReason)),this,SLOT(activated(QSystemTrayIcon::ActivationReason)) ); +} + + +void TrayIco::activated(QSystemTrayIcon::ActivationReason reason) +{ + if(reason==QSystemTrayIcon::Trigger) + { + + LanPaper *mainWin=(LanPaper *)this->parent(); + this->setFlash(false); + mainWin->showNormal(); + mainWin->activateWindow(); + } +} + +void TrayIco::setFlash(bool flash) +{ + if(flash) + { + if(this->timer!=0) + { + return; + } + this->flashFlag=true; + this->timer=this->startTimer(500); + } + else + { + this->trayIco.setIcon(this->normalIcon); + this->killTimer(this->timer); + this->timer=0; + } +} + +void TrayIco::timerEvent(QTimerEvent *e) +{ + if(this->flashFlag) + { + this->trayIco.setIcon(this->flashIcon); + this->flashFlag=false; + } + else + { + this->trayIco.setIcon(this->normalIcon); + this->flashFlag=true; + } +} diff --git a/TrayIco.h b/TrayIco.h new file mode 100644 index 0000000..911737c --- /dev/null +++ b/TrayIco.h @@ -0,0 +1,31 @@ +#ifndef TRAYICO_H +#define TRAYICO_H +#include "LanPaper.h" +#include +#include +#include + +class TrayIco : public QObject +{ + Q_OBJECT +public: + explicit TrayIco(QObject *parent = 0); + void setFlash(bool); +private: + void timerEvent(QTimerEvent *); +private: + QSystemTrayIcon trayIco; + QIcon normalIcon; + QIcon flashIcon; + int timer; + bool flashFlag; + +signals: + +public slots: +private slots: + void activated(QSystemTrayIcon::ActivationReason); + +}; + +#endif // TRAYICO_H diff --git a/big_smile.ico b/big_smile.ico new file mode 100644 index 0000000..2678003 Binary files /dev/null and b/big_smile.ico differ diff --git a/emoticon.ico b/emoticon.ico new file mode 100644 index 0000000..2d35b87 Binary files /dev/null and b/emoticon.ico differ diff --git a/main.cpp b/main.cpp new file mode 100644 index 0000000..169c8d6 --- /dev/null +++ b/main.cpp @@ -0,0 +1,14 @@ +#include "LanPaper.h" +#include +//#include + +//Q_IMPORT_PLUGIN(qico) + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + LanPaper w; + w.show(); + + return a.exec(); +} diff --git a/rc.svt b/rc.svt new file mode 100644 index 0000000..77cf028 --- /dev/null +++ b/rc.svt @@ -0,0 +1,4 @@ +SrcIP#localhost +SrcPort#100 +DesIP#12.21.12.21 +DesPort#100 \ No newline at end of file diff --git a/resource.qrc b/resource.qrc new file mode 100644 index 0000000..401682a --- /dev/null +++ b/resource.qrc @@ -0,0 +1,6 @@ + + + emoticon.ico + big_smile.ico + +