mirror of
https://github.com/justcallmekoko/ESP32Marauder.git
synced 2025-12-12 07:40:58 -08:00
Add more port scanners
This commit is contained in:
@@ -859,6 +859,11 @@ void MenuFunctions::main(uint32_t currentTime)
|
||||
(wifi_scan_obj.currentScanMode == WIFI_PORT_SCAN_ALL) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_SSH) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_TELNET) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_DNS) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_SMTP) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_HTTP) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_HTTPS) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_RDP) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_PWN) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_PINESCAN) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_MULTISSID) ||
|
||||
@@ -947,6 +952,11 @@ void MenuFunctions::main(uint32_t currentTime)
|
||||
(wifi_scan_obj.currentScanMode == WIFI_PORT_SCAN_ALL) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_SSH) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_TELNET) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_DNS) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_SMTP) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_HTTP) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_HTTPS) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_RDP) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_PWN) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_PINESCAN) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_MULTISSID) ||
|
||||
@@ -2150,6 +2160,31 @@ void MenuFunctions::RunSetup()
|
||||
this->drawStatusBar();
|
||||
wifi_scan_obj.StartScan(WIFI_SCAN_TELNET, TFT_CYAN);
|
||||
});
|
||||
this->addNodes(&wifiScannerMenu, "SMTP Scan", TFTWHITE, NULL, SCANNERS, [this]() {
|
||||
display_obj.clearScreen();
|
||||
this->drawStatusBar();
|
||||
wifi_scan_obj.StartScan(WIFI_SCAN_SMTP, TFT_CYAN);
|
||||
});
|
||||
this->addNodes(&wifiScannerMenu, "DNS Scan", TFTLIME, NULL, SCANNERS, [this]() {
|
||||
display_obj.clearScreen();
|
||||
this->drawStatusBar();
|
||||
wifi_scan_obj.StartScan(WIFI_SCAN_DNS, TFT_CYAN);
|
||||
});
|
||||
this->addNodes(&wifiScannerMenu, "HTTP Scan", TFTSKYBLUE, NULL, SCANNERS, [this]() {
|
||||
display_obj.clearScreen();
|
||||
this->drawStatusBar();
|
||||
wifi_scan_obj.StartScan(WIFI_SCAN_HTTP, TFT_CYAN);
|
||||
});
|
||||
this->addNodes(&wifiScannerMenu, "HTTPS Scan", TFTYELLOW, NULL, SCANNERS, [this]() {
|
||||
display_obj.clearScreen();
|
||||
this->drawStatusBar();
|
||||
wifi_scan_obj.StartScan(WIFI_SCAN_HTTPS, TFT_CYAN);
|
||||
});
|
||||
this->addNodes(&wifiScannerMenu, "RDP Scan", TFTPURPLE, NULL, SCANNERS, [this]() {
|
||||
display_obj.clearScreen();
|
||||
this->drawStatusBar();
|
||||
wifi_scan_obj.StartScan(WIFI_SCAN_RDP, TFT_CYAN);
|
||||
});
|
||||
|
||||
// Build WiFi sniffer Menu
|
||||
wifiSnifferMenu.parentMenu = &wifiMenu; // Main Menu is second menu parent
|
||||
|
||||
@@ -1016,6 +1016,16 @@ void WiFiScan::StartScan(uint8_t scan_mode, uint16_t color)
|
||||
RunPortScanAll(scan_mode, color);
|
||||
else if (scan_mode == WIFI_SCAN_TELNET)
|
||||
RunPortScanAll(scan_mode, color);
|
||||
else if (scan_mode == WIFI_SCAN_SMTP)
|
||||
RunPortScanAll(scan_mode, color);
|
||||
else if (scan_mode == WIFI_SCAN_DNS)
|
||||
RunPortScanAll(scan_mode, color);
|
||||
else if (scan_mode == WIFI_SCAN_HTTP)
|
||||
RunPortScanAll(scan_mode, color);
|
||||
else if (scan_mode == WIFI_SCAN_HTTPS)
|
||||
RunPortScanAll(scan_mode, color);
|
||||
else if (scan_mode == WIFI_SCAN_RDP)
|
||||
RunPortScanAll(scan_mode, color);
|
||||
|
||||
this->currentScanMode = scan_mode;
|
||||
}
|
||||
@@ -1189,6 +1199,11 @@ void WiFiScan::StopScan(uint8_t scan_mode)
|
||||
(currentScanMode == WIFI_PORT_SCAN_ALL) ||
|
||||
(currentScanMode == WIFI_SCAN_SSH) ||
|
||||
(currentScanMode == WIFI_SCAN_TELNET) ||
|
||||
(currentScanMode == WIFI_SCAN_SMTP) ||
|
||||
(currentScanMode == WIFI_SCAN_DNS) ||
|
||||
(currentScanMode == WIFI_SCAN_HTTP) ||
|
||||
(currentScanMode == WIFI_SCAN_HTTPS) ||
|
||||
(currentScanMode == WIFI_SCAN_RDP) ||
|
||||
(currentScanMode == WIFI_SCAN_PWN) ||
|
||||
(currentScanMode == WIFI_SCAN_PINESCAN) ||
|
||||
(currentScanMode == WIFI_SCAN_MULTISSID) ||
|
||||
@@ -1573,6 +1588,16 @@ void WiFiScan::RunPortScanAll(uint8_t scan_mode, uint16_t color)
|
||||
startLog("sshscan");
|
||||
else if (scan_mode == WIFI_SCAN_TELNET)
|
||||
startLog("telnetscan");
|
||||
else if (scan_mode == WIFI_SCAN_SMTP)
|
||||
startLog("smtp");
|
||||
else if (scan_mode == WIFI_SCAN_DNS)
|
||||
startLog("dns");
|
||||
else if (scan_mode == WIFI_SCAN_HTTP)
|
||||
startLog("http");
|
||||
else if (scan_mode == WIFI_SCAN_HTTPS)
|
||||
startLog("https");
|
||||
else if (scan_mode == WIFI_SCAN_RDP)
|
||||
startLog("rdp");
|
||||
else
|
||||
startLog("portscan");
|
||||
|
||||
@@ -1602,6 +1627,16 @@ void WiFiScan::RunPortScanAll(uint8_t scan_mode, uint16_t color)
|
||||
display_obj.tft.drawCentreString("SSH Scan",120,16,2);
|
||||
else if (scan_mode == WIFI_SCAN_TELNET)
|
||||
display_obj.tft.drawCentreString("Telnet Scan",120,16,2);
|
||||
else if (scan_mode == WIFI_SCAN_SMTP)
|
||||
display_obj.tft.drawCentreString("SMTP Scan",120,16,2);
|
||||
else if (scan_mode == WIFI_SCAN_DNS)
|
||||
display_obj.tft.drawCentreString("DNS Scan",120,16,2);
|
||||
else if (scan_mode == WIFI_SCAN_HTTP)
|
||||
display_obj.tft.drawCentreString("HTTP Scan",120,16,2);
|
||||
else if (scan_mode == WIFI_SCAN_HTTPS)
|
||||
display_obj.tft.drawCentreString("HTTPS Scan",120,16,2);
|
||||
else if (scan_mode == WIFI_SCAN_RDP)
|
||||
display_obj.tft.drawCentreString("RDP Scan",120,16,2);
|
||||
#endif
|
||||
#ifdef HAS_ILI9341
|
||||
display_obj.touchToExit();
|
||||
@@ -1612,7 +1647,12 @@ void WiFiScan::RunPortScanAll(uint8_t scan_mode, uint16_t color)
|
||||
|
||||
this->current_scan_port = 0;
|
||||
if ((scan_mode == WIFI_SCAN_SSH) ||
|
||||
(scan_mode == WIFI_SCAN_TELNET))
|
||||
(scan_mode == WIFI_SCAN_TELNET) ||
|
||||
(scan_mode == WIFI_SCAN_SMTP) ||
|
||||
(scan_mode == WIFI_SCAN_DNS) ||
|
||||
(scan_mode == WIFI_SCAN_HTTP) ||
|
||||
(scan_mode == WIFI_SCAN_HTTPS) ||
|
||||
(scan_mode == WIFI_SCAN_RDP))
|
||||
this->current_scan_ip = this->gateway;
|
||||
|
||||
Serial.println("Starting Port Scan with...");
|
||||
@@ -8141,8 +8181,45 @@ void WiFiScan::pingScan(uint8_t scan_mode) {
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
int targ_port = 0;
|
||||
if (scan_mode == WIFI_SCAN_SSH)
|
||||
targ_port = 22;
|
||||
else if (scan_mode == WIFI_SCAN_TELNET)
|
||||
targ_port = 23;
|
||||
else if (scan_mode == WIFI_SCAN_SMTP)
|
||||
targ_port = 25;
|
||||
else if (scan_mode == WIFI_SCAN_DNS)
|
||||
targ_port = 53;
|
||||
else if (scan_mode == WIFI_SCAN_HTTP)
|
||||
targ_port = 80;
|
||||
else if (scan_mode == WIFI_SCAN_HTTPS)
|
||||
targ_port = 443;
|
||||
else if (scan_mode == WIFI_SCAN_RDP)
|
||||
targ_port = 3389;
|
||||
|
||||
else if (scan_mode == WIFI_SCAN_SSH) {
|
||||
if (this->current_scan_ip != IPAddress(0, 0, 0, 0)) {
|
||||
this->current_scan_ip = getNextIP(this->current_scan_ip, this->subnet);
|
||||
#ifndef HAS_DUAL_BAND
|
||||
if (this->singleARP(this->current_scan_ip)) {
|
||||
#else
|
||||
if (this->isHostAlive(this->current_scan_ip)) {
|
||||
#endif
|
||||
Serial.println(this->current_scan_ip);
|
||||
this->portScan(scan_mode, targ_port);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (!this->scan_complete) {
|
||||
this->scan_complete = true;
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.display_buffer->add("Scan complete");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*else if (scan_mode == WIFI_SCAN_SSH) {
|
||||
if (this->current_scan_ip != IPAddress(0, 0, 0, 0)) {
|
||||
this->current_scan_ip = getNextIP(this->current_scan_ip, this->subnet);
|
||||
#ifndef HAS_DUAL_BAND
|
||||
@@ -8184,7 +8261,7 @@ void WiFiScan::pingScan(uint8_t scan_mode) {
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
void WiFiScan::portScan(uint8_t scan_mode, uint16_t targ_port) {
|
||||
|
||||
@@ -130,6 +130,11 @@
|
||||
#define WIFI_ATTACK_SLEEP 61
|
||||
#define WIFI_ATTACK_SLEEP_TARGETED 62
|
||||
#define GPS_POI 63
|
||||
#define WIFI_SCAN_DNS 64
|
||||
#define WIFI_SCAN_HTTP 65
|
||||
#define WIFI_SCAN_HTTPS 66
|
||||
#define WIFI_SCAN_SMTP 67
|
||||
#define WIFI_SCAN_RDP 68
|
||||
|
||||
#define BASE_MULTIPLIER 4
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
//#define MARAUDER_CARDPUTER
|
||||
//// END BOARD TARGETS
|
||||
|
||||
#define MARAUDER_VERSION "v1.8.5"
|
||||
#define MARAUDER_VERSION "v1.8.6"
|
||||
|
||||
#define GRAPH_REFRESH 100
|
||||
|
||||
|
||||
Reference in New Issue
Block a user