将ip输入和端口输入的框改成纯文本的,更新RM
This commit is contained in:
@@ -1,9 +1,23 @@
|
||||
## 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]
|
||||
|
||||
|
||||
|
||||
扫描ip段的tcp端口
|
||||
|
||||
工程同步地址
|
||||
gitlmve:https://git.lmve.net/summary/~kevin%2Ftcp_ip_scan.git
|
||||
github:https://github.com/wuwenfengmi1998/tcp_ip_scan
|
||||
[1]: https://wnfed.com/usr/uploads/2022/01/2803635156.png
|
||||
[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
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!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>
|
||||
<data>
|
||||
<variable>EnvironmentId</variable>
|
||||
@@ -247,7 +247,6 @@
|
||||
<value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</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>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
||||
</valuemap>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include <QDebug>
|
||||
#include <QTcpSocket> //socket
|
||||
#include <QLabel>
|
||||
|
||||
#include <QPlainTextEdit>
|
||||
|
||||
|
||||
|
||||
@@ -48,8 +48,8 @@ public:
|
||||
quint16 outputbusy=0;
|
||||
quint16 barbusy=0;
|
||||
//QThread* main_thread;
|
||||
QTextEdit* ip_list;
|
||||
QTextEdit* port_list;
|
||||
QPlainTextEdit* ip_list;
|
||||
QPlainTextEdit* port_list;
|
||||
QTextEdit* output_list;
|
||||
|
||||
trytry* try_telnet;
|
||||
|
||||
@@ -61,7 +61,7 @@ Widget::Widget(QWidget *parent)
|
||||
//dispatch_thread->moveToThread(main_thread);
|
||||
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->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);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include <QTextEdit>
|
||||
|
||||
|
||||
|
||||
#include "scan_run.h"
|
||||
#include <QThread>
|
||||
|
||||
|
||||
+20
-20
@@ -25,16 +25,6 @@
|
||||
<property name="windowTitle">
|
||||
<string>Widget</string>
|
||||
</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">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
@@ -133,16 +123,6 @@
|
||||
<string>保存扫描结果</string>
|
||||
</property>
|
||||
</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">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
@@ -204,6 +184,26 @@ domain.com</string>
|
||||
<number>100</number>
|
||||
</property>
|
||||
</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>
|
||||
<resources/>
|
||||
<connections/>
|
||||
|
||||
Reference in New Issue
Block a user