将ip输入和端口输入的框改成纯文本的,更新RM

This commit is contained in:
2022-01-08 20:16:22 +08:00
parent a23651cad3
commit ffe3ee2967
6 changed files with 47 additions and 33 deletions
+20 -6
View File
@@ -1,9 +1,23 @@
## tcp_ip_scan ## tcp_ip_scan
![Qt_logo_2016.svg.png][1]
摸了很长时间,又把QT捡起来学习了,突然想到的一个项目,想扫描一下网上有多少隐藏的Minecraft服务器。
其实IP扫描器网上也有很多,我也用过来扫描我所在地区的ip段的80、25565端口,扫到了就进去参观一下。
然后我自己又写一个扫描器的初衷是想优化,输入的方式的。
这是我在网上找的扫描器
有一说一真的挺好用,就是只能扫1段,而且不支持域名。
然后这个是我做的
![捕获.PNG][2]
丑了一点,但也不是不能用。
可以扫描多个个独立ip、多个ip段、多个域名的任意端口、端口段。
支持多线程,不建议不建议超过100线程,我对QT的多线程还不是很理解,是不是线程会暴毙又或者无法正常结束。
实测在Qt5.12下就会出现线程无法正常结束的问题,所以这是在Qt6.2.2下编译的。(其实问题依然存在)太多线程的时候会有那么一两个线程无法正常结束。正在研究中。
持续学习研究中,计划会加入IPv6的支持,会优化外观细节。
项目地址
[我的git服务器][3]
[github][4]
[1]: https://wnfed.com/usr/uploads/2022/01/2803635156.png
扫描ip段的tcp端口 [2]: https://wnfed.com/usr/uploads/2022/01/1412970345.png
[3]: https://git.lmve.net/summary/~kevin%2Ftcp_ip_scan.git
工程同步地址 [4]: https://github.com/wuwenfengmi1998/tcp_ip_scan
gitlmve:https://git.lmve.net/summary/~kevin%2Ftcp_ip_scan.git
github:https://github.com/wuwenfengmi1998/tcp_ip_scan
+1 -2
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject> <!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 6.0.1, 2022-01-07T00:57:47. --> <!-- Written by QtCreator 6.0.1, 2022-01-08T19:34:54. -->
<qtcreator> <qtcreator>
<data> <data>
<variable>EnvironmentId</variable> <variable>EnvironmentId</variable>
@@ -247,7 +247,6 @@
<value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</value> <value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</value>
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value> <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value> <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
<value type="QString" key="RunConfiguration.WorkingDirectory.default">C:/Users/wuwen/Desktop/tcp_ip_scan/build-ip_sacaner-Desktop_Qt_6_2_2_MinGW_64_bit-Debug</value>
</valuemap> </valuemap>
<value type="qlonglong" key="ProjectExplorer.Target.RunConfigurationCount">1</value> <value type="qlonglong" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
</valuemap> </valuemap>
+3 -3
View File
@@ -8,7 +8,7 @@
#include <QDebug> #include <QDebug>
#include <QTcpSocket> //socket #include <QTcpSocket> //socket
#include <QLabel> #include <QLabel>
#include <QPlainTextEdit>
@@ -48,8 +48,8 @@ public:
quint16 outputbusy=0; quint16 outputbusy=0;
quint16 barbusy=0; quint16 barbusy=0;
//QThread* main_thread; //QThread* main_thread;
QTextEdit* ip_list; QPlainTextEdit* ip_list;
QTextEdit* port_list; QPlainTextEdit* port_list;
QTextEdit* output_list; QTextEdit* output_list;
trytry* try_telnet; trytry* try_telnet;
+2 -2
View File
@@ -61,7 +61,7 @@ Widget::Widget(QWidget *parent)
//dispatch_thread->moveToThread(main_thread); //dispatch_thread->moveToThread(main_thread);
connect(dispatch_thread, &dispatch::dispatch_one, [=]() connect(dispatch_thread, &dispatch::dispatch_one, [=]()
{ {
qDebug()<<100*nt_bar/t_bar; //qDebug()<<100*nt_bar/t_bar;
//ui->t_bar->setValue(100*nt_bar/t_bar); //ui->t_bar->setValue(100*nt_bar/t_bar);
ui->stard_scan->setText(QString("停止 %1%").arg(100*nt_bar/t_bar)); ui->stard_scan->setText(QString("停止 %1%").arg(100*nt_bar/t_bar));
@@ -92,7 +92,7 @@ Widget::Widget(QWidget *parent)
connect(ui->IP_list,&QTextEdit::textChanged,this, &Widget::auto_edit); //connect(ui->IP_list,&QTextEdit::textChanged,this, &Widget::auto_edit);
} }
+1
View File
@@ -6,6 +6,7 @@
#include <QTextEdit> #include <QTextEdit>
#include "scan_run.h" #include "scan_run.h"
#include <QThread> #include <QThread>
+20 -20
View File
@@ -25,16 +25,6 @@
<property name="windowTitle"> <property name="windowTitle">
<string>Widget</string> <string>Widget</string>
</property> </property>
<widget class="QTextEdit" name="port_list">
<property name="geometry">
<rect>
<x>490</x>
<y>100</y>
<width>101</width>
<height>111</height>
</rect>
</property>
</widget>
<widget class="QLabel" name="label_3"> <widget class="QLabel" name="label_3">
<property name="geometry"> <property name="geometry">
<rect> <rect>
@@ -133,16 +123,6 @@
<string>保存扫描结果</string> <string>保存扫描结果</string>
</property> </property>
</widget> </widget>
<widget class="QTextEdit" name="IP_list">
<property name="geometry">
<rect>
<x>10</x>
<y>100</y>
<width>471</width>
<height>111</height>
</rect>
</property>
</widget>
<widget class="QLabel" name="label"> <widget class="QLabel" name="label">
<property name="geometry"> <property name="geometry">
<rect> <rect>
@@ -204,6 +184,26 @@ domain.com</string>
<number>100</number> <number>100</number>
</property> </property>
</widget> </widget>
<widget class="QPlainTextEdit" name="IP_list">
<property name="geometry">
<rect>
<x>10</x>
<y>100</y>
<width>471</width>
<height>111</height>
</rect>
</property>
</widget>
<widget class="QPlainTextEdit" name="port_list">
<property name="geometry">
<rect>
<x>490</x>
<y>100</y>
<width>104</width>
<height>111</height>
</rect>
</property>
</widget>
</widget> </widget>
<resources/> <resources/>
<connections/> <connections/>