Projects STRLCPY sub3suite Commits e293d5a6
🤬
Revision indexing in progress... (symbol navigation in revisions will be accurate after indexed)
  • ■ ■ ■ ■ ■ ■
    CONTRIBUTING.md
    skipped 3 lines
    4 4   
    5 5  ## Overview
    6 6   
    7  -This is a list of things you can do to help us out (in no particular order). Each item will be expanded upon later in the document.
     7 +This is a list of things you can do to help out (in no particular order). Each item will be expanded upon later in the document.
    8 8   
    9 9  - [Compile sub3suite](COMPILING.md) and add new features and/or solving current [issues](https://github.com/3nock/sub3suite).
    10 10  - Design an even more intuitive UI, Logos and Icons.
    skipped 3 lines
    14 14  - [Contact us](CONTACTS.md) and talk about sub3suite.
    15 15  - Send a [donation](https://3nock.github.io/sub3suite/donations.html) to support the project.
    16 16  - [Translate](https://3nock.github.io/sub3suite/translations.html) sub3suite (contact us if your language isn't listed).
    17  -- Help us improve the [documentation](https://github.com/sub3suite/docs/issues).
     17 +- Help us improve the [documentation](https://github.com/3nock/s3s_doc).
    18 18   
    19 19  ### Compile sub3suite
    20 20   
    skipped 59 lines
  • ■ ■ ■ ■ ■ ■
    README.md
    skipped 5 lines
    6 6   
    7 7  # Subdomain Enumeration Suite
    8 8  Sub3 Suite is a research-grade suite of tools for Subdomain Enumeration, OSINT Information gathering & Attack Surface Mapping. Supports both
    9  -manual and automated analysis on variety of targets types with many available feautues & tools.
     9 +manual and automated analysis on variety of target types with many available features & tools.
    10 10   
    11 11  ## Screenshots
    12 12  <img src="docs/images/screenshot_osint.png"/>
    skipped 14 lines
    27 27   
    28 28  **Not a developer?**
    29 29   
    30  -You can help by reporting [bugs](https://github.com/3nock/sub3suite), requesting [features](https://github.com/3nock/sub3suite), [sponsoring](SPONSOR.md) the project, writing blog posts & sharing this project to peers.
     30 +You can help by reporting [bugs](https://github.com/3nock/sub3suite), requesting [features](https://github.com/3nock/sub3suite), improving the [documentation](https://github.com/3nock/s3s_doc), [sponsoring](SPONSOR.md) the project, writing blog posts & sharing this project to peers.
    31 31   
    32 32  For More information see [contribution guide](CONTRIBUTING.md).
    33 33   
    skipped 21 lines
  • ■ ■ ■ ■ ■ ■
    sub3suite/res/files/under_development.html
    skipped 12 lines
    13 13  1. Contribute on the active development of <a href="https://github.com/3nock/sub3suite">sub3suite</a>.<br>
    14 14  2. Contribute by writting <a href="https://github.com/3nock/sub3suite">translations</a> of the program to different languages.<br>
    15 15  3. Contribute by writting articles and blog post about Sub3 Suite.<br>
    16  -4. Contribute by writting Documentation & different ways of using the tools for osint info gathering.<br>
    17  -5. Contribute by Reporting <a href="https://github.com/3nock/sub3suite">bugs!</a>.<br>
    18  -6. Contribute by Requesting <a href="https://github.com/3nock/sub3suite">New Features!</a>.<br>
     16 +4. Contribute by writting <a href=https://github.com/3nock/s3s_doc>documentation</a> & different ways of using the tools for osint info gathering.<br>
     17 +5. Contribute by Reporting <a href="https://github.com/3nock/sub3suite/issues">bugs!</a>.<br>
     18 +6. Contribute by Requesting <a href="https://github.com/3nock/sub3suite/issues">New Features!</a>.<br>
    19 19  7. Contribute by Sharing about the program to peers.<br>
    20 20  8. Contribute by Extensively using the program on your work :)<br>
    21 21  9. Monetary Contributions are also highly welcomed :)<br>
    22 22   
    23 23  <h2> Sponsoring </h2>
    24  -Please consider <a href="https://github.com/3nock/sub3suite">sponsoring</a> the project with any amount is highly appreciated.<br>
     24 +Please consider <a href="https://github.com/3nock/sub3suite/SPONSOR.md">sponsoring</a> the project with any amount is highly appreciated.<br>
    25 25  If my work is earning you money, consider becoming a sponsor! It would mean A WHOLE LOT.<br>
    26 26  Also if you are looking to partner up on the project feel free to contact: [email protected].<br>
    27 27   
    skipped 19 lines
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/Dialogs/AboutDialog.cpp
    skipped 20 lines
    21 21   ui(new Ui::AboutDialog),
    22 22   m_authorsModel(new QStandardItemModel),
    23 23   m_modulesModel(new QStandardItemModel),
    24  - m_foldersModel(new QStandardItemModel)
     24 + m_foldersModel(new QStandardItemModel),
     25 + m_sponsorsModel(new QStandardItemModel)
    25 26  {
    26 27   ui->setupUi(this);
    27 28   this->setWindowIcon(QIcon(":/img/res/icons/about.png"));
    skipped 45 lines
    73 74   ui->tableViewModules->horizontalHeader()->setDefaultAlignment(Qt::AlignLeft | Qt::AlignVCenter);
    74 75   
    75 76   ///
    76  - /// for donations...
     77 + /// for sponsors...
    77 78   ///
    78 79   
    79 80   foreach(const QString &donor, DONORS.allKeys())
    80  - m_authorsModel->appendRow({new QStandardItem(donor),
     81 + m_sponsorsModel->appendRow({new QStandardItem(donor),
    81 82   new QStandardItem(DONORS.value(donor).toString())});
    82 83   
    83  - m_foldersModel->setHorizontalHeaderLabels({tr(" Name"), tr(" Contact")});
    84  - ui->tableViewDonations->setModel(m_foldersModel);
     84 + m_sponsorsModel->setHorizontalHeaderLabels({tr(" Name"), tr(" Contact")});
     85 + ui->tableViewDonations->setModel(m_sponsorsModel);
    85 86   ui->tableViewDonations->horizontalHeader()->setDefaultAlignment(Qt::AlignLeft | Qt::AlignVCenter);
    86 87   
    87 88   ///
    skipped 19 lines
    107 108   }
    108 109  }
    109 110  AboutDialog::~AboutDialog(){
     111 + delete m_sponsorsModel;
    110 112   delete m_foldersModel;
    111 113   delete m_modulesModel;
    112 114   delete m_authorsModel;
    skipped 4 lines
    117 119  void AboutDialog::on_tableViewModules_customContextMenuRequested(const QPoint &pos){
    118 120   Q_UNUSED(pos);
    119 121   
    120  - /* check if user right clicked on items else dont show the context menu... */
     122 + /* check if user right clicked on items else dont show the context menu */
    121 123   if(!ui->tableViewModules->selectionModel()->isSelected(ui->tableViewModules->currentIndex()))
    122 124   return;
    123 125   
    124 126   if(ui->tableViewModules->currentIndex().column() == 0)
    125 127   return;
    126 128   
    127  - /* creating the context menu... */
     129 + /* creating the context menu */
    128 130   QMenu menu(this);
    129 131   
    130 132   menu.addAction("Copy", this, [=](){
    skipped 4 lines
    135 137   QDesktopServices::openUrl(QUrl(ui->tableViewModules->currentIndex().data().toString(), QUrl::TolerantMode));
    136 138   });
    137 139   
    138  - /* showing the context menu... */
     140 + /* showing the context menu */
    139 141   menu.exec(QCursor::pos());
    140 142  }
    141 143   
    142 144  void AboutDialog::on_tableViewContributors_customContextMenuRequested(const QPoint &pos){
    143 145   Q_UNUSED(pos);
    144 146   
    145  - /* check if user right clicked on items else dont show the context menu... */
     147 + /* check if user right clicked on items else dont show the context menu */
    146 148   if(!ui->tableViewContributors->selectionModel()->isSelected(ui->tableViewContributors->currentIndex()))
    147 149   return;
    148 150   
    149  - /* creating the context menu... */
     151 + /* creating the context menu */
    150 152   QMenu menu(this);
    151 153   
    152 154   menu.addAction("Copy", this, [=](){
    skipped 1 lines
    154 156   clipboard->setText(ui->tableViewContributors->currentIndex().data().toString());
    155 157   });
    156 158   
    157  - /* showing the context menu... */
     159 + /* showing the context menu */
    158 160   menu.exec(QCursor::pos());
    159 161  }
    160 162   
    161 163  void AboutDialog::on_tableViewDonations_customContextMenuRequested(const QPoint &pos){
    162 164   Q_UNUSED(pos);
    163 165   
    164  - /* check if user right clicked on items else dont show the context menu... */
     166 + /* check if user right clicked on items else dont show the context menu */
    165 167   if(!ui->tableViewDonations->selectionModel()->isSelected(ui->tableViewDonations->currentIndex()))
    166 168   return;
    167 169   
    168  - /* creating the context menu... */
     170 + /* creating the context menu */
    169 171   QMenu menu(this);
    170 172   
    171 173   menu.addAction("Copy", this, [=](){
    skipped 1 lines
    173 175   clipboard->setText(ui->tableViewDonations->currentIndex().data().toString());
    174 176   });
    175 177   
    176  - /* showing the context menu... */
     178 + /* showing the context menu */
    177 179   menu.exec(QCursor::pos());
    178 180  }
    179 181   
    skipped 5 lines
  • ■ ■ ■ ■ ■
    sub3suite/src/Dialogs/AboutDialog.h
    skipped 33 lines
    34 34   QStandardItemModel *m_authorsModel;
    35 35   QStandardItemModel *m_modulesModel;
    36 36   QStandardItemModel *m_foldersModel;
     37 + QStandardItemModel *m_sponsorsModel;
    37 38  };
    38 39   
    39 40  #endif // ABOUTDIALOG_H
    skipped 1 lines
  • ■ ■ ■ ■
    sub3suite/src/Dialogs/AboutDialog.ui
    skipped 304 lines
    305 305   </widget>
    306 306   <widget class="QWidget" name="tabDonations">
    307 307   <attribute name="title">
    308  - <string>Donations</string>
     308 + <string>Sponsors</string>
    309 309   </attribute>
    310 310   <layout class="QVBoxLayout" name="verticalLayout_5">
    311 311   <item>
    skipped 96 lines
  • ■ ■ ■ ■ ■
    sub3suite/src/Dialogs/ActiveConfigDialog.cpp
    skipped 132 lines
    133 133   if(url)
    134 134   this->m_saveURL();
    135 135   
    136  - /* close the dialog */
    137 136   accept();
    138 137  }
    139 138   
    skipped 469 lines
  • ■ ■ ■ ■ ■
    sub3suite/src/Dialogs/ActiveConfigDialog.h
    skipped 8 lines
    9 9  #define ACTIVECONFIGDIALOG_H
    10 10   
    11 11  #include <QDialog>
    12  -#include <QSettings>
    13 12  #include <QStringListModel>
    14 13  #include "src/modules/active/BruteScanner.h"
    15 14  #include "src/modules/active/ActiveScanner.h"
    skipped 39 lines
    55 54   QStringListModel *m_customNameserverListModel;
    56 55   
    57 56   void m_initWidgets();
     57 + 
    58 58   void m_loadConfigBrute();
    59 59   void m_loadConfigActive();
    60 60   void m_loadConfigDns();
    skipped 5 lines
    66 66   void m_saveDns();
    67 67   void m_saveSSL();
    68 68   void m_saveURL();
    69  - 
    70 69  };
    71 70   
    72 71  #endif // ACTIVECONFIGDIALOG_H
    skipped 1 lines
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/Dialogs/ApiKeysDialog.cpp
    skipped 27 lines
    28 28  }
    29 29   
    30 30  void ApiKeysDialog::on_buttonSave_clicked(){
    31  - APIKEY.setValue("bing", ui->lineEditBing->text());
    32 31   APIKEY.setValue("censys_id", ui->lineEditCensysId->text());
    33 32   APIKEY.setValue("censys_secret", ui->lineEditCensysSecret->text());
    34 33   APIKEY.setValue(OSINT_MODULE_CERTSPOTTER, ui->lineEditCertspotter->text());
    35  - APIKEY.setValue("cloudflare", ui->lineEditCloudflare->text());
    36 34   APIKEY.setValue(OSINT_MODULE_GITHUB, ui->lineEditGithub->text());
    37  - APIKEY.setValue("google", ui->lineEditGoogle->text());
    38 35   APIKEY.setValue(OSINT_MODULE_HUNTER, ui->lineEditHunter->text());
    39  - APIKEY.setValue("intelx", ui->lineEditIntelX->text());
    40  - APIKEY.setValue("pentesttools", ui->lineEditPentestTools->text());
    41 36   APIKEY.setValue(OSINT_MODULE_PROJECTDISCOVERY, ui->lineEditProjectDiscovery->text());
    42 37   APIKEY.setValue("riskiq_key", ui->lineEditRiskIqKey->text());
    43 38   APIKEY.setValue("riskiq_secret", ui->lineEditRiskIqSecret->text());
    skipped 65 lines
    109 104   QString key;
    110 105   
    111 106   /* loading the keys.... */
    112  - key = APIKEY.value("bing").toString();
    113  - if(!key.isEmpty()){
    114  - ui->lineEditBing->setText(key);
    115  - ui->buttonGetBing->hide();
    116  - }
    117 107   key = APIKEY.value("censys_id").toString();
    118 108   if(!key.isEmpty()){
    119 109   ui->lineEditCensysId->setText(key);
    skipped 9 lines
    129 119   ui->lineEditCertspotter->setText(key);
    130 120   ui->buttonGetCertspotter->hide();
    131 121   }
    132  - key = APIKEY.value("cloudflare").toString();
    133  - if(!key.isEmpty()){
    134  - ui->lineEditCloudflare->setText(key);
    135  - ui->buttonGetCloudflare->hide();
    136  - }
    137 122   key = APIKEY.value(OSINT_MODULE_GITHUB).toString();
    138 123   if(!key.isEmpty()){
    139 124   ui->lineEditGithub->setText(key);
    140 125   ui->buttonGetGithub->hide();
    141 126   }
    142  - key = APIKEY.value("google").toString();
    143  - if(!key.isEmpty()){
    144  - ui->lineEditGoogle->setText(key);
    145  - ui->buttonGetGoogle->hide();
    146  - }
    147 127   key = APIKEY.value(OSINT_MODULE_HUNTER).toString();
    148 128   if(!key.isEmpty()){
    149 129   ui->lineEditHunter->setText(key);
    150 130   ui->buttonGetHunter->hide();
    151  - }
    152  - key = APIKEY.value("intelx").toString();
    153  - if(!key.isEmpty()){
    154  - ui->lineEditIntelX->setText(key);
    155  - ui->buttonGetIntelX->hide();
    156  - }
    157  - key = APIKEY.value("pentesttools").toString();
    158  - if(!key.isEmpty()){
    159  - ui->lineEditPentestTools->setText(key);
    160  - ui->buttonGetPentestTools->hide();
    161 131   }
    162 132   key = APIKEY.value(OSINT_MODULE_PROJECTDISCOVERY).toString();
    163 133   if(!key.isEmpty()){
    skipped 311 lines
    475 445   QDesktopServices::openUrl(QUrl("https://developer.shodan.io/api/requirements", QUrl::TolerantMode));
    476 446  }
    477 447   
    478  -void ApiKeysDialog::on_buttonGetCloudflare_clicked(){
    479  - QDesktopServices::openUrl(QUrl("https://dash.cloudflare.com/profile/api-tokens", QUrl::TolerantMode));
    480  -}
    481  - 
    482  -void ApiKeysDialog::on_buttonGetBing_clicked(){
    483  - QDesktopServices::openUrl(QUrl("https://www.microsoft.com/en-us/bing/apis/bing-web-search-api", QUrl::TolerantMode));
    484  -}
    485  - 
    486  -void ApiKeysDialog::on_buttonGetGoogle_clicked(){
    487  - QDesktopServices::openUrl(QUrl("https://developers.google.com/maps/documentation/places/web-service/get-api-key", QUrl::TolerantMode));
    488  -}
    489  - 
    490 448  void ApiKeysDialog::on_buttonGetHunter_clicked(){
    491 449   QDesktopServices::openUrl(QUrl("https://hunter.io/api", QUrl::TolerantMode));
    492 450  }
    493 451   
    494 452  void ApiKeysDialog::on_buttonGetCertspotter_clicked(){
    495 453   QDesktopServices::openUrl(QUrl("https://sslmate.com/certspotter/api/", QUrl::TolerantMode));
    496  -}
    497  - 
    498  -void ApiKeysDialog::on_buttonGetIntelX_clicked(){
    499  - QDesktopServices::openUrl(QUrl("https://intelx.io/signup", QUrl::TolerantMode));
    500 454  }
    501 455   
    502 456  void ApiKeysDialog::on_buttonGetSecurityTrails_clicked(){
    skipped 214 lines
  • ■ ■ ■ ■ ■
    sub3suite/src/Dialogs/ApiKeysDialog.h
    skipped 25 lines
    26 26   void on_buttonSave_clicked();
    27 27   void on_buttonCancel_clicked();
    28 28   
    29  - /* the button to visit site for acquiring api keys... */
     29 + /* visit site for acquiring api keys */
    30 30   void on_buttonGetCensys_clicked();
    31 31   void on_buttonGetVirusTotal_clicked();
    32 32   void on_buttonGetGithub_clicked();
    33 33   void on_buttonGetShodan_clicked();
    34  - void on_buttonGetCloudflare_clicked();
    35  - void on_buttonGetBing_clicked();
    36  - void on_buttonGetGoogle_clicked();
    37 34   void on_buttonGetHunter_clicked();
    38 35   void on_buttonGetCertspotter_clicked();
    39  - void on_buttonGetIntelX_clicked();
    40 36   void on_buttonGetSecurityTrails_clicked();
    41 37   void on_buttonGetSpyse_clicked();
    42 38   void on_buttonGetRiskIq_clicked();
    skipped 45 lines
    88 84   void on_buttonGetIpQualityScore_clicked();
    89 85   void on_buttonGetLeakLookup_clicked();
    90 86   void on_buttonGetWappalyzer_clicked();
    91  - 
    92 87   void on_buttonGetPassiveTotal_clicked();
    93  - 
    94 88   void on_buttonGetIpfy_clicked();
    95 89   
    96  -private:
     90 + private:
    97 91   Ui::ApiKeysDialog *ui;
    98 92   void m_loadApiKeys();
    99 93  };
    skipped 3 lines
  • ■ ■ ■ ■ ■
    sub3suite/src/Dialogs/ApiKeysDialog.ui
    skipped 62 lines
    63 63   <property name="geometry">
    64 64   <rect>
    65 65   <x>0</x>
    66  - <y>-1182</y>
     66 + <y>0</y>
    67 67   <width>626</width>
    68  - <height>2663</height>
     68 + <height>2478</height>
    69 69   </rect>
    70 70   </property>
    71 71   <layout class="QVBoxLayout" name="verticalLayout">
    skipped 887 lines
    959 959   </widget>
    960 960   </item>
    961 961   <item>
    962  - <layout class="QHBoxLayout" name="horizontalLayout_6">
    963  - <item>
    964  - <widget class="QLabel" name="label_7">
    965  - <property name="sizePolicy">
    966  - <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
    967  - <horstretch>0</horstretch>
    968  - <verstretch>0</verstretch>
    969  - </sizepolicy>
    970  - </property>
    971  - <property name="minimumSize">
    972  - <size>
    973  - <width>100</width>
    974  - <height>0</height>
    975  - </size>
    976  - </property>
    977  - <property name="maximumSize">
    978  - <size>
    979  - <width>100</width>
    980  - <height>16777215</height>
    981  - </size>
    982  - </property>
    983  - <property name="font">
    984  - <font>
    985  - <weight>75</weight>
    986  - <bold>true</bold>
    987  - </font>
    988  - </property>
    989  - <property name="text">
    990  - <string>Bing:</string>
    991  - </property>
    992  - </widget>
    993  - </item>
    994  - <item>
    995  - <widget class="QLineEdit" name="lineEditBing">
    996  - <property name="sizePolicy">
    997  - <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
    998  - <horstretch>0</horstretch>
    999  - <verstretch>0</verstretch>
    1000  - </sizepolicy>
    1001  - </property>
    1002  - <property name="minimumSize">
    1003  - <size>
    1004  - <width>0</width>
    1005  - <height>0</height>
    1006  - </size>
    1007  - </property>
    1008  - <property name="maximumSize">
    1009  - <size>
    1010  - <width>16777215</width>
    1011  - <height>16777215</height>
    1012  - </size>
    1013  - </property>
    1014  - <property name="styleSheet">
    1015  - <string notr="true"/>
    1016  - </property>
    1017  - </widget>
    1018  - </item>
    1019  - <item>
    1020  - <widget class="QToolButton" name="buttonGetBing">
    1021  - <property name="styleSheet">
    1022  - <string notr="true"/>
    1023  - </property>
    1024  - <property name="text">
    1025  - <string>Get...</string>
    1026  - </property>
    1027  - </widget>
    1028  - </item>
    1029  - </layout>
    1030  - </item>
    1031  - <item>
    1032  - <widget class="Line" name="line_30">
    1033  - <property name="orientation">
    1034  - <enum>Qt::Horizontal</enum>
    1035  - </property>
    1036  - </widget>
    1037  - </item>
    1038  - <item>
    1039 962   <layout class="QHBoxLayout" name="horizontalLayout_35">
    1040 963   <item>
    1041 964   <widget class="QLabel" name="label_38">
    skipped 153 lines
    1195 1118   </item>
    1196 1119   <item>
    1197 1120   <widget class="Line" name="line_31">
    1198  - <property name="orientation">
    1199  - <enum>Qt::Horizontal</enum>
    1200  - </property>
    1201  - </widget>
    1202  - </item>
    1203  - <item>
    1204  - <layout class="QHBoxLayout" name="horizontalLayout_8">
    1205  - <item>
    1206  - <widget class="QLabel" name="label_2">
    1207  - <property name="sizePolicy">
    1208  - <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
    1209  - <horstretch>0</horstretch>
    1210  - <verstretch>0</verstretch>
    1211  - </sizepolicy>
    1212  - </property>
    1213  - <property name="minimumSize">
    1214  - <size>
    1215  - <width>100</width>
    1216  - <height>0</height>
    1217  - </size>
    1218  - </property>
    1219  - <property name="maximumSize">
    1220  - <size>
    1221  - <width>100</width>
    1222  - <height>16777215</height>
    1223  - </size>
    1224  - </property>
    1225  - <property name="font">
    1226  - <font>
    1227  - <weight>75</weight>
    1228  - <bold>true</bold>
    1229  - </font>
    1230  - </property>
    1231  - <property name="text">
    1232  - <string>CloudFlare:</string>
    1233  - </property>
    1234  - </widget>
    1235  - </item>
    1236  - <item>
    1237  - <widget class="QLineEdit" name="lineEditCloudflare">
    1238  - <property name="sizePolicy">
    1239  - <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
    1240  - <horstretch>0</horstretch>
    1241  - <verstretch>0</verstretch>
    1242  - </sizepolicy>
    1243  - </property>
    1244  - <property name="minimumSize">
    1245  - <size>
    1246  - <width>0</width>
    1247  - <height>0</height>
    1248  - </size>
    1249  - </property>
    1250  - <property name="maximumSize">
    1251  - <size>
    1252  - <width>16777215</width>
    1253  - <height>16777215</height>
    1254  - </size>
    1255  - </property>
    1256  - <property name="styleSheet">
    1257  - <string notr="true"/>
    1258  - </property>
    1259  - </widget>
    1260  - </item>
    1261  - <item>
    1262  - <widget class="QToolButton" name="buttonGetCloudflare">
    1263  - <property name="styleSheet">
    1264  - <string notr="true"/>
    1265  - </property>
    1266  - <property name="text">
    1267  - <string>Get...</string>
    1268  - </property>
    1269  - </widget>
    1270  - </item>
    1271  - </layout>
    1272  - </item>
    1273  - <item>
    1274  - <widget class="Line" name="line_2">
    1275 1121   <property name="orientation">
    1276 1122   <enum>Qt::Horizontal</enum>
    1277 1123   </property>
    skipped 359 lines
    1637 1483   </widget>
    1638 1484   </item>
    1639 1485   <item>
    1640  - <layout class="QHBoxLayout" name="horizontalLayout_13">
    1641  - <item>
    1642  - <widget class="QLabel" name="label_8">
    1643  - <property name="sizePolicy">
    1644  - <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
    1645  - <horstretch>0</horstretch>
    1646  - <verstretch>0</verstretch>
    1647  - </sizepolicy>
    1648  - </property>
    1649  - <property name="minimumSize">
    1650  - <size>
    1651  - <width>100</width>
    1652  - <height>0</height>
    1653  - </size>
    1654  - </property>
    1655  - <property name="maximumSize">
    1656  - <size>
    1657  - <width>100</width>
    1658  - <height>16777215</height>
    1659  - </size>
    1660  - </property>
    1661  - <property name="font">
    1662  - <font>
    1663  - <weight>75</weight>
    1664  - <bold>true</bold>
    1665  - </font>
    1666  - </property>
    1667  - <property name="text">
    1668  - <string>Google:</string>
    1669  - </property>
    1670  - </widget>
    1671  - </item>
    1672  - <item>
    1673  - <widget class="QLineEdit" name="lineEditGoogle">
    1674  - <property name="sizePolicy">
    1675  - <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
    1676  - <horstretch>0</horstretch>
    1677  - <verstretch>0</verstretch>
    1678  - </sizepolicy>
    1679  - </property>
    1680  - <property name="minimumSize">
    1681  - <size>
    1682  - <width>0</width>
    1683  - <height>0</height>
    1684  - </size>
    1685  - </property>
    1686  - <property name="maximumSize">
    1687  - <size>
    1688  - <width>16777215</width>
    1689  - <height>16777215</height>
    1690  - </size>
    1691  - </property>
    1692  - <property name="styleSheet">
    1693  - <string notr="true"/>
    1694  - </property>
    1695  - </widget>
    1696  - </item>
    1697  - <item>
    1698  - <widget class="QToolButton" name="buttonGetGoogle">
    1699  - <property name="styleSheet">
    1700  - <string notr="true"/>
    1701  - </property>
    1702  - <property name="text">
    1703  - <string>Get...</string>
    1704  - </property>
    1705  - </widget>
    1706  - </item>
    1707  - </layout>
    1708  - </item>
    1709  - <item>
    1710  - <widget class="Line" name="line_7">
    1711  - <property name="orientation">
    1712  - <enum>Qt::Horizontal</enum>
    1713  - </property>
    1714  - </widget>
    1715  - </item>
    1716  - <item>
    1717 1486   <layout class="QHBoxLayout" name="horizontalLayout_28">
    1718 1487   <item>
    1719 1488   <widget class="QLabel" name="label_30">
    skipped 247 lines
    1967 1736   </item>
    1968 1737   <item>
    1969 1738   <widget class="Line" name="line_57">
    1970  - <property name="orientation">
    1971  - <enum>Qt::Horizontal</enum>
    1972  - </property>
    1973  - </widget>
    1974  - </item>
    1975  - <item>
    1976  - <layout class="QHBoxLayout" name="horizontalLayout_16">
    1977  - <item>
    1978  - <widget class="QLabel" name="label_9">
    1979  - <property name="sizePolicy">
    1980  - <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
    1981  - <horstretch>0</horstretch>
    1982  - <verstretch>0</verstretch>
    1983  - </sizepolicy>
    1984  - </property>
    1985  - <property name="minimumSize">
    1986  - <size>
    1987  - <width>100</width>
    1988  - <height>0</height>
    1989  - </size>
    1990  - </property>
    1991  - <property name="maximumSize">
    1992  - <size>
    1993  - <width>100</width>
    1994  - <height>16777215</height>
    1995  - </size>
    1996  - </property>
    1997  - <property name="font">
    1998  - <font>
    1999  - <weight>75</weight>
    2000  - <bold>true</bold>
    2001  - </font>
    2002  - </property>
    2003  - <property name="text">
    2004  - <string>IntelX:</string>
    2005  - </property>
    2006  - </widget>
    2007  - </item>
    2008  - <item>
    2009  - <widget class="QLineEdit" name="lineEditIntelX">
    2010  - <property name="sizePolicy">
    2011  - <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
    2012  - <horstretch>0</horstretch>
    2013  - <verstretch>0</verstretch>
    2014  - </sizepolicy>
    2015  - </property>
    2016  - <property name="minimumSize">
    2017  - <size>
    2018  - <width>0</width>
    2019  - <height>0</height>
    2020  - </size>
    2021  - </property>
    2022  - <property name="maximumSize">
    2023  - <size>
    2024  - <width>16777215</width>
    2025  - <height>16777215</height>
    2026  - </size>
    2027  - </property>
    2028  - <property name="styleSheet">
    2029  - <string notr="true"/>
    2030  - </property>
    2031  - </widget>
    2032  - </item>
    2033  - <item>
    2034  - <widget class="QToolButton" name="buttonGetIntelX">
    2035  - <property name="styleSheet">
    2036  - <string notr="true"/>
    2037  - </property>
    2038  - <property name="text">
    2039  - <string>Get...</string>
    2040  - </property>
    2041  - </widget>
    2042  - </item>
    2043  - </layout>
    2044  - </item>
    2045  - <item>
    2046  - <widget class="Line" name="line_17">
    2047 1739   <property name="orientation">
    2048 1740   <enum>Qt::Horizontal</enum>
    2049 1741   </property>
    skipped 699 lines
    2749 2441   </item>
    2750 2442   <item>
    2751 2443   <widget class="Line" name="line_29">
    2752  - <property name="orientation">
    2753  - <enum>Qt::Horizontal</enum>
    2754  - </property>
    2755  - </widget>
    2756  - </item>
    2757  - <item>
    2758  - <layout class="QHBoxLayout" name="horizontalLayout_17">
    2759  - <item>
    2760  - <widget class="QLabel" name="label_17">
    2761  - <property name="sizePolicy">
    2762  - <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
    2763  - <horstretch>0</horstretch>
    2764  - <verstretch>0</verstretch>
    2765  - </sizepolicy>
    2766  - </property>
    2767  - <property name="minimumSize">
    2768  - <size>
    2769  - <width>100</width>
    2770  - <height>20</height>
    2771  - </size>
    2772  - </property>
    2773  - <property name="maximumSize">
    2774  - <size>
    2775  - <width>100</width>
    2776  - <height>20</height>
    2777  - </size>
    2778  - </property>
    2779  - <property name="font">
    2780  - <font>
    2781  - <weight>75</weight>
    2782  - <bold>true</bold>
    2783  - </font>
    2784  - </property>
    2785  - <property name="text">
    2786  - <string>Pentest-tools:</string>
    2787  - </property>
    2788  - </widget>
    2789  - </item>
    2790  - <item>
    2791  - <widget class="QLineEdit" name="lineEditPentestTools">
    2792  - <property name="sizePolicy">
    2793  - <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
    2794  - <horstretch>0</horstretch>
    2795  - <verstretch>0</verstretch>
    2796  - </sizepolicy>
    2797  - </property>
    2798  - <property name="minimumSize">
    2799  - <size>
    2800  - <width>0</width>
    2801  - <height>0</height>
    2802  - </size>
    2803  - </property>
    2804  - <property name="maximumSize">
    2805  - <size>
    2806  - <width>16777215</width>
    2807  - <height>16777215</height>
    2808  - </size>
    2809  - </property>
    2810  - <property name="styleSheet">
    2811  - <string notr="true"/>
    2812  - </property>
    2813  - </widget>
    2814  - </item>
    2815  - <item>
    2816  - <widget class="QToolButton" name="buttonGetPentestTools">
    2817  - <property name="styleSheet">
    2818  - <string notr="true"/>
    2819  - </property>
    2820  - <property name="text">
    2821  - <string>Get...</string>
    2822  - </property>
    2823  - </widget>
    2824  - </item>
    2825  - </layout>
    2826  - </item>
    2827  - <item>
    2828  - <widget class="Line" name="line_10">
    2829 2444   <property name="orientation">
    2830 2445   <enum>Qt::Horizontal</enum>
    2831 2446   </property>
    skipped 1140 lines
  • ■ ■ ■ ■ ■
    sub3suite/src/Dialogs/EnumConfigDialog.h
    skipped 30 lines
    31 31   private:
    32 32   Ui::EnumConfigDialog *ui;
    33 33   ScanConfig *m_config;
     34 + 
    34 35   bool asn = false;
    35 36   bool cidr = false;
    36 37   bool ip = false;
    skipped 16 lines
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/Dialogs/FailedScansDialog.h
    skipped 8 lines
    9 9  #define FAILEDSCANSDIALOG_H
    10 10   
    11 11  #include <QDialog>
    12  -#include <QMap>
    13 12  #include <QQueue>
    14 13  #include <QStandardItemModel>
    15 14   
    skipped 15 lines
    31 30   private slots:
    32 31   void on_buttonReScan_clicked();
    33 32   void on_buttonCancel_clicked();
    34  - 
    35  - void on_tableView_customContextMenuRequested(const QPoint &pos);
    36  - 
    37 33   void on_buttonCopy_clicked();
     34 + void on_tableView_customContextMenuRequested(const QPoint &pos);
    38 35   
    39  -private:
     36 + private:
    40 37   Ui::FailedScansDialog *ui;
    41 38   QStandardItemModel *m_model;
    42 39  };
    skipped 3 lines
  • ■ ■ ■ ■ ■
    sub3suite/src/Dialogs/LogViewerDialog.cpp
    skipped 36 lines
    37 37   m_logsSyntaxHighlighter = new LogsSyntaxHighlighter(ui->plainTextEdit->document());
    38 38  }
    39 39  LogViewerDialog::~LogViewerDialog(){
     40 + delete m_logsSyntaxHighlighter;
    40 41   delete ui;
    41 42  }
    42 43   
    skipped 22 lines
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/Dialogs/PassiveConfigDialog.cpp
    skipped 26 lines
    27 27   /* setting placeholder texts.. */
    28 28   ui->lineEditTimeout->setPlaceholderText("e.g. 1000");
    29 29   ui->lineEditMaxPages->setPlaceholderText("e.g. 100");
    30  - 
    31  - /* validators... */
    32  - ui->lineEditMaxPages->setValidator(new QIntValidator(1, 1000, this));
    33 30  }
    34 31  PassiveConfigDialog::~PassiveConfigDialog(){
    35 32   delete ui;
    skipped 71 lines
  • ■ ■ ■ ■ ■
    sub3suite/src/Dialogs/PassiveConfigDialog.h
    skipped 27 lines
    28 28   
    29 29   private slots:
    30 30   void on_buttonOk_clicked();
    31  - void on_checkBoxNoDuplicates_clicked(bool checked);
    32 31   void on_buttonCancel_clicked();
     32 + void on_checkBoxNoDuplicates_clicked(bool checked);
    33 33   
    34 34   private:
    35 35   Ui::PassiveConfigDialog *ui;
    36 36   ScanConfig *m_config;
     37 + 
    37 38   bool osint = false;
    38 39   bool raw = false;
     40 + 
    39 41   void saveConfig_osint();
    40 42   void saveConfig_raw();
    41 43  };
    skipped 3 lines
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/Dialogs/ProjectConfigDialog.h
    1 1  #ifndef PROJECTCONFIGDIALOG_H
    2 2  #define PROJECTCONFIGDIALOG_H
    3 3   
    4  -#include <QMap>
    5 4  #include <QDialog>
    6  - 
    7 5  #include "src/models/ProjectModel.h"
    8 6   
    9 7  namespace Ui {
    skipped 22 lines
  • ■ ■ ■ ■ ■
    sub3suite/src/Dialogs/SaveProjectDialog.h
    skipped 1 lines
    2 2  #define SAVEPROJECTDIALOG_H
    3 3   
    4 4  #include <QDialog>
    5  - 
    6 5  #include "src/models/ProjectModel.h"
    7 6   
    8 7   
    skipped 23 lines
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/Dialogs/WordlistDialog.h
    skipped 40 lines
    41 41   void on_comboBoxSubstituteFrom_currentIndexChanged(int index);
    42 42   void on_comboBoxSubstituteTo_currentIndexChanged(int index);
    43 43   
    44  -private:
     44 + private:
    45 45   Ui::WordListDialog *ui;
    46 46   QStringListModel *m_wordlistModel;
    47 47   
    48 48   /* for choose */
    49 49   void m_initChoose();
    50 50   QStringListModel *m_listModel_choose;
    51  - QStringListModel *m_listModel_generate;
    52 51   QString m_defaultWordlist;
    53 52   QString m_specialWordlist;
    54 53   bool TLD = false;
    55 54   bool Subdomain = false;
    56 55   
    57 56   /* for generate */
     57 + QStringListModel *m_listModel_generate;
    58 58   void m_initGenerate();
    59 59   void m_generateAZ();
    60 60   void m_generateNumbers();
    skipped 6 lines
  • ■ ■ ■ ■
    sub3suite/src/MainWindow.cpp
    skipped 11 lines
    12 12  #include <QPushButton>
    13 13  #include <QDesktopServices>
    14 14   
    15  -#include "src/dialogs/StartupDialog.h"
    16 15  #include "src/dialogs/AboutDialog.h"
    17 16  #include "src/dialogs/ApiKeysDialog.h"
    18 17  #include "src/dialogs/LogViewerDialog.h"
    skipped 26 lines
    45 44   ui->setupUi(this);
    46 45   
    47 46   /* build info */
    48  - QAction* buildInfo = new QAction(tr("(%2)").arg("BETA"), this);
     47 + QAction* buildInfo = new QAction(tr("(%1)").arg("BETA"), this);
    49 48   buildInfo->setEnabled(false);
    50 49   ui->menubar->addAction(buildInfo);
    51 50   
    skipped 71 lines
    123 122   ui->actionAboutQt->setIcon(QIcon(":/img/res/icons/qt-logo.png"));
    124 123   ui->actionApiKeys->setIcon(QIcon(":/img/res/icons/key.png"));
    125 124   ui->actionTwitter->setIcon(QIcon(":/img/res/icons/twitter.png"));
    126  - /*ui->actionLanguage->setIcon(QIcon(":/img/res/icons/"));*/
    127 125   ui->actionlogViewer->setIcon(QIcon(":/img/res/icons/log.png"));
    128 126   ui->actionSourceCode->setIcon(QIcon(":/img/res/icons/source.png"));
    129 127   ui->actionOpenProject->setIcon(QIcon(":/img/res/icons/open.png"));
    130  - /*ui->actionPreferences->setIcon(QIcon(":/img/res/icons/preferences.png"));*/
    131 128   ui->actionDocumentation->setIcon(QIcon(":/img/res/icons/doc.png"));
    132 129   ui->actionRecentProjects->setIcon(QIcon(":/img/res/icons/recent.png"));
    133 130   ui->actionCheckUpdates->setIcon(QIcon(":/img/res/icons/updates.png"));
    skipped 454 lines
  • ■ ■ ■ ■
    sub3suite/src/MainWindow.h
    skipped 71 lines
    72 72   void onChangeTabToEmailEnum();
    73 73   
    74 74   private slots:
    75  - /* get documentation */
     75 + /* documentation clickable label */
    76 76   void onGetDocumentation();
    77 77   
    78 78   /* file menu */
    skipped 59 lines
  • ■ ■ ■ ■
    sub3suite/src/engines/AbstractEngine.h
    skipped 38 lines
    39 39   ScanStatus *status;
    40 40   ProjectModel *project;
    41 41   QSortFilterProxyModel *proxyModel;
    42  - QItemSelectionModel *selectionModel;
     42 + QItemSelectionModel *selectionModel = nullptr;
    43 43   
    44 44   signals:
    45 45   /* signals to scanner threads */
    skipped 44 lines
  • ■ ■ ■ ■
    sub3suite/src/engines/active/Active.ui
    skipped 393 lines
    394 394   <number>50</number>
    395 395   </attribute>
    396 396   <attribute name="horizontalHeaderDefaultSectionSize">
    397  - <number>250</number>
     397 + <number>150</number>
    398 398   </attribute>
    399 399   <attribute name="horizontalHeaderShowSortIndicator" stdset="0">
    400 400   <bool>true</bool>
    skipped 219 lines
  • ■ ■ ■ ■
    sub3suite/src/engines/brute/Brute.ui
    skipped 447 lines
    448 448   <number>50</number>
    449 449   </attribute>
    450 450   <attribute name="horizontalHeaderDefaultSectionSize">
    451  - <number>250</number>
     451 + <number>200</number>
    452 452   </attribute>
    453 453   <attribute name="horizontalHeaderStretchLastSection">
    454 454   <bool>true</bool>
    skipped 130 lines
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/engines/osint/Osint.h
    skipped 13 lines
    14 14  #include <QAction>
    15 15   
    16 16   
    17  -enum INPUT{
     17 +enum INPUT {
    18 18   HOSTNAME = 0,
    19 19   IP = 1,
    20 20   EMAIL = 2,
    skipped 4 lines
    25 25   QUERY_TERM =7
    26 26  };
    27 27   
    28  -namespace osint{
    29  - 
    30  -enum OUTPUT{
     28 +namespace osint {
     29 +enum OUTPUT {
    31 30   SUBDOMAIN = 0,
    32 31   SUBDOMAINIP = 1,
    33 32   IP = 2,
    skipped 3 lines
    37 36   CERT = 6,
    38 37   CIDR = 7
    39 38  };
    40  - 
    41 39  }
    42 40   
    43 41  namespace Ui {
    skipped 46 lines
    90 88   Ui::Osint *ui;
    91 89   ScanConfig *m_scanConfig;
    92 90   ScanArgs *m_scanArgs;
     91 + 
    93 92   /* target listmodels */
    94 93   QStringListModel *m_targetListModel_host;
    95 94   QStringListModel *m_targetListModel_ip;
    skipped 59 lines
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/engines/osint/Osint.ui
    skipped 70 lines
    71 71   </item>
    72 72   <item>
    73 73   <property name="text">
    74  - <string> Ip</string>
     74 + <string> IP</string>
    75 75   </property>
    76 76   </item>
    77 77   <item>
    skipped 3 lines
    81 81   </item>
    82 82   <item>
    83 83   <property name="text">
    84  - <string> Url</string>
     84 + <string> URL</string>
    85 85   </property>
    86 86   </item>
    87 87   <item>
    88 88   <property name="text">
    89  - <string> Asn</string>
     89 + <string> ASN</string>
    90 90   </property>
    91 91   </item>
    92 92   <item>
    93 93   <property name="text">
    94  - <string> SSL Cert</string>
     94 + <string> SSL</string>
    95 95   </property>
    96 96   </item>
    97 97   <item>
    98 98   <property name="text">
    99  - <string> Cidr</string>
     99 + <string> CIDR</string>
    100 100   </property>
    101 101   </item>
    102 102   <item>
    skipped 52 lines
    155 155   </item>
    156 156   <item>
    157 157   <property name="text">
    158  - <string> Subdomain &amp; Ip</string>
     158 + <string> Subdomain &amp; IP</string>
    159 159   </property>
    160 160   </item>
    161 161   <item>
    162 162   <property name="text">
    163  - <string> Ip</string>
     163 + <string> IP</string>
    164 164   </property>
    165 165   </item>
    166 166   <item>
    167 167   <property name="text">
    168  - <string> Emails</string>
     168 + <string> Email</string>
    169 169   </property>
    170 170   </item>
    171 171   <item>
    172 172   <property name="text">
    173  - <string> Urls</string>
     173 + <string> URL</string>
    174 174   </property>
    175 175   </item>
    176 176   <item>
    177 177   <property name="text">
    178  - <string> Asn</string>
     178 + <string> ASN</string>
    179 179   </property>
    180 180   </item>
    181 181   <item>
    182 182   <property name="text">
    183  - <string> SSL Certs</string>
     183 + <string> SSL</string>
    184 184   </property>
    185 185   </item>
    186 186   <item>
    187 187   <property name="text">
    188  - <string> Cidr</string>
     188 + <string> CIDR</string>
    189 189   </property>
    190 190   </item>
    191 191   </widget>
    skipped 409 lines
    601 601   <number>50</number>
    602 602   </attribute>
    603 603   <attribute name="horizontalHeaderDefaultSectionSize">
    604  - <number>250</number>
     604 + <number>300</number>
    605 605   </attribute>
    606 606   <attribute name="horizontalHeaderShowSortIndicator" stdset="0">
    607 607   <bool>true</bool>
    skipped 126 lines
    734 734   <property name="geometry">
    735 735   <rect>
    736 736   <x>0</x>
    737  - <y>0</y>
     737 + <y>-763</y>
    738 738   <width>177</width>
    739  - <height>1136</height>
     739 + <height>1159</height>
    740 740   </rect>
    741 741   </property>
    742 742   <attribute name="label">
    skipped 254 lines
    997 997   <item>
    998 998   <widget class="QCheckBox" name="moduleBing">
    999 999   <property name="text">
    1000  - <string>Bing</string>
     1000 + <string>Bing Search</string>
    1001 1001   </property>
    1002 1002   </widget>
    1003 1003   </item>
    skipped 19 lines
    1023 1023   </widget>
    1024 1024   </item>
    1025 1025   <item>
     1026 + <widget class="QCheckBox" name="moduleGoogleSearch">
     1027 + <property name="text">
     1028 + <string>Google Search</string>
     1029 + </property>
     1030 + </widget>
     1031 + </item>
     1032 + <item>
    1026 1033   <widget class="QCheckBox" name="moduleYahoo">
    1027 1034   <property name="text">
    1028  - <string>Yahoo</string>
     1035 + <string>Yahoo Search</string>
    1029 1036   </property>
    1030 1037   </widget>
    1031 1038   </item>
    skipped 421 lines
  • ■ ■ ■ ■ ■
    sub3suite/src/engines/osint/Osint_modules.cpp
    skipped 7 lines
    8 8  #include "Osint.h"
    9 9  #include "ui_Osint.h"
    10 10   
    11  -#include "src/modules/passive/OsintModulesHeaders.h"
     11 +#include "src/modules/passive/OsintHeaders.h"
    12 12   
    13 13   
    14 14  void Osint::initModules(){
    skipped 402 lines
    417 417   else
    418 418   ui->moduleExalead->hide();
    419 419   
    420  - ModuleInfo::Yahoo yahoo;
     420 + ModuleInfo::YahooSearch yahoo;
    421 421   if(yahoo.input_output.contains(INPUT_TYPE) && yahoo.input_output[INPUT_TYPE].contains(OUTPUT_TYPE))
    422 422   ui->moduleYahoo->show();
    423 423   else
    424 424   ui->moduleYahoo->hide();
    425 425   
    426  - ModuleInfo::Bing bing;
     426 + ModuleInfo::BingSearch bing;
    427 427   if(bing.input_output.contains(INPUT_TYPE) && bing.input_output[INPUT_TYPE].contains(OUTPUT_TYPE))
    428 428   ui->moduleBing->show();
    429 429   else
    skipped 28 lines
    458 458   ui->moduleASRank->show();
    459 459   else
    460 460   ui->moduleASRank->hide();
     461 + 
     462 + ModuleInfo::GoogleSearch googlesearch;
     463 + if(googlesearch.input_output.contains(INPUT_TYPE) && googlesearch.input_output[INPUT_TYPE].contains(OUTPUT_TYPE))
     464 + ui->moduleGoogleSearch->show();
     465 + else
     466 + ui->moduleGoogleSearch->hide();
    461 467   
    462 468   /* uncheck all modules */
    463 469   this->uncheckAllModules();
    skipped 74 lines
    538 544   ui->moduleDnsbufferoverrun->setChecked(false);
    539 545   ui->moduleCirclPublic->setChecked(false);
    540 546   ui->moduleASRank->setChecked(false);
     547 + ui->moduleGoogleSearch->setChecked(false);
    541 548  }
    542 549   
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/engines/osint/Osint_scan.cpp
    skipped 7 lines
    8 8  #include "Osint.h"
    9 9  #include "ui_Osint.h"
    10 10   
    11  -#include "src/modules/passive/OsintModulesHeaders.h"
     11 +#include "src/modules/passive/OsintHeaders.h"
    12 12   
    13 13   
    14 14  void Osint::onScanThreadEnded(){
    skipped 338 lines
    353 353   this->startScanThread(new Exalead(*m_scanArgs));
    354 354   
    355 355   if(ui->moduleYahoo->isChecked())
    356  - this->startScanThread(new Yahoo(*m_scanArgs));
     356 + this->startScanThread(new YahooSearch(*m_scanArgs));
    357 357   
    358 358   if(ui->moduleBing->isChecked())
    359  - this->startScanThread(new Bing(*m_scanArgs));
     359 + this->startScanThread(new BingSearch(*m_scanArgs));
     360 + 
     361 + if(ui->moduleGoogleSearch->isChecked())
     362 + this->startScanThread(new GoogleSearch(*m_scanArgs));
    360 363   
    361 364   ///
    362 365   /// ip...
    skipped 67 lines
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/engines/raw/Raw.h
    skipped 14 lines
    15 15   
    16 16  #include "../AbstractEngine.h"
    17 17  #include "src/utils/utils.h"
    18  -#include "src/modules/passive/OsintModulesHeaders.h"
     18 +#include "src/modules/passive/OsintHeaders.h"
    19 19  #include "src/utils/JsonSyntaxHighlighter.h"
    20 20   
    21 21   
    skipped 127 lines
    149 149   void on_moduleLeakLookup_clicked();
    150 150   void on_moduleWappalyzer_clicked();
    151 151   void on_modulePassiveTotal_clicked();
    152  - 
    153 152   void on_moduleIpfy_clicked();
    154  - 
    155 153   void on_moduleCirclPublic_clicked();
    156  - 
    157 154   void on_moduleASRank_clicked();
    158 155   
    159  -private:
     156 + private:
    160 157   Ui::Raw *ui;
    161 158   QStandardItemModel *m_model;
    162 159   QStringListModel *m_targetListModel;
    skipped 50 lines
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/engines/ssl/Ssl.h
    skipped 31 lines
    32 32   public slots:
    33 33   void onScanThreadEnded();
    34 34   void onScanLog(scan::Log log);
    35  - /* scan results */
     35 + 
    36 36   void onScanResultSHA1(QString sha1);
    37 37   void onScanResultSHA256(QString sha256);
    38 38   void onScanResultSubdomain(QStringList subdomain);
    39 39   void onScanResultRaw(QString target, QSslCertificate certificate);
    40  - /* ... */
     40 + 
    41 41   void onReScan(QQueue<QString> targets);
    42 42   
    43 43   /* receiving targets from other engines */
    skipped 56 lines
  • ■ ■ ■ ■
    sub3suite/src/engines/url/Url.ui
    skipped 384 lines
    385 385   <number>40</number>
    386 386   </attribute>
    387 387   <attribute name="horizontalHeaderDefaultSectionSize">
    388  - <number>100</number>
     388 + <number>150</number>
    389 389   </attribute>
    390 390   <attribute name="horizontalHeaderHighlightSections">
    391 391   <bool>false</bool>
    skipped 127 lines
  • ■ ■ ■ ■
    sub3suite/src/enums/AbstractEnum.h
    skipped 31 lines
    32 32   protected:
    33 33   ScanStatus *status;
    34 34   ProjectModel *project;
    35  - QItemSelectionModel *selectionModel;
    36 35   QSortFilterProxyModel *proxyModel;
     36 + QItemSelectionModel *selectionModel = nullptr;
    37 37   
    38 38   signals:
    39 39   /* signals to scanning threads */
    skipped 44 lines
  • ■ ■ ■ ■
    sub3suite/src/enums/asn/ASNEnum.h
    skipped 9 lines
    10 10   
    11 11  #include "../AbstractEnum.h"
    12 12  #include "src/items/ASNItem.h"
    13  -#include "src/modules/passive/OsintModulesHeaders.h"
     13 +#include "src/modules/passive/OsintHeaders.h"
    14 14   
    15 15   
    16 16  namespace Ui {
    skipped 67 lines
  • ■ ■ ■ ■
    sub3suite/src/enums/cidr/CidrEnum.h
    skipped 9 lines
    10 10   
    11 11  #include "../AbstractEnum.h"
    12 12  #include "src/items/CIDRItem.h"
    13  -#include "src/modules/passive/OsintModulesHeaders.h"
     13 +#include "src/modules/passive/OsintHeaders.h"
    14 14   
    15 15   
    16 16  namespace Ui {
    skipped 66 lines
  • ■ ■ ■ ■
    sub3suite/src/enums/email/EmailEnum_scan.cpp
    1 1  #include "EmailEnum.h"
    2 2  #include "ui_EmailEnum.h"
    3 3   
    4  -#include "src/modules/passive/OsintModulesHeaders.h"
     4 +#include "src/modules/passive/OsintHeaders.h"
    5 5  #include "src/dialogs/FailedScansDialog.h"
    6 6   
    7 7   
    skipped 102 lines
  • ■ ■ ■ ■ ■
    sub3suite/src/enums/ip/IpEnum.h
    skipped 8 lines
    9 9  #define IPENUM_H
    10 10   
    11 11  #include "../AbstractEnum.h"
    12  -#include "src/modules/passive/OsintModulesHeaders.h"
     12 +#include "src/modules/passive/OsintHeaders.h"
    13 13   
    14 14  #include <QAction>
    15 15   
    skipped 27 lines
    43 43   void on_treeViewResults_customContextMenuRequested(const QPoint &pos);
    44 44   void on_lineEditFilter_textChanged(const QString &arg1);
    45 45   void on_buttonAction_clicked();
    46  - 
    47 46   void on_comboBoxOutput_currentIndexChanged(int index);
    48 47   
    49  -private:
     48 + private:
    50 49   Ui::IpEnum *ui;
    51 50   
    52 51   QStandardItemModel *m_model;
    skipped 31 lines
  • ■ ■ ■ ■
    sub3suite/src/enums/mx/MXEnum.h
    skipped 9 lines
    10 10   
    11 11  #include "../AbstractEnum.h"
    12 12  #include "src/items/MXItem.h"
    13  -#include "src/modules/passive/OsintModulesHeaders.h"
     13 +#include "src/modules/passive/OsintHeaders.h"
    14 14   
    15 15   
    16 16  namespace Ui {
    skipped 64 lines
  • ■ ■ ■ ■
    sub3suite/src/enums/ns/NSEnum.h
    skipped 9 lines
    10 10   
    11 11  #include "../AbstractEnum.h"
    12 12  #include "src/items/NSItem.h"
    13  -#include "src/modules/passive/OsintModulesHeaders.h"
     13 +#include "src/modules/passive/OsintHeaders.h"
    14 14   
    15 15   
    16 16  namespace Ui {
    skipped 64 lines
  • ■ ■ ■ ■
    sub3suite/src/enums/ssl/SSLEnum.h
    skipped 8 lines
    9 9  #define SSLENUM_H
    10 10   
    11 11  #include "../AbstractEnum.h"
    12  -#include "src/modules/passive/OsintModulesHeaders.h"
     12 +#include "src/modules/passive/OsintHeaders.h"
    13 13   
    14 14   
    15 15  namespace Ui {
    skipped 63 lines
  • ■ ■ ■ ■
    sub3suite/src/main.cpp
    skipped 23 lines
    24 24  /// logging device informations...
    25 25  ///
    26 26  void log_device_info(){
     27 + /* display info */
    27 28   qDebug() << "physical dpi value X: " << qApp->desktop()->physicalDpiX();
    28 29   qDebug() << "physical dpi value Y: " << qApp->desktop()->physicalDpiY();
    29 30   qDebug() << "Logical dpi value X: " << qApp->desktop()->logicalDpiX();
    skipped 44 lines
    74 75   break;
    75 76   }
    76 77   
    77  - /*
    78  - * since the messagehandler isn't thread safe
    79  - * introducing mutex lock
    80  - */
    81 78   QMutex mutex;
    82 79   mutex.lock();
    83 80   
    skipped 146 lines
  • ■ ■ ■ ■ ■
    sub3suite/src/models/ProjectModel.h
    skipped 28 lines
    29 29   
    30 30  #include "ExplorerModel.h"
    31 31   
    32  -/* TODO:
    33  - * compress & decompress data before saving and loading project,
    34  - * use a fast compression library eg https://github.com/lz4/lz4
    35  - */
     32 + 
    36 33  struct ProjectStruct{
    37 34   QString name;
    38 35   QString path;
    skipped 8 lines
    47 44   
    48 45  class ProjectModel
    49 46  {
    50  - 
    51 47  public:
    52 48   ProjectModel();
    53 49   ~ProjectModel();
    skipped 117 lines
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/modules/active/URLScanner.cpp
    skipped 31 lines
    32 32   emit scanLog(log);
    33 33   }
    34 34   break;
     35 + 
    35 36   case QNetworkReply::NoError:
    36 37   {
    37 38   s3s_struct::URL url;
    skipped 4 lines
    42 43   emit scanResult(url);
    43 44   }
    44 45   break;
     46 + 
    45 47   default:
    46 48   {
    47 49   scan::Log log;
    skipped 41 lines
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/AbstractOsintModule.h
    skipped 6 lines
    7 7  #include <QNetworkReply>
    8 8  #include <QNetworkRequest>
    9 9   
    10  -#include "ParserMethods.h"
    11 10  #include "src/utils/s3s.h"
    12 11  #include "src/utils/utils.h"
    13 12  #include "OsintDefinitions.h"
    skipped 7 lines
    21 20  #include "src/items/MXItem.h"
    22 21  #include "src/items/NSItem.h"
    23 22  #include "src/items/RawItem.h"
    24  - 
    25 23   
    26 24  /* input option */
    27 25  #define IN_DOMAIN 0
    skipped 74 lines
    102 100   QString raw_query_name;
    103 101  };
    104 102   
     103 +///
     104 +/// getting html body node...
     105 +///
     106 + 
     107 +GumboNode* getBody(GumboNode *node) {
     108 + for(unsigned int i = 0; i < node->v.element.children.length; i++)
     109 + {
     110 + GumboNode *child = static_cast<GumboNode*>(node->v.element.children.data[i]);
     111 + if(child->type == GUMBO_NODE_ELEMENT && child->v.element.tag == GUMBO_TAG_BODY)
     112 + return child;
     113 + }
     114 + return nullptr;
     115 +}
     116 + 
     117 +///
     118 +/// \brief The AbstractOsintModule class
     119 +///
    105 120   
    106 121  class AbstractOsintModule : public QObject {
    107  - Q_OBJECT
     122 + Q_OBJECT
    108 123   
    109  - public:
    110  - explicit AbstractOsintModule(ScanArgs args)
    111  - : QObject(nullptr),
    112  - args(args)
    113  - {
    114  - }
    115  - ~AbstractOsintModule()
    116  - {
    117  - }
     124 +public:
     125 + explicit AbstractOsintModule(ScanArgs args)
     126 + : QObject(nullptr),
     127 + args(args)
     128 + {
     129 + }
     130 + ~AbstractOsintModule()
     131 + {
     132 + }
    118 133   
    119  - void startScan(QThread* cThread)
    120  - {
    121  - connect(cThread, &QThread::started, this, &AbstractOsintModule::start);
    122  - connect(this, &AbstractOsintModule::nextTarget, this, &AbstractOsintModule::start);
    123  - connect(this, &AbstractOsintModule::quitThread, cThread, &QThread::quit);
     134 + void startScan(QThread* cThread)
     135 + {
     136 + connect(cThread, &QThread::started, this, &AbstractOsintModule::start);
     137 + connect(this, &AbstractOsintModule::nextTarget, this, &AbstractOsintModule::start);
     138 + connect(this, &AbstractOsintModule::quitThread, cThread, &QThread::quit);
    124 139   
    125  - /* first target */
    126  - target = args.targets.dequeue();
    127  - log.target = target;
    128  - }
     140 + /* first target */
     141 + target = args.targets.dequeue();
     142 + log.target = target;
     143 + }
    129 144   
    130  - signals:
    131  - void quitThread();
    132  - void nextTarget();
     145 +signals:
     146 + void quitThread();
     147 + void nextTarget();
    133 148   
    134  - void scanProgress(int progress);
    135  - void scanLog(ScanLog);
     149 + void scanProgress(int progress);
     150 + void scanLog(ScanLog);
    136 151   
    137  - void resultSubdomain(QString subdomain);
    138  - void resultSubdomainIp(QString subdomain, QString ip);
    139  - void resultIP(QString ip);
    140  - void resultA(QString ip);
    141  - void resultAAAA(QString ip);
    142  - void resultNS(QString NS);
    143  - void resultMX(QString MX);
    144  - void resultCNAME(QString CNAME);
    145  - void resultTXT(QString TXT);
    146  - void resultSSL(QString certId);
    147  - void resultEmail(QString email);
    148  - void resultCIDR(QString cidr);
    149  - void resultURL(QString url);
    150  - void resultASN(QString asn, QString name);
     152 + void resultSubdomain(QString subdomain);
     153 + void resultSubdomainIp(QString subdomain, QString ip);
     154 + void resultIP(QString ip);
     155 + void resultA(QString ip);
     156 + void resultAAAA(QString ip);
     157 + void resultNS(QString NS);
     158 + void resultMX(QString MX);
     159 + void resultCNAME(QString CNAME);
     160 + void resultTXT(QString TXT);
     161 + void resultSSL(QString certId);
     162 + void resultEmail(QString email);
     163 + void resultCIDR(QString cidr);
     164 + void resultURL(QString url);
     165 + void resultASN(QString asn, QString name);
    151 166   
    152  - void resultRawSSL(QByteArray);
    153  - void resultRawTXT(s3s_struct::RAW);
    154  - void resultRawJSON(s3s_struct::RAW);
     167 + void resultRawSSL(QByteArray);
     168 + void resultRawTXT(s3s_struct::RAW);
     169 + void resultRawJSON(s3s_struct::RAW);
    155 170   
    156  - void resultEnumASN(s3s_struct::ASN);
    157  - void resultEnumCIDR(s3s_struct::CIDR);
    158  - void resultEnumMX(s3s_struct::MX);
    159  - void resultEnumNS(s3s_struct::NS);
    160  - void resultEnumIP(s3s_struct::IP);
    161  - void resultEnumEmail(s3s_struct::Email);
     171 + void resultEnumASN(s3s_struct::ASN);
     172 + void resultEnumCIDR(s3s_struct::CIDR);
     173 + void resultEnumMX(s3s_struct::MX);
     174 + void resultEnumNS(s3s_struct::NS);
     175 + void resultEnumIP(s3s_struct::IP);
     176 + void resultEnumEmail(s3s_struct::Email);
    162 177   
    163  - public slots:
    164  - void onStop(){
    165  - log.statusCode = 0;
    166  - log.message = "Stopped...";
    167  - emit scanLog(log);
    168  - emit quitThread();
    169  - }
     178 +public slots:
     179 + void onStop(){
     180 + log.statusCode = 0;
     181 + log.message = "Stopped...";
     182 + emit scanLog(log);
     183 + emit quitThread();
     184 + }
    170 185   
    171  - protected slots:
    172  - virtual void start() = 0;
    173  - virtual void replyFinishedSubdomainIp(QNetworkReply*){} // returns subdomain and ip
    174  - virtual void replyFinishedSubdomain(QNetworkReply*){} // returns subdomains
    175  - virtual void replyFinishedCidr(QNetworkReply *){} // returns ip/cidr
    176  - virtual void replyFinishedSSL(QNetworkReply*){} // returns SSL Cert Sha1 fingerprint
    177  - virtual void replyFinishedIp(QNetworkReply*){} // returns ip-addresses
    178  - virtual void replyFinishedAsn(QNetworkReply*){} // returns ASN
    179  - virtual void replyFinishedEmail(QNetworkReply*){} // returns Emails
    180  - virtual void replyFinishedUrl(QNetworkReply*){} // returns URLs
     186 +protected slots:
     187 + virtual void start() = 0;
     188 + virtual void replyFinishedSubdomainIp(QNetworkReply*){} // returns subdomain and ip
     189 + virtual void replyFinishedSubdomain(QNetworkReply*){} // returns subdomains
     190 + virtual void replyFinishedCidr(QNetworkReply *){} // returns ip/cidr
     191 + virtual void replyFinishedSSL(QNetworkReply*){} // returns SSL Cert Sha1 fingerprint
     192 + virtual void replyFinishedIp(QNetworkReply*){} // returns ip-addresses
     193 + virtual void replyFinishedAsn(QNetworkReply*){} // returns ASN
     194 + virtual void replyFinishedEmail(QNetworkReply*){} // returns Emails
     195 + virtual void replyFinishedUrl(QNetworkReply*){} // returns URLs
    181 196   
    182  - virtual void replyFinishedEnumASN(QNetworkReply*){} // returns multiple info on asn
    183  - virtual void replyFinishedEnumASNPeers(QNetworkReply*){} // returns multiple info on asn peers
    184  - virtual void replyFinishedEnumASNPrefixes(QNetworkReply*){} // returns multiple info on asn prefixes
     197 + virtual void replyFinishedEnumASN(QNetworkReply*){} // returns multiple info on asn
     198 + virtual void replyFinishedEnumASNPeers(QNetworkReply*){} // returns multiple info on asn peers
     199 + virtual void replyFinishedEnumASNPrefixes(QNetworkReply*){} // returns multiple info on asn prefixes
    185 200   
    186  - virtual void replyFinishedEnumIP(QNetworkReply*){} // returns multiple info on ip
    187  - virtual void replyFinishedEnumCIDR(QNetworkReply*){} // returns multiple info on cidr
    188  - virtual void replyFinishedEnumSSL(QNetworkReply*){} // returns multiple info on ssl cert
     201 + virtual void replyFinishedEnumIP(QNetworkReply*){} // returns multiple info on ip
     202 + virtual void replyFinishedEnumCIDR(QNetworkReply*){} // returns multiple info on cidr
     203 + virtual void replyFinishedEnumSSL(QNetworkReply*){} // returns multiple info on ssl cert
    189 204   
    190  - virtual void replyFinishedEnumMX(QNetworkReply*){} // returns MX records info
    191  - virtual void replyFinishedEnumNS(QNetworkReply*){} // returns NS records info
     205 + virtual void replyFinishedEnumMX(QNetworkReply*){} // returns MX records info
     206 + virtual void replyFinishedEnumNS(QNetworkReply*){} // returns NS records info
    192 207   
    193  - virtual void replyFinishedEnumEmail(QNetworkReply*){} // returns Email info
     208 + virtual void replyFinishedEnumEmail(QNetworkReply*){} // returns Email info
    194 209   
    195  - virtual void replyFinishedRawNdjson(QNetworkReply *reply) // returns raw json results from ndjson
     210 + virtual void replyFinishedRawNdjson(QNetworkReply *reply) // returns raw json results from ndjson
     211 + {
     212 + if(reply->error())
     213 + this->onError(reply);
     214 + else
    196 215   {
    197  - if(reply->error())
    198  - this->onError(reply);
    199  - else
    200  - {
    201  - /* converting ndjson to json array document */
    202  - QByteArray byteDocument = reply->readAll();
    203  - byteDocument = byteDocument.simplified();
    204  - byteDocument.replace("\n", ",");
    205  - byteDocument.push_back("]");
    206  - byteDocument.push_front("[");
     216 + /* converting ndjson to json array document */
     217 + QByteArray byteDocument = reply->readAll();
     218 + byteDocument = byteDocument.simplified();
     219 + byteDocument.replace("\n", ",");
     220 + byteDocument.push_back("]");
     221 + byteDocument.push_front("[");
    207 222   
    208  - s3s_struct::RAW raw;
    209  - raw.module = log.moduleName;
    210  - raw.query_option = args.raw_query_name;
    211  - raw.target = target;
    212  - raw.results = byteDocument;
    213  - emit resultRawJSON(raw);
    214  - }
    215  - 
    216  - this->end(reply);
     223 + s3s_struct::RAW raw;
     224 + raw.module = log.moduleName;
     225 + raw.query_option = args.raw_query_name;
     226 + raw.target = target;
     227 + raw.results = byteDocument;
     228 + emit resultRawJSON(raw);
    217 229   }
    218 230   
    219  - virtual void replyFinishedRawJson(QNetworkReply *reply) // returns raw json results
    220  - {
    221  - if(reply->error())
    222  - this->onError(reply);
    223  - else{
    224  - s3s_struct::RAW raw;
    225  - raw.module = log.moduleName;
    226  - raw.query_option = args.raw_query_name;
    227  - raw.target = target;
    228  - raw.results = reply->readAll();
    229  - emit resultRawJSON(raw);
    230  - }
     231 + this->end(reply);
     232 + }
    231 233   
    232  - this->end(reply);
     234 + virtual void replyFinishedRawJson(QNetworkReply *reply) // returns raw json results
     235 + {
     236 + if(reply->error())
     237 + this->onError(reply);
     238 + else{
     239 + s3s_struct::RAW raw;
     240 + raw.module = log.moduleName;
     241 + raw.query_option = args.raw_query_name;
     242 + raw.target = target;
     243 + raw.results = reply->readAll();
     244 + emit resultRawJSON(raw);
    233 245   }
    234 246   
    235  - virtual void replyFinishedRawTxt(QNetworkReply *reply) // returns raw txt results
    236  - {
    237  - if(reply->error())
    238  - this->onError(reply);
    239  - else{
    240  - s3s_struct::RAW raw;
    241  - raw.module = log.moduleName;
    242  - raw.query_option = args.raw_query_name;
    243  - raw.target = target;
    244  - raw.results = reply->readAll();
    245  - emit resultRawTXT(raw);
    246  - }
     247 + this->end(reply);
     248 + }
    247 249   
    248  - this->end(reply);
     250 + virtual void replyFinishedRawTxt(QNetworkReply *reply) // returns raw txt results
     251 + {
     252 + if(reply->error())
     253 + this->onError(reply);
     254 + else{
     255 + s3s_struct::RAW raw;
     256 + raw.module = log.moduleName;
     257 + raw.query_option = args.raw_query_name;
     258 + raw.target = target;
     259 + raw.results = reply->readAll();
     260 + emit resultRawTXT(raw);
    249 261   }
    250 262   
    251  - protected:
    252  - ScanLog log;
    253  - ScanArgs args;
    254  - QString target;
    255  - s3sNetworkAccessManager *manager = nullptr;
     263 + this->end(reply);
     264 + }
    256 265   
    257  - void onError(QNetworkReply *reply) {
    258  - switch(reply->error()){
    259  - case QNetworkReply::OperationCanceledError:
    260  - log.target = target;
    261  - log.message = "Operation Cancelled due to Timeout";
    262  - log.statusCode = 0;
    263  - log.error = true;
    264  - emit scanLog(log);
    265  - break;
    266  - default:
    267  - log.target = target;
    268  - log.message = reply->errorString();
    269  - log.statusCode = reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt();
    270  - log.error = true;
    271  - emit scanLog(log);
    272  - break;
    273  - }
     266 +protected:
     267 + ScanLog log;
     268 + ScanArgs args;
     269 + QString target;
     270 + s3sNetworkAccessManager *manager = nullptr;
    274 271   
    275  - reply->close();
    276  - reply->deleteLater();
    277  - this->next();
     272 + void checkAPIKey(QString key){
     273 + if(key.isNull() || key.isEmpty()){
     274 + log.message = "API key Required!";
     275 + log.statusCode = 0;
     276 + log.error = true;
     277 + emit scanLog(log);
     278 + emit quitThread();
    278 279   }
     280 + }
    279 281   
    280  - void end(QNetworkReply *reply) {
     282 + void onError(QNetworkReply *reply) {
     283 + switch(reply->error()){
     284 + case QNetworkReply::OperationCanceledError:
    281 285   log.target = target;
     286 + log.message = "Operation Cancelled due to Timeout";
     287 + log.statusCode = 0;
     288 + log.error = true;
     289 + emit scanLog(log);
     290 + break;
     291 + default:
     292 + log.target = target;
     293 + log.message = reply->errorString();
    282 294   log.statusCode = reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt();
     295 + log.error = true;
    283 296   emit scanLog(log);
    284  - 
    285  - reply->close();
    286  - reply->deleteLater();
    287  - this->next();
     297 + break;
    288 298   }
    289 299   
    290  - void next() {
    291  - args.config->progress++;
    292  - emit scanProgress(args.config->progress);
     300 + reply->close();
     301 + reply->deleteLater();
     302 + this->next();
     303 + }
    293 304   
    294  - /*
    295  - * enumerate next target if there are still targets available
    296  - * if no targets available quit the scanThread.
    297  - */
    298  - if(args.targets.length()){
    299  - target = args.targets.dequeue();
    300  - emit nextTarget();
    301  - }
    302  - else
    303  - emit quitThread();
     305 + void end(QNetworkReply *reply) {
     306 + log.target = target;
     307 + log.statusCode = reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt();
     308 + emit scanLog(log);
     309 + 
     310 + reply->close();
     311 + reply->deleteLater();
     312 + this->next();
     313 + }
     314 + 
     315 + void next() {
     316 + args.config->progress++;
     317 + emit scanProgress(args.config->progress);
     318 + 
     319 + /*
     320 + * enumerate next target if there are still targets available
     321 + * if no targets available quit the scanThread.
     322 + */
     323 + if(args.targets.length()){
     324 + target = args.targets.dequeue();
     325 + emit nextTarget();
    304 326   }
     327 + else
     328 + emit quitThread();
     329 + }
    305 330  };
    306 331   
    307 332  #endif // ABSTRACTOSINTMODULE_H
    skipped 1 lines
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/OsintDefinitions.h
    skipped 97 lines
    98 98  #define OSINT_MODULE_LEAKLOOKUP "LeakLookup"
    99 99  #define OSINT_MODULE_VIRUSTOTAL "VirusTotal"
    100 100   
    101  -/* Scrape */
     101 +/* scrape */
    102 102  #define OSINT_MODULE_ASK "Ask"
    103 103  #define OSINT_MODULE_BAIDU "Baidu"
    104  -#define OSINT_MODULE_BING "Bing"
     104 +#define OSINT_MODULE_BINGSEARCH "BingSearch"
    105 105  #define OSINT_MODULE_DOGPILE "DogPile"
    106 106  #define OSINT_MODULE_DUCKDUCKGO "DuckDuckGo"
    107 107  #define OSINT_MODULE_EXALEAD "Exalead"
    108  -#define OSINT_MODULE_YAHOO "Yahoo"
     108 +#define OSINT_MODULE_YAHOOSEARCH "YahooSearch"
     109 +#define OSINT_MODULE_GOOGLESEARCH "GoogleSearch"
    109 110   
    110 111  /* site */
    111 112  #define OSINT_MODULE_DNSDUMPSTER "DnsDumpster"
    skipped 8 lines
  • ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/OsintModulesHeaders.h sub3suite/src/modules/passive/OsintHeaders.h
    skipped 123 lines
    124 124  ///
    125 125  /// scrape
    126 126  ///
    127  -#include "src/modules/passive/scrape/Bing.h"
    128  -#include "src/modules/passive/scrape/Yahoo.h"
     127 +#include "src/modules/passive/scrape/BingSearch.h"
     128 +#include "src/modules/passive/scrape/YahooSearch.h"
    129 129  #include "src/modules/passive/scrape/Exalead.h"
    130 130  #include "src/modules/passive/scrape/DuckDuckGo.h"
    131 131  #include "src/modules/passive/scrape/DogPile.h"
    132 132  #include "src/modules/passive/scrape/Baidu.h"
    133 133  #include "src/modules/passive/scrape/Ask.h"
     134 +#include "src/modules/passive/scrape/GoogleSearch.h"
    134 135   
    135 136  #endif // OSINTMODULESHEADERS_H
    136 137   
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/ParserMethods.cpp
    1  -#include "ParserMethods.h"
    2  - 
    3  - 
    4  -///
    5  -/// getting html body node...
    6  -///
    7  -GumboNode* getBody(GumboNode *node) {
    8  - for(unsigned int i = 0; i < node->v.element.children.length; i++)
    9  - {
    10  - GumboNode *child = static_cast<GumboNode*>(node->v.element.children.data[i]);
    11  - if(child->type == GUMBO_NODE_ELEMENT && child->v.element.tag == GUMBO_TAG_BODY)
    12  - return child;
    13  - }
    14  - return nullptr;
    15  -}
    16  - 
    17  -///
    18  -/// getting document title...
    19  -///
    20  -QString getTitle(QNetworkReply *reply) {
    21  - QString title;
    22  - QStack<GumboNode*> node_stack;
    23  - GumboOutput *output = gumbo_parse(reply->readAll());
    24  - node_stack.push(getBody(output->root));
    25  - 
    26  - GumboNode *node;
    27  - while(!node_stack.isEmpty())
    28  - {
    29  - node = node_stack.pop();
    30  - if (node->type != GUMBO_NODE_ELEMENT)
    31  - continue;
    32  - 
    33  - if (node->v.element.tag == GUMBO_TAG_H1){
    34  - GumboNode* title_text = static_cast<GumboNode*>(node->v.element.children.data[0]);
    35  - title = QString::fromUtf8(title_text->v.text.text);
    36  - break;
    37  - }
    38  - 
    39  - GumboVector *children = &node->v.element.children;
    40  - for(unsigned int i = 0; i < children->length; i++)
    41  - node_stack.push(static_cast<GumboNode*>(children->data[i]));
    42  - }
    43  - 
    44  - gumbo_destroy_output(&kGumboDefaultOptions, output);
    45  - return title;
    46  -}
    47  - 
    48  -///
    49  -/// getting links from html document
    50  -///
    51  -QSet<QString> getLinks(QNetworkReply *reply)
    52  -{
    53  - QSet<QString> links;
    54  - QStack<GumboNode*> node_stack;
    55  - GumboOutput *output = gumbo_parse(reply->readAll());
    56  - node_stack.push(getBody(output->root));
    57  - 
    58  - GumboNode *node;
    59  - while(!node_stack.isEmpty())
    60  - {
    61  - node = node_stack.pop();
    62  - if (node->type != GUMBO_NODE_ELEMENT)
    63  - continue;
    64  - 
    65  - if (node->v.element.tag == GUMBO_TAG_A){
    66  - GumboAttribute* href = gumbo_get_attribute(&node->v.element.attributes, "href");
    67  - if (href)
    68  - links.insert(QString::fromUtf8(href->value));
    69  - continue;
    70  - }
    71  - 
    72  - GumboVector *children = &node->v.element.children;
    73  - for(unsigned int i = 0; i < children->length; i++)
    74  - node_stack.push(static_cast<GumboNode*>(children->data[i]));
    75  - }
    76  - 
    77  - gumbo_destroy_output(&kGumboDefaultOptions, output);
    78  - return links;
    79  -}
    80  - 
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/ParserMethods.h
    1  -#ifndef PARSERMETHODS_H
    2  -#define PARSERMETHODS_H
    3  - 
    4  -#include <QSet>
    5  -#include <QStack>
    6  -#include <QNetworkReply>
    7  -#include "gumbo-parser/src/gumbo.h"
    8  - 
    9  - 
    10  -GumboNode* getBody(GumboNode *node);
    11  - 
    12  -QString getTitle(QNetworkReply *reply);
    13  - 
    14  -QSet<QString> getLinks(QNetworkReply *reply);
    15  - 
    16  - 
    17  -#endif // PARSERMETHODS_H
    18  - 
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/api/BinaryEdge.cpp
    skipped 39 lines
    40 40  }
    41 41   
    42 42  void BinaryEdge::start(){
     43 + this->checkAPIKey(m_key);
     44 + 
    43 45   QNetworkRequest request;
    44 46   request.setRawHeader("X-KEY", m_key.toUtf8());
    45 47   request.setRawHeader("Content-Type", "application/json");
    skipped 175 lines
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/api/BuiltWith.cpp
    skipped 35 lines
    36 36  }
    37 37   
    38 38  void BuiltWith::start(){
     39 + this->checkAPIKey(m_key);
     40 + 
    39 41   QNetworkRequest request;
    40 42   QUrl url;
    41 43   
    skipped 37 lines
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/api/C99.cpp
    skipped 55 lines
    56 56  }
    57 57   
    58 58  void C99::start(){
     59 + this->checkAPIKey(m_key);
     60 + 
    59 61   QNetworkRequest request;
    60 62   QUrl url;
    61 63   
    skipped 121 lines
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/api/Circl.cpp
    skipped 33 lines
    34 34  }
    35 35   
    36 36  void Circl::start(){
     37 + this->checkAPIKey(m_id);
     38 + this->checkAPIKey(m_password);
     39 + 
    37 40   QNetworkRequest request;
    38 41   QUrl url;
    39 42   
    skipped 148 lines
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/api/CirclPublic.cpp
    skipped 18 lines
    19 19   connect(manager, &s3sNetworkAccessManager::finished, this, &CirclPublic::replyFinishedCidr);
    20 20   if(args.output_ASN)
    21 21   connect(manager, &s3sNetworkAccessManager::finished, this, &CirclPublic::replyFinishedAsn);
    22  - 
    23  - 
    24 22  }
    25 23  CirclPublic::~CirclPublic(){
    26 24   delete manager;
    skipped 74 lines
  • ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/api/Dnslytics.cpp
    skipped 45 lines
    46 46   
    47 47   /* getting api key */
    48 48   m_key = APIKEY.value(OSINT_MODULE_DNSLYTICS).toString();
    49  -
    50 49  }
    51 50  Dnslytics::~Dnslytics(){
    52 51   delete manager;
    53 52  }
    54 53   
    55 54  void Dnslytics::start(){
     55 + this->checkAPIKey(m_key);
     56 + 
    56 57   QNetworkRequest request;
    57 58   QUrl url;
    58 59   
    skipped 426 lines
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/api/DomainTools.cpp
    skipped 57 lines
    58 58  }
    59 59   
    60 60  void DomainTools::start(){
     61 + this->checkAPIKey(m_key);
     62 + 
    61 63   QNetworkRequest request;
    62 64   QUrl url;
    63 65   
    skipped 271 lines
  • ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/api/FullHunt.cpp
    skipped 27 lines
    28 28   
    29 29   /* getting api key */
    30 30   m_key = APIKEY.value(OSINT_MODULE_FULLHUNT).toString();
    31  -
    32 31  }
    33 32  FullHunt::~FullHunt(){
    34 33   delete manager;
    35 34  }
    36 35   
    37 36  void FullHunt::start(){
     37 + this->checkAPIKey(m_key);
     38 + 
    38 39   QNetworkRequest request;
    39 40   request.setRawHeader("X-API-KEY", m_key.toUtf8());
    40 41   QUrl url;
    skipped 107 lines
  • ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/api/Github.cpp
    skipped 20 lines
    21 21   
    22 22   /* getting the api-key */
    23 23   m_key = APIKEY.value(OSINT_MODULE_GITHUB).toString();
    24  -
    25 24  }
    26 25  Github::~Github(){
    27 26   delete manager;
    28 27  }
    29 28   
    30 29  void Github::start(){
     30 + this->checkAPIKey(m_key);
     31 + 
    31 32   QNetworkRequest request;
    32 33   request.setRawHeader("Authorization", "token "+m_key.toUtf8());
    33 34   request.setRawHeader("Content-Type", "application/json");
    skipped 33 lines
  • ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/api/HackerTarget.cpp
    skipped 37 lines
    38 38   
    39 39   /* getting api key */
    40 40   m_key = APIKEY.value(OSINT_MODULE_HACKERTARGET).toString();
    41  -
    42 41  }
    43 42  HackerTarget::~HackerTarget(){
    44 43   delete manager;
    45 44  }
    46 45   
    47 46  void HackerTarget::start(){
     47 + this->checkAPIKey(m_key);
     48 + 
    48 49   QNetworkRequest request;
    49 50   QUrl url;
    50 51   
    skipped 212 lines
  • ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/api/HaveIBeenPawned.cpp
    skipped 18 lines
    19 19   
    20 20   /* getting api key */
    21 21   m_key = APIKEY.value(OSINT_MODULE_HAVEIBEENPAWNED).toString();
    22  -
    23 22  }
    24 23  HaveIBeenPawned::~HaveIBeenPawned(){
    25 24   delete manager;
    26 25  }
    27 26   
    28 27  void HaveIBeenPawned::start(){
     28 + this->checkAPIKey(m_key);
     29 + 
    29 30   QNetworkRequest request;
    30 31   request.setRawHeader("hibp-api-key", m_key.toUtf8());
    31 32   QUrl url;
    skipped 22 lines
  • ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/api/Host.cpp
    skipped 18 lines
    19 19   
    20 20   /* getting api key */
    21 21   m_key = APIKEY.value(OSINT_MODULE_HOST).toString();
    22  -
    23 22  }
    24 23  Host::~Host(){
    25 24   delete manager;
    26 25  }
    27 26   
    28 27  void Host::start(){
     28 + this->checkAPIKey(m_key);
     29 + 
    29 30   QNetworkRequest request;
    30 31   QUrl url;
    31 32   
    skipped 21 lines
  • ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/api/JsonWhois.cpp
    skipped 17 lines
    18 18   
    19 19   /* getting api key */
    20 20   m_key = APIKEY.value(OSINT_MODULE_JSONWHOIS).toString();
    21  -
    22 21  }
    23 22  JsonWhois::~JsonWhois(){
    24 23   delete manager;
    25 24  }
    26 25   
    27 26  void JsonWhois::start(){
     27 + this->checkAPIKey(m_key);
     28 + 
    28 29   QNetworkRequest request;
    29 30   request.setRawHeader("Accept", "application/json");
    30 31   request.setRawHeader("Authorization", "Token token="+m_key.toUtf8());
    skipped 21 lines
  • ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/api/LeakIX.cpp
    skipped 21 lines
    22 22   
    23 23   /* getting api key */
    24 24   m_key = APIKEY.value(OSINT_MODULE_LEAKIX).toString();
    25  -
    26 25  }
    27 26  LeakIX::~LeakIX(){
    28 27   delete manager;
    29 28  }
    30 29   
    31 30  void LeakIX::start(){
     31 + this->checkAPIKey(m_key);
     32 + 
    32 33   QNetworkRequest request;
    33 34   request.setRawHeader("Accept", "application/json");
    34 35   request.setRawHeader("api-key", m_key.toUtf8());
    skipped 87 lines
  • ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/api/Mnemonic.cpp
    skipped 25 lines
    26 26   
    27 27   /* getting api key */
    28 28   m_key = APIKEY.value(OSINT_MODULE_MNEMONIC).toString();
    29  -
    30 29  }
    31 30  Mnemonic::~Mnemonic(){
    32 31   delete manager;
    33 32  }
    34 33   
    35 34  void Mnemonic::start(){
     35 + this->checkAPIKey(m_key);
     36 + 
    36 37   QNetworkRequest request;
    37 38   request.setRawHeader("Argus-API-Key", m_key.toUtf8());
    38 39   QUrl url;
    skipped 97 lines
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/api/NetworksDB.cpp
    skipped 43 lines
    44 44  }
    45 45   
    46 46  void NetworksDB::start(){
     47 + this->checkAPIKey(m_key);
     48 + 
    47 49   QNetworkRequest request;
    48 50   request.setRawHeader("X-Api-Key", m_key.toUtf8());
    49 51   QUrl url;
    skipped 238 lines
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/api/NeutrinoApi.cpp
    skipped 30 lines
    31 31  }
    32 32   
    33 33  void NeutrinoApi::start(){
     34 + this->checkAPIKey(m_key);
     35 + this->checkAPIKey(m_userId);
     36 + 
    34 37   QNetworkRequest request;
    35 38   QUrl url;
    36 39   
    skipped 34 lines
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/api/Onyphe.cpp
    skipped 56 lines
    57 57  }
    58 58   
    59 59  void Onyphe::start(){
     60 + this->checkAPIKey(m_key);
     61 + 
    60 62   QNetworkRequest request;
    61 63   request.setRawHeader("Content-Type", "application/json");
    62 64   request.setRawHeader("Authorization", "apikey "+m_key.toUtf8());
    skipped 183 lines
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/api/Otx.cpp
    skipped 58 lines
    59 59  }
    60 60   
    61 61  void Otx::start(){
     62 + this->checkAPIKey(m_key);
     63 + 
    62 64   QNetworkRequest request;
    63 65   request.setRawHeader("X-OTX-API-KEY", m_key.toUtf8());
    64 66   QUrl url;
    skipped 234 lines
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/api/PassiveTotal.cpp
    skipped 46 lines
    47 47  }
    48 48   
    49 49  void PassiveTotal::start(){
     50 + this->checkAPIKey(m_key);
     51 + this->checkAPIKey(m_username);
     52 + 
    50 53   QNetworkRequest request;
    51 54   request.setRawHeader("Accept", "application/json");
    52 55   QString concatenated = m_key+":"+m_username;
    skipped 218 lines
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/api/Projectdiscovery.cpp
    skipped 25 lines
    26 26  }
    27 27   
    28 28  void Projectdiscovery::start(){
     29 + this->checkAPIKey(m_key);
     30 + 
    29 31   QNetworkRequest request;
    30 32   request.setRawHeader("Authorization", m_key.toUtf8());
    31 33   QUrl url;
    skipped 39 lines
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/api/RiskIq.cpp
    skipped 47 lines
    48 48  }
    49 49   
    50 50  void RiskIq::start(){
     51 + this->checkAPIKey(m_key);
     52 + this->checkAPIKey(m_secret);
     53 + 
    51 54   QNetworkRequest request;
    52 55   request.setRawHeader("Accept", "application/json");
    53 56   QString concatenated = m_key+":"+m_secret;
    skipped 265 lines
  • ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/api/Robtex.cpp
    skipped 29 lines
    30 30   
    31 31   /* getting api key */
    32 32   m_key = APIKEY.value(OSINT_MODULE_ROBTEX).toString();
    33  -
    34 33  }
    35 34  Robtex::~Robtex(){
    36 35   delete manager;
    37 36  }
    38 37   
    39 38  void Robtex::start(){
     39 + this->checkAPIKey(m_key);
     40 + 
    40 41   QNetworkRequest request;
    41 42   request.setRawHeader("Content-Type", "application/json");
    42 43   QUrl url;
    skipped 207 lines
  • ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/api/SecurityTrails.cpp
    skipped 36 lines
    37 37   
    38 38   /* get api key */
    39 39   m_key = APIKEY.value(OSINT_MODULE_SECURITYTRAILS).toString();
    40  -
    41 40  }
    42 41  SecurityTrails::~SecurityTrails(){
    43 42   delete manager;
    44 43  }
    45 44   
    46 45  void SecurityTrails::start(){
     46 + this->checkAPIKey(m_key);
     47 + 
    47 48   QNetworkRequest request;
    48 49   request.setRawHeader("APIKEY", m_key.toUtf8());
    49 50   request.setRawHeader("Accept", "application/json");
    skipped 171 lines
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/api/Seon.cpp
    skipped 21 lines
    22 22  }
    23 23   
    24 24  void Seon::start(){
     25 + this->checkAPIKey(m_key);
     26 + 
    25 27   QNetworkRequest request;
    26 28   request.setRawHeader("X-API-KEY", m_key.toUtf8());
    27 29   QUrl url;
    skipped 21 lines
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/api/Shodan.cpp
    skipped 41 lines
    42 42  }
    43 43   
    44 44  void Shodan::start(){
     45 + this->checkAPIKey(m_key);
     46 + 
    45 47   QNetworkRequest request;
    46 48   
    47 49   QUrl url;
    skipped 193 lines
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/api/SpamHaus.cpp
    skipped 22 lines
    23 23  }
    24 24   
    25 25  void SpamHaus::start(){
     26 + this->checkAPIKey(m_key);
     27 + 
    26 28   QNetworkRequest request;
    27 29   request.setRawHeader("Content-Type", "application/json");
    28 30   request.setRawHeader("Authorization", "Bearer "+m_key.toUtf8());
    skipped 16 lines
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/api/SpyOnWeb.cpp
    skipped 36 lines
    37 37  }
    38 38   
    39 39  void SpyOnWeb::start(){
     40 + this->checkAPIKey(m_key);
     41 + 
    40 42   QNetworkRequest request;
    41 43   QUrl url;
    42 44   
    skipped 179 lines
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/api/Spyse.cpp
    skipped 43 lines
    44 44  }
    45 45   
    46 46  void Spyse::start(){
     47 + this->checkAPIKey(m_key);
     48 + 
    47 49   QNetworkRequest request;
    48 50   request.setRawHeader("accept", "application/json");
    49 51   request.setRawHeader("Content-Type", "application/json");
    skipped 305 lines
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/api/ThreatBook.cpp
    skipped 32 lines
    33 33  }
    34 34   
    35 35  void ThreatBook::start(){
     36 + this->checkAPIKey(m_key);
     37 + 
    36 38   QNetworkRequest request;
    37 39   request.setRawHeader("Content-Type", "application/json");
    38 40   QUrl url;
    skipped 158 lines
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/api/ViewDns.cpp
    skipped 47 lines
    48 48  }
    49 49   
    50 50  void ViewDns::start(){
     51 + this->checkAPIKey(m_key);
     52 + 
    51 53   QNetworkRequest request;
    52 54   QUrl url;
    53 55   
    skipped 288 lines
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/api/Wappalyzer.cpp
    skipped 25 lines
    26 26  }
    27 27   
    28 28  void Wappalyzer::start(){
     29 + this->checkAPIKey(m_key);
     30 + 
    29 31   QNetworkRequest request;
    30 32   request.setRawHeader("x-api-key", m_key.toUtf8());
    31 33   QUrl url;
    skipped 20 lines
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/api/WebResolver.cpp
    skipped 37 lines
    38 38  }
    39 39   
    40 40  void WebResolver::start(){
     41 + this->checkAPIKey(m_key);
     42 + 
    41 43   QNetworkRequest request;
    42 44   QUrl url;
    43 45   
    skipped 137 lines
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/api/Whatcms.cpp
    skipped 26 lines
    27 27  }
    28 28   
    29 29  void Whatcms::start(){
     30 + this->checkAPIKey(m_key);
     31 + 
    30 32   QNetworkRequest request;
    31 33   QUrl url;
    32 34   
    skipped 26 lines
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/api/WhoisXmlApi.cpp
    skipped 54 lines
    55 55  }
    56 56   
    57 57  void WhoisXmlApi::start(){
     58 + this->checkAPIKey(m_key);
     59 + 
    58 60   QNetworkRequest request;
    59 61   request.setRawHeader("Content-Type", "application/json");
    60 62   QUrl url;
    skipped 388 lines
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/api/Whoxy.cpp
    skipped 29 lines
    30 30  }
    31 31   
    32 32  void Whoxy::start(){
     33 + this->checkAPIKey(m_key);
     34 + 
    33 35   QNetworkRequest request;
    34 36   QUrl url;
    35 37   
    skipped 29 lines
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/api/ZETAlytics.cpp
    skipped 20 lines
    21 21  }
    22 22   
    23 23  void ZETAlytics::start(){
     24 + this->checkAPIKey(m_key);
     25 + 
    24 26   QNetworkRequest request;
    25 27   request.setRawHeader("Content-Type", "application/json");
    26 28   QUrl url;
    skipped 9 lines
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/api/ZoomEye.cpp
    skipped 37 lines
    38 38  }
    39 39   
    40 40  void ZoomEye::start(){
     41 + this->checkAPIKey(m_key);
     42 + 
    41 43   QNetworkRequest request;
    42 44   request.setRawHeader("Content-Type", "application/json");
    43 45   request.setRawHeader("API-KEY", m_key.toUtf8());
    skipped 154 lines
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/cert/Censys.cpp
    skipped 30 lines
    31 31  }
    32 32   
    33 33  void Censys::start(){
     34 + this->checkAPIKey(m_key);
     35 + this->checkAPIKey(m_uid);
     36 + 
    34 37   QNetworkRequest request;
    35 38   /* Basic Authentication */
    36 39   QString credentialsString = QString("%1:%2").arg(m_uid).arg(m_key);
    skipped 80 lines
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/cert/Certspotter.cpp
    skipped 26 lines
    27 27  }
    28 28   
    29 29  void Certspotter::start(){
     30 + this->checkAPIKey(m_key);
     31 + 
    30 32   QNetworkRequest request;
    31 33   request.setRawHeader("Authorization", "Bearer "+m_key.toUtf8());
    32 34   QUrl url;
    skipped 68 lines
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/email/Debounce.cpp
    skipped 22 lines
    23 23  }
    24 24   
    25 25  void Debounce::start(){
     26 + this->checkAPIKey(m_key);
     27 + 
    26 28   QNetworkRequest request;
    27 29   QUrl url;
    28 30   
    skipped 20 lines
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/email/EmailCrawlr.cpp
    skipped 29 lines
    30 30  }
    31 31   
    32 32  void EmailCrawlr::start(){
     33 + this->checkAPIKey(m_key);
     34 + 
    33 35   QNetworkRequest request;
    34 36   request.setRawHeader("x-api-key", m_key.toUtf8());
    35 37   QUrl url;
    skipped 48 lines
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/email/EmailFormat.cpp
    skipped 21 lines
    22 22  }
    23 23   
    24 24  void EmailFormat::start(){
     25 + this->checkAPIKey(m_key);
     26 + 
    25 27   QNetworkRequest request;
    26 28   request.setRawHeader("Content-Type", "application/json");
    27 29   request.setRawHeader("Authorization", m_key.toUtf8());
    skipped 19 lines
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/email/EmailRep.cpp
    skipped 19 lines
    20 20  }
    21 21   
    22 22  void EmailRep::start(){
     23 + this->checkAPIKey(m_key);
     24 + 
    23 25   QNetworkRequest request;
    24 26   request.setRawHeader("Key", m_key.toUtf8());
    25 27   // request.setRawHeader("User-Agent", userAget);
    skipped 14 lines
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/email/Hunter.cpp
    skipped 28 lines
    29 29  }
    30 30   
    31 31  void Hunter::start(){
     32 + this->checkAPIKey(m_key);
     33 + 
    32 34   QNetworkRequest request;
    33 35   QUrl url;
    34 36   
    skipped 57 lines
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/email/Snov.cpp
    skipped 30 lines
    31 31  }
    32 32   
    33 33  void Snov::start(){
     34 + this->checkAPIKey(m_key);
     35 + 
    34 36   QNetworkRequest request;
    35 37   QUrl url;
    36 38   
    skipped 76 lines
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/ip/IpApi.cpp
    skipped 28 lines
    29 29  }
    30 30   
    31 31  void IpApi::start(){
     32 + this->checkAPIKey(m_key);
     33 + 
    32 34   QNetworkRequest request;
    33 35   QUrl url;
    34 36   
    skipped 86 lines
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/ip/IpData.cpp
    skipped 25 lines
    26 26  }
    27 27   
    28 28  void IpData::start(){
     29 + this->checkAPIKey(m_key);
     30 + 
    29 31   QNetworkRequest request;
    30 32   QUrl url;
    31 33   
    skipped 24 lines
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/ip/IpGeoLocation.cpp
    skipped 22 lines
    23 23  }
    24 24   
    25 25  void IpGeoLocation::start(){
     26 + this->checkAPIKey(m_key);
     27 + 
    26 28   QNetworkRequest request;
    27 29   QUrl url;
    28 30   
    skipped 15 lines
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/ip/IpInfo.cpp
    skipped 31 lines
    32 32  }
    33 33   
    34 34  void IpInfo::start(){
     35 + this->checkAPIKey(m_key);
     36 + 
    35 37   QNetworkRequest request;
    36 38   request.setRawHeader("Accept", "application/json");
    37 39   QUrl url;
    skipped 135 lines
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/ip/IpRegistry.cpp
    skipped 23 lines
    24 24  }
    25 25   
    26 26  void IpRegistry::start(){
     27 + this->checkAPIKey(m_key);
     28 + 
    27 29   QNetworkRequest request;
    28 30   QUrl url;
    29 31   
    skipped 18 lines
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/ip/IpStack.cpp
    skipped 23 lines
    24 24  }
    25 25   
    26 26  void IpStack::start(){
     27 + this->checkAPIKey(m_key);
     28 + 
    27 29   QNetworkRequest request;
    28 30   QUrl url;
    29 31   
    skipped 18 lines
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/ip/Ipfy.cpp
    skipped 30 lines
    31 31  }
    32 32   
    33 33  void Ipfy::start(){
     34 + this->checkAPIKey(m_key);
     35 + 
    34 36   QNetworkRequest request;
    35 37   QUrl url;
    36 38   
    skipped 104 lines
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/mal/AbuseIPDB.cpp
    skipped 24 lines
    25 25  }
    26 26   
    27 27  void AbuseIPDB::start(){
     28 + this->checkAPIKey(m_key);
     29 + 
    28 30   QNetworkRequest request;
    29 31   request.setRawHeader("Key", m_key.toUtf8());
    30 32   request.setRawHeader("Accept", "application/json");
    skipped 22 lines
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/mal/FraudGuard.cpp
    skipped 29 lines
    30 30  }
    31 31   
    32 32  void FraudGuard::start(){
     33 + this->checkAPIKey(m_user);
     34 + this->checkAPIKey(m_pass);
     35 + 
    33 36   QNetworkRequest request;
    34 37   /* Basic Authentication */
    35 38   QString credentialsString = QString("%1:%2").arg(m_user).arg(m_pass);
    skipped 35 lines
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/mal/HybridAnalysis.cpp
    skipped 19 lines
    20 20  }
    21 21   
    22 22  void HybridAnalysis::start(){
     23 + this->checkAPIKey(m_key);
     24 + 
    23 25   QNetworkRequest request;
    24 26   request.setRawHeader("api-key", m_key.toUtf8());
    25 27   request.setRawHeader("accept", "application/json");
    skipped 18 lines
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/mal/IpQualityScore.cpp
    skipped 25 lines
    26 26  }
    27 27   
    28 28  void IpQualityScore::start(){
     29 + this->checkAPIKey(m_key);
     30 + 
    29 31   QNetworkRequest request;
    30 32   request.setRawHeader("Key", m_key.toUtf8());
    31 33   request.setRawHeader("Accept", "application/json");
    skipped 37 lines
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/mal/LeakLookup.cpp
    skipped 24 lines
    25 25  }
    26 26   
    27 27  void LeakLookup::start(){
     28 + this->checkAPIKey(m_key);
     29 + 
    28 30   QNetworkRequest request;
    29 31   QUrl url;
    30 32   
    skipped 21 lines
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/mal/VirusTotal.cpp
    skipped 50 lines
    51 51  }
    52 52   
    53 53  void VirusTotal::start(){
     54 + this->checkAPIKey(m_key);
     55 + 
    54 56   QNetworkRequest request;
    55 57   QUrl url;
    56 58   
    skipped 209 lines
  • ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/scrape/Ask.cpp
    skipped 8 lines
    9 9   
    10 10   if(args.output_Hostname)
    11 11   connect(manager, &s3sNetworkAccessManager::finished, this, &Ask::replyFinishedSubdomain);
    12  - if(args.output_Email)
    13  - connect(manager, &s3sNetworkAccessManager::finished, this, &Ask::replyFinishedEmail);
    14 12   if(args.output_URL)
    15 13   connect(manager, &s3sNetworkAccessManager::finished, this, &Ask::replyFinishedUrl);
    16 14  }
    skipped 7 lines
    24 22   
    25 23   if(args.input_Domain){
    26 24   if(args.output_Hostname){
    27  - url.setUrl("https://www.ask.com/web?q=site:"+target+"&page=1&qid=8D6EE6BF52E0C04527E51A64F22C4534&o=0&l=dir&qsrc=998&qo=pagination");
     25 + url.setUrl("https://www.ask.com/web?q=site:*"+target+"&ad=dirN&o=0&qo=pagination&page="+QString::number(m_page));
    28 26   request.setUrl(url);
    29 27   manager->get(request);
    30  - m_firstRequest = true;
    31 28   return;
    32 29   }
    33  - 
    34 30   if(args.output_URL){
    35  - url.setUrl("https://www.ask.com/web?q=site:"+target+"&page=1&qid=8D6EE6BF52E0C04527E51A64F22C4534&o=0&l=dir&qsrc=998&qo=pagination");
     31 + url.setUrl("https://www.ask.com/web?q=site:"+target+"/*&ad=dirN&o=0&qo=pagination&page="+QString::number(m_page));
    36 32   request.setUrl(url);
    37 33   manager->get(request);
    38  - m_firstRequest = true;
    39 34   return;
    40 35   }
     36 + }
    41 37   
    42  - if(args.output_Email){
    43  - url.setUrl("https://www.ask.com/web?q=site:"+target+"&page=1&qid=8D6EE6BF52E0C04527E51A64F22C4534&o=0&l=dir&qsrc=998&qo=pagination");
     38 + if(args.input_Search){
     39 + if(args.output_Hostname || args.output_URL){
     40 + url.setUrl("https://www.ask.com/web?q=site:*"+target+".*+OR+site:*"+target+".*.*&ad=dirN&o=0&qo=pagination&page="+QString::number(m_page));
    44 41   request.setUrl(url);
    45 42   manager->get(request);
    46  - m_firstRequest = true;
    47 43   return;
    48 44   }
    49 45   }
    skipped 10 lines
    60 56   nodes.push(getBody(output->root));
    61 57   
    62 58   GumboNode *node;
    63  - while(!nodes.isEmpty())
     59 + while(!nodes.isEmpty()) // backtrack loop
    64 60   {
    65 61   node = nodes.pop();
    66 62   if(node->type != GUMBO_NODE_ELEMENT)
    67 63   continue;
    68 64   
    69  - if(m_firstRequest){
    70  - if(node->v.element.tag == GUMBO_TAG_DIV && node->v.element.attributes.length == 1 && node->v.element.children.length == 1)
    71  - {
    72  - GumboAttribute *classAttribute = static_cast<GumboAttribute*>(node->v.element.attributes.data[0]);
    73  - if(QString::fromUtf8(classAttribute->value) == "PartialWebPagination-link-text")
    74  - {
    75  - GumboNode *child = static_cast<GumboNode*>(node->v.element.children.data[0]);
    76  - int page = QString::fromUtf8(child->v.text.text).toInt();
    77  - if(page > m_lastPage)
    78  - m_lastPage = page;
    79  - }
    80  - }
    81  - }
    82  - 
    83 65   if(node->v.element.tag == GUMBO_TAG_DIV && node->v.element.attributes.length == 1 && node->v.element.children.length == 1)
    84 66   {
    85 67   GumboAttribute *classAttribute = static_cast<GumboAttribute*>(node->v.element.attributes.data[0]);
    86  - if(QString::fromUtf8(classAttribute->value) == "PartialSearchResults-item-url PartialSearchResults-item-top-url")
     68 + if(QString::fromUtf8(classAttribute->value) == "PartialSearchResults-item-url")
    87 69   {
    88 70   GumboNode *child = static_cast<GumboNode*>(node->v.element.children.data[0]);
    89  - QString domain = QString::fromUtf8(child->v.text.text);
     71 + QString domain(child->v.text.text);
    90 72   domain = domain.split("/")[0];
    91 73   emit resultSubdomain(domain);
    92 74   log.resultsCount++;
     75 + 
     76 + /* avoid unwanted links */
     77 + if(log.resultsCount == 10)
     78 + break;
    93 79   }
    94 80   }
    95 81   
    skipped 3 lines
    99 85   }
    100 86   
    101 87   gumbo_destroy_output(&kGumboDefaultOptions, output);
    102  - 
    103  - if(m_firstRequest)
    104  - this->sendRequests();
    105  - 
    106  - this->end(reply);
    107  -}
    108  - 
    109  -void Ask::replyFinishedEmail(QNetworkReply *reply){
    110  - if(reply->error()){
    111  - this->onError(reply);
    112  - return;
    113  - }
    114  - 
    115  - /*
    116  - * not yet implemented...
    117  - */
    118 88   
    119 89   this->end(reply);
    120 90  }
    skipped 9 lines
    130 100   nodes.push(getBody(output->root));
    131 101   
    132 102   GumboNode *node;
    133  - while(!nodes.isEmpty())
     103 + while(!nodes.isEmpty()) // backtrack loop
    134 104   {
    135 105   node = nodes.pop();
    136 106   if(node->type != GUMBO_NODE_ELEMENT)
    137 107   continue;
    138 108   
    139  - if(m_firstRequest){
    140  - if(node->v.element.tag == GUMBO_TAG_DIV && node->v.element.attributes.length == 1 && node->v.element.children.length == 1)
    141  - {
    142  - GumboAttribute *classAttribute = static_cast<GumboAttribute*>(node->v.element.attributes.data[0]);
    143  - if(QString::fromUtf8(classAttribute->value) == "PartialWebPagination-link-text")
    144  - {
    145  - GumboNode *child = static_cast<GumboNode*>(node->v.element.children.data[0]);
    146  - int page = QString::fromUtf8(child->v.text.text).toInt();
    147  - if(page > m_lastPage)
    148  - m_lastPage = page;
    149  - }
    150  - }
    151  - }
    152  - 
    153 109   if(node->v.element.tag == GUMBO_TAG_DIV && node->v.element.attributes.length == 1 && node->v.element.children.length == 1)
    154 110   {
    155 111   GumboAttribute *classAttribute = static_cast<GumboAttribute*>(node->v.element.attributes.data[0]);
    156  - if(QString::fromUtf8(classAttribute->value) == "PartialSearchResults-item-url PartialSearchResults-item-top-url")
     112 + if(QString::fromUtf8(classAttribute->value) == "PartialSearchResults-item-url")
    157 113   {
    158 114   GumboNode *child = static_cast<GumboNode*>(node->v.element.children.data[0]);
    159 115   emit resultURL(QString::fromUtf8(child->v.text.text));
    160 116   log.resultsCount++;
     117 + 
     118 + /* avoid unwanted links */
     119 + if(log.resultsCount == 10)
     120 + break;
    161 121   }
    162 122   }
    163 123   
    skipped 4 lines
    168 128   
    169 129   gumbo_destroy_output(&kGumboDefaultOptions, output);
    170 130   
    171  - if(m_firstRequest)
    172  - this->sendRequests();
    173  - 
    174 131   this->end(reply);
    175 132  }
    176 133   
    177  -void Ask::sendRequests(){
    178  - QNetworkRequest request;
    179  - 
    180  - if(args.input_Domain){
    181  - if(args.output_Hostname)
    182  - {
    183  - ///
    184  - /// getting the max pages to query...
    185  - ///
    186  - int lastPage;
    187  - if(args.config->maxPage <= m_lastPage)
    188  - lastPage = args.config->maxPage;
    189  - else
    190  - lastPage = m_lastPage;
    191  - 
    192  - ///
    193  - /// loop to send appropriate requests...
    194  - ///
    195  - int currentPage = 2;
    196  - while(currentPage < lastPage){
    197  - QUrl url("https://www.ask.com/web?q=site:"+target+"&page="+QString::number(currentPage)+"&qid=8D6EE6BF52E0C04527E51A64F22C4534&o=0&l=dir&qsrc=998&qo=pagination");
    198  - request.setUrl(url);
    199  - manager->get(request);
    200  - m_firstRequest = false;
    201  - currentPage++;
    202  - }
    203  - }
    204  - }
    205  -}
    206  - 
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/scrape/Ask.h
    skipped 11 lines
    12 12   QString summary = "";
    13 13   QMap<QString, QStringList> flags = {};
    14 14   QMap<int, QList<int>> input_output = {{IN_DOMAIN,
    15  - {OUT_SUBDOMAIN, OUT_URL, OUT_EMAIL}}};
     15 + {OUT_SUBDOMAIN, OUT_URL}},
     16 + {IN_QUERYTERM,
     17 + {OUT_SUBDOMAIN, OUT_URL}}};
    16 18  };
    17 19  }
    18 20   
    skipped 6 lines
    25 27   public slots:
    26 28   void start() override;
    27 29   void replyFinishedSubdomain(QNetworkReply *reply) override;
    28  - void replyFinishedEmail(QNetworkReply *reply) override;
    29 30   void replyFinishedUrl(QNetworkReply *reply) override;
    30 31   
    31 32   private:
    32  - bool m_firstRequest = false;
    33  - int m_lastPage = 1;
    34  - void sendRequests();
     33 + int m_page= 0;
    35 34  };
    36 35   
    37 36  #endif // ASK_H
    skipped 1 lines
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/scrape/Baidu.cpp
    1 1  #include "Baidu.h"
    2 2  #include <QStack>
    3 3   
    4  - 
    5 4  /*
    6 5   * has scrape prevention...
    7 6   */
    skipped 4 lines
    12 11   
    13 12   if(args.output_Hostname)
    14 13   connect(manager, &s3sNetworkAccessManager::finished, this, &Baidu::replyFinishedSubdomain);
    15  - if(args.output_Email)
    16  - connect(manager, &s3sNetworkAccessManager::finished, this, &Baidu::replyFinishedEmail);
    17 14   if(args.output_URL)
    18 15   connect(manager, &s3sNetworkAccessManager::finished, this, &Baidu::replyFinishedUrl);
    19 16  }
    skipped 10 lines
    30 27   url.setUrl("https://www.baidu.com/s?wd=site:"+target+"&oq=site:"+target+"&pn=1");
    31 28   request.setUrl(url);
    32 29   manager->get(request);
    33  - m_firstRequest = true;
    34 30   return;
    35 31   }
    36 32   
    skipped 1 lines
    38 34   url.setUrl("https://www.baidu.com/s?wd=site:"+target+"&oq=site:"+target+"&pn=1");
    39 35   request.setUrl(url);
    40 36   manager->get(request);
    41  - m_firstRequest = true;
    42 37   return;
    43 38   }
    44 39   }
    skipped 16 lines
    61 56   if(node->type != GUMBO_NODE_ELEMENT)
    62 57   continue;
    63 58   
    64  - if(m_firstRequest){
    65  - if(node->v.element.tag == GUMBO_TAG_SPAN && node->v.element.attributes.length == 1 && node->v.element.children.length == 1)
    66  - {
    67  - GumboAttribute *classAttribute = static_cast<GumboAttribute*>(node->v.element.attributes.data[0]);
    68  - if(QString::fromUtf8(classAttribute->value) == "page-item_M4MDr pc")
    69  - {
    70  - GumboNode *child = static_cast<GumboNode*>(node->v.element.children.data[0]);
    71  - int page = QString::fromUtf8(child->v.text.text).toInt();
    72  - if(page > m_lastPage)
    73  - m_lastPage = page;
    74  - }
    75  - }
    76  - }
    77  - 
    78 59   if(node->v.element.tag == GUMBO_TAG_DIV && node->v.element.attributes.length == 1 && node->v.element.children.length > 0)
    79 60   {
    80 61   GumboAttribute *classAttribute = static_cast<GumboAttribute*>(node->v.element.attributes.data[0]);
    skipped 15 lines
    96 77   
    97 78   gumbo_destroy_output(&kGumboDefaultOptions, output);
    98 79   
    99  - if(m_firstRequest)
    100  - this->sendRequests();
    101  - 
    102  - this->end(reply);
    103  -}
    104  - 
    105  -void Baidu::replyFinishedEmail(QNetworkReply *reply){
    106  - if(reply->error()){
    107  - this->onError(reply);
    108  - return;
    109  - }
    110  - 
    111  - /*
    112  - * not yet implemented...
    113  - */
    114  - 
    115 80   this->end(reply);
    116 81  }
    117 82   
    skipped 14 lines
    132 97   if(node->type != GUMBO_NODE_ELEMENT)
    133 98   continue;
    134 99   
    135  - if(m_firstRequest){
    136  - if(node->v.element.tag == GUMBO_TAG_SPAN && node->v.element.attributes.length == 1 && node->v.element.children.length == 1)
    137  - {
    138  - GumboAttribute *classAttribute = static_cast<GumboAttribute*>(node->v.element.attributes.data[0]);
    139  - if(QString::fromUtf8(classAttribute->value) == "page-item_M4MDr pc")
    140  - {
    141  - GumboNode *child = static_cast<GumboNode*>(node->v.element.children.data[0]);
    142  - int page = QString::fromUtf8(child->v.text.text).toInt();
    143  - if(page > m_lastPage)
    144  - m_lastPage = page;
    145  - }
    146  - }
    147  - }
    148  - 
    149 100   if(node->v.element.tag == GUMBO_TAG_DIV && node->v.element.attributes.length == 1 && node->v.element.children.length == 1)
    150 101   {
    151 102   GumboAttribute *classAttribute = static_cast<GumboAttribute*>(node->v.element.attributes.data[0]);
    skipped 12 lines
    164 115   }
    165 116   
    166 117   gumbo_destroy_output(&kGumboDefaultOptions, output);
    167  - 
    168  - if(m_firstRequest)
    169  - this->sendRequests();
    170 118   
    171 119   this->end(reply);
    172 120  }
    173 121   
    174  -void Baidu::sendRequests(){
    175  - QNetworkRequest request;
    176  - 
    177  - if(args.input_Domain){
    178  - if(args.output_Hostname)
    179  - {
    180  - ///
    181  - /// getting the max pages to query...
    182  - ///
    183  - int lastPage;
    184  - if(args.config->maxPage <= m_lastPage)
    185  - lastPage = args.config->maxPage;
    186  - else
    187  - lastPage = m_lastPage;
    188  - 
    189  - ///
    190  - /// loop to send appropriate requests...
    191  - ///
    192  - int currentPage = 2;
    193  - while(currentPage < lastPage){
    194  - QUrl url("https://www.baidu.com/s?wd=site:"+target+"&oq=site:"+target+"&pn="+QString::number(currentPage));
    195  - request.setUrl(url);
    196  - manager->get(request);
    197  - m_firstRequest = false;
    198  - currentPage++;
    199  - }
    200  - }
    201  - }
    202  -}
    203  - 
  • ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/scrape/Baidu.h
    skipped 10 lines
    11 11   QString summary = "";
    12 12   QMap<QString, QStringList> flags = {};
    13 13   QMap<int, QList<int>> input_output = {{IN_DOMAIN,
    14  - {OUT_SUBDOMAIN, OUT_URL, OUT_EMAIL}}};
     14 + {OUT_SUBDOMAIN, OUT_URL}}};
    15 15  };
    16 16  }
    17 17   
    skipped 6 lines
    24 24   public slots:
    25 25   void start() override;
    26 26   void replyFinishedSubdomain(QNetworkReply *reply) override;
    27  - void replyFinishedEmail(QNetworkReply *reply) override;
    28 27   void replyFinishedUrl(QNetworkReply *reply) override;
    29  - 
    30  - private:
    31  - bool m_firstRequest = false;
    32  - int m_lastPage = 1;
    33  - void sendRequests();
    34 28  };
    35 29  #endif // BAIDU_H
    36 30   
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/scrape/Bing.cpp
    1  -#include "Bing.h"
    2  -#include <QStack>
    3  - 
    4  - 
    5  -/*
    6  - * has a different type of next page...
    7  - * redirection probs...
    8  - */
    9  -Bing::Bing(ScanArgs args): AbstractOsintModule(args)
    10  -{
    11  - manager = new s3sNetworkAccessManager(this, args.config->timeout, args.config->setTimeout);
    12  - log.moduleName = OSINT_MODULE_BING;
    13  - 
    14  - if(args.output_Hostname)
    15  - connect(manager, &s3sNetworkAccessManager::finished, this, &Bing::replyFinishedSubdomain);
    16  - if(args.output_Email)
    17  - connect(manager, &s3sNetworkAccessManager::finished, this, &Bing::replyFinishedEmail);
    18  - if(args.output_URL)
    19  - connect(manager, &s3sNetworkAccessManager::finished, this, &Bing::replyFinishedUrl);
    20  -}
    21  -Bing::~Bing(){
    22  - delete manager;
    23  -}
    24  - 
    25  -void Bing::start(){
    26  - QNetworkRequest request;
    27  - QUrl url;
    28  - 
    29  - if(args.input_Domain){
    30  - if(args.output_Hostname){
    31  - url.setUrl("https://www.bing.com/search?q=site:"+target+"&first=1&FORM=PORE");
    32  - //request.setAttribute(QNetworkRequest::RedirectPolicyAttribute, QNetworkRequest::NoLessSafeRedirectPolicy);
    33  - request.setUrl(url);
    34  - manager->get(request);
    35  - m_firstRequest = true;
    36  - return;
    37  - }
    38  - 
    39  - if(args.output_URL){
    40  - url.setUrl("https://www.bing.com/search?q=site:"+target+"&first=1&FORM=PORE");
    41  - //request.setAttribute(QNetworkRequest::RedirectPolicyAttribute, QNetworkRequest::NoLessSafeRedirectPolicy);
    42  - request.setUrl(url);
    43  - manager->get(request);
    44  - m_firstRequest = true;
    45  - return;
    46  - }
    47  - }
    48  -}
    49  - 
    50  -void Bing::replyFinishedSubdomain(QNetworkReply *reply){
    51  - if(reply->error()){
    52  - this->onError(reply);
    53  - return;
    54  - }
    55  - 
    56  - QStack<GumboNode*> nodes;
    57  - GumboOutput *output = gumbo_parse(reply->readAll());
    58  - nodes.push(getBody(output->root));
    59  - 
    60  - GumboNode *node;
    61  - while(!nodes.isEmpty())
    62  - {
    63  - node = nodes.pop();
    64  - if(node->type != GUMBO_NODE_ELEMENT)
    65  - continue;
    66  - 
    67  - if(m_firstRequest){
    68  - if(node->v.element.tag == GUMBO_TAG_A && node->v.element.attributes.length > 0 && node->v.element.children.length == 1)
    69  - {
    70  - GumboAttribute *classAttribute = static_cast<GumboAttribute*>(node->v.element.attributes.data[0]);
    71  - if(QString::fromUtf8(classAttribute->value) == "b_widePag sb_bp")
    72  - {
    73  - GumboNode *child = static_cast<GumboNode*>(node->v.element.children.data[0]);
    74  - int page = QString::fromUtf8(child->v.text.text).toInt();
    75  - if(page > m_lastPage)
    76  - m_lastPage = page;
    77  - }
    78  - }
    79  - }
    80  - 
    81  - if(node->v.element.tag == GUMBO_TAG_CITE)
    82  - {
    83  - GumboNode *url = static_cast<GumboNode*>(node->v.element.children.data[0]);
    84  - QString domain = QString::fromUtf8(url->v.text.text);
    85  - domain = domain.remove("https://").remove("http://").split("/")[0];
    86  - emit resultSubdomain(domain);
    87  - log.resultsCount++;
    88  - }
    89  - 
    90  - GumboVector *children = &node->v.element.children;
    91  - for(unsigned int i = 0; i < children->length; i++)
    92  - nodes.push(static_cast<GumboNode*>(children->data[i]));
    93  - }
    94  - 
    95  - gumbo_destroy_output(&kGumboDefaultOptions, output);
    96  - 
    97  - if(m_firstRequest)
    98  - this->sendRequests();
    99  - 
    100  - this->end(reply);
    101  -}
    102  - 
    103  -void Bing::replyFinishedEmail(QNetworkReply *reply){
    104  - if(reply->error()){
    105  - this->onError(reply);
    106  - return;
    107  - }
    108  - 
    109  - /*
    110  - * not yet implemented...
    111  - */
    112  - 
    113  - this->end(reply);
    114  -}
    115  - 
    116  -void Bing::replyFinishedUrl(QNetworkReply *reply){
    117  - if(reply->error()){
    118  - this->onError(reply);
    119  - return;
    120  - }
    121  - 
    122  - QStack<GumboNode*> nodes;
    123  - GumboOutput *output = gumbo_parse(reply->readAll());
    124  - nodes.push(getBody(output->root));
    125  - 
    126  - GumboNode *node;
    127  - while(!nodes.isEmpty())
    128  - {
    129  - node = nodes.pop();
    130  - if(node->type != GUMBO_NODE_ELEMENT)
    131  - continue;
    132  - 
    133  - if(m_firstRequest){
    134  - if(node->v.element.tag == GUMBO_TAG_A && node->v.element.attributes.length > 0 && node->v.element.children.length == 1)
    135  - {
    136  - GumboAttribute *classAttribute = static_cast<GumboAttribute*>(node->v.element.attributes.data[0]);
    137  - if(QString::fromUtf8(classAttribute->value) == "b_widePag sb_bp")
    138  - {
    139  - GumboNode *child = static_cast<GumboNode*>(node->v.element.children.data[0]);
    140  - int page = QString::fromUtf8(child->v.text.text).toInt();
    141  - if(page > m_lastPage)
    142  - m_lastPage = page;
    143  - }
    144  - }
    145  - }
    146  - 
    147  - if(node->v.element.tag == GUMBO_TAG_CITE)
    148  - {
    149  - GumboNode *child = static_cast<GumboNode*>(node->v.element.children.data[0]);
    150  - emit resultURL(QString::fromUtf8(child->v.text.text));
    151  - log.resultsCount++;
    152  - }
    153  - 
    154  - GumboVector *children = &node->v.element.children;
    155  - for(unsigned int i = 0; i < children->length; i++)
    156  - nodes.push(static_cast<GumboNode*>(children->data[i]));
    157  - }
    158  - 
    159  - gumbo_destroy_output(&kGumboDefaultOptions, output);
    160  - 
    161  - if(m_firstRequest)
    162  - this->sendRequests();
    163  - 
    164  - this->end(reply);
    165  -}
    166  - 
    167  -void Bing::sendRequests(){
    168  - QNetworkRequest request;
    169  - 
    170  - if(args.input_Domain){
    171  - if(args.output_Hostname)
    172  - {
    173  - ///
    174  - /// getting the max pages to query...
    175  - ///
    176  - int lastPage;
    177  - if(args.config->maxPage <= m_lastPage)
    178  - lastPage = args.config->maxPage;
    179  - else
    180  - lastPage = m_lastPage;
    181  - 
    182  - ///
    183  - /// loop to send appropriate requests...
    184  - ///
    185  - int currentPage = 2;
    186  - int first = 11;
    187  - while(currentPage < lastPage){
    188  - QUrl url("https://www.bing.com/search?q=site:"+target+"&first="+QString::number(first)+"&FORM=PORE");
    189  - //request.setAttribute(QNetworkRequest::RedirectPolicyAttribute, QNetworkRequest::NoLessSafeRedirectPolicy);
    190  - request.setUrl(url);
    191  - manager->get(request);
    192  - m_firstRequest = false;
    193  - currentPage++;
    194  - first += 10;
    195  - }
    196  - }
    197  - }
    198  -}
    199  - 
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/scrape/Bing.h
    1  -#ifndef BING_H
    2  -#define BING_H
    3  - 
    4  -#include "../AbstractOsintModule.h"
    5  - 
    6  -namespace ModuleInfo {
    7  -struct Bing{
    8  - QString name = OSINT_MODULE_BING;
    9  - QString url = "https://bing.com/";
    10  - QString url_apiDoc = "";
    11  - QString summary = "";
    12  - QMap<QString, QStringList> flags = {};
    13  - QMap<int, QList<int>> input_output = {{IN_DOMAIN,
    14  - {OUT_SUBDOMAIN, OUT_URL, OUT_EMAIL}}};
    15  -};
    16  -}
    17  - 
    18  -class Bing: public AbstractOsintModule{
    19  - 
    20  - public:
    21  - Bing(ScanArgs args);
    22  - ~Bing() override;
    23  - 
    24  - public slots:
    25  - void start() override;
    26  - void replyFinishedSubdomain(QNetworkReply *reply) override;
    27  - void replyFinishedEmail(QNetworkReply *reply) override;
    28  - void replyFinishedUrl(QNetworkReply *reply) override;
    29  - 
    30  - private:
    31  - bool m_firstRequest = false;
    32  - int m_lastPage = 1;
    33  - void sendRequests();
    34  -};
    35  -#endif // BING_H
    36  - 
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/scrape/BingSearch.cpp
     1 +#include "BingSearch.h"
     2 +#include <QStack>
     3 + 
     4 +BingSearch::BingSearch(ScanArgs args): AbstractOsintModule(args)
     5 +{
     6 + manager = new s3sNetworkAccessManager(this, args.config->timeout, args.config->setTimeout);
     7 + log.moduleName = OSINT_MODULE_BINGSEARCH;
     8 + 
     9 + if(args.output_Hostname)
     10 + connect(manager, &s3sNetworkAccessManager::finished, this, &BingSearch::replyFinishedSubdomain);
     11 + if(args.output_URL)
     12 + connect(manager, &s3sNetworkAccessManager::finished, this, &BingSearch::replyFinishedUrl);
     13 +}
     14 +BingSearch::~BingSearch(){
     15 + delete manager;
     16 +}
     17 + 
     18 +void BingSearch::start(){
     19 + QNetworkRequest request;
     20 + request.setAttribute(QNetworkRequest::FollowRedirectsAttribute, true);
     21 + request.setHeader(QNetworkRequest::UserAgentHeader, "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.83 Safari/537.36");
     22 + QUrl url;
     23 + 
     24 + if(args.input_Domain){
     25 + if(args.output_Hostname){
     26 + url.setUrl("https://www.bing.com/search?q=site:"+target+"&first=1&FORM=PORE&count=50");
     27 + request.setUrl(url);
     28 + manager->get(request);
     29 + return;
     30 + }
     31 + }
     32 + 
     33 + if(args.input_Search){
     34 + if(args.output_URL || args.output_Hostname){
     35 + url.setUrl("https://www.bing.com/search?q=*"+target+"*&first=1&FORM=PORE&count=50");
     36 + request.setUrl(url);
     37 + manager->get(request);
     38 + return;
     39 + }
     40 + }
     41 +}
     42 + 
     43 +void BingSearch::replyFinishedSubdomain(QNetworkReply *reply){
     44 + if(reply->error()){
     45 + this->onError(reply);
     46 + return;
     47 + }
     48 + 
     49 + QStack<GumboNode*> nodes;
     50 + GumboOutput *output = gumbo_parse(reply->readAll());
     51 + nodes.push(getBody(output->root));
     52 + 
     53 + GumboNode *node;
     54 + while(!nodes.isEmpty()) // backtracking loop
     55 + {
     56 + node = nodes.pop();
     57 + if(node->type != GUMBO_NODE_ELEMENT)
     58 + continue;
     59 + 
     60 + if(node->v.element.tag == GUMBO_TAG_CITE)
     61 + {
     62 + GumboNode *urlNode = static_cast<GumboNode*>(node->v.element.children.data[0]);
     63 + QString url(urlNode->v.text.text);
     64 + url = url.remove("https://").remove("http://").split("/")[0];
     65 + emit resultSubdomain(url);
     66 + log.resultsCount++;
     67 + }
     68 + 
     69 + GumboVector *children = &node->v.element.children;
     70 + for(unsigned int i = 0; i < children->length; i++)
     71 + nodes.push(static_cast<GumboNode*>(children->data[i]));
     72 + }
     73 + 
     74 + gumbo_destroy_output(&kGumboDefaultOptions, output);
     75 + 
     76 + this->end(reply);
     77 +}
     78 + 
     79 +void BingSearch::replyFinishedUrl(QNetworkReply *reply){
     80 + if(reply->error()){
     81 + this->onError(reply);
     82 + return;
     83 + }
     84 + 
     85 + QStack<GumboNode*> nodes;
     86 + GumboOutput *output = gumbo_parse(reply->readAll());
     87 + nodes.push(getBody(output->root));
     88 + 
     89 + GumboNode *node;
     90 + while(!nodes.isEmpty()) // backtracking loop
     91 + {
     92 + node = nodes.pop();
     93 + if(node->type != GUMBO_NODE_ELEMENT)
     94 + continue;
     95 + 
     96 + if(node->v.element.tag == GUMBO_TAG_CITE)
     97 + {
     98 + GumboNode *child = static_cast<GumboNode*>(node->v.element.children.data[0]);
     99 + emit resultURL(child->v.text.text);
     100 + log.resultsCount++;
     101 + }
     102 + 
     103 + GumboVector *children = &node->v.element.children;
     104 + for(unsigned int i = 0; i < children->length; i++)
     105 + nodes.push(static_cast<GumboNode*>(children->data[i]));
     106 + }
     107 + 
     108 + gumbo_destroy_output(&kGumboDefaultOptions, output);
     109 + 
     110 + this->end(reply);
     111 +}
     112 + 
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/scrape/BingSearch.h
     1 +#ifndef BINGSEARCH_H
     2 +#define BINGSEARCH_H
     3 + 
     4 +#include "../AbstractOsintModule.h"
     5 + 
     6 +namespace ModuleInfo {
     7 +struct BingSearch{
     8 + QString name = OSINT_MODULE_BINGSEARCH;
     9 + QString url = "https://bing.com/";
     10 + QString url_apiDoc = "";
     11 + QString summary = "";
     12 + QMap<QString, QStringList> flags = {};
     13 + QMap<int, QList<int>> input_output = {{IN_DOMAIN,
     14 + {OUT_SUBDOMAIN, OUT_URL}},
     15 + {IN_QUERYTERM,
     16 + {OUT_SUBDOMAIN, OUT_URL}}};
     17 +};
     18 +}
     19 + 
     20 +class BingSearch: public AbstractOsintModule{
     21 + 
     22 + public:
     23 + BingSearch(ScanArgs args);
     24 + ~BingSearch() override;
     25 + 
     26 + public slots:
     27 + void start() override;
     28 + void replyFinishedSubdomain(QNetworkReply *reply) override;
     29 + void replyFinishedUrl(QNetworkReply *reply) override;
     30 +};
     31 +#endif // BING_H
     32 + 
  • ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/scrape/DogPile.cpp
    1 1  #include "DogPile.h"
    2 2  #include <QStack>
    3 3   
    4  - 
    5  -/*
    6  - * doesnt show last page...
    7  - * redirection issues...
    8  - */
    9 4  DogPile::DogPile(ScanArgs args): AbstractOsintModule(args)
    10 5  {
    11 6   manager = new s3sNetworkAccessManager(this, args.config->timeout, args.config->setTimeout);
    skipped 1 lines
    13 8   
    14 9   if(args.output_Hostname)
    15 10   connect(manager, &s3sNetworkAccessManager::finished, this, &DogPile::replyFinishedSubdomain);
    16  - if(args.output_Email)
    17  - connect(manager, &s3sNetworkAccessManager::finished, this, &DogPile::replyFinishedEmail);
    18 11   if(args.output_URL)
    19 12   connect(manager, &s3sNetworkAccessManager::finished, this, &DogPile::replyFinishedUrl);
    20 13  }
    skipped 3 lines
    24 17   
    25 18  void DogPile::start(){
    26 19   QNetworkRequest request;
     20 + request.setAttribute(QNetworkRequest::FollowRedirectsAttribute, true);
     21 + request.setHeader(QNetworkRequest::UserAgentHeader, "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.83 Safari/537.36");
    27 22   QUrl url;
    28 23   
    29 24   if(args.input_Domain){
    30  - if(args.output_Hostname){
     25 + if(args.output_Hostname || args.output_URL){
    31 26   url.setUrl("https://www.dogpile.com/serp?q="+target);
    32 27   request.setUrl(url);
    33 28   manager->get(request);
    34  - m_firstRequest = true;
    35 29   return;
    36 30   }
     31 + }
    37 32   
    38  - if(args.output_URL){
    39  - url.setUrl("https://www.dogpile.com/serp?q="+target);
     33 + if(args.input_Search){
     34 + if(args.output_Hostname || args.output_URL){
     35 + url.setUrl("https://www.dogpile.com/serp?q=*"+target+"*");
    40 36   request.setUrl(url);
    41 37   manager->get(request);
    42  - m_firstRequest = true;
    43 38   return;
    44 39   }
    45 40   }
    skipped 16 lines
    62 57   if(node->type != GUMBO_NODE_ELEMENT)
    63 58   continue;
    64 59   
    65  - if(m_firstRequest){
    66  - if(node->v.element.tag == GUMBO_TAG_A && node->v.element.attributes.length == 3 && node->v.element.children.length == 1)
    67  - {
    68  - GumboAttribute *classAttribute = static_cast<GumboAttribute*>(node->v.element.attributes.data[0]);
    69  - if(QString::fromUtf8(classAttribute->value) == "pagination__num")
    70  - {
    71  - GumboAttribute *hrefAttribute = static_cast<GumboAttribute*>(node->v.element.attributes.data[1]);
    72  - this->sendRequests(QString::fromUtf8(hrefAttribute->value));
    73  - }
    74  - }
    75  - }
    76  - 
    77  - if(node->v.element.tag == GUMBO_TAG_SPAN && node->v.element.attributes.length == 1 && node->v.element.children.length > 1)
     60 + if(node->v.element.tag == GUMBO_TAG_A && node->v.element.attributes.length > 4)
    78 61   {
    79 62   GumboAttribute *classAttribute = static_cast<GumboAttribute*>(node->v.element.attributes.data[0]);
    80  - if(QString::fromUtf8(classAttribute->value) == "web-bing__url")
     63 + if(QString::fromUtf8(classAttribute->value) == "web-bing__title")
    81 64   {
    82  - GumboNode *child = static_cast<GumboNode*>(node->v.element.children.data[0]);
    83  - QString domain = QString::fromUtf8(child->v.text.text);
    84  - domain = domain.remove("http://").remove("https://");
    85  - domain.append(target);
    86  - emit resultSubdomain(domain);
     65 + GumboAttribute *hrefAttribute = static_cast<GumboAttribute*>(node->v.element.attributes.data[1]);
     66 + QString url(hrefAttribute->value);
     67 + url = url.remove("http://").remove("https://");
     68 + emit resultSubdomain(url.split("/")[0]);
    87 69   log.resultsCount++;
    88 70   }
    89 71   }
    skipped 8 lines
    98 80   this->end(reply);
    99 81  }
    100 82   
    101  -void DogPile::replyFinishedEmail(QNetworkReply *reply){
    102  - if(reply->error()){
    103  - this->onError(reply);
    104  - return;
    105  - }
    106  - 
    107  - /*
    108  - * not yet implemented...
    109  - */
    110  - 
    111  - this->end(reply);
    112  -}
    113  - 
    114 83  void DogPile::replyFinishedUrl(QNetworkReply *reply){
    115 84   if(reply->error()){
    116 85   this->onError(reply);
    skipped 11 lines
    128 97   if(node->type != GUMBO_NODE_ELEMENT)
    129 98   continue;
    130 99   
    131  - if(m_firstRequest){
    132  - if(node->v.element.tag == GUMBO_TAG_A && node->v.element.attributes.length == 3 && node->v.element.children.length == 1)
    133  - {
    134  - GumboAttribute *classAttribute = static_cast<GumboAttribute*>(node->v.element.attributes.data[0]);
    135  - if(QString::fromUtf8(classAttribute->value) == "pagination__num")
    136  - {
    137  - GumboAttribute *hrefAttribute = static_cast<GumboAttribute*>(node->v.element.attributes.data[1]);
    138  - this->sendRequests(QString::fromUtf8(hrefAttribute->value));
    139  - }
    140  - }
    141  - }
    142  - 
    143  - if(node->v.element.tag == GUMBO_TAG_SPAN && node->v.element.attributes.length == 1 && node->v.element.children.length > 1)
     100 + if(node->v.element.tag == GUMBO_TAG_A && node->v.element.attributes.length > 4)
    144 101   {
    145 102   GumboAttribute *classAttribute = static_cast<GumboAttribute*>(node->v.element.attributes.data[0]);
    146  - if(QString::fromUtf8(classAttribute->value) == "web-bing__url")
     103 + if(QString::fromUtf8(classAttribute->value) == "web-bing__title")
    147 104   {
    148  - GumboNode *child = static_cast<GumboNode*>(node->v.element.children.data[0]);
    149  - QString domain = QString::fromUtf8(child->v.text.text);
    150  - domain.append(target);
    151  - emit resultURL(domain);
     105 + GumboAttribute *hrefAttribute = static_cast<GumboAttribute*>(node->v.element.attributes.data[1]);
     106 + emit resultSubdomain(hrefAttribute->value);
    152 107   log.resultsCount++;
    153 108   }
    154 109   }
    skipped 8 lines
    163 118   this->end(reply);
    164 119  }
    165 120   
    166  -void DogPile::sendRequests(QString anotherPage){
    167  - QNetworkRequest request;
    168  - 
    169  - if(args.input_Domain){
    170  - if(args.output_Hostname){
    171  - if(m_sentPages < args.config->maxPage){
    172  - QUrl url("https://www.dogpile.com"+anotherPage);
    173  - request.setUrl(url);
    174  - manager->get(request);
    175  - m_firstRequest = false;
    176  - m_sentPages++;
    177  - }
    178  - }
    179  - }
    180  -}
    181  - 
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/scrape/DogPile.h
    skipped 10 lines
    11 11   QString summary = "";
    12 12   QMap<QString, QStringList> flags = {};
    13 13   QMap<int, QList<int>> input_output = {{IN_DOMAIN,
    14  - {OUT_SUBDOMAIN, OUT_URL, OUT_EMAIL}}};
     14 + {OUT_SUBDOMAIN, OUT_URL}},
     15 + {IN_QUERYTERM,
     16 + {OUT_SUBDOMAIN, OUT_URL}}};
    15 17  };
    16 18  }
    17 19   
    skipped 6 lines
    24 26   public slots:
    25 27   void start() override;
    26 28   void replyFinishedSubdomain(QNetworkReply *reply) override;
    27  - void replyFinishedEmail(QNetworkReply *reply) override;
    28 29   void replyFinishedUrl(QNetworkReply *reply) override;
    29  - 
    30  - private:
    31  - bool m_firstRequest = false;
    32  - int m_lastPage = 1;
    33  - int m_sentPages = 1;
    34  - void sendRequests(QString anotherPage);
    35 30  };
    36 31  #endif // DOGPILE_H
    37 32   
  • ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/scrape/DuckDuckGo.cpp
    skipped 11 lines
    12 12   
    13 13   if(args.output_Hostname)
    14 14   connect(manager, &s3sNetworkAccessManager::finished, this, &DuckDuckGo::replyFinishedSubdomain);
    15  - if(args.output_Email)
    16  - connect(manager, &s3sNetworkAccessManager::finished, this, &DuckDuckGo::replyFinishedEmail);
    17 15   if(args.output_URL)
    18 16   connect(manager, &s3sNetworkAccessManager::finished, this, &DuckDuckGo::replyFinishedUrl);
    19 17  }
    skipped 6 lines
    26 24   QUrl url;
    27 25   
    28 26   if(args.input_Domain){
    29  - if(args.output_Hostname){
    30  - url.setUrl("https://html.duckduckgo.com/html/?q=site:"+target);
    31  - request.setUrl(url);
    32  - manager->get(request);
    33  - return;
    34  - }
    35  - 
    36  - if(args.output_URL){
     27 + if(args.output_Hostname || args.output_URL){
    37 28   url.setUrl("https://html.duckduckgo.com/html/?q=site:"+target);
    38 29   request.setUrl(url);
    39 30   manager->get(request);
    skipped 37 lines
    77 68   }
    78 69   
    79 70   gumbo_destroy_output(&kGumboDefaultOptions, output);
    80  - 
    81  - this->end(reply);
    82  -}
    83  - 
    84  -void DuckDuckGo::replyFinishedEmail(QNetworkReply *reply){
    85  - if(reply->error()){
    86  - this->onError(reply);
    87  - return;
    88  - }
    89  - 
    90  - /*
    91  - * not yet implemented...
    92  - */
    93 71   
    94 72   this->end(reply);
    95 73  }
    skipped 39 lines
  • ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/scrape/DuckDuckGo.h
    skipped 10 lines
    11 11   QString summary = "";
    12 12   QMap<QString, QStringList> flags = {};
    13 13   QMap<int, QList<int>> input_output = {{IN_DOMAIN,
    14  - {OUT_SUBDOMAIN, OUT_URL, OUT_EMAIL}}};
     14 + {OUT_SUBDOMAIN, OUT_URL}}};
    15 15  };
    16 16  }
    17 17   
    skipped 6 lines
    24 24   public slots:
    25 25   void start() override;
    26 26   void replyFinishedSubdomain(QNetworkReply *reply) override;
    27  - void replyFinishedEmail(QNetworkReply *reply) override;
    28 27   void replyFinishedUrl(QNetworkReply *reply) override;
    29 28  };
    30 29  #endif // DUCKDUCKGO_H
    skipped 1 lines
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/scrape/Exalead.cpp
    1 1  #include "Exalead.h"
    2 2  #include <QStack>
    3 3   
    4  - 
    5 4  /*
    6 5   * not very accurate...
    7 6   */
    skipped 4 lines
    12 11   
    13 12   if(args.output_Hostname)
    14 13   connect(manager, &s3sNetworkAccessManager::finished, this, &Exalead::replyFinishedSubdomain);
    15  - if(args.output_Email)
    16  - connect(manager, &s3sNetworkAccessManager::finished, this, &Exalead::replyFinishedEmail);
    17 14   if(args.output_URL)
    18 15   connect(manager, &s3sNetworkAccessManager::finished, this, &Exalead::replyFinishedUrl);
    19 16  }
    skipped 6 lines
    26 23   QUrl url;
    27 24   
    28 25   if(args.input_Domain){
    29  - if(args.output_Hostname){
     26 + if(args.output_Hostname || args.output_URL){
    30 27   url.setUrl("https://www.exalead.com/search/web/results/?q="+target+"&collapsing=off");
    31 28   request.setUrl(url);
    32 29   manager->get(request);
    33 30   return;
    34 31   }
     32 + }
    35 33   
    36  - if(args.output_URL){
     34 + if(args.input_Search){
     35 + if(args.output_Hostname || args.output_URL){
    37 36   url.setUrl("https://www.exalead.com/search/web/results/?q="+target+"&collapsing=off");
    38 37   request.setUrl(url);
    39 38   manager->get(request);
    skipped 25 lines
    65 64   if(QString::fromUtf8(classAttribute->value) == "ellipsis")
    66 65   {
    67 66   GumboNode *child = static_cast<GumboNode*>(node->v.element.children.data[0]);
    68  - emit resultSubdomain(QString::fromUtf8(child->v.text.text));
     67 + QString url(child->v.text.text);
     68 + emit resultSubdomain(url.split("/")[0]);
    69 69   log.resultsCount++;
    70 70   }
    71 71   }
    skipped 8 lines
    80 80   this->end(reply);
    81 81  }
    82 82   
    83  -void Exalead::replyFinishedEmail(QNetworkReply *reply){
    84  - if(reply->error()){
    85  - this->onError(reply);
    86  - return;
    87  - }
    88  - 
    89  - /*
    90  - * not yet implemented...
    91  - */
    92  - 
    93  - this->end(reply);
    94  -}
    95  - 
    96 83  void Exalead::replyFinishedUrl(QNetworkReply *reply){
    97 84   if(reply->error()){
    98 85   this->onError(reply);
    skipped 17 lines
    116 103   if(QString::fromUtf8(classAttribute->value) == "ellipsis")
    117 104   {
    118 105   GumboNode *child = static_cast<GumboNode*>(node->v.element.children.data[0]);
    119  - emit resultURL(QString::fromUtf8(child->v.text.text));
     106 + emit resultURL(child->v.text.text);
    120 107   log.resultsCount++;
    121 108   }
    122 109   }
    skipped 11 lines
  • ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/scrape/Exalead.h
    skipped 10 lines
    11 11   QString summary = "";
    12 12   QMap<QString, QStringList> flags = {};
    13 13   QMap<int, QList<int>> input_output = {{IN_DOMAIN,
    14  - {OUT_SUBDOMAIN, OUT_URL, OUT_EMAIL}}};
     14 + {OUT_SUBDOMAIN, OUT_URL}},
     15 + {IN_QUERYTERM,
     16 + {OUT_SUBDOMAIN, OUT_URL}}};
    15 17  };
    16 18  }
    17 19   
    skipped 6 lines
    24 26   public slots:
    25 27   void start() override;
    26 28   void replyFinishedSubdomain(QNetworkReply *reply) override;
    27  - void replyFinishedEmail(QNetworkReply *reply) override;
    28 29   void replyFinishedUrl(QNetworkReply *reply) override;
    29 30  };
    30 31  #endif // EXALEAD_H
    skipped 1 lines
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/scrape/GoogleSearch.cpp
     1 +#include "GoogleSearch.h"
     2 +#include <QStack>
     3 + 
     4 + 
     5 +/*
     6 + * intext:"@udsm.ac.tz" site:udsm.ac.tz ==> sites containing email
     7 + */
     8 +GoogleSearch::GoogleSearch(ScanArgs args): AbstractOsintModule(args)
     9 +{
     10 + manager = new s3sNetworkAccessManager(this, args.config->timeout, args.config->setTimeout);
     11 + log.moduleName = OSINT_MODULE_GOOGLESEARCH;
     12 + 
     13 + if(args.output_Hostname)
     14 + connect(manager, &s3sNetworkAccessManager::finished, this, &GoogleSearch::replyFinishedSubdomain);
     15 + if(args.output_URL)
     16 + connect(manager, &s3sNetworkAccessManager::finished, this, &GoogleSearch::replyFinishedUrl);
     17 +}
     18 +GoogleSearch::~GoogleSearch(){
     19 + delete manager;
     20 +}
     21 + 
     22 +void GoogleSearch::start(){
     23 + QNetworkRequest request;
     24 + request.setAttribute(QNetworkRequest::FollowRedirectsAttribute, true);
     25 + QUrl url;
     26 + 
     27 + if(args.input_Domain) {
     28 + if(args.output_Hostname) {
     29 + url.setUrl("https://google.com/search?q=site:*."+target+"&btnG=Search&hl=en-US&biw=&bih=&gbv=1&start="+QString::number(m_offset)+"&filter=0&num=100");
     30 + request.setUrl(url);
     31 + manager->get(request);
     32 + return;
     33 + }
     34 + 
     35 + if(args.output_URL) {
     36 + url.setUrl("https://google.com/search?q=site:"+target+"/*&btnG=Search&hl=en-US&biw=&bih=&gbv=1&start="+QString::number(m_offset)+"&filter=0&num=100");
     37 + request.setUrl(url);
     38 + manager->get(request);
     39 + return;
     40 + }
     41 + }
     42 + 
     43 + if(args.input_Email) {
     44 + if(args.output_URL) {
     45 + url.setUrl("https://google.com/search?q=intext:\""+target+"\"&btnG=Search&hl=en-US&biw=&bih=&gbv=1&start="+QString::number(m_offset)+"&filter=0&num=100");
     46 + request.setUrl(url);
     47 + manager->get(request);
     48 + return;
     49 + }
     50 + }
     51 + 
     52 + if(args.input_Search) {
     53 + if(args.output_URL || args.output_Hostname) {
     54 + url.setUrl("https://google.com/search?q=site:*"+target+".*+OR+site:*"+target+".*.*&btnG=Search&hl=en-US&biw=&bih=&gbv=1&start="+QString::number(m_offset)+"&filter=0&num=100");
     55 + request.setUrl(url);
     56 + manager->get(request);
     57 + return;
     58 + }
     59 + }
     60 +}
     61 + 
     62 +void GoogleSearch::replyFinishedSubdomain(QNetworkReply *reply){
     63 + if(reply->error()){
     64 + this->onError(reply);
     65 + return;
     66 + }
     67 + 
     68 + QStack<GumboNode*> nodes;
     69 + GumboOutput *output = gumbo_parse(reply->readAll());
     70 + nodes.push(getBody(output->root));
     71 + 
     72 + GumboNode *node;
     73 + while(!nodes.isEmpty()) // backtrack loop
     74 + {
     75 + node = nodes.pop();
     76 + if(node->type != GUMBO_NODE_ELEMENT)
     77 + continue;
     78 + 
     79 + if(node->v.element.tag == GUMBO_TAG_DIV && node->v.element.attributes.length == 1 && node->v.element.children.length == 1)
     80 + {
     81 + GumboAttribute *classAttribute = static_cast<GumboAttribute*>(node->v.element.attributes.data[0]);
     82 + if(QString::fromUtf8(classAttribute->value) == "BNeawe UPmit AP7Wnd")
     83 + {
     84 + GumboNode *child = static_cast<GumboNode*>(node->v.element.children.data[0]);
     85 + /* trim the results and send */
     86 + QString subdomain(child->v.text.text);
     87 + subdomain = subdomain.split(" ").at(0);
     88 + emit resultSubdomain(subdomain);
     89 + log.resultsCount++;
     90 + continue;
     91 + }
     92 + }
     93 + 
     94 + GumboVector *children = &node->v.element.children;
     95 + for(unsigned int i = 0; i < children->length; i++)
     96 + nodes.push(static_cast<GumboNode*>(children->data[i]));
     97 + }
     98 + 
     99 + gumbo_destroy_output(&kGumboDefaultOptions, output);
     100 + 
     101 + this->end(reply);
     102 +}
     103 + 
     104 +void GoogleSearch::replyFinishedUrl(QNetworkReply *reply){
     105 + if(reply->error()){
     106 + this->onError(reply);
     107 + return;
     108 + }
     109 + 
     110 + QStack<GumboNode*> nodes;
     111 + GumboOutput *output = gumbo_parse(reply->readAll());
     112 + nodes.push(getBody(output->root));
     113 + 
     114 + GumboNode *node;
     115 + while(!nodes.isEmpty()) // backtrack loop
     116 + {
     117 + node = nodes.pop();
     118 + if(node->type != GUMBO_NODE_ELEMENT)
     119 + continue;
     120 + 
     121 + if(node->v.element.tag == GUMBO_TAG_DIV && node->v.element.attributes.length == 1 && node->v.element.children.length > 0)
     122 + {
     123 + GumboAttribute *classAttribute = static_cast<GumboAttribute*>(node->v.element.attributes.data[0]);
     124 + if(QString::fromUtf8(classAttribute->value) == "egMi0 kCrYT")
     125 + {
     126 + GumboNode *child = static_cast<GumboNode*>(node->v.element.children.data[0]);
     127 + if(child->v.element.tag == GUMBO_TAG_A && node->v.element.attributes.length == 1)
     128 + {
     129 + GumboAttribute *hrefAttribute = static_cast<GumboAttribute*>(child->v.element.attributes.data[0]);
     130 + QString url(hrefAttribute->value);
     131 + url = url.remove(0, 7);
     132 + url = url.split("&")[0];
     133 + emit resultURL(url);
     134 + continue;
     135 + }
     136 + }
     137 + }
     138 + 
     139 + GumboVector *children = &node->v.element.children;
     140 + for(unsigned int i = 0; i < children->length; i++)
     141 + nodes.push(static_cast<GumboNode*>(children->data[i]));
     142 + }
     143 + 
     144 + gumbo_destroy_output(&kGumboDefaultOptions, output);
     145 + 
     146 + this->end(reply);
     147 +}
     148 + 
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/scrape/GoogleSearch.h
     1 +#ifndef GOOGLESEARCH_H
     2 +#define GOOGLESEARCH_H
     3 + 
     4 +#include "../AbstractOsintModule.h"
     5 + 
     6 + 
     7 +namespace ModuleInfo {
     8 +struct GoogleSearch{
     9 + QString name = OSINT_MODULE_GOOGLESEARCH;
     10 + QString url = "https://google.com/";
     11 + QString url_apiDoc = "";
     12 + QString summary = "";
     13 + QMap<QString, QStringList> flags = {};
     14 + QMap<int, QList<int>> input_output = {{IN_DOMAIN,
     15 + {OUT_SUBDOMAIN, OUT_URL}},
     16 + {IN_EMAIL,
     17 + {OUT_URL}},
     18 + {IN_QUERYTERM,
     19 + {OUT_SUBDOMAIN, OUT_URL}}};
     20 +};
     21 +}
     22 + 
     23 +class GoogleSearch: public AbstractOsintModule{
     24 + 
     25 + public:
     26 + GoogleSearch(ScanArgs args);
     27 + ~GoogleSearch() override;
     28 + 
     29 + public slots:
     30 + void start() override;
     31 + void replyFinishedSubdomain(QNetworkReply *reply) override;
     32 + void replyFinishedUrl(QNetworkReply *reply) override;
     33 + 
     34 + private:
     35 + int m_offset = 0;
     36 +};
     37 + 
     38 +#endif // GOOGLESEARCH_H
     39 + 
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/scrape/Yahoo.cpp
    1  -#include "Yahoo.h"
    2  -#include <QStack>
    3  - 
    4  - 
    5  -/*
    6  - * has a different type of next page...
    7  - * redirection probs...
    8  - */
    9  -Yahoo::Yahoo(ScanArgs args): AbstractOsintModule(args)
    10  -{
    11  - manager = new s3sNetworkAccessManager(this, args.config->timeout, args.config->setTimeout);
    12  - log.moduleName = OSINT_MODULE_YAHOO;
    13  - 
    14  - if(args.output_Hostname)
    15  - connect(manager, &s3sNetworkAccessManager::finished, this, &Yahoo::replyFinishedSubdomain);
    16  - if(args.output_Email)
    17  - connect(manager, &s3sNetworkAccessManager::finished, this, &Yahoo::replyFinishedEmail);
    18  - if(args.output_URL)
    19  - connect(manager, &s3sNetworkAccessManager::finished, this, &Yahoo::replyFinishedUrl);
    20  -}
    21  -Yahoo::~Yahoo(){
    22  - delete manager;
    23  -}
    24  - 
    25  -void Yahoo::start(){
    26  - QNetworkRequest request;
    27  - QUrl url;
    28  - 
    29  - if(args.input_Domain){
    30  - if(args.output_Hostname){
    31  - url.setUrl("https://search.yahoo.com/search?p=site:"+target+"&b=1&pz=10&bct=0&xargs=0");
    32  - request.setUrl(url);
    33  - manager->get(request);
    34  - m_firstRequest = true;
    35  - return;
    36  - }
    37  - 
    38  - if(args.output_URL){
    39  - url.setUrl("https://search.yahoo.com/search?p=site:"+target+"&b=1&pz=10&bct=0&xargs=0");
    40  - request.setUrl(url);
    41  - manager->get(request);
    42  - m_firstRequest = true;
    43  - return;
    44  - }
    45  - }
    46  -}
    47  - 
    48  -void Yahoo::replyFinishedSubdomain(QNetworkReply *reply){
    49  - if(reply->error()){
    50  - this->onError(reply);
    51  - return;
    52  - }
    53  - 
    54  - QStack<GumboNode*> nodes;
    55  - GumboOutput *output = gumbo_parse(reply->readAll());
    56  - nodes.push(getBody(output->root));
    57  - 
    58  - GumboNode *node;
    59  - while(!nodes.isEmpty())
    60  - {
    61  - node = nodes.pop();
    62  - if(node->type != GUMBO_NODE_ELEMENT)
    63  - continue;
    64  - 
    65  - if(m_firstRequest){
    66  - if(node->v.element.tag == GUMBO_TAG_DIV && node->v.element.attributes.length > 1 && node->v.element.children.length > 0)
    67  - {
    68  - GumboAttribute *classAttribute = static_cast<GumboAttribute*>(node->v.element.attributes.data[0]);
    69  - if(QString::fromUtf8(classAttribute->value) == "pages")
    70  - {
    71  - /*
    72  - next pages implemented here...
    73  - */
    74  - }
    75  - }
    76  - }
    77  - 
    78  - if(node->v.element.tag == GUMBO_TAG_DIV && node->v.element.attributes.length == 2 && node->v.element.children.length > 0)
    79  - {
    80  - GumboAttribute *styleAttribute = static_cast<GumboAttribute*>(node->v.element.attributes.data[0]);
    81  - if(QString::fromUtf8(styleAttribute->value) == "visibility:hidden;")
    82  - {
    83  - GumboNode *span = static_cast<GumboNode*>(node->v.element.children.data[0]);
    84  - GumboNode *child = static_cast<GumboNode*>(span->v.element.children.data[0]);
    85  - 
    86  - emit resultSubdomain(child->v.text.text);
    87  - log.resultsCount++;
    88  - }
    89  - }
    90  - 
    91  - GumboVector *children = &node->v.element.children;
    92  - for(unsigned int i = 0; i < children->length; i++)
    93  - nodes.push(static_cast<GumboNode*>(children->data[i]));
    94  - }
    95  - 
    96  - gumbo_destroy_output(&kGumboDefaultOptions, output);
    97  - 
    98  - if(m_firstRequest)
    99  - this->sendRequests();
    100  - 
    101  - this->end(reply);
    102  -}
    103  - 
    104  -void Yahoo::replyFinishedEmail(QNetworkReply *reply){
    105  - if(reply->error()){
    106  - this->onError(reply);
    107  - return;
    108  - }
    109  - 
    110  - /*
    111  - * not yet implemented...
    112  - */
    113  - 
    114  - this->end(reply);
    115  -}
    116  - 
    117  -void Yahoo::replyFinishedUrl(QNetworkReply *reply){
    118  - if(reply->error()){
    119  - this->onError(reply);
    120  - return;
    121  - }
    122  - 
    123  - QStack<GumboNode*> nodes;
    124  - GumboOutput *output = gumbo_parse(reply->readAll());
    125  - nodes.push(getBody(output->root));
    126  - 
    127  - GumboNode *node;
    128  - while(!nodes.isEmpty())
    129  - {
    130  - node = nodes.pop();
    131  - if(node->type != GUMBO_NODE_ELEMENT)
    132  - continue;
    133  - 
    134  - if(m_firstRequest){
    135  - if(node->v.element.tag == GUMBO_TAG_DIV && node->v.element.attributes.length > 1 && node->v.element.children.length > 0)
    136  - {
    137  - GumboAttribute *classAttribute = static_cast<GumboAttribute*>(node->v.element.attributes.data[0]);
    138  - if(QString::fromUtf8(classAttribute->value) == "pages")
    139  - {
    140  - /*
    141  - next pages implemented here...
    142  - */
    143  - }
    144  - }
    145  - }
    146  - 
    147  - if(node->v.element.tag == GUMBO_TAG_DIV && node->v.element.attributes.length == 2 && node->v.element.children.length > 0)
    148  - {
    149  - GumboAttribute *styleAttribute = static_cast<GumboAttribute*>(node->v.element.attributes.data[0]);
    150  - if(QString::fromUtf8(styleAttribute->value) == "visibility:hidden;")
    151  - {
    152  - GumboNode *span = static_cast<GumboNode*>(node->v.element.children.data[0]);
    153  - GumboNode *child = static_cast<GumboNode*>(span->v.element.children.data[0]);
    154  - 
    155  - emit resultURL(child->v.text.text);
    156  - log.resultsCount++;
    157  - }
    158  - }
    159  - 
    160  - GumboVector *children = &node->v.element.children;
    161  - for(unsigned int i = 0; i < children->length; i++)
    162  - nodes.push(static_cast<GumboNode*>(children->data[i]));
    163  - }
    164  - 
    165  - gumbo_destroy_output(&kGumboDefaultOptions, output);
    166  - 
    167  - if(m_firstRequest)
    168  - this->sendRequests();
    169  - 
    170  - this->end(reply);
    171  -}
    172  - 
    173  -void Yahoo::sendRequests(){
    174  - QNetworkRequest request;
    175  - 
    176  - if(args.input_Domain){
    177  - if(args.output_Hostname)
    178  - {
    179  - ///
    180  - /// getting the max pages to query...
    181  - ///
    182  - int lastPage;
    183  - m_lastPage = 5;
    184  - if(args.config->maxPage <= m_lastPage)
    185  - lastPage = args.config->maxPage;
    186  - else
    187  - lastPage = m_lastPage;
    188  - 
    189  - ///
    190  - /// loop to send appropriate requests...
    191  - ///
    192  - int currentPage = 2;
    193  - int first = 11;
    194  - while(currentPage < lastPage){
    195  - QUrl url("https://search.yahoo.com/search?p=site:"+target+"&b="+QString::number(first)+"&pz=10&bct=0&xargs=0");
    196  - request.setUrl(url);
    197  - manager->get(request);
    198  - m_firstRequest = false;
    199  - currentPage++;
    200  - first += 10;
    201  - }
    202  - }
    203  - }
    204  -}
    205  - 
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/scrape/YahooSearch.cpp
     1 +#include "YahooSearch.h"
     2 +#include <QStack>
     3 + 
     4 + 
     5 +YahooSearch::YahooSearch(ScanArgs args): AbstractOsintModule(args)
     6 +{
     7 + manager = new s3sNetworkAccessManager(this, args.config->timeout, args.config->setTimeout);
     8 + log.moduleName = OSINT_MODULE_YAHOOSEARCH;
     9 + 
     10 + if(args.output_Hostname)
     11 + connect(manager, &s3sNetworkAccessManager::finished, this, &YahooSearch::replyFinishedSubdomain);
     12 + if(args.output_URL)
     13 + connect(manager, &s3sNetworkAccessManager::finished, this, &YahooSearch::replyFinishedUrl);
     14 +}
     15 +YahooSearch::~YahooSearch(){
     16 + delete manager;
     17 +}
     18 + 
     19 +void YahooSearch::start(){
     20 + QNetworkRequest request;
     21 + request.setAttribute(QNetworkRequest::FollowRedirectsAttribute, true);
     22 + request.setHeader(QNetworkRequest::UserAgentHeader, "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.83 Safari/537.36");
     23 + QUrl url;
     24 + 
     25 + if(args.input_Domain){
     26 + if(args.output_Hostname || args.output_URL){
     27 + url.setUrl("https://search.yahoo.com/search?p=site:"+target+"&b=1&pz=10&bct=0&xargs=0&n=100");
     28 + request.setUrl(url);
     29 + manager->get(request);
     30 + return;
     31 + }
     32 + }
     33 + 
     34 + if(args.input_Search){
     35 + if(args.output_Hostname || args.output_URL){
     36 + url.setUrl("https://search.yahoo.com/search?n=100&ei=UTF-8&va_vt=any&vo_vt=any&ve_vt=any&vp_vt=any&vst=0&vf=all&vm=p&fl=0&p="+target+"&vs=");
     37 + request.setUrl(url);
     38 + manager->get(request);
     39 + return;
     40 + }
     41 + }
     42 +}
     43 + 
     44 +void YahooSearch::replyFinishedSubdomain(QNetworkReply *reply){
     45 + if(reply->error()){
     46 + this->onError(reply);
     47 + return;
     48 + }
     49 + 
     50 + QStack<GumboNode*> nodes;
     51 + GumboOutput *output = gumbo_parse(reply->readAll());
     52 + nodes.push(getBody(output->root));
     53 + 
     54 + GumboNode *node;
     55 + while(!nodes.isEmpty())
     56 + {
     57 + node = nodes.pop();
     58 + if(node->type != GUMBO_NODE_ELEMENT) // backtrack loop
     59 + continue;
     60 + 
     61 + if(node->v.element.tag == GUMBO_TAG_DIV && node->v.element.attributes.length == 2 && node->v.element.children.length > 0)
     62 + {
     63 + GumboAttribute *styleAttribute = static_cast<GumboAttribute*>(node->v.element.attributes.data[0]);
     64 + if(QString::fromUtf8(styleAttribute->value) == "visibility:hidden;")
     65 + {
     66 + GumboNode *span = static_cast<GumboNode*>(node->v.element.children.data[0]);
     67 + GumboNode *child = static_cast<GumboNode*>(span->v.element.children.data[0]);
     68 + 
     69 + emit resultSubdomain(child->v.text.text);
     70 + log.resultsCount++;
     71 + }
     72 + }
     73 + 
     74 + GumboVector *children = &node->v.element.children;
     75 + for(unsigned int i = 0; i < children->length; i++)
     76 + nodes.push(static_cast<GumboNode*>(children->data[i]));
     77 + }
     78 + 
     79 + gumbo_destroy_output(&kGumboDefaultOptions, output);
     80 + 
     81 + this->end(reply);
     82 +}
     83 + 
     84 +void YahooSearch::replyFinishedUrl(QNetworkReply *reply){
     85 + if(reply->error()){
     86 + this->onError(reply);
     87 + return;
     88 + }
     89 + 
     90 + QStack<GumboNode*> nodes;
     91 + GumboOutput *output = gumbo_parse(reply->readAll());
     92 + nodes.push(getBody(output->root));
     93 + 
     94 + GumboNode *node;
     95 + while(!nodes.isEmpty()) // backtrack loop
     96 + {
     97 + node = nodes.pop();
     98 + if(node->type != GUMBO_NODE_ELEMENT)
     99 + continue;
     100 + 
     101 + if(node->v.element.tag == GUMBO_TAG_DIV && node->v.element.attributes.length == 2 && node->v.element.children.length > 0)
     102 + {
     103 + GumboAttribute *styleAttribute = static_cast<GumboAttribute*>(node->v.element.attributes.data[0]);
     104 + if(QString::fromUtf8(styleAttribute->value) == "visibility:hidden;")
     105 + {
     106 + GumboNode *span = static_cast<GumboNode*>(node->v.element.children.data[0]);
     107 + GumboNode *child = static_cast<GumboNode*>(span->v.element.children.data[0]);
     108 + 
     109 + emit resultURL(child->v.text.text);
     110 + log.resultsCount++;
     111 + }
     112 + }
     113 + 
     114 + GumboVector *children = &node->v.element.children;
     115 + for(unsigned int i = 0; i < children->length; i++)
     116 + nodes.push(static_cast<GumboNode*>(children->data[i]));
     117 + }
     118 + 
     119 + gumbo_destroy_output(&kGumboDefaultOptions, output);
     120 + 
     121 + this->end(reply);
     122 +}
     123 + 
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/modules/passive/scrape/Yahoo.h sub3suite/src/modules/passive/scrape/YahooSearch.h
    skipped 3 lines
    4 4  #include "../AbstractOsintModule.h"
    5 5   
    6 6  namespace ModuleInfo {
    7  -struct Yahoo{
    8  - QString name = OSINT_MODULE_YAHOO;
     7 +struct YahooSearch{
     8 + QString name = OSINT_MODULE_YAHOOSEARCH;
    9 9   QString url = "https://yahoo.com/";
    10 10   QString url_apiDoc = "";
    11 11   QString summary = "";
    12 12   QMap<QString, QStringList> flags = {};
    13 13   QMap<int, QList<int>> input_output = {{IN_DOMAIN,
    14  - {OUT_SUBDOMAIN, OUT_URL, OUT_EMAIL}}};
     14 + {OUT_SUBDOMAIN, OUT_URL}},
     15 + {IN_QUERYTERM,
     16 + {OUT_SUBDOMAIN, OUT_URL}}};
    15 17  };
    16 18  }
    17 19   
    18 20   
    19  -class Yahoo: public AbstractOsintModule{
     21 +class YahooSearch: public AbstractOsintModule{
    20 22   
    21 23   public:
    22  - Yahoo(ScanArgs args);
    23  - ~Yahoo() override;
     24 + YahooSearch(ScanArgs args);
     25 + ~YahooSearch() override;
    24 26   
    25 27   public slots:
    26 28   void start() override;
    27 29   void replyFinishedSubdomain(QNetworkReply *reply) override;
    28  - void replyFinishedEmail(QNetworkReply *reply) override;
    29 30   void replyFinishedUrl(QNetworkReply *reply) override;
    30  - 
    31  - private:
    32  - bool m_firstRequest = false;
    33  - int m_lastPage = 1;
    34  - void sendRequests();
    35 31  };
    36 32  #endif // YAHOO_H
    37 33   
  • ■ ■ ■ ■ ■ ■
    sub3suite/src/project/Project.h
    skipped 70 lines
    71 71   private:
    72 72   Ui::Project *ui;
    73 73   
    74  - QItemSelectionModel *m_selectionModel;
    75  - JsonSyntaxHighlighter *m_jsonHighlighter;
    76  - 
    77 74   ProjectModel *model;
    78 75   QSortFilterProxyModel *proxyModel;
    79 76   
     77 + QItemSelectionModel *m_selectionModel = nullptr;
     78 + JsonSyntaxHighlighter *m_jsonHighlighter = nullptr;
     79 + 
    80 80   QString m_projectFile;
    81 81   QString *item_comment = nullptr;
    82 82   
    83  - QMenuBar *menubar_tree;
    84  - QMenuBar *menubar_project;
     83 + QMenuBar *menubar_tree = nullptr;
     84 + QMenuBar *menubar_project = nullptr;
    85 85   
    86  - QMenu *menu_send;
    87  - QMenu *menu_copy;
    88  - QMenu *menu_save;
    89  - QMenu *menu_extract;
     86 + QMenu *menu_send = nullptr;
     87 + QMenu *menu_copy = nullptr;
     88 + QMenu *menu_save = nullptr;
     89 + QMenu *menu_extract = nullptr;
    90 90   
    91 91   /* main actions */
    92 92   QAction a_copy;
    skipped 62 lines
  • sub3suite/src/utils/simdjson.cpp
    Diff is too large to be displayed.
  • sub3suite/src/utils/simdjson.h
    Diff is too large to be displayed.
  • ■ ■ ■ ■ ■ ■
    sub3suite/sub3suite.pro
    skipped 124 lines
    125 125   src/items/NSItem.cpp \
    126 126   src/models/ExplorerModel.cpp \
    127 127   src/modules/active/URLScanner.cpp \
    128  - src/modules/passive/ParserMethods.cpp \
    129 128   src/modules/passive/api/ASRank.cpp \
    130 129   src/modules/passive/api/CirclPublic.cpp \
    131 130   src/modules/passive/api/HackerTarget.cpp \
    skipped 2 lines
    134 133   src/modules/passive/api/PassiveTotal.cpp \
    135 134   src/modules/passive/api/Robtex.cpp \
    136 135   src/modules/passive/ip/Ipfy.cpp \
     136 + src/modules/passive/scrape/BingSearch.cpp \
     137 + src/modules/passive/scrape/GoogleSearch.cpp \
     138 + src/modules/passive/scrape/YahooSearch.cpp \
    137 139   src/project/Project_contextmenu.cpp \
    138 140   src/models/ProjectModel.cpp \
    139 141   src/models/ProjectModel_serialization.cpp \
    skipped 98 lines
    238 240   src/modules/passive/cert/CensysFree.cpp \
    239 241   src/modules/passive/scrape/Ask.cpp \
    240 242   src/modules/passive/scrape/Baidu.cpp \
    241  - src/modules/passive/scrape/Bing.cpp \
    242 243   src/modules/passive/scrape/DogPile.cpp \
    243 244   src/modules/passive/scrape/DuckDuckGo.cpp \
    244 245   src/modules/passive/scrape/Exalead.cpp \
    245  - src/modules/passive/scrape/Yahoo.cpp \
    246 246   src/modules/passive/site/Dnsdumpster.cpp \
    247 247   src/modules/passive/site/Netcraft.cpp \
    248 248   src/modules/passive/site/PagesInventory.cpp \
    skipped 40 lines
    289 289   src/items/NSItem.h \
    290 290   src/models/ExplorerModel.h \
    291 291   src/modules/active/URLScanner.h \
    292  - src/modules/passive/ParserMethods.h \
     292 + src/modules/passive/OsintHeaders.h \
    293 293   src/modules/passive/api/ASRank.h \
    294 294   src/modules/passive/api/CirclPublic.h \
    295 295   src/modules/passive/api/HackerTarget.h \
    skipped 24 lines
    320 320   src/modules/passive/cert/Certspotter.h \
    321 321   src/modules/passive/cert/CertspotterFree.h \
    322 322   src/modules/passive/email/EmailCrawlr.h \
    323  - src/modules/passive/OsintModulesHeaders.h \
    324 323   src/modules/passive/email/Debounce.h \
    325 324   src/modules/passive/api/FullHunt.h \
    326 325   src/modules/passive/email/EmailFormat.h \
    skipped 31 lines
    358 357   src/modules/passive/mal/LeakLookup.h \
    359 358   src/modules/active/DNSScanner.h \
    360 359   src/modules/active/SSLScanner.h \
     360 + src/modules/passive/scrape/BingSearch.h \
     361 + src/modules/passive/scrape/GoogleSearch.h \
     362 + src/modules/passive/scrape/YahooSearch.h \
    361 363   src/project/Project.h \
    362 364   src/enums/AbstractEnum.h \
    363 365   src/enums/asn/ASNEnum.h \
    skipped 40 lines
    404 406   src/modules/passive/cert/CensysFree.h \
    405 407   src/modules/passive/scrape/Ask.h \
    406 408   src/modules/passive/scrape/Baidu.h \
    407  - src/modules/passive/scrape/Bing.h \
    408 409   src/modules/passive/scrape/DogPile.h \
    409 410   src/modules/passive/scrape/DuckDuckGo.h \
    410 411   src/modules/passive/scrape/Exalead.h \
    411  - src/modules/passive/scrape/Yahoo.h \
    412 412   src/modules/passive/site/Dnsdumpster.h \
    413 413   src/modules/passive/site/Netcraft.h \
    414 414   src/modules/passive/site/PagesInventory.h \
    skipped 65 lines
Please wait...
Page is in error, reload to recover