+48
-5
@@ -42,12 +42,12 @@ void dispatch::run()
|
||||
{
|
||||
QStringList str_ip_list = ip_list.split("\n");
|
||||
QStringList str_ips_list;
|
||||
|
||||
QStringList str_list_more;
|
||||
quint32 ipa,ipb;
|
||||
QStringList str_port_list = port_list.split("\n");
|
||||
QStringList str_ports_list;
|
||||
|
||||
quint32 ips_num=0;
|
||||
quint32 ports_num=0;
|
||||
quint64 ips_num=0;
|
||||
QRegExp ex_ipv4 ("^((25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(25[0-5]|2[0-4]\\d|[01]?\\d\\d?)$");
|
||||
QRegExp ex_ipv4_more("^((25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(25[0-5]|2[0-4]\\d|[01]?\\d\\d?)-((25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(25[0-5]|2[0-4]\\d|[01]?\\d\\d?)$");
|
||||
QRegExp ex_ipv4_more2("^((25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(25[0-5]|2[0-4]\\d|[01]?\\d\\d?)/(0?[0-9]|1[0-9]|2[0-9]|3[0-2])$");
|
||||
@@ -60,30 +60,73 @@ void dispatch::run()
|
||||
if(ex_ipv4.exactMatch(str_ip_list.at(i)))
|
||||
{
|
||||
qDebug() << str_ip_list.at(i)<<" is ipv4";
|
||||
str_ips_list.append(str_ip_list.at(i));
|
||||
ips_num+=1;
|
||||
}else if(ex_ipv4_more.exactMatch(str_ip_list.at(i)))
|
||||
{
|
||||
|
||||
qDebug() << str_ip_list.at(i)<<" is ipv4_more";
|
||||
str_list_more=str_ip_list.at(i).split("-");
|
||||
ipa=ipv4str_to_int(str_list_more.at(0));
|
||||
ipb=ipv4str_to_int(str_list_more.at(1));
|
||||
if(ipa>ipb)
|
||||
{
|
||||
for(;ipb<=ipa;ipb++)
|
||||
{
|
||||
str_ips_list.append(ipv4int_to_str(ipb));
|
||||
ips_num+=1;
|
||||
}
|
||||
}else if(ipb>ipa)
|
||||
{
|
||||
for(;ipa<=ipb;ipa++)
|
||||
{
|
||||
str_ips_list.append(ipv4int_to_str(ipa));
|
||||
ips_num+=1;
|
||||
}
|
||||
}else//=
|
||||
{
|
||||
str_ips_list.append(ipv4int_to_str(ipa));
|
||||
ips_num+=1;
|
||||
}
|
||||
|
||||
}else if(ex_ipv4_more2.exactMatch(str_ip_list.at(i)))
|
||||
{
|
||||
|
||||
qDebug() << str_ip_list.at(i)<<" is ipv4_more2";
|
||||
str_list_more=str_ip_list.at(i).split("/");
|
||||
ipa=ipv4str_to_int(str_list_more.at(0));
|
||||
ipb=qPow(2,(32-str_list_more.at(1).toInt()));
|
||||
for(quint32 ii=0;ii<ipb;ii++)
|
||||
{
|
||||
str_ips_list.append(ipv4int_to_str(ipa+ii));
|
||||
ips_num+=1;
|
||||
}
|
||||
|
||||
}else if(ex_ipv6.exactMatch(str_ip_list.at(i)))
|
||||
{
|
||||
|
||||
qDebug() << str_ip_list.at(i)<<" is ipv6";
|
||||
str_ips_list.append(str_ip_list.at(i));
|
||||
ips_num+=1;
|
||||
}else if(ex_domain.exactMatch(str_ip_list.at(i)))
|
||||
{
|
||||
|
||||
qDebug() << str_ip_list.at(i)<<" is domain";
|
||||
str_ips_list.append(str_ip_list.at(i));
|
||||
ips_num+=1;
|
||||
}else
|
||||
{
|
||||
qDebug() << str_ip_list.at(i)<<" don't know what is thit";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
qDebug() << ips_num;
|
||||
qDebug() << str_ips_list.size();
|
||||
for(int ii=0;ii<str_ips_list.size();ii++)
|
||||
{
|
||||
|
||||
qDebug() << str_ips_list.at(ii);
|
||||
}
|
||||
|
||||
emit dispatch_finish();
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include <QTcpSocket> //socket
|
||||
#include <QLabel>
|
||||
#include <QPlainTextEdit>
|
||||
|
||||
#include <qmath.h>
|
||||
|
||||
|
||||
class trytry : public QThread
|
||||
|
||||
@@ -70,6 +70,102 @@ Widget::Widget(QWidget *parent)
|
||||
|
||||
});//'scan button pass'
|
||||
|
||||
|
||||
connect(ui->pushButton_2, &QPushButton::pressed, [=]()
|
||||
{
|
||||
|
||||
ui->IP_list->insertPlainText(ui->pushButton_2->text());
|
||||
});
|
||||
connect(ui->pushButton_3, &QPushButton::pressed, [=]()
|
||||
{
|
||||
|
||||
ui->IP_list->insertPlainText(ui->pushButton_3->text());
|
||||
});
|
||||
connect(ui->pushButton_4, &QPushButton::pressed, [=]()
|
||||
{
|
||||
|
||||
ui->IP_list->insertPlainText(ui->pushButton_4->text());
|
||||
});
|
||||
connect(ui->pushButton_5, &QPushButton::pressed, [=]()
|
||||
{
|
||||
|
||||
ui->IP_list->insertPlainText(ui->pushButton_5->text());
|
||||
});
|
||||
connect(ui->pushButton_6, &QPushButton::pressed, [=]()
|
||||
{
|
||||
|
||||
ui->IP_list->insertPlainText("\n");
|
||||
});
|
||||
connect(ui->pushButton_7, &QPushButton::pressed, [=]()
|
||||
{
|
||||
|
||||
ui->IP_list->insertPlainText(ui->pushButton_7->text());
|
||||
});
|
||||
connect(ui->pushButton_8, &QPushButton::pressed, [=]()
|
||||
{
|
||||
|
||||
ui->IP_list->insertPlainText(ui->pushButton_8->text());
|
||||
});
|
||||
connect(ui->pushButton_9, &QPushButton::pressed, [=]()
|
||||
{
|
||||
|
||||
ui->IP_list->insertPlainText(ui->pushButton_9->text());
|
||||
});
|
||||
connect(ui->pushButton_10, &QPushButton::pressed, [=]()
|
||||
{
|
||||
|
||||
ui->IP_list->insertPlainText(ui->pushButton_10->text());
|
||||
});
|
||||
connect(ui->pushButton_11, &QPushButton::pressed, [=]()
|
||||
{
|
||||
|
||||
ui->IP_list->insertPlainText(ui->pushButton_11->text());
|
||||
});
|
||||
connect(ui->pushButton_12, &QPushButton::pressed, [=]()
|
||||
{
|
||||
|
||||
ui->IP_list->insertPlainText(ui->pushButton_12->text());
|
||||
});
|
||||
connect(ui->pushButton_13, &QPushButton::pressed, [=]()
|
||||
{
|
||||
|
||||
ui->IP_list->insertPlainText(ui->pushButton_13->text());
|
||||
});
|
||||
connect(ui->pushButton_14, &QPushButton::pressed, [=]()
|
||||
{
|
||||
|
||||
ui->IP_list->insertPlainText(ui->pushButton_14->text());
|
||||
});
|
||||
connect(ui->pushButton_15, &QPushButton::pressed, [=]()
|
||||
{
|
||||
|
||||
ui->IP_list->insertPlainText(ui->pushButton_15->text());
|
||||
});
|
||||
connect(ui->pushButton_16, &QPushButton::pressed, [=]()
|
||||
{
|
||||
|
||||
ui->IP_list->insertPlainText(ui->pushButton_16->text());
|
||||
});
|
||||
connect(ui->pushButton_17, &QPushButton::pressed, [=]()
|
||||
{
|
||||
|
||||
ui->IP_list->insertPlainText(ui->pushButton_17->text());
|
||||
});
|
||||
connect(ui->pushButton_18, &QPushButton::pressed, [=]()
|
||||
{
|
||||
|
||||
ui->IP_list->insertPlainText(ui->pushButton_18->text());
|
||||
});
|
||||
connect(ui->pushButton_19, &QPushButton::pressed, [=]()
|
||||
{
|
||||
|
||||
ui->IP_list->insertPlainText(ui->pushButton_19->text());
|
||||
});
|
||||
connect(ui->pushButton_21, &QPushButton::pressed, [=]()
|
||||
{
|
||||
|
||||
ui->IP_list->clear();
|
||||
});
|
||||
}
|
||||
|
||||
Widget::~Widget()
|
||||
|
||||
+278
-18
@@ -44,9 +44,9 @@
|
||||
<widget class="QPushButton" name="stard_scan">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>420</x>
|
||||
<x>480</x>
|
||||
<y>220</y>
|
||||
<width>171</width>
|
||||
<width>111</width>
|
||||
<height>41</height>
|
||||
</rect>
|
||||
</property>
|
||||
@@ -68,8 +68,8 @@
|
||||
<widget class="QSpinBox" name="threads">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>350</x>
|
||||
<y>230</y>
|
||||
<x>240</x>
|
||||
<y>240</y>
|
||||
<width>61</width>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
@@ -87,8 +87,8 @@
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>320</x>
|
||||
<y>230</y>
|
||||
<x>240</x>
|
||||
<y>220</y>
|
||||
<width>31</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
@@ -101,7 +101,7 @@
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>230</y>
|
||||
<y>240</y>
|
||||
<width>53</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
@@ -113,8 +113,8 @@
|
||||
<widget class="QPushButton" name="pushButton">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>70</x>
|
||||
<y>230</y>
|
||||
<x>60</x>
|
||||
<y>240</y>
|
||||
<width>91</width>
|
||||
<height>24</height>
|
||||
</rect>
|
||||
@@ -128,12 +128,12 @@
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>20</y>
|
||||
<width>141</width>
|
||||
<width>171</width>
|
||||
<height>71</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>IP范围
|
||||
<string>IP范围 总数不能超过2147483647
|
||||
127.0.0.1
|
||||
0.0.0.0-255.255.255.255
|
||||
domain.com</string>
|
||||
@@ -155,8 +155,8 @@ domain.com</string>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>200</x>
|
||||
<y>230</y>
|
||||
<x>170</x>
|
||||
<y>220</y>
|
||||
<width>41</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
@@ -168,8 +168,8 @@ domain.com</string>
|
||||
<widget class="QSpinBox" name="timeout">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>250</x>
|
||||
<y>230</y>
|
||||
<x>170</x>
|
||||
<y>240</y>
|
||||
<width>61</width>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
@@ -189,7 +189,7 @@ domain.com</string>
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>100</y>
|
||||
<width>471</width>
|
||||
<width>301</width>
|
||||
<height>111</height>
|
||||
</rect>
|
||||
</property>
|
||||
@@ -197,13 +197,273 @@ domain.com</string>
|
||||
<widget class="QPlainTextEdit" name="port_list">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>490</x>
|
||||
<x>483</x>
|
||||
<y>100</y>
|
||||
<width>104</width>
|
||||
<width>111</width>
|
||||
<height>111</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>320</x>
|
||||
<y>100</y>
|
||||
<width>61</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>192.168.</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton_3">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>320</x>
|
||||
<y>130</y>
|
||||
<width>61</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>169.254.</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton_4">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>320</x>
|
||||
<y>160</y>
|
||||
<width>31</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>10.</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton_5">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>350</x>
|
||||
<y>160</y>
|
||||
<width>31</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>100.</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton_6">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>320</x>
|
||||
<y>190</y>
|
||||
<width>31</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>ENT</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton_7">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>350</x>
|
||||
<y>190</y>
|
||||
<width>31</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>/</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton_8">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>380</x>
|
||||
<y>190</y>
|
||||
<width>31</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>.</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton_9">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>440</x>
|
||||
<y>190</y>
|
||||
<width>31</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>-</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton_10">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>410</x>
|
||||
<y>190</y>
|
||||
<width>31</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton_11">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>380</x>
|
||||
<y>100</y>
|
||||
<width>31</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>1</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton_12">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>410</x>
|
||||
<y>100</y>
|
||||
<width>31</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>2</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton_13">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>440</x>
|
||||
<y>100</y>
|
||||
<width>31</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>3</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton_14">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>380</x>
|
||||
<y>130</y>
|
||||
<width>31</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>4</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton_15">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>410</x>
|
||||
<y>130</y>
|
||||
<width>31</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>5</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton_16">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>440</x>
|
||||
<y>130</y>
|
||||
<width>31</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>6</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton_17">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>380</x>
|
||||
<y>160</y>
|
||||
<width>31</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>7</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton_18">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>410</x>
|
||||
<y>160</y>
|
||||
<width>31</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>8</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton_19">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>440</x>
|
||||
<y>160</y>
|
||||
<width>31</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>9</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton_20">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>380</x>
|
||||
<y>220</y>
|
||||
<width>91</width>
|
||||
<height>41</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Ping Olny</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton_21">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>320</x>
|
||||
<y>220</y>
|
||||
<width>51</width>
|
||||
<height>41</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>clear</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
|
||||
Reference in New Issue
Block a user