Projects STRLCPY sub3suite Commits 92ac142a
🤬
  • ■ ■ ■ ■
    sub3suite/src/engines/raw/Raw_scan.cpp
    skipped 15 lines
    16 16   /* check if no active thread */
    17 17   status->activeScanThreads--;
    18 18   if(status->activeScanThreads)
    19  - 
     19 + return;
    20 20   
    21 21   /* set the progress bar to 100% just in case */
    22 22   if(!status->isStopped)
    skipped 341 lines
  • ■ ■ ■ ■ ■
    sub3suite/src/enums/asn/ASNEnum.ui
    skipped 79 lines
    80 80   <string>Bgpview</string>
    81 81   </property>
    82 82   </item>
     83 + <item>
     84 + <property name="text">
     85 + <string>IpData</string>
     86 + </property>
     87 + </item>
    83 88   </widget>
    84 89   </item>
    85 90   <item>
    skipped 284 lines
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/enums/asn/ASNEnum_scan.cpp
    skipped 88 lines
    89 89   case 0: // Bgpview
    90 90   this->startScanThread(new Bgpview(*m_scanArgs));
    91 91   break;
     92 + case 1: // IpData
     93 + this->startScanThread(new IpData(*m_scanArgs));
     94 + break;
    92 95   }
    93 96  }
    94 97   
    skipped 41 lines
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/items/ASNItem.h
    skipped 147 lines
    148 148   this->setText(asn.asn);
    149 149   
    150 150   /* info */
    151  - info_asn->setText(asn.info_asn);
    152  - info_name->setText(asn.info_name);
    153  - info_description->setText(asn.info_description);
    154  - info_country->setText(asn.info_country);
    155  - info_website->setText(asn.info_website);
    156  - info_ownerAddress->setText(asn.info_ownerAddress);
     151 + if(info_asn->text().isEmpty())
     152 + info_asn->setText(asn.info_asn);
     153 + if(info_name->text().isEmpty())
     154 + info_name->setText(asn.info_name);
     155 + if(info_description->text().isEmpty())
     156 + info_description->setText(asn.info_description);
     157 + if(info_country->text().isEmpty())
     158 + info_country->setText(asn.info_country);
     159 + if(info_website->text().isEmpty())
     160 + info_website->setText(asn.info_website);
     161 + if(info_ownerAddress->text().isEmpty())
     162 + info_ownerAddress->setText(asn.info_ownerAddress);
    157 163   
    158 164   /* rir */
    159  - rir_name->setText(asn.rir_name);
    160  - rir_country->setText(asn.rir_country);
    161  - rir_dateAllocated->setText(asn.rir_dateallocated);
     165 + if(rir_name->text().isEmpty())
     166 + rir_name->setText(asn.rir_name);
     167 + if(rir_country->text().isEmpty())
     168 + rir_country->setText(asn.rir_country);
     169 + if(rir_dateAllocated->text().isEmpty())
     170 + rir_dateAllocated->setText(asn.rir_dateallocated);
    162 171   
    163  - int count = 0;
     172 + int count = emailContacts->rowCount();
    164 173   /* email contacts */
    165 174   foreach(const QString &value, asn.emailcontacts){
    166 175   emailContacts->appendRow({new QStandardItem(QString::number(count)),
    skipped 2 lines
    169 178   }
    170 179   
    171 180   /* abuse contacts */
    172  - count = 0;
     181 + count = abuseContacts->rowCount();
    173 182   foreach(const QString &value, asn.abusecontacts){
    174 183   abuseContacts->appendRow({new QStandardItem(QString::number(count)),
    175 184   new QStandardItem(value)});
    skipped 1 lines
    177 186   }
    178 187   
    179 188   /* peers */
    180  - count = 0;
     189 + count = peers->rowCount();
    181 190   foreach(const QString &peer, asn.peers){
    182 191   peers->appendRow({new QStandardItem(QString::number(count)),
    183 192   new QStandardItem(peer)});
    skipped 1 lines
    185 194   }
    186 195   
    187 196   /* prefixes */
    188  - count = 0;
     197 + count = prefixes->rowCount();
    189 198   foreach(const QString &prefix, asn.prefixes){
    190 199   prefixes->appendRow({new QStandardItem(QString::number(count)),
    191 200   new QStandardItem(prefix)});
    skipped 5 lines
    197 206   }
    198 207   
    199 208   void setPeers(const QSet<QString> &peersList){
    200  - int count = 0;
     209 + int count = peers->rowCount();
    201 210   foreach(const QString &peer, peersList){
    202 211   peers->appendRow({new QStandardItem(QString::number(count)),
    203 212   new QStandardItem(peer)});
    skipped 5 lines
    209 218   }
    210 219   
    211 220   void setPrefixes(const QSet<QString> &prefixList){
    212  - int count = 0;
     221 + int count = prefixes->rowCount();
    213 222   foreach(const QString &prefix, prefixList){
    214 223   prefixes->appendRow({new QStandardItem(QString::number(count)),
    215 224   new QStandardItem(prefix)});
    skipped 18 lines
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/items/IPItem.cpp
    skipped 32 lines
    33 33   ip.companyInfo_domain = item->companyInfo_domain->text();
    34 34   
    35 35   /* privacy info */
    36  - ip.privacyInfo_vpn = QVariant(item->privacyInfo_vpn->text()).toBool();
    37 36   ip.privacyInfo_proxy = QVariant(item->privacyInfo_proxy->text()).toBool();
    38 37   ip.privacyInfo_anonymous = QVariant(item->privacyInfo_anonymous->text()).toBool();
    39 38   ip.privacyInfo_tor = QVariant(item->privacyInfo_tor->text()).toBool();
    skipped 38 lines
    78 77   ip.insert("companyInfo_domain", item->companyInfo_domain->text());
    79 78   
    80 79   /* privacyInfo */
    81  - ip.insert("privacyInfo_vpn", item->privacyInfo_vpn->text());
    82 80   ip.insert("privacyInfo_proxy", item->privacyInfo_proxy->text());
    83 81   ip.insert("privacyInfo_anonymous", item->privacyInfo_anonymous->text());
    84 82   ip.insert("privacyInfo_tor", item->privacyInfo_tor->text());
    skipped 36 lines
    121 119   item->companyInfo_domain->setText(ip.value("companyInfo_domain").toString());
    122 120   
    123 121   /* privacyInfo */
    124  - item->privacyInfo_vpn->setText(ip.value("privacyInfo_vpn").toString());
    125 122   item->privacyInfo_proxy->setText(ip.value("privacyInfo_proxy").toString());
    126 123   item->privacyInfo_anonymous->setText(ip.value("privacyInfo_anonymous").toString());
    127 124   item->privacyInfo_tor->setText(ip.value("privacyInfo_tor").toString());
    skipped 17 lines
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/items/IPItem.h
    skipped 41 lines
    42 42   QString companyInfo_domain;
    43 43   
    44 44   /* privacyInfo */
    45  - bool privacyInfo_vpn;
    46 45   bool privacyInfo_proxy;
    47 46   bool privacyInfo_anonymous;
    48 47   bool privacyInfo_tor;
    skipped 42 lines
    91 90   companyInfo_domain(new QStandardItem),
    92 91   
    93 92   /* privacy info */
    94  - privacyInfo_vpn(new QStandardItem),
    95 93   privacyInfo_proxy(new QStandardItem),
    96 94   privacyInfo_anonymous(new QStandardItem),
    97 95   privacyInfo_tor(new QStandardItem),
    skipped 40 lines
    138 136   companyInfo->appendRow({new QStandardItem("Name"), companyInfo_name});
    139 137   companyInfo->appendRow({new QStandardItem("Domain"), companyInfo_domain});
    140 138   
    141  - privacyInfo->appendRow({new QStandardItem("is VPN"), privacyInfo_vpn});
    142 139   privacyInfo->appendRow({new QStandardItem("is Proxy"), privacyInfo_proxy});
    143 140   privacyInfo->appendRow({new QStandardItem("is Anonymous"), privacyInfo_anonymous});
    144 141   privacyInfo->appendRow({new QStandardItem("is Attacker"), privacyInfo_attacker});
    skipped 41 lines
    186 183   QStandardItem *companyInfo_domain;
    187 184   
    188 185   /* privacyInfo */
    189  - QStandardItem *privacyInfo_vpn;
    190 186   QStandardItem *privacyInfo_proxy;
    191 187   QStandardItem *privacyInfo_anonymous;
    192 188   QStandardItem *privacyInfo_tor;
    skipped 30 lines
    223 219   companyInfo_domain->setText(ip.companyInfo_domain);
    224 220   
    225 221   /* privacy info */
    226  - privacyInfo_vpn->setText(QVariant(ip.privacyInfo_vpn).toString());
    227 222   privacyInfo_proxy->setText(QVariant(ip.privacyInfo_proxy).toString());
    228 223   privacyInfo_anonymous->setText(QVariant(ip.privacyInfo_anonymous).toString());
    229 224   privacyInfo_tor->setText(QVariant(ip.privacyInfo_tor).toString());
    skipped 51 lines
    281 276   companyInfo_domain->setText(ip.companyInfo_domain);
    282 277   
    283 278   /* privacy info */
    284  - if(privacyInfo_vpn->text().isEmpty())
    285  - privacyInfo_vpn->setText(QVariant(ip.privacyInfo_vpn).toString());
    286 279   if(privacyInfo_proxy->text().isEmpty())
    287 280   privacyInfo_proxy->setText(QVariant(ip.privacyInfo_proxy).toString());
    288 281   if(privacyInfo_anonymous->text().isEmpty())
    skipped 46 lines
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/models/ProjectModel_serialization.cpp
    skipped 97 lines
    98 98   explorer->project->setText(info.name);
    99 99   info.date_created = QDate::currentDate().toString();
    100 100   info.last_modified = QDate::currentDate().toString();
     101 + 
     102 + emit projectLoaded();
    101 103   return;
    102 104   }
    103 105   
    skipped 448 lines
  • ■ ■ ■ ■
    sub3suite/src/modules/passive/ip/IpApi.cpp
    skipped 59 lines
    60 60   
    61 61  void IpApi::replyFinishedEnumIP(QNetworkReply *reply){
    62 62   if(reply->error()){
    63  - quitThread();
     63 + this->onError(reply);
    64 64   return;
    65 65   }
    66 66   
    skipped 37 lines
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/ip/IpData.cpp
    skipped 19 lines
    20 20   connect(manager, &s3sNetworkAccessManager::finished, this, &IpData::replyFinishedRawJson);
    21 21   if(args.output_EnumIP)
    22 22   connect(manager, &s3sNetworkAccessManager::finished, this, &IpData::replyFinishedEnumIP);
     23 + if(args.output_EnumASN)
     24 + connect(manager, &s3sNetworkAccessManager::finished, this, &IpData::replyFinishedEnumASN);
     25 + if(args.output_EnumASNPeers)
     26 + connect(manager, &s3sNetworkAccessManager::finished, this, &IpData::replyFinishedEnumASNPeers);
     27 + if(args.output_EnumASNPrefixes)
     28 + connect(manager, &s3sNetworkAccessManager::finished, this, &IpData::replyFinishedEnumASNPrefixes);
    23 29   
    24 30   /* get api key */
    25 31   m_key = APIKEY.value(OSINT_MODULE_IPDATA).toString();
    skipped 11 lines
    37 43   if(args.output_Raw){
    38 44   switch (args.raw_query_id) {
    39 45   case ASN_API:
    40  - url.setUrl("https://api.ipdata.co/"+target+"/asn?api-key="+m_key);
     46 + url.setUrl("https://api.ipdata.co/AS"+target+"/?api-key="+m_key);
    41 47   break;
    42 48   case ASN_DATA:
    43 49   url.setUrl("https://api.ipdata.co/"+target+"/asn?api-key="+m_key);
    skipped 22 lines
    66 72   manager->get(request);
    67 73   return;
    68 74   }
     75 + 
     76 + if(args.output_EnumASN || args.output_EnumASNPeers || args.output_EnumASNPrefixes){
     77 + url.setUrl("https://api.ipdata.co/AS"+target+"/?api-key="+m_key);
     78 + request.setUrl(url);
     79 + manager->get(request);
     80 + return;
     81 + }
    69 82  }
    70 83   
    71 84  void IpData::replyFinishedEnumIP(QNetworkReply *reply){
    72 85   if(reply->error()){
    73  - quitThread();
     86 + this->onError(reply);
    74 87   return;
    75 88   }
    76 89   
    skipped 32 lines
    109 122   emit resultEnumIP(ip);
    110 123   
    111 124   end(reply);
     125 +}
     126 + 
     127 +void IpData::replyFinishedEnumASN(QNetworkReply *reply){
     128 + if(reply->error()){
     129 + this->onError(reply);
     130 + return;
     131 + }
     132 + 
     133 + QJsonDocument document = QJsonDocument::fromJson(reply->readAll());
     134 + QJsonObject mainObj = document.object();
     135 + 
     136 + s3s_struct::ASN asn;
     137 + asn.asn = target;
     138 + 
     139 + asn.info_website = mainObj["domain"].toString();
     140 + asn.info_country = mainObj["country"].toString();
     141 + asn.info_name = mainObj["name"].toString();
     142 + asn.info_asn = target;
     143 + asn.rir_name = mainObj["registry"].toString();
     144 + 
     145 + /* asn peers */
     146 + foreach(const QJsonValue &value, mainObj["peers"].toArray())
     147 + asn.peers.insert(value.toString());
     148 + 
     149 + /* prefixes */
     150 + foreach(const QJsonValue &value, mainObj["ipv4_prefixes"].toArray())
     151 + asn.prefixes.insert(value.toString());
     152 + 
     153 + foreach(const QJsonValue &value, mainObj["ipv6_prefixes"].toArray())
     154 + asn.prefixes.insert(value.toString());
     155 + 
     156 + emit resultEnumASN(asn);
     157 + 
     158 + this->end(reply);
     159 +}
     160 + 
     161 +void IpData::replyFinishedEnumASNPeers(QNetworkReply *reply){
     162 + if(reply->error()){
     163 + this->onError(reply);
     164 + return;
     165 + }
     166 + 
     167 + QJsonDocument document = QJsonDocument::fromJson(reply->readAll());
     168 + QJsonObject mainObj = document.object();
     169 + 
     170 + s3s_struct::ASN asn;
     171 + asn.asn = target;
     172 + 
     173 + foreach(const QJsonValue &value, mainObj["peers"].toArray())
     174 + asn.peers.insert(value.toString());
     175 + 
     176 + emit resultEnumASN(asn);
     177 + 
     178 + this->end(reply);
     179 +}
     180 + 
     181 +void IpData::replyFinishedEnumASNPrefixes(QNetworkReply *reply){
     182 + if(reply->error()){
     183 + this->onError(reply);
     184 + return;
     185 + }
     186 + 
     187 + QJsonDocument document = QJsonDocument::fromJson(reply->readAll());
     188 + QJsonObject mainObj = document.object();
     189 + 
     190 + s3s_struct::ASN asn;
     191 + asn.asn = target;
     192 + 
     193 + foreach(const QJsonValue &value, mainObj["ipv4_prefixes"].toArray())
     194 + asn.prefixes.insert(value.toString());
     195 + 
     196 + foreach(const QJsonValue &value, mainObj["ipv6_prefixes"].toArray())
     197 + asn.prefixes.insert(value.toString());
     198 + 
     199 + emit resultEnumASN(asn);
     200 + 
     201 + this->end(reply);
    112 202  }
    113 203   
    114 204   
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/ip/IpData.h
    skipped 37 lines
    38 38   public slots:
    39 39   void start() override;
    40 40   void replyFinishedEnumIP(QNetworkReply *reply) override;
     41 + void replyFinishedEnumASN(QNetworkReply *reply) override;
     42 + void replyFinishedEnumASNPeers(QNetworkReply *reply) override;
     43 + void replyFinishedEnumASNPrefixes(QNetworkReply *reply) override;
    41 44   
    42 45   private:
    43 46   QString m_key;
    skipped 4 lines
  • ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/ip/IpInfo.cpp
    skipped 99 lines
    100 100   
    101 101  void IpInfo::replyFinishedEnumIP(QNetworkReply *reply){
    102 102   if(reply->error()){
    103  - quitThread();
     103 + this->onError(reply);
    104 104   return;
    105 105   }
    106 106   
    skipped 23 lines
    130 130   ip.companyInfo_domain = company["domain"].toString();
    131 131   
    132 132   QJsonObject privacy = mainObj["privacy"].toObject();
    133  - ip.privacyInfo_vpn = privacy["vpn"].toBool();
    134 133   ip.privacyInfo_proxy = privacy["proxy"].toBool();
    135 134   ip.privacyInfo_tor = privacy["tor"].toBool();
    136 135   emit resultEnumIP(ip);
    skipped 4 lines
  • ■ ■ ■ ■
    sub3suite/src/modules/passive/ip/IpRegistry.cpp
    skipped 57 lines
    58 58   
    59 59  void IpRegistry::replyFinishedEnumIP(QNetworkReply *reply){
    60 60   if(reply->error()){
    61  - quitThread();
     61 + this->onError(reply);
    62 62   return;
    63 63   }
    64 64   
    skipped 47 lines
Please wait...
Page is in error, reload to recover