| 1 | #cxx . . $ `<file>/cNetStat.cpp`/include "cNetStat.h"cxx . . $ `<file>/cNetStat.h`/ |
| 2 | #include <QDir> |
| 3 | #include <QFile> |
| 4 | #include <QTextStream> |
| 5 | #include <QDebug> |
| 6 | #include <QProcess> |
| 7 | #include <QRegExp> |
| 8 | #include <QRegularExpression> |
| 9 | |
| 10 | cNetStatcxx . . $ cNetStat#::cNetStatcxx . . $ cNetStat#cNetStat(49f6e7a06ebc5aa8).(){ |
| 11 | |
| 12 | } |
| 13 | |
| 14 | |
| 15 | void cNetStatcxx . . $ cNetStat#::runcxx . . $ cNetStat#run(49f6e7a06ebc5aa8).(){ |
| 16 | getNetStatcxx . . $ cNetStat#getNetStat(ee77c92be8ae04d7).(); |
| 17 | emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! endReadStatcxx . . $ cNetStat#endReadStat(fb2d4d711cd938e3).(save_netstatcxx . . $ QVector#QVector(8c6ebb725bc04eaa).); |
| 18 | } |
| 19 | |
| 20 | QVectorcxx . . $ QVector#<sNetStatcxx . . $ sNetStat#> cNetStatcxx . . $ cNetStat#::getTablecxx . . $ cNetStat#getTable(ee77c92be8ae04d7).(){ |
| 21 | sNetStatcxx . . $ sNetStat# netstat; |
| 22 | QVectorcxx . . $ QVector#<sNetStatcxx . . $ sNetStat#> resultcxx . . $ QVector#QVector(ced63f7c635d850d).; |
| 23 | |
| 24 | |
| 25 | #if defined(Q_OS_LINUXcxx . . $ `<external>/5130987379601705141/qsystemdetection.h:150:11`!) || defined(Q_OS_UNIXcxx . . $ `<external>/5130987379601705141/qsystemdetection.h:201:11`!) |
| 26 | QVectorcxx . . $ QVector#<QStringcxx . . $ QString#> protscxx . . $ QVector#QVector(ced63f7c635d850d).; // Протоколы |
| 27 | QListcxx . . $ QList#<QStringcxx . . $ QString#> statescxx . . $ QList#QList(ced63f7c635d850d).; // Статусы подключений |
| 28 | |
| 29 | // Список протоколов |
| 30 | prots <<cxx . . $ QVector#`operator<<`(a67f761fa76cec1d). "tcp"cxx . . $ QString#QString(85c52e162fed56f9). <<cxx . . $ QVector#`operator<<`(a67f761fa76cec1d). "udp"cxx . . $ QString#QString(85c52e162fed56f9). <<cxx . . $ QVector#`operator<<`(a67f761fa76cec1d). "tcp6"cxx . . $ QString#QString(85c52e162fed56f9). <<cxx . . $ QVector#`operator<<`(a67f761fa76cec1d). "udp6"cxx . . $ QString#QString(85c52e162fed56f9). <<cxx . . $ QVector#`operator<<`(a67f761fa76cec1d). "icmp"cxx . . $ QString#QString(85c52e162fed56f9).; |
| 31 | |
| 32 | // Массив статусов подключений |
| 33 | states <<cxx . . $ QList#`operator<<`(309d1580d8f5dc58). ""cxx . . $ QString#QString(85c52e162fed56f9). <<cxx . . $ QList#`operator<<`(309d1580d8f5dc58). "ESTABLISHED"cxx . . $ QString#QString(85c52e162fed56f9). <<cxx . . $ QList#`operator<<`(309d1580d8f5dc58). "SYN_SENT"cxx . . $ QString#QString(85c52e162fed56f9). <<cxx . . $ QList#`operator<<`(309d1580d8f5dc58). "SYN_RECV"cxx . . $ QString#QString(85c52e162fed56f9). <<cxx . . $ QList#`operator<<`(309d1580d8f5dc58). "FIN_WAIT1"cxx . . $ QString#QString(85c52e162fed56f9). <<cxx . . $ QList#`operator<<`(309d1580d8f5dc58). "FIN_WAIT2"cxx . . $ QString#QString(85c52e162fed56f9).; |
| 34 | states <<cxx . . $ QList#`operator<<`(309d1580d8f5dc58). "TIME_WAIT"cxx . . $ QString#QString(85c52e162fed56f9). <<cxx . . $ QList#`operator<<`(309d1580d8f5dc58). "CLOSE"cxx . . $ QString#QString(85c52e162fed56f9). <<cxx . . $ QList#`operator<<`(309d1580d8f5dc58). "CLOSE_WAIT"cxx . . $ QString#QString(85c52e162fed56f9). <<cxx . . $ QList#`operator<<`(309d1580d8f5dc58). "LAST_ACK"cxx . . $ QString#QString(85c52e162fed56f9). <<cxx . . $ QList#`operator<<`(309d1580d8f5dc58). "LISTEN"cxx . . $ QString#QString(85c52e162fed56f9).; |
| 35 | states <<cxx . . $ QList#`operator<<`(309d1580d8f5dc58). "CLOSING"cxx . . $ QString#QString(85c52e162fed56f9). <<cxx . . $ QList#`operator<<`(309d1580d8f5dc58). "CLOSED"cxx . . $ QString#QString(85c52e162fed56f9).; |
| 36 | |
| 37 | // Обновление списка процесов |
| 38 | ProcessListLinuxcxx . . $ ProcessListLinux# proccxx . . $ ProcessListLinux#ProcessListLinux(49f6e7a06ebc5aa8).; |
| 39 | proc.initProccessListcxx . . $ ProcessListLinux#initProccessList(b126dc7c1de90089).(); |
| 40 | |
| 41 | |
| 42 | for (int p=0;p<prots.sizecxx . . $ QVector#size(455f465bc33b4cdf).();p++){ |
| 43 | QFilecxx . . $ QFile# filecxx . . $ QFile#QFile(3520e46b33348bf6).("/proc/net/"+cxx . . $ operator+(c75c3ae4eb9af1a8).prots.atcxx . . $ QVector#at(e2681f9bb6b2f357).(p)); |
| 44 | if (!file.opencxx . . $ QFile#open(dca164408be960c8).(QIODevicecxx . . $ QIODevice#::ReadOnlycxx . . $ QIODevice#ReadOnly. |cxx . . $ `operator|`(c9e45f682471e48d). QIODevicecxx . . $ QIODevice#::Textcxx . . $ QIODevice#Text.)){ |
| 45 | qDebugcxx . . $ `<external>/10450329605257866924/qlogging.h:164:9`!() <<cxx . . $ QDebug#`operator<<`(4cf17434affdd8). file.errorStringcxx . . $ QIODevice#errorString(6ef7b6c27b00b43d).(); |
| 46 | return resultcxx . . $ QVector#QVector(a0d8f1cfe28f0150).; |
| 47 | } |
| 48 | |
| 49 | QTextStreamcxx . . $ QTextStream# incxx . . $ QTextStream#QTextStream(bebe8f2dee7f9e86).(&file); |
| 50 | QStringListcxx . . $ QStringList# buf = in.readAllcxx . . $ QTextStream#readAll(4365c3963150523e).().splitcxx . . $ QString#split(c8b44a97dcb6200d).("\n"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 51 | file.closecxx . . $ QFileDevice#close(49f6e7a06ebc5aa8).(); |
| 52 | for (int i=1;i<buf.sizecxx . . $ QList#size(ea6fe5115c70a13f).()-1;i++){ |
| 53 | //("", "sl", "local_address", "rem_address", "st", "tx_queue", "rx_queue", "tr", "tm->when", "retrnsmt", "uid", "timeout", "inode", "") |
| 54 | //("", "18:", "4B80A8C0:DA90", "5480A8C0:008B", "01", "00000000:00000000", "02:000A6A42", "00000000", "500", "0", "7793475", "2", "d6798fc0", "20", "3", "32", "10", "-1", "") |
| 55 | buf[cxx . . $ QList#`operator[]`(7a0ef1c7079e8533).i] =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). " "+cxx . . $ operator+(c75c3ae4eb9af1a8).buf.atcxx . . $ QList#at(e2681f9bb6b2f357).(i); |
| 56 | QStringListcxx . . $ QStringList# ns = buf.atcxx . . $ QList#at(e2681f9bb6b2f357).(i).splitcxx . . $ QString#split(4bed3a84ceee0bef).(QRegularExpressioncxx . . $ QRegularExpression#QRegularExpression(4279d2539df7cd4a).("\\s+"cxx . . $ QString#QString(85c52e162fed56f9).)); |
| 57 | |
| 58 | netstat.protcxx . . $ sNetStat#prot.=cxx . . $ QString#`operator=`(4f35bf974e7f8568).prots.atcxx . . $ QVector#at(e2681f9bb6b2f357).(p).toUppercxx . . $ QString#toUpper(dca2c5857e9adf82).(); |
| 59 | netstat.local_addresscxx . . $ sNetStat#local_address.=cxx . . $ QString#`operator=`(4f35bf974e7f8568).convAddresscxx . . $ cNetStat#convAddress(1ba22f3269531822).(nscxx . . $ QString#QString(132dd6869045752b)..atcxx . . $ QList#at(e2681f9bb6b2f357).(2),netstatcxx . . $ QString#QString(132dd6869045752b)..protcxx . . $ sNetStat#prot.); |
| 60 | netstat.rem_addresscxx . . $ sNetStat#rem_address.=cxx . . $ QString#`operator=`(4f35bf974e7f8568).convAddresscxx . . $ cNetStat#convAddress(1ba22f3269531822).(nscxx . . $ QString#QString(132dd6869045752b)..atcxx . . $ QList#at(e2681f9bb6b2f357).(3),netstatcxx . . $ QString#QString(132dd6869045752b)..protcxx . . $ sNetStat#prot.); |
| 61 | netstat.statcxx . . $ sNetStat#stat.=cxx . . $ QString#`operator=`(b79fde0b0ce9b948).states[cxx . . $ QList#`operator[]`(7a0ef1c7079e8533).ns.atcxx . . $ QList#at(e2681f9bb6b2f357).(4).toIntcxx . . $ QString#toInt(d7972accae11ee1f).(0,16)]; |
| 62 | netstat.processcxx . . $ sNetStat#process. =cxx . . $ sProccess#`operator=`(83375d43cd45304f). proc.getProccxx . . $ ProcessListLinux#getProc(a30611555c524a2e).(nscxx . . $ QString#QString(132dd6869045752b)..atcxx . . $ QList#at(e2681f9bb6b2f357).(10)); |
| 63 | |
| 64 | result.appendcxx . . $ QVector#append(77d9f17553126ecb).(netstat); |
| 65 | } |
| 66 | } |
| 67 | |
| 68 | #endif |
| 69 | |
| 70 | |
| 71 | #if defined(Q_OS_WIN) |
| 72 | //Имя Локальный адрес Внешний адрес Состояние PID |
| 73 | //TCP 0.0.0.0:80 0.0.0.0:0 LISTENING 3480 |
| 74 | //TCP 0.0.0.0:135 0.0.0.0:0 LISTENING 1708 |
| 75 | |
| 76 | ProcessListWindows proc; |
| 77 | proc.initProccessList(); |
| 78 | |
| 79 | |
| 80 | QProcess *myProcess = new QProcess(); |
| 81 | myProcess->start("netstat.exe", QStringList() << "-n" << "-a" << "-o"); |
| 82 | |
| 83 | if (myProcess->waitForFinished(2000)==false){ |
| 84 | qDebug() << myProcess->errorString(); |
| 85 | return result; |
| 86 | } |
| 87 | |
| 88 | QStringList table = QString(myProcess->readAll()).split("\n"); |
| 89 | for (int t=3;t<table.size();t++){ |
| 90 | QStringList ns = table.at(t).split(QRegExp("\\s+")); |
| 91 | |
| 92 | //qDebug() << ns; |
| 93 | |
| 94 | if (ns.size()<2) continue; |
| 95 | |
| 96 | if (ns.at(1)=="TCP"){ |
| 97 | netstat.prot=ns.at(1); |
| 98 | netstat.local_address=ns.at(2); |
| 99 | netstat.rem_address=ns.at(3); |
| 100 | netstat.stat=ns.at(4); |
| 101 | netstat.process = proc.getProc(ns.at(5)); |
| 102 | result.append(netstat); |
| 103 | } |
| 104 | if (ns.at(1)=="UDP"){ |
| 105 | netstat.prot=ns.at(1); |
| 106 | netstat.local_address=ns.at(2); |
| 107 | netstat.rem_address=ns.at(3); |
| 108 | netstat.stat=""; |
| 109 | netstat.process = proc.getProc(ns.at(4)); |
| 110 | |
| 111 | netstat.rem_address.replace("*:*","0.0.0.0:0"); |
| 112 | netstat.rem_address.replace("*:*","0.0.0.0:0"); |
| 113 | result.append(netstat); |
| 114 | } |
| 115 | |
| 116 | } |
| 117 | |
| 118 | #endif |
| 119 | |
| 120 | |
| 121 | #if defined(Q_OS_OS2) |
| 122 | //SOCK TYPE FOREIGN LOCAL FOREIGN STATE |
| 123 | // PORT PORT HOST |
| 124 | //2302 STREAM 0 6881 0.0.0.0 LISTEN |
| 125 | //2304 DGRAM 0 6881 0.0.0.0 UDP |
| 126 | |
| 127 | QProcess *myProcess = new QProcess(); |
| 128 | myProcess->start("netstat", QStringList() << "-s"); |
| 129 | |
| 130 | if (myProcess->waitForFinished(2000)==false){ |
| 131 | qDebug() << myProcess->errorString(); |
| 132 | return result; |
| 133 | } |
| 134 | |
| 135 | QString procData = myProcess->readAll(); |
| 136 | QStringList table = QString(procData).split("\n"); |
| 137 | |
| 138 | for (int t=10;t<table.size();t++){ |
| 139 | |
| 140 | QStringList ns = table.at(t).split(QRegExp("\\s+")); |
| 141 | |
| 142 | /* |
| 143 | writeLog(table.at(t)); |
| 144 | QString d=""; |
| 145 | for (int l=0;l<ns.size();l++){ |
| 146 | d+=ns.at(l)+" {"+QString::number(l)+"}| "; |
| 147 | } |
| 148 | writeLog("["+QString::number(ns.size())+"]"); |
| 149 | writeLog(d); |
| 150 | writeLog("-----\n"); |
| 151 | */ |
| 152 | |
| 153 | if (ns.size()!=8) return result; |
| 154 | |
| 155 | |
| 156 | QString foreign_port=ns.at(3); |
| 157 | if (foreign_port.split("..").size()==2) foreign_port=foreign_port.split("..").at(1); |
| 158 | |
| 159 | QString local_port=ns.at(4); |
| 160 | if (local_port.split("..").size()==2) local_port=local_port.split("..").at(1); |
| 161 | |
| 162 | if (ns.at(6)=="CLOSED") continue; |
| 163 | |
| 164 | if (ns.at(6)=="UDP"){ |
| 165 | netstat.stat="CLOSE"; |
| 166 | netstat.prot="UDP"; |
| 167 | }else{ |
| 168 | netstat.stat=ns.at(6); |
| 169 | netstat.prot="TCP"; |
| 170 | } |
| 171 | |
| 172 | netstat.local_address="0.0.0.0:"+local_port; |
| 173 | netstat.rem_address=ns.at(5)+":"+foreign_port; |
| 174 | netstat.process = sProccess(); |
| 175 | result.append(netstat); |
| 176 | |
| 177 | } |
| 178 | #endif |
| 179 | |
| 180 | |
| 181 | return resultcxx . . $ QVector#QVector(a0d8f1cfe28f0150).; |
| 182 | } |
| 183 | |
| 184 | |
| 185 | |
| 186 | |
| 187 | QVectorcxx . . $ QVector#<sNetStatcxx . . $ sNetStat#> cNetStatcxx . . $ cNetStat#::getNetStatcxx . . $ cNetStat#getNetStat(ee77c92be8ae04d7).(){ |
| 188 | |
| 189 | // Получение данных о сетевых процессах |
| 190 | sNetStatcxx . . $ sNetStat# netstat; |
| 191 | QVectorcxx . . $ QVector#<sNetStatcxx . . $ sNetStat#> resultcxx . . $ QVector#QVector(ced63f7c635d850d).; |
| 192 | |
| 193 | |
| 194 | |
| 195 | QVectorcxx . . $ QVector#<sNetStatcxx . . $ sNetStat#> TableNet = getTablecxx . . $ cNetStat#getTable(ee77c92be8ae04d7).(); |
| 196 | |
| 197 | for (int i=0;i<TableNet.sizecxx . . $ QVector#size(455f465bc33b4cdf).();i++){ |
| 198 | netstat=cxx . . $ sNetStat#`operator=`(14284bd762a4c62b).TableNet.atcxx . . $ QVector#at(e2681f9bb6b2f357).(i); |
| 199 | |
| 200 | if (netstat.local_addresscxx . . $ sNetStat#local_address..splitcxx . . $ QString#split(c8b44a97dcb6200d).(":"cxx . . $ QString#QString(85c52e162fed56f9).).atcxx . . $ QList#at(e2681f9bb6b2f357).(0)==cxx . . $ QString#`operator==`(7d4bdb1abc417636)."0.0.0.0") netstat.local_addresscxx . . $ sNetStat#local_address.=cxx . . $ QString#`operator=`(b79fde0b0ce9b948)."*:"+cxx . . $ operator+(c75c3ae4eb9af1a8).netstat.local_addresscxx . . $ sNetStat#local_address..splitcxx . . $ QString#split(c8b44a97dcb6200d).(":"cxx . . $ QString#QString(85c52e162fed56f9).).atcxx . . $ QList#at(e2681f9bb6b2f357).(1); |
| 201 | if (netstat.rem_addresscxx . . $ sNetStat#rem_address.==cxx . . $ QString#`operator==`(7d4bdb1abc417636)."0.0.0.0:0") netstat.rem_addresscxx . . $ sNetStat#rem_address.=cxx . . $ QString#`operator=`(d02845eef0c33901)."*"; |
| 202 | |
| 203 | |
| 204 | netstat.operationcxx . . $ sNetStat#operation.=-1; |
| 205 | if (save_netstatcxx . . $ cNetStat#save_netstat..sizecxx . . $ QVector#size(455f465bc33b4cdf).()>0){ |
| 206 | for (int s=0;s<save_netstatcxx . . $ cNetStat#save_netstat..sizecxx . . $ QVector#size(455f465bc33b4cdf).();s++){ |
| 207 | if (netstat.local_addresscxx . . $ sNetStat#local_address.==cxx . . $ `operator==`(5bc2975d2d751687).save_netstatcxx . . $ cNetStat#save_netstat..atcxx . . $ QVector#at(e2681f9bb6b2f357).(s).local_addresscxx . . $ sNetStat#local_address. and netstat.rem_addresscxx . . $ sNetStat#rem_address.==cxx . . $ `operator==`(5bc2975d2d751687).save_netstatcxx . . $ cNetStat#save_netstat..atcxx . . $ QVector#at(e2681f9bb6b2f357).(s).rem_addresscxx . . $ sNetStat#rem_address.){ |
| 208 | if (QTimecxx . . $ QTime#::currentTimecxx . . $ QTime#currentTime(bd2fc2b92108c576).() <cxx . . $ QTime#`operator<`(1610574c25194847). save_netstatcxx . . $ cNetStat#save_netstat..atcxx . . $ QVector#at(e2681f9bb6b2f357).(s).timeEventcxx . . $ sNetStat#timeEvent..addSecscxx . . $ QTime#addSecs(902e6118dfa1a226).(5)){ |
| 209 | netstat.operationcxx . . $ sNetStat#operation.=save_netstatcxx . . $ cNetStat#save_netstat..atcxx . . $ QVector#at(e2681f9bb6b2f357).(s).operationcxx . . $ sNetStat#operation.; |
| 210 | }else{ |
| 211 | netstat.operationcxx . . $ sNetStat#operation.=0; |
| 212 | } |
| 213 | break; |
| 214 | } |
| 215 | } |
| 216 | if (netstat.operationcxx . . $ sNetStat#operation.==-1){ |
| 217 | netstat.operationcxx . . $ sNetStat#operation.=1; |
| 218 | netstat.timeEventcxx . . $ sNetStat#timeEvent.=cxx . . $ QTime#`operator=`(370b645f04941e62).QTimecxx . . $ QTime#::currentTimecxx . . $ QTime#currentTime(bd2fc2b92108c576).(); |
| 219 | } |
| 220 | }else{ |
| 221 | netstat.operationcxx . . $ sNetStat#operation.=0; |
| 222 | } |
| 223 | result.appendcxx . . $ QVector#append(77d9f17553126ecb).(netstat); |
| 224 | } |
| 225 | |
| 226 | |
| 227 | // Показ старых подключений |
| 228 | bool isExistProc=false; |
| 229 | for (int p=0;p<save_netstatcxx . . $ cNetStat#save_netstat..sizecxx . . $ QVector#size(455f465bc33b4cdf).();p++){ |
| 230 | isExistProc=false; |
| 231 | for (int n=0;n<result.sizecxx . . $ QVector#size(455f465bc33b4cdf).();n++){ |
| 232 | if (save_netstatcxx . . $ cNetStat#save_netstat..atcxx . . $ QVector#at(e2681f9bb6b2f357).(p).local_addresscxx . . $ sNetStat#local_address.==cxx . . $ `operator==`(5bc2975d2d751687).result.atcxx . . $ QVector#at(e2681f9bb6b2f357).(n).local_addresscxx . . $ sNetStat#local_address. and save_netstatcxx . . $ cNetStat#save_netstat..atcxx . . $ QVector#at(e2681f9bb6b2f357).(p).rem_addresscxx . . $ sNetStat#rem_address.==cxx . . $ `operator==`(5bc2975d2d751687).result.atcxx . . $ QVector#at(e2681f9bb6b2f357).(n).rem_addresscxx . . $ sNetStat#rem_address.){ |
| 233 | isExistProc=true; |
| 234 | break; |
| 235 | } |
| 236 | } |
| 237 | if (isExistProc==false){ |
| 238 | if (save_netstatcxx . . $ cNetStat#save_netstat..atcxx . . $ QVector#at(e2681f9bb6b2f357).(p).operationcxx . . $ sNetStat#operation.==2){ |
| 239 | if (QTimecxx . . $ QTime#::currentTimecxx . . $ QTime#currentTime(bd2fc2b92108c576).() <cxx . . $ QTime#`operator<`(1610574c25194847). save_netstatcxx . . $ cNetStat#save_netstat..atcxx . . $ QVector#at(e2681f9bb6b2f357).(p).timeEventcxx . . $ sNetStat#timeEvent..addSecscxx . . $ QTime#addSecs(902e6118dfa1a226).(5)){ |
| 240 | netstat=cxx . . $ sNetStat#`operator=`(14284bd762a4c62b).save_netstatcxx . . $ cNetStat#save_netstat..atcxx . . $ QVector#at(e2681f9bb6b2f357).(p); |
| 241 | result.appendcxx . . $ QVector#append(77d9f17553126ecb).(netstat); |
| 242 | } |
| 243 | }else{ |
| 244 | netstat=cxx . . $ sNetStat#`operator=`(14284bd762a4c62b).save_netstatcxx . . $ cNetStat#save_netstat..atcxx . . $ QVector#at(e2681f9bb6b2f357).(p); |
| 245 | netstat.operationcxx . . $ sNetStat#operation.=2; |
| 246 | netstat.timeEventcxx . . $ sNetStat#timeEvent.=cxx . . $ QTime#`operator=`(370b645f04941e62).QTimecxx . . $ QTime#::currentTimecxx . . $ QTime#currentTime(bd2fc2b92108c576).(); |
| 247 | result.appendcxx . . $ QVector#append(77d9f17553126ecb).(netstat); |
| 248 | } |
| 249 | } |
| 250 | |
| 251 | } |
| 252 | |
| 253 | |
| 254 | |
| 255 | save_netstatcxx . . $ cNetStat#save_netstat.=cxx . . $ QVector#`operator=`(c90ab23731af0b5e).result; |
| 256 | |
| 257 | return resultcxx . . $ QVector#QVector(a0d8f1cfe28f0150).; |
| 258 | } |
| 259 | |
| 260 | |
| 261 | |
| 262 | QStringcxx . . $ QString# cNetStatcxx . . $ cNetStat#::convAddresscxx . . $ cNetStat#convAddress(1ba22f3269531822).(QStringcxx . . $ QString# address,QStringcxx . . $ QString# ipv){ |
| 263 | // Конвертирование IP адреса из 16-ричной в 10-ричную систему. |
| 264 | QStringcxx . . $ QString# result=""cxx . . $ QString#QString(85c52e162fed56f9).; |
| 265 | QStringListcxx . . $ QStringList# octetcxx . . $ QStringList#QStringList(ced63f7c635d850d).; |
| 266 | bool ok; |
| 267 | |
| 268 | QStringcxx . . $ QString# a= addresscxx . . $ QString#QString(132dd6869045752b)..splitcxx . . $ QString#split(c8b44a97dcb6200d).(":"cxx . . $ QString#QString(85c52e162fed56f9).).atcxx . . $ QList#at(e2681f9bb6b2f357).(0); |
| 269 | QStringcxx . . $ QString# p= addresscxx . . $ QString#QString(132dd6869045752b)..splitcxx . . $ QString#split(c8b44a97dcb6200d).(":"cxx . . $ QString#QString(85c52e162fed56f9).).atcxx . . $ QList#at(e2681f9bb6b2f357).(1); |
| 270 | |
| 271 | |
| 272 | |
| 273 | if (ipv==cxx . . $ QString#`operator==`(7d4bdb1abc417636)."TCP6" or ipv==cxx . . $ QString#`operator==`(7d4bdb1abc417636)."UDP6" or ipv==cxx . . $ QString#`operator==`(7d4bdb1abc417636)."ICMP6"){ |
| 274 | // Незнаю как тут правильно |
| 275 | for (int i=16;i>0;i=i-4){ |
| 276 | octet.appendcxx . . $ QList#append(77d9f17553126ecb).(a.midcxx . . $ QString#mid(44b7563da18aea72).(i-4,4)); |
| 277 | } |
| 278 | result=cxx . . $ QString#`operator=`(4f35bf974e7f8568).octet.joincxx . . $ QListSpecialMethods#join(5555d9024dcf93fb).(":"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 279 | }else{ |
| 280 | for (int i=8;i>0;i=i-2){ |
| 281 | octet.appendcxx . . $ QList#append(77d9f17553126ecb).(QStringcxx . . $ QString#::numbercxx . . $ QString#number(f4fd9db251ca774b).(a.midcxx . . $ QString#mid(44b7563da18aea72).(i-2,2).toIntcxx . . $ QString#toInt(d7972accae11ee1f).(&ok,16))); |
| 282 | } |
| 283 | result=cxx . . $ QString#`operator=`(4f35bf974e7f8568).octet.joincxx . . $ QListSpecialMethods#join(5555d9024dcf93fb).("."cxx . . $ QString#QString(85c52e162fed56f9).); |
| 284 | } |
| 285 | |
| 286 | |
| 287 | result+=cxx . . $ QString#`operator+=`(6a89d0b7f4d2681c).":"+cxx . . $ operator+(c75c3ae4eb9af1a8).QStringcxx . . $ QString#::numbercxx . . $ QString#number(f4fd9db251ca774b).(p.toIntcxx . . $ QString#toInt(d7972accae11ee1f).(&ok,16)); |
| 288 | |
| 289 | return resultcxx . . $ QString#QString(28715ad661ad3cec).; |
| 290 | } |
| 291 | |
| 292 | |
| 293 | void cNetStatcxx . . $ cNetStat#::writeLogcxx . . $ cNetStat#writeLog(7df51288a9ebd664).(QStringcxx . . $ QString# str){ |
| 294 | QFilecxx . . $ QFile# filecxx . . $ QFile#QFile(3520e46b33348bf6).(QDircxx . . $ QDir#::currentPathcxx . . $ QDir#currentPath(4365c3963150523e).()+cxx . . $ operator+(3d22f08efddf8107)."/debug.log"); |
| 295 | |
| 296 | if (!file.opencxx . . $ QFile#open(dca164408be960c8).(QIODevicecxx . . $ QIODevice#::Appendcxx . . $ QIODevice#Append. |cxx . . $ `operator|`(c9e45f682471e48d). QIODevicecxx . . $ QIODevice#::Textcxx . . $ QIODevice#Text.)) |
| 297 | return; |
| 298 | |
| 299 | QTextStreamcxx . . $ QTextStream# outcxx . . $ QTextStream#QTextStream(bebe8f2dee7f9e86).(&file); |
| 300 | out <<cxx . . $ QTextStream#`operator<<`(f61e69e0d177108f). str <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "\n"; |
| 301 | file.closecxx . . $ QFileDevice#close(49f6e7a06ebc5aa8).(); |
| 302 | } |