if I type in 'nmap'; then it does as it's supposed to and goes to the first if statement. However if I type in 'nmap 23.56.132.98' it doesn't do the if-statement it was supposed to and goes to the first one.
Try using getline(cin,input); instead of cin >> input;. The reason for this is because when you type in "nmap 23.56.132.98" std::cin only reads until any whitespace, in this case it will stop after nmap which makes your fist if statement true.