Hey hey,
This is my first post, also i am new to c programming so if i make a mistake or if i've posted this in the wrong section or something please correct me ;P.
So at tech today i was reading an online c manual and thought it would be pretty cool make to a half decent proggy.
Here is what I wrote and i was wonder if someone could give me afew links or some explain source code to me on how port scanning works.
What I need help with is how i would go about scanning a port in the while loop.Code:#include <iostream>
using namespace std;
int checkPort()
{
// Loop scans port 3 times
int i = 3;
while (i > 0){
// Scan port;
// record results in;
--i;
}
}
int main()
{
// Inputs port number
int iPort;
cout << "Enter port you want to scan: ";
cin >> iPort;
// Scans the port
checkPort();
// Prints result
cout << "Port Result: " << endl;
cout << "1. " << endl;
cout << "2. " << endl;
cout << "3. " << endl;
system("Pause");
return 0;
}
Cheers in advance.