From 8777d93ec56d2ba6be0831cdf6dec76a1ddea901 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E6=96=87=E5=B3=B0?= Date: Thu, 6 Jan 2022 11:46:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=A8=E7=BA=BF=E7=A8=8B=E4=B8=AD=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E6=8E=A7=E4=BB=B6=E5=86=85=E5=AE=B9=E8=BF=98=E6=98=AF?= =?UTF-8?q?=E6=9C=89=E9=97=AE=E9=A2=98=EF=BC=8C=E8=A6=81=E6=94=B9=E6=88=90?= =?UTF-8?q?=E4=BF=A1=E5=8F=B7=E7=9A=84=E6=96=B9=E5=BC=8F=EF=BC=8C=E7=94=A8?= =?UTF-8?q?=E9=98=9F=E5=88=97=E4=BF=AE=E6=94=B9=EF=BC=8C=E5=BA=94=E8=AF=A5?= =?UTF-8?q?=E5=8F=AF=E4=BB=A5=E5=87=8F=E5=B0=91=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .DS_Store | Bin 0 -> 6148 bytes ip_sacaner/ip_sacaner.pro.user | 69 +++---- ip_sacaner/ip_sacaner.pro.user.6abde24 | 264 +++++++++++++++++++++++++ ip_sacaner/scan_run.cpp | 7 +- 4 files changed, 303 insertions(+), 37 deletions(-) create mode 100644 .DS_Store create mode 100644 ip_sacaner/ip_sacaner.pro.user.6abde24 diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..2204b9b9dfa2a6db0e9bb171ba371dc5d7af732b GIT binary patch literal 6148 zcmeHKO;6iE5S+6er{mMe?2g z7tZ_<{tmp^T~KM@T199^ntijo^X&CoYd?rcbtg%is6j+EIAf)b;t}J1_64i>mMT!$ zXGC;F5#=aXy`Ov7IEufegK59{3F>Vvi_C~ zRWVUO6c7cLLjk`8*4CC|I5G-RKonRa1$ceXaK^x6>Ci46DC`vg$j3-)i21n49PKgi zSUN-xOgSphQI)@9C`U)T_IZKF(xIc1@|O?g->m!%McKFG`P!zF3LHu)3Wx#^6 - + EnvironmentId - {6abde24b-4ceb-4889-a962-45c24ecb0df8} + {dd2c0b1a-683d-4d88-826b-21331983c7b9} ProjectExplorer.Project.ActiveTarget - 0 + 0 ProjectExplorer.Project.EditorSettings @@ -28,7 +28,7 @@ QmlJSGlobal - 2 + 2 UTF-8 false 4 @@ -70,16 +70,14 @@ 0 true - - -fno-delayed-template-parsing - + true Builtin.BuildSystem true true Builtin.DefaultTidyAndClazy - 2 + 4 @@ -91,16 +89,16 @@ ProjectExplorer.Project.Target.0 Desktop - Desktop Qt 5.12.12 MinGW 64-bit - Desktop Qt 5.12.12 MinGW 64-bit - qt.qt5.51212.win64_mingw73_kit - 0 - 0 - 0 + Qt 6.2.2 for macOS + Qt 6.2.2 for macOS + qt.qt6.622.clang_64_kit + 0 + 0 + 0 0 - C:\Users\wuwen\Desktop\tcp_ip_scan\build-ip_sacaner-Desktop_Qt_5_12_12_MinGW_64_bit-Debug - C:/Users/wuwen/Desktop/tcp_ip_scan/build-ip_sacaner-Desktop_Qt_5_12_12_MinGW_64_bit-Debug + /Users/wuwenfeng/Documents/tcp_ip_scan/build-ip_sacaner-Qt_6_2_2_for_macOS-Debug + /Users/wuwenfeng/Documents/tcp_ip_scan/build-ip_sacaner-Qt_6_2_2_for_macOS-Debug true @@ -112,7 +110,7 @@ true Qt4ProjectManager.MakeStep - 2 + 2 Build Build ProjectExplorer.BuildSteps.Build @@ -123,7 +121,7 @@ Qt4ProjectManager.MakeStep clean - 1 + 1 Clean Clean ProjectExplorer.BuildSteps.Clean @@ -131,14 +129,15 @@ 2 false + false Debug Qt4ProjectManager.Qt4BuildConfiguration 2 - C:\Users\wuwen\Desktop\tcp_ip_scan\build-ip_sacaner-Desktop_Qt_5_12_12_MinGW_64_bit-Release - C:/Users/wuwen/Desktop/tcp_ip_scan/build-ip_sacaner-Desktop_Qt_5_12_12_MinGW_64_bit-Release + /Users/wuwenfeng/Documents/tcp_ip_scan/build-ip_sacaner-Qt_6_2_2_for_macOS-Release + /Users/wuwenfeng/Documents/tcp_ip_scan/build-ip_sacaner-Qt_6_2_2_for_macOS-Release true @@ -150,7 +149,7 @@ true Qt4ProjectManager.MakeStep - 2 + 2 Build Build ProjectExplorer.BuildSteps.Build @@ -161,7 +160,7 @@ Qt4ProjectManager.MakeStep clean - 1 + 1 Clean Clean ProjectExplorer.BuildSteps.Clean @@ -169,6 +168,7 @@ 2 false + false Release Qt4ProjectManager.Qt4BuildConfiguration @@ -177,8 +177,8 @@ 0 - C:\Users\wuwen\Desktop\tcp_ip_scan\build-ip_sacaner-Desktop_Qt_5_12_12_MinGW_64_bit-Profile - C:/Users/wuwen/Desktop/tcp_ip_scan/build-ip_sacaner-Desktop_Qt_5_12_12_MinGW_64_bit-Profile + /Users/wuwenfeng/Documents/tcp_ip_scan/build-ip_sacaner-Qt_6_2_2_for_macOS-Profile + /Users/wuwenfeng/Documents/tcp_ip_scan/build-ip_sacaner-Qt_6_2_2_for_macOS-Profile true @@ -190,7 +190,7 @@ true Qt4ProjectManager.MakeStep - 2 + 2 Build Build ProjectExplorer.BuildSteps.Build @@ -201,7 +201,7 @@ Qt4ProjectManager.MakeStep clean - 1 + 1 Clean Clean ProjectExplorer.BuildSteps.Clean @@ -209,6 +209,7 @@ 2 false + false Profile Qt4ProjectManager.Qt4BuildConfiguration @@ -216,10 +217,10 @@ 0 0 - 3 + 3 - 0 + 0 Deploy Deploy ProjectExplorer.BuildSteps.Deploy @@ -229,7 +230,7 @@ false ProjectExplorer.DefaultDeployConfiguration - 1 + 1 true true @@ -237,21 +238,21 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:C:/Users/wuwen/Desktop/tcp_ip_scan/ip_sacaner/ip_sacaner.pro - C:/Users/wuwen/Desktop/tcp_ip_scan/ip_sacaner/ip_sacaner.pro + Qt4ProjectManager.Qt4RunConfiguration:/Users/wuwenfeng/Documents/tcp_ip_scan/ip_sacaner/ip_sacaner.pro + /Users/wuwenfeng/Documents/tcp_ip_scan/ip_sacaner/ip_sacaner.pro false true true false true - C:/Users/wuwen/Desktop/tcp_ip_scan/build-ip_sacaner-Desktop_Qt_5_12_12_MinGW_64_bit-Debug + /Users/wuwenfeng/Documents/tcp_ip_scan/build-ip_sacaner-Qt_6_2_2_for_macOS-Debug/ip_sacaner.app/Contents/MacOS - 1 + 1 ProjectExplorer.Project.TargetCount - 1 + 1 ProjectExplorer.Project.Updater.FileVersion diff --git a/ip_sacaner/ip_sacaner.pro.user.6abde24 b/ip_sacaner/ip_sacaner.pro.user.6abde24 new file mode 100644 index 0000000..955c388 --- /dev/null +++ b/ip_sacaner/ip_sacaner.pro.user.6abde24 @@ -0,0 +1,264 @@ + + + + + + EnvironmentId + {6abde24b-4ceb-4889-a962-45c24ecb0df8} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + false + true + false + 0 + true + true + 0 + 8 + true + false + 1 + true + true + true + *.md, *.MD, Makefile + false + true + + + + ProjectExplorer.Project.PluginSettings + + + true + false + true + true + true + true + + + 0 + true + + -fno-delayed-template-parsing + + true + Builtin.BuildSystem + + true + true + Builtin.DefaultTidyAndClazy + 2 + + + + true + + + + + ProjectExplorer.Project.Target.0 + + Desktop + Desktop Qt 5.12.12 MinGW 64-bit + Desktop Qt 5.12.12 MinGW 64-bit + qt.qt5.51212.win64_mingw73_kit + 0 + 0 + 0 + + 0 + C:\Users\wuwen\Desktop\tcp_ip_scan\build-ip_sacaner-Desktop_Qt_5_12_12_MinGW_64_bit-Debug + C:/Users/wuwen/Desktop/tcp_ip_scan/build-ip_sacaner-Desktop_Qt_5_12_12_MinGW_64_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + false + + + + true + Qt4ProjectManager.MakeStep + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + clean + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + C:\Users\wuwen\Desktop\tcp_ip_scan\build-ip_sacaner-Desktop_Qt_5_12_12_MinGW_64_bit-Release + C:/Users/wuwen/Desktop/tcp_ip_scan/build-ip_sacaner-Desktop_Qt_5_12_12_MinGW_64_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + + + true + Qt4ProjectManager.MakeStep + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + clean + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + 0 + + + 0 + C:\Users\wuwen\Desktop\tcp_ip_scan\build-ip_sacaner-Desktop_Qt_5_12_12_MinGW_64_bit-Profile + C:/Users/wuwen/Desktop/tcp_ip_scan/build-ip_sacaner-Desktop_Qt_5_12_12_MinGW_64_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + false + + + + true + Qt4ProjectManager.MakeStep + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + clean + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + 0 + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + + false + ProjectExplorer.DefaultDeployConfiguration + + 1 + + true + true + true + + 2 + + Qt4ProjectManager.Qt4RunConfiguration:C:/Users/wuwen/Desktop/tcp_ip_scan/ip_sacaner/ip_sacaner.pro + C:/Users/wuwen/Desktop/tcp_ip_scan/ip_sacaner/ip_sacaner.pro + false + true + true + false + true + C:/Users/wuwen/Desktop/tcp_ip_scan/build-ip_sacaner-Desktop_Qt_5_12_12_MinGW_64_bit-Debug + + 1 + + + + ProjectExplorer.Project.TargetCount + 1 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/ip_sacaner/scan_run.cpp b/ip_sacaner/scan_run.cpp index 20ccde9..c5aaf53 100644 --- a/ip_sacaner/scan_run.cpp +++ b/ip_sacaner/scan_run.cpp @@ -28,7 +28,7 @@ quint32 ipv4str_to_int(const QString& ipstr) void trytry::run() { - //qDebug() << ipstr<<":"<< ipint; + QTcpSocket m_socket; m_socket.connectToHost(ipstr, ipint, QTcpSocket::ReadWrite); @@ -37,7 +37,8 @@ void trytry::run() while(*outputbusy); *outputbusy+=1; QString temp = QString("%1:%2").arg(ipstr).arg(ipint); - output_list->append(temp); + //output_list->append(temp); + qDebug() << ipstr<<":"<< ipint; //msleep(1); *outputbusy-=1; } @@ -50,7 +51,7 @@ void trytry::run() *nt_bar+=1; //str.asprintf("停止 %.3f",((0.0+*nt_bar)/(0.0+*t_bar))*100); //bt->setText(QString("%1%").arg(((0.0+*nt_bar)/(0.0+*t_bar))*100)); - qDebug()<<*nt_bar<<"/"<<*t_bar; + //qDebug()<<*nt_bar<<"/"<<*t_bar; //*barbusy-=1; *now_thread_num-=1;