<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Problem mit Portscanner]]></title><description><![CDATA[<p>Hi Leut ich hab n Kleines Problem mit mein Portscanner .<br />
mein portscanner soll jeden port den er scannt in eine listbox schreiben soweit sogut das functioniert ja prob: er schreibt erst nach den 5 oder 6 port was in die listbox sonst zeigt er nichts an achja ich lese exat nur 10 ports aus mehr muss er nicht können</p>
<p>thx im voraus <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
<p>hier mein Code:</p>
<pre><code>[code]
// port.cpp
#include &quot;stdafx.h&quot;
#include &quot;resource.h&quot;

#include &lt;winsock.h&gt;
#include &lt;stdlib.h&gt;
#include &lt;commctrl.h&gt;

#pragma comment(lib, &quot;ws2_32.lib&quot;)
#pragma comment(lib, &quot;comctl32.lib&quot;)

LRESULT CALLBACK	DlgProc( HWND, UINT, WPARAM, LPARAM );

void ScanForOpenPorts(PVOID pVoid);

HINSTANCE hComCtl;

char g_szIpAdress[50];

int g_iPortStart1, 
	g_iPortStart2,
	g_iPortStart3,
	g_iPortStart4,
	g_iPortStart5,
	g_iPortStart6,
	g_iPortStart7,
	g_iPortStart8,
	g_iPortStart9,
	g_iPortStart10;

int iDif;

HWND g_hWndList, g_hDlg, g_hWndStatus;

int APIENTRY WinMain(HINSTANCE hInstance,
                     HINSTANCE hPrevInstance,
                     LPSTR     lpCmdLine,
                     int       nCmdShow )
{
	hComCtl = LoadLibrary(TEXT(&quot;comctl32.dll&quot;));
	DialogBox(hInstance, (LPCTSTR)IDD_SCANNER, NULL, (DLGPROC)DlgProc);
	return 0;
}

LRESULT CALLBACK DlgProc( HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam )
{
	char szPortStart1[10];
	char szPortStart2[10];
	char szPortStart3[10];
	char szPortStart4[10];
	char szPortStart5[10];
	char szPortStart6[10];
	char szPortStart7[10];
	char szPortStart8[10];
	char szPortStart9[10];
	char szPortStart10[10];

	static HWND hWndIP, 
				hWndSrtPrt1 , 
				hWndSrtPrt2, 
				hWndSrtPrt3, 
				hWndSrtPrt4, 
				hWndSrtPrt5, 
				hWndSrtPrt6, 
				hWndSrtPrt7, 
				hWndSrtPrt8, 
				hWndSrtPrt9, 
				hWndSrtPrt10;

	switch( message )
	{
		case WM_INITDIALOG:
			SetWindowText(GetDlgItem(hDlg, IDC_IPADDRESS),		&quot;127.0.0.1&quot;);
			SetWindowText(GetDlgItem(hDlg, IDC_PORTSTART1),		&quot;21&quot;);//ftp
			SetWindowText(GetDlgItem(hDlg, IDC_PORTSTART2),		&quot;25&quot;);//smtp
			SetWindowText(GetDlgItem(hDlg, IDC_PORTSTART3),		&quot;80&quot;);//http
			SetWindowText(GetDlgItem(hDlg, IDC_PORTSTART4),		&quot;110&quot;);//pop3
			SetWindowText(GetDlgItem(hDlg, IDC_PORTSTART5),		&quot;143&quot;);//imap
			SetWindowText(GetDlgItem(hDlg, IDC_PORTSTART6),		&quot;443&quot;);//https
			SetWindowText(GetDlgItem(hDlg, IDC_PORTSTART7),		&quot;3306&quot;);//mysql
			SetWindowText(GetDlgItem(hDlg, IDC_PORTSTART8),		&quot;8009&quot;);//ajp
			SetWindowText(GetDlgItem(hDlg, IDC_PORTSTART9),		&quot;8080&quot;);//httpalt
			SetWindowText(GetDlgItem(hDlg, IDC_PORTSTART10),	&quot;65535&quot;);//chat

			hWndIP		= GetDlgItem(hDlg, IDC_IPADDRESS);
			hWndSrtPrt1	= GetDlgItem(hDlg, IDC_PORTSTART1);
			hWndSrtPrt2	= GetDlgItem(hDlg, IDC_PORTSTART2);
			hWndSrtPrt3	= GetDlgItem(hDlg, IDC_PORTSTART3);
			hWndSrtPrt4	= GetDlgItem(hDlg, IDC_PORTSTART4);
			hWndSrtPrt5	= GetDlgItem(hDlg, IDC_PORTSTART5);
			hWndSrtPrt6	= GetDlgItem(hDlg, IDC_PORTSTART6);
			hWndSrtPrt7	= GetDlgItem(hDlg, IDC_PORTSTART7);
			hWndSrtPrt8	= GetDlgItem(hDlg, IDC_PORTSTART8);
			hWndSrtPrt9	= GetDlgItem(hDlg, IDC_PORTSTART9);
			hWndSrtPrt10	= GetDlgItem(hDlg, IDC_PORTSTART10);
			g_hWndList  = GetDlgItem(hDlg, IDC_OPENPORTS);
			g_hWndStatus  = GetDlgItem(hDlg, IDC_STATUS);
			g_hDlg		= hDlg;

			return TRUE;

		case WM_COMMAND:
			switch(LOWORD(wParam))
			{
				case IDOK:
					SendMessage(hWndIP, WM_GETTEXT, (WPARAM)sizeof(g_szIpAdress), (LPARAM)g_szIpAdress);
					SendMessage(hWndSrtPrt1, WM_GETTEXT, (WPARAM)sizeof(szPortStart1), (LPARAM)szPortStart1);
					SendMessage(hWndSrtPrt2, WM_GETTEXT, (WPARAM)sizeof(szPortStart2), (LPARAM)szPortStart2);
					SendMessage(hWndSrtPrt3, WM_GETTEXT, (WPARAM)sizeof(szPortStart3), (LPARAM)szPortStart3);
					SendMessage(hWndSrtPrt4, WM_GETTEXT, (WPARAM)sizeof(szPortStart4), (LPARAM)szPortStart4);
					SendMessage(hWndSrtPrt5, WM_GETTEXT, (WPARAM)sizeof(szPortStart5), (LPARAM)szPortStart5);
					SendMessage(hWndSrtPrt6, WM_GETTEXT, (WPARAM)sizeof(szPortStart6), (LPARAM)szPortStart6);
					SendMessage(hWndSrtPrt7, WM_GETTEXT, (WPARAM)sizeof(szPortStart7), (LPARAM)szPortStart7);
					SendMessage(hWndSrtPrt8, WM_GETTEXT, (WPARAM)sizeof(szPortStart8), (LPARAM)szPortStart8);
					SendMessage(hWndSrtPrt9, WM_GETTEXT, (WPARAM)sizeof(szPortStart9), (LPARAM)szPortStart9);
					SendMessage(hWndSrtPrt10, WM_GETTEXT, (WPARAM)sizeof(szPortStart10), (LPARAM)szPortStart10);

					g_iPortStart1 = atoi(szPortStart1);
					g_iPortStart2 = atoi(szPortStart2);
					g_iPortStart3 = atoi(szPortStart3);
					g_iPortStart4 = atoi(szPortStart4);
					g_iPortStart5 = atoi(szPortStart5);
					g_iPortStart6 = atoi(szPortStart6);
					g_iPortStart7 = atoi(szPortStart7);
					g_iPortStart8 = atoi(szPortStart8);
					g_iPortStart9 = atoi(szPortStart9);
					g_iPortStart10 = atoi(szPortStart10);
					ScanForOpenPorts(0);
					break;
				case IDCANCEL:
					EndDialog(hDlg, LOWORD(wParam));
					return TRUE;
			}
			break;
	}
    return FALSE;
}

void ScanForOpenPorts(PVOID pVoid)
{

	char Buffer[100];
	int contr, a,b,c,d,e,f,g,h,i,j;
	SOCKET sock = INVALID_SOCKET;
	WORD wVersionReg = MAKEWORD(1, 1); 
	WSADATA wsaData;

	iDif =  g_iPortStart1,
			g_iPortStart2,
			g_iPortStart3,
			g_iPortStart4,
			g_iPortStart5,
			g_iPortStart6,
			g_iPortStart7,
			g_iPortStart8,
			g_iPortStart9,
			g_iPortStart10;

	if (int err = WSAStartup(wVersionReg, &amp;wsaData) != 0)
	{
		SendMessage(g_hWndList, LB_ADDSTRING, (WPARAM)0, (LPARAM)&quot;-Err: Winsock32.dll&quot;);
	}

	struct sockaddr_in server;   
	server.sin_addr.s_addr = inet_addr(g_szIpAdress); 
	server.sin_family = AF_INET; 

	if (a = g_iPortStart1) 
    { 

		server.sin_port = htons(a); 

		if ((sock = socket(AF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET) 
		{ 
			SendMessage(g_hWndList, LB_ADDSTRING, (WPARAM)0, (LPARAM)&quot;-Err: Port erstellen&quot;);
		} 
		contr = connect(sock, (sockaddr *) &amp;server ,sizeof(server)); 
		if (contr &lt; 0)
		{ //Port Closed
			wsprintf(Buffer, &quot;Port %d is closed //FTP&quot;, a);
			SendMessage(g_hWndList, LB_ADDSTRING, (WPARAM)0, (LPARAM)Buffer);
		}
		else 
		{
			//Port Open !!!
			wsprintf(Buffer, &quot;Port %d is open //FTP&quot;, a);
			SendMessage(g_hWndList, LB_ADDSTRING, (WPARAM)0, (LPARAM)Buffer);
		}
		closesocket(sock); 
		SendMessage(g_hWndList, WM_VSCROLL, (WPARAM)MAKEWPARAM(SB_PAGEDOWN, 0), (LPARAM)0);

	} 

	if (b = g_iPortStart2) 
    { 

		server.sin_port = htons(b); 

		if ((sock = socket(AF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET) 
		{ 
			SendMessage(g_hWndList, LB_ADDSTRING, (WPARAM)0, (LPARAM)&quot;-Err: Port erstellen&quot;);
		} 
		contr = connect(sock, (sockaddr *) &amp;server ,sizeof(server)); 
		if (contr &lt; 0)
		{ //Port Closed
			wsprintf(Buffer, &quot;Port %d is closed //SMTP&quot;, b);
			SendMessage(g_hWndList, LB_ADDSTRING, (WPARAM)0, (LPARAM)Buffer);
		}
		else 
		{
			//Port Open !!!
			wsprintf(Buffer, &quot;Port %d is open //SMTP&quot;, b);
			SendMessage(g_hWndList, LB_ADDSTRING, (WPARAM)0, (LPARAM)Buffer);
		}
		closesocket(sock); 
		SendMessage(g_hWndList, WM_VSCROLL, (WPARAM)MAKEWPARAM(SB_PAGEDOWN, 0), (LPARAM)0);

	}
	if (c = g_iPortStart3) 
    { 

		server.sin_port = htons(c); 

		if ((sock = socket(AF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET) 
		{ 
			SendMessage(g_hWndList, LB_ADDSTRING, (WPARAM)0, (LPARAM)&quot;-Err: Port erstellen&quot;);
		} 
		contr = connect(sock, (sockaddr *) &amp;server ,sizeof(server)); 
		if (contr &lt; 0)
		{ //Port Closed
			wsprintf(Buffer, &quot;Port %d is closed //HTTP&quot;, c);
			SendMessage(g_hWndList, LB_ADDSTRING, (WPARAM)0, (LPARAM)Buffer);
		}
		else 
		{
			//Port Open !!!
			wsprintf(Buffer, &quot;Port %d is open //HTTP&quot;, c);
			SendMessage(g_hWndList, LB_ADDSTRING, (WPARAM)0, (LPARAM)Buffer);
		}
		closesocket(sock); 
		SendMessage(g_hWndList, WM_VSCROLL, (WPARAM)MAKEWPARAM(SB_PAGEDOWN, 0), (LPARAM)0);

	}
	if (d = g_iPortStart4) 
    { 

		server.sin_port = htons(c); 

		if ((sock = socket(AF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET) 
		{ 
			SendMessage(g_hWndList, LB_ADDSTRING, (WPARAM)0, (LPARAM)&quot;-Err: Port erstellen&quot;);
		} 
		contr = connect(sock, (sockaddr *) &amp;server ,sizeof(server)); 
		if (contr &lt; 0)
		{ //Port Closed
			wsprintf(Buffer, &quot;Port %d is closed //POP3&quot;, d);
			SendMessage(g_hWndList, LB_ADDSTRING, (WPARAM)0, (LPARAM)Buffer);
		}
		else 
		{
			//Port Open !!!
			wsprintf(Buffer, &quot;Port %d is open //POP3&quot;, d);
			SendMessage(g_hWndList, LB_ADDSTRING, (WPARAM)0, (LPARAM)Buffer);
		}
		closesocket(sock); 
		SendMessage(g_hWndList, WM_VSCROLL, (WPARAM)MAKEWPARAM(SB_PAGEDOWN, 0), (LPARAM)0);

	}
	if (e = g_iPortStart5) 
    { 

		server.sin_port = htons(e); 

		if ((sock = socket(AF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET) 
		{ 
			SendMessage(g_hWndList, LB_ADDSTRING, (WPARAM)0, (LPARAM)&quot;-Err: Port erstellen&quot;);
		} 
		contr = connect(sock, (sockaddr *) &amp;server ,sizeof(server)); 
		if (contr &lt; 0)
		{ //Port Closed
			wsprintf(Buffer, &quot;Port %d is closed //IMAP&quot;, e);
			SendMessage(g_hWndList, LB_ADDSTRING, (WPARAM)0, (LPARAM)Buffer);
		}
		else 
		{
			//Port Open !!!
			wsprintf(Buffer, &quot;Port %d is open //IMAP&quot;, e);
			SendMessage(g_hWndList, LB_ADDSTRING, (WPARAM)0, (LPARAM)Buffer);
		}
		closesocket(sock); 
		SendMessage(g_hWndList, WM_VSCROLL, (WPARAM)MAKEWPARAM(SB_PAGEDOWN, 0), (LPARAM)0);

	}
	if (f = g_iPortStart6) 
    { 

		server.sin_port = htons(f); 

		if ((sock = socket(AF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET) 
		{ 
			SendMessage(g_hWndList, LB_ADDSTRING, (WPARAM)0, (LPARAM)&quot;-Err: Port erstellen&quot;);
		} 
		contr = connect(sock, (sockaddr *) &amp;server ,sizeof(server)); 
		if (contr &lt; 0)
		{ //Port Closed
			wsprintf(Buffer, &quot;Port %d is closed //HTTPS&quot;, f);
			SendMessage(g_hWndList, LB_ADDSTRING, (WPARAM)0, (LPARAM)Buffer);
		}
		else 
		{
			//Port Open !!!
			wsprintf(Buffer, &quot;Port %d is open //HTTPS&quot;, f);
			SendMessage(g_hWndList, LB_ADDSTRING, (WPARAM)0, (LPARAM)Buffer);
		}
		closesocket(sock); 
		SendMessage(g_hWndList, WM_VSCROLL, (WPARAM)MAKEWPARAM(SB_PAGEDOWN, 0), (LPARAM)0);

	}
	if (g = g_iPortStart7) 
    { 

		server.sin_port = htons(g); 

		if ((sock = socket(AF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET) 
		{ 
			SendMessage(g_hWndList, LB_ADDSTRING, (WPARAM)0, (LPARAM)&quot;-Err: Port erstellen&quot;);
		} 
		contr = connect(sock, (sockaddr *) &amp;server ,sizeof(server)); 
		if (contr &lt; 0)
		{ //Port Closed
			wsprintf(Buffer, &quot;Port %d is closed //MYSQL&quot;, g);
			SendMessage(g_hWndList, LB_ADDSTRING, (WPARAM)0, (LPARAM)Buffer);
		}
		else 
		{
			//Port Open !!!
			wsprintf(Buffer, &quot;Port %d is open //MYSQL&quot;, g);
			SendMessage(g_hWndList, LB_ADDSTRING, (WPARAM)0, (LPARAM)Buffer);
		}
		closesocket(sock); 
		SendMessage(g_hWndList, WM_VSCROLL, (WPARAM)MAKEWPARAM(SB_PAGEDOWN, 0), (LPARAM)0);

	}
	if (h = g_iPortStart8) 
    { 

		server.sin_port = htons(h); 

		if ((sock = socket(AF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET) 
		{ 
			SendMessage(g_hWndList, LB_ADDSTRING, (WPARAM)0, (LPARAM)&quot;-Err: Port erstellen&quot;);
		} 

		contr = connect(sock, (sockaddr *) &amp;server ,sizeof(server)); 
		if (contr &lt; 0)
		{ //Port Closed
			wsprintf(Buffer, &quot;Port %d is closed //AJP&quot;, h);
			SendMessage(g_hWndList, LB_ADDSTRING, (WPARAM)0, (LPARAM)Buffer);
		}
		else 
		{
			//Port Open !!!
			wsprintf(Buffer, &quot;Port %d is open //AJP&quot;, h);
			SendMessage(g_hWndList, LB_ADDSTRING, (WPARAM)0, (LPARAM)Buffer);
		}
		closesocket(sock); 
		SendMessage(g_hWndList, WM_VSCROLL, (WPARAM)MAKEWPARAM(SB_PAGEDOWN, 0), (LPARAM)0);

	}
	if (i = g_iPortStart9) 
    { 

		server.sin_port = htons(i); 

		if ((sock = socket(AF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET) 
		{ 
			SendMessage(g_hWndList, LB_ADDSTRING, (WPARAM)0, (LPARAM)&quot;-Err: Port erstellen&quot;);
		} 
		contr = connect(sock, (sockaddr *) &amp;server ,sizeof(server)); 
		if (contr &lt; 0)
		{ //Port Closed
			wsprintf(Buffer, &quot;Port %d is closed //HTTPALT&quot;, i);
			SendMessage(g_hWndList, LB_ADDSTRING, (WPARAM)0, (LPARAM)Buffer);
		}
		else 
		{
			//Port Open !!!
			wsprintf(Buffer, &quot;Port %d is open //HTTPALT&quot;, i);
			SendMessage(g_hWndList, LB_ADDSTRING, (WPARAM)0, (LPARAM)Buffer);
		}
		closesocket(sock); 
		SendMessage(g_hWndList, WM_VSCROLL, (WPARAM)MAKEWPARAM(SB_PAGEDOWN, 0), (LPARAM)0);

	}

	if (j = g_iPortStart10) 
    { 

		server.sin_port = htons(j); 

		if ((sock = socket(AF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET) 
		{ 
			SendMessage(g_hWndList, LB_ADDSTRING, (WPARAM)0, (LPARAM)&quot;-Err: Port erstellen&quot;);
		} 
		contr = connect(sock, (sockaddr *) &amp;server ,sizeof(server)); 
		if (contr &lt; 0)
		{ //Port Closed
			wsprintf(Buffer, &quot;Port %d is closed //CHAT&quot;, j);
			SendMessage(g_hWndList, LB_ADDSTRING, (WPARAM)0, (LPARAM)Buffer);
		}
		else 
		{
			//Port Open !!!
			wsprintf(Buffer, &quot;Port %d is open //CHAT&quot;, j);
			SendMessage(g_hWndList, LB_ADDSTRING, (WPARAM)0, (LPARAM)Buffer);
		}
		closesocket(sock); 
		SendMessage(g_hWndList, WM_VSCROLL, (WPARAM)MAKEWPARAM(SB_PAGEDOWN, 0), (LPARAM)0);

	}

  WSACleanup(); 
}
[/code]
</code></pre>
<pre><code class="language-cpp">[code]
//port.rc
//Microsoft Developer Studio generated resource script.
//
#include &quot;resource.h&quot;

#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include &quot;afxres.h&quot;

/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS

/////////////////////////////////////////////////////////////////////////////
// Deutsch (Deutschland) resources

#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_DEU)
#ifdef _WIN32
LANGUAGE LANG_GERMAN, SUBLANG_GERMAN
#pragma code_page(1252)
#endif //_WIN32

#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//

1 TEXTINCLUDE DISCARDABLE 
BEGIN
    &quot;resource.h\0&quot;
END

2 TEXTINCLUDE DISCARDABLE 
BEGIN
    &quot;#include &quot;&quot;afxres.h&quot;&quot;\r\n&quot;
    &quot;\0&quot;
END

3 TEXTINCLUDE DISCARDABLE 
BEGIN
    &quot;\r\n&quot;
    &quot;\0&quot;
END

#endif    // APSTUDIO_INVOKED

/////////////////////////////////////////////////////////////////////////////
//
// Icon
//

// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDI_MAINFRAME           ICON    DISCARDABLE     &quot;Res\\Icons\\port.ico&quot;
IDI_SCAN                ICON    DISCARDABLE     &quot;Res\\Icons\\connected.ico&quot;

/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//

IDD_SCANNER DIALOGEX 0, 0, 223, 252
STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_TOOLWINDOW
CAPTION &quot;  Port Scanner&quot;
FONT 8, &quot;MS Sans Serif&quot;
BEGIN
    DEFPUSHBUTTON   &quot;Scan Ports&quot;,IDOK,111,231,50,14
    PUSHBUTTON      &quot;Beenden&quot;,IDCANCEL,166,231,50,14
    LISTBOX         IDC_OPENPORTS,19,170,183,41,LBS_NOINTEGRALHEIGHT | 
                    WS_VSCROLL | WS_TABSTOP
    EDITTEXT        IDC_PORTSTART1,50,68,40,12,ES_AUTOHSCROLL
    CONTROL         &quot;IPAddress1&quot;,IDC_IPADDRESS,&quot;SysIPAddress32&quot;,WS_TABSTOP,
                    101,20,100,12
    LTEXT           &quot;IP Adresse : &quot;,IDC_STATIC,53,20,39,12,SS_CENTERIMAGE
    ICON            IDI_SCAN,IDC_STATIC,14,14,21,20,SS_REALSIZEIMAGE,
                    WS_EX_DLGMODALFRAME
    EDITTEXT        IDC_PORTSTART2,50,82,40,12,ES_AUTOHSCROLL
    EDITTEXT        IDC_PORTSTART3,50,97,40,12,ES_AUTOHSCROLL
    EDITTEXT        IDC_PORTSTART4,50,111,40,12,ES_AUTOHSCROLL
    EDITTEXT        IDC_PORTSTART5,50,126,40,12,ES_AUTOHSCROLL
    EDITTEXT        IDC_PORTSTART6,133,68,40,12,ES_AUTOHSCROLL
    EDITTEXT        IDC_PORTSTART7,133,82,40,12,ES_AUTOHSCROLL
    EDITTEXT        IDC_PORTSTART8,133,97,40,12,ES_AUTOHSCROLL
    EDITTEXT        IDC_PORTSTART9,133,111,40,12,ES_AUTOHSCROLL
    EDITTEXT        IDC_PORTSTART10,133,126,40,12,ES_AUTOHSCROLL
    GROUPBOX        &quot;&quot;,IDC_STATIC,7,7,209,37,BS_CENTER
    GROUPBOX        &quot;Ports : &quot;,IDC_STATIC,7,50,209,102,BS_CENTER
    GROUPBOX        &quot;Status&quot;,IDC_STATIC,7,157,209,65,BS_CENTER
END

/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
//

#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO DISCARDABLE 
BEGIN
    IDD_SCANNER, DIALOG
    BEGIN
        LEFTMARGIN, 7
        RIGHTMARGIN, 216
        TOPMARGIN, 7
        BOTTOMMARGIN, 245
    END
END
#endif    // APSTUDIO_INVOKED

/////////////////////////////////////////////////////////////////////////////
//
// 24
//

1                       24      DISCARDABLE     &quot;Res\\Style\\xpstyle.xml&quot;
#endif    // Deutsch (Deutschland) resources
/////////////////////////////////////////////////////////////////////////////

#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//

/////////////////////////////////////////////////////////////////////////////
#endif    // not APSTUDIO_INVOKED

[/code]
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/133869/problem-mit-portscanner</link><generator>RSS for Node</generator><lastBuildDate>Sat, 11 Jul 2026 17:34:32 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/133869.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 21 Jan 2006 18:19:10 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Problem mit Portscanner on Sat, 21 Jan 2006 18:19:10 GMT]]></title><description><![CDATA[<p>Hi Leut ich hab n Kleines Problem mit mein Portscanner .<br />
mein portscanner soll jeden port den er scannt in eine listbox schreiben soweit sogut das functioniert ja prob: er schreibt erst nach den 5 oder 6 port was in die listbox sonst zeigt er nichts an achja ich lese exat nur 10 ports aus mehr muss er nicht können</p>
<p>thx im voraus <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
<p>hier mein Code:</p>
<pre><code>[code]
// port.cpp
#include &quot;stdafx.h&quot;
#include &quot;resource.h&quot;

#include &lt;winsock.h&gt;
#include &lt;stdlib.h&gt;
#include &lt;commctrl.h&gt;

#pragma comment(lib, &quot;ws2_32.lib&quot;)
#pragma comment(lib, &quot;comctl32.lib&quot;)

LRESULT CALLBACK	DlgProc( HWND, UINT, WPARAM, LPARAM );

void ScanForOpenPorts(PVOID pVoid);

HINSTANCE hComCtl;

char g_szIpAdress[50];

int g_iPortStart1, 
	g_iPortStart2,
	g_iPortStart3,
	g_iPortStart4,
	g_iPortStart5,
	g_iPortStart6,
	g_iPortStart7,
	g_iPortStart8,
	g_iPortStart9,
	g_iPortStart10;

int iDif;

HWND g_hWndList, g_hDlg, g_hWndStatus;

int APIENTRY WinMain(HINSTANCE hInstance,
                     HINSTANCE hPrevInstance,
                     LPSTR     lpCmdLine,
                     int       nCmdShow )
{
	hComCtl = LoadLibrary(TEXT(&quot;comctl32.dll&quot;));
	DialogBox(hInstance, (LPCTSTR)IDD_SCANNER, NULL, (DLGPROC)DlgProc);
	return 0;
}

LRESULT CALLBACK DlgProc( HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam )
{
	char szPortStart1[10];
	char szPortStart2[10];
	char szPortStart3[10];
	char szPortStart4[10];
	char szPortStart5[10];
	char szPortStart6[10];
	char szPortStart7[10];
	char szPortStart8[10];
	char szPortStart9[10];
	char szPortStart10[10];

	static HWND hWndIP, 
				hWndSrtPrt1 , 
				hWndSrtPrt2, 
				hWndSrtPrt3, 
				hWndSrtPrt4, 
				hWndSrtPrt5, 
				hWndSrtPrt6, 
				hWndSrtPrt7, 
				hWndSrtPrt8, 
				hWndSrtPrt9, 
				hWndSrtPrt10;

	switch( message )
	{
		case WM_INITDIALOG:
			SetWindowText(GetDlgItem(hDlg, IDC_IPADDRESS),		&quot;127.0.0.1&quot;);
			SetWindowText(GetDlgItem(hDlg, IDC_PORTSTART1),		&quot;21&quot;);//ftp
			SetWindowText(GetDlgItem(hDlg, IDC_PORTSTART2),		&quot;25&quot;);//smtp
			SetWindowText(GetDlgItem(hDlg, IDC_PORTSTART3),		&quot;80&quot;);//http
			SetWindowText(GetDlgItem(hDlg, IDC_PORTSTART4),		&quot;110&quot;);//pop3
			SetWindowText(GetDlgItem(hDlg, IDC_PORTSTART5),		&quot;143&quot;);//imap
			SetWindowText(GetDlgItem(hDlg, IDC_PORTSTART6),		&quot;443&quot;);//https
			SetWindowText(GetDlgItem(hDlg, IDC_PORTSTART7),		&quot;3306&quot;);//mysql
			SetWindowText(GetDlgItem(hDlg, IDC_PORTSTART8),		&quot;8009&quot;);//ajp
			SetWindowText(GetDlgItem(hDlg, IDC_PORTSTART9),		&quot;8080&quot;);//httpalt
			SetWindowText(GetDlgItem(hDlg, IDC_PORTSTART10),	&quot;65535&quot;);//chat

			hWndIP		= GetDlgItem(hDlg, IDC_IPADDRESS);
			hWndSrtPrt1	= GetDlgItem(hDlg, IDC_PORTSTART1);
			hWndSrtPrt2	= GetDlgItem(hDlg, IDC_PORTSTART2);
			hWndSrtPrt3	= GetDlgItem(hDlg, IDC_PORTSTART3);
			hWndSrtPrt4	= GetDlgItem(hDlg, IDC_PORTSTART4);
			hWndSrtPrt5	= GetDlgItem(hDlg, IDC_PORTSTART5);
			hWndSrtPrt6	= GetDlgItem(hDlg, IDC_PORTSTART6);
			hWndSrtPrt7	= GetDlgItem(hDlg, IDC_PORTSTART7);
			hWndSrtPrt8	= GetDlgItem(hDlg, IDC_PORTSTART8);
			hWndSrtPrt9	= GetDlgItem(hDlg, IDC_PORTSTART9);
			hWndSrtPrt10	= GetDlgItem(hDlg, IDC_PORTSTART10);
			g_hWndList  = GetDlgItem(hDlg, IDC_OPENPORTS);
			g_hWndStatus  = GetDlgItem(hDlg, IDC_STATUS);
			g_hDlg		= hDlg;

			return TRUE;

		case WM_COMMAND:
			switch(LOWORD(wParam))
			{
				case IDOK:
					SendMessage(hWndIP, WM_GETTEXT, (WPARAM)sizeof(g_szIpAdress), (LPARAM)g_szIpAdress);
					SendMessage(hWndSrtPrt1, WM_GETTEXT, (WPARAM)sizeof(szPortStart1), (LPARAM)szPortStart1);
					SendMessage(hWndSrtPrt2, WM_GETTEXT, (WPARAM)sizeof(szPortStart2), (LPARAM)szPortStart2);
					SendMessage(hWndSrtPrt3, WM_GETTEXT, (WPARAM)sizeof(szPortStart3), (LPARAM)szPortStart3);
					SendMessage(hWndSrtPrt4, WM_GETTEXT, (WPARAM)sizeof(szPortStart4), (LPARAM)szPortStart4);
					SendMessage(hWndSrtPrt5, WM_GETTEXT, (WPARAM)sizeof(szPortStart5), (LPARAM)szPortStart5);
					SendMessage(hWndSrtPrt6, WM_GETTEXT, (WPARAM)sizeof(szPortStart6), (LPARAM)szPortStart6);
					SendMessage(hWndSrtPrt7, WM_GETTEXT, (WPARAM)sizeof(szPortStart7), (LPARAM)szPortStart7);
					SendMessage(hWndSrtPrt8, WM_GETTEXT, (WPARAM)sizeof(szPortStart8), (LPARAM)szPortStart8);
					SendMessage(hWndSrtPrt9, WM_GETTEXT, (WPARAM)sizeof(szPortStart9), (LPARAM)szPortStart9);
					SendMessage(hWndSrtPrt10, WM_GETTEXT, (WPARAM)sizeof(szPortStart10), (LPARAM)szPortStart10);

					g_iPortStart1 = atoi(szPortStart1);
					g_iPortStart2 = atoi(szPortStart2);
					g_iPortStart3 = atoi(szPortStart3);
					g_iPortStart4 = atoi(szPortStart4);
					g_iPortStart5 = atoi(szPortStart5);
					g_iPortStart6 = atoi(szPortStart6);
					g_iPortStart7 = atoi(szPortStart7);
					g_iPortStart8 = atoi(szPortStart8);
					g_iPortStart9 = atoi(szPortStart9);
					g_iPortStart10 = atoi(szPortStart10);
					ScanForOpenPorts(0);
					break;
				case IDCANCEL:
					EndDialog(hDlg, LOWORD(wParam));
					return TRUE;
			}
			break;
	}
    return FALSE;
}

void ScanForOpenPorts(PVOID pVoid)
{

	char Buffer[100];
	int contr, a,b,c,d,e,f,g,h,i,j;
	SOCKET sock = INVALID_SOCKET;
	WORD wVersionReg = MAKEWORD(1, 1); 
	WSADATA wsaData;

	iDif =  g_iPortStart1,
			g_iPortStart2,
			g_iPortStart3,
			g_iPortStart4,
			g_iPortStart5,
			g_iPortStart6,
			g_iPortStart7,
			g_iPortStart8,
			g_iPortStart9,
			g_iPortStart10;

	if (int err = WSAStartup(wVersionReg, &amp;wsaData) != 0)
	{
		SendMessage(g_hWndList, LB_ADDSTRING, (WPARAM)0, (LPARAM)&quot;-Err: Winsock32.dll&quot;);
	}

	struct sockaddr_in server;   
	server.sin_addr.s_addr = inet_addr(g_szIpAdress); 
	server.sin_family = AF_INET; 

	if (a = g_iPortStart1) 
    { 

		server.sin_port = htons(a); 

		if ((sock = socket(AF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET) 
		{ 
			SendMessage(g_hWndList, LB_ADDSTRING, (WPARAM)0, (LPARAM)&quot;-Err: Port erstellen&quot;);
		} 
		contr = connect(sock, (sockaddr *) &amp;server ,sizeof(server)); 
		if (contr &lt; 0)
		{ //Port Closed
			wsprintf(Buffer, &quot;Port %d is closed //FTP&quot;, a);
			SendMessage(g_hWndList, LB_ADDSTRING, (WPARAM)0, (LPARAM)Buffer);
		}
		else 
		{
			//Port Open !!!
			wsprintf(Buffer, &quot;Port %d is open //FTP&quot;, a);
			SendMessage(g_hWndList, LB_ADDSTRING, (WPARAM)0, (LPARAM)Buffer);
		}
		closesocket(sock); 
		SendMessage(g_hWndList, WM_VSCROLL, (WPARAM)MAKEWPARAM(SB_PAGEDOWN, 0), (LPARAM)0);

	} 

	if (b = g_iPortStart2) 
    { 

		server.sin_port = htons(b); 

		if ((sock = socket(AF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET) 
		{ 
			SendMessage(g_hWndList, LB_ADDSTRING, (WPARAM)0, (LPARAM)&quot;-Err: Port erstellen&quot;);
		} 
		contr = connect(sock, (sockaddr *) &amp;server ,sizeof(server)); 
		if (contr &lt; 0)
		{ //Port Closed
			wsprintf(Buffer, &quot;Port %d is closed //SMTP&quot;, b);
			SendMessage(g_hWndList, LB_ADDSTRING, (WPARAM)0, (LPARAM)Buffer);
		}
		else 
		{
			//Port Open !!!
			wsprintf(Buffer, &quot;Port %d is open //SMTP&quot;, b);
			SendMessage(g_hWndList, LB_ADDSTRING, (WPARAM)0, (LPARAM)Buffer);
		}
		closesocket(sock); 
		SendMessage(g_hWndList, WM_VSCROLL, (WPARAM)MAKEWPARAM(SB_PAGEDOWN, 0), (LPARAM)0);

	}
	if (c = g_iPortStart3) 
    { 

		server.sin_port = htons(c); 

		if ((sock = socket(AF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET) 
		{ 
			SendMessage(g_hWndList, LB_ADDSTRING, (WPARAM)0, (LPARAM)&quot;-Err: Port erstellen&quot;);
		} 
		contr = connect(sock, (sockaddr *) &amp;server ,sizeof(server)); 
		if (contr &lt; 0)
		{ //Port Closed
			wsprintf(Buffer, &quot;Port %d is closed //HTTP&quot;, c);
			SendMessage(g_hWndList, LB_ADDSTRING, (WPARAM)0, (LPARAM)Buffer);
		}
		else 
		{
			//Port Open !!!
			wsprintf(Buffer, &quot;Port %d is open //HTTP&quot;, c);
			SendMessage(g_hWndList, LB_ADDSTRING, (WPARAM)0, (LPARAM)Buffer);
		}
		closesocket(sock); 
		SendMessage(g_hWndList, WM_VSCROLL, (WPARAM)MAKEWPARAM(SB_PAGEDOWN, 0), (LPARAM)0);

	}
	if (d = g_iPortStart4) 
    { 

		server.sin_port = htons(c); 

		if ((sock = socket(AF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET) 
		{ 
			SendMessage(g_hWndList, LB_ADDSTRING, (WPARAM)0, (LPARAM)&quot;-Err: Port erstellen&quot;);
		} 
		contr = connect(sock, (sockaddr *) &amp;server ,sizeof(server)); 
		if (contr &lt; 0)
		{ //Port Closed
			wsprintf(Buffer, &quot;Port %d is closed //POP3&quot;, d);
			SendMessage(g_hWndList, LB_ADDSTRING, (WPARAM)0, (LPARAM)Buffer);
		}
		else 
		{
			//Port Open !!!
			wsprintf(Buffer, &quot;Port %d is open //POP3&quot;, d);
			SendMessage(g_hWndList, LB_ADDSTRING, (WPARAM)0, (LPARAM)Buffer);
		}
		closesocket(sock); 
		SendMessage(g_hWndList, WM_VSCROLL, (WPARAM)MAKEWPARAM(SB_PAGEDOWN, 0), (LPARAM)0);

	}
	if (e = g_iPortStart5) 
    { 

		server.sin_port = htons(e); 

		if ((sock = socket(AF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET) 
		{ 
			SendMessage(g_hWndList, LB_ADDSTRING, (WPARAM)0, (LPARAM)&quot;-Err: Port erstellen&quot;);
		} 
		contr = connect(sock, (sockaddr *) &amp;server ,sizeof(server)); 
		if (contr &lt; 0)
		{ //Port Closed
			wsprintf(Buffer, &quot;Port %d is closed //IMAP&quot;, e);
			SendMessage(g_hWndList, LB_ADDSTRING, (WPARAM)0, (LPARAM)Buffer);
		}
		else 
		{
			//Port Open !!!
			wsprintf(Buffer, &quot;Port %d is open //IMAP&quot;, e);
			SendMessage(g_hWndList, LB_ADDSTRING, (WPARAM)0, (LPARAM)Buffer);
		}
		closesocket(sock); 
		SendMessage(g_hWndList, WM_VSCROLL, (WPARAM)MAKEWPARAM(SB_PAGEDOWN, 0), (LPARAM)0);

	}
	if (f = g_iPortStart6) 
    { 

		server.sin_port = htons(f); 

		if ((sock = socket(AF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET) 
		{ 
			SendMessage(g_hWndList, LB_ADDSTRING, (WPARAM)0, (LPARAM)&quot;-Err: Port erstellen&quot;);
		} 
		contr = connect(sock, (sockaddr *) &amp;server ,sizeof(server)); 
		if (contr &lt; 0)
		{ //Port Closed
			wsprintf(Buffer, &quot;Port %d is closed //HTTPS&quot;, f);
			SendMessage(g_hWndList, LB_ADDSTRING, (WPARAM)0, (LPARAM)Buffer);
		}
		else 
		{
			//Port Open !!!
			wsprintf(Buffer, &quot;Port %d is open //HTTPS&quot;, f);
			SendMessage(g_hWndList, LB_ADDSTRING, (WPARAM)0, (LPARAM)Buffer);
		}
		closesocket(sock); 
		SendMessage(g_hWndList, WM_VSCROLL, (WPARAM)MAKEWPARAM(SB_PAGEDOWN, 0), (LPARAM)0);

	}
	if (g = g_iPortStart7) 
    { 

		server.sin_port = htons(g); 

		if ((sock = socket(AF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET) 
		{ 
			SendMessage(g_hWndList, LB_ADDSTRING, (WPARAM)0, (LPARAM)&quot;-Err: Port erstellen&quot;);
		} 
		contr = connect(sock, (sockaddr *) &amp;server ,sizeof(server)); 
		if (contr &lt; 0)
		{ //Port Closed
			wsprintf(Buffer, &quot;Port %d is closed //MYSQL&quot;, g);
			SendMessage(g_hWndList, LB_ADDSTRING, (WPARAM)0, (LPARAM)Buffer);
		}
		else 
		{
			//Port Open !!!
			wsprintf(Buffer, &quot;Port %d is open //MYSQL&quot;, g);
			SendMessage(g_hWndList, LB_ADDSTRING, (WPARAM)0, (LPARAM)Buffer);
		}
		closesocket(sock); 
		SendMessage(g_hWndList, WM_VSCROLL, (WPARAM)MAKEWPARAM(SB_PAGEDOWN, 0), (LPARAM)0);

	}
	if (h = g_iPortStart8) 
    { 

		server.sin_port = htons(h); 

		if ((sock = socket(AF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET) 
		{ 
			SendMessage(g_hWndList, LB_ADDSTRING, (WPARAM)0, (LPARAM)&quot;-Err: Port erstellen&quot;);
		} 

		contr = connect(sock, (sockaddr *) &amp;server ,sizeof(server)); 
		if (contr &lt; 0)
		{ //Port Closed
			wsprintf(Buffer, &quot;Port %d is closed //AJP&quot;, h);
			SendMessage(g_hWndList, LB_ADDSTRING, (WPARAM)0, (LPARAM)Buffer);
		}
		else 
		{
			//Port Open !!!
			wsprintf(Buffer, &quot;Port %d is open //AJP&quot;, h);
			SendMessage(g_hWndList, LB_ADDSTRING, (WPARAM)0, (LPARAM)Buffer);
		}
		closesocket(sock); 
		SendMessage(g_hWndList, WM_VSCROLL, (WPARAM)MAKEWPARAM(SB_PAGEDOWN, 0), (LPARAM)0);

	}
	if (i = g_iPortStart9) 
    { 

		server.sin_port = htons(i); 

		if ((sock = socket(AF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET) 
		{ 
			SendMessage(g_hWndList, LB_ADDSTRING, (WPARAM)0, (LPARAM)&quot;-Err: Port erstellen&quot;);
		} 
		contr = connect(sock, (sockaddr *) &amp;server ,sizeof(server)); 
		if (contr &lt; 0)
		{ //Port Closed
			wsprintf(Buffer, &quot;Port %d is closed //HTTPALT&quot;, i);
			SendMessage(g_hWndList, LB_ADDSTRING, (WPARAM)0, (LPARAM)Buffer);
		}
		else 
		{
			//Port Open !!!
			wsprintf(Buffer, &quot;Port %d is open //HTTPALT&quot;, i);
			SendMessage(g_hWndList, LB_ADDSTRING, (WPARAM)0, (LPARAM)Buffer);
		}
		closesocket(sock); 
		SendMessage(g_hWndList, WM_VSCROLL, (WPARAM)MAKEWPARAM(SB_PAGEDOWN, 0), (LPARAM)0);

	}

	if (j = g_iPortStart10) 
    { 

		server.sin_port = htons(j); 

		if ((sock = socket(AF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET) 
		{ 
			SendMessage(g_hWndList, LB_ADDSTRING, (WPARAM)0, (LPARAM)&quot;-Err: Port erstellen&quot;);
		} 
		contr = connect(sock, (sockaddr *) &amp;server ,sizeof(server)); 
		if (contr &lt; 0)
		{ //Port Closed
			wsprintf(Buffer, &quot;Port %d is closed //CHAT&quot;, j);
			SendMessage(g_hWndList, LB_ADDSTRING, (WPARAM)0, (LPARAM)Buffer);
		}
		else 
		{
			//Port Open !!!
			wsprintf(Buffer, &quot;Port %d is open //CHAT&quot;, j);
			SendMessage(g_hWndList, LB_ADDSTRING, (WPARAM)0, (LPARAM)Buffer);
		}
		closesocket(sock); 
		SendMessage(g_hWndList, WM_VSCROLL, (WPARAM)MAKEWPARAM(SB_PAGEDOWN, 0), (LPARAM)0);

	}

  WSACleanup(); 
}
[/code]
</code></pre>
<pre><code class="language-cpp">[code]
//port.rc
//Microsoft Developer Studio generated resource script.
//
#include &quot;resource.h&quot;

#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include &quot;afxres.h&quot;

/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS

/////////////////////////////////////////////////////////////////////////////
// Deutsch (Deutschland) resources

#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_DEU)
#ifdef _WIN32
LANGUAGE LANG_GERMAN, SUBLANG_GERMAN
#pragma code_page(1252)
#endif //_WIN32

#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//

1 TEXTINCLUDE DISCARDABLE 
BEGIN
    &quot;resource.h\0&quot;
END

2 TEXTINCLUDE DISCARDABLE 
BEGIN
    &quot;#include &quot;&quot;afxres.h&quot;&quot;\r\n&quot;
    &quot;\0&quot;
END

3 TEXTINCLUDE DISCARDABLE 
BEGIN
    &quot;\r\n&quot;
    &quot;\0&quot;
END

#endif    // APSTUDIO_INVOKED

/////////////////////////////////////////////////////////////////////////////
//
// Icon
//

// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDI_MAINFRAME           ICON    DISCARDABLE     &quot;Res\\Icons\\port.ico&quot;
IDI_SCAN                ICON    DISCARDABLE     &quot;Res\\Icons\\connected.ico&quot;

/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//

IDD_SCANNER DIALOGEX 0, 0, 223, 252
STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_TOOLWINDOW
CAPTION &quot;  Port Scanner&quot;
FONT 8, &quot;MS Sans Serif&quot;
BEGIN
    DEFPUSHBUTTON   &quot;Scan Ports&quot;,IDOK,111,231,50,14
    PUSHBUTTON      &quot;Beenden&quot;,IDCANCEL,166,231,50,14
    LISTBOX         IDC_OPENPORTS,19,170,183,41,LBS_NOINTEGRALHEIGHT | 
                    WS_VSCROLL | WS_TABSTOP
    EDITTEXT        IDC_PORTSTART1,50,68,40,12,ES_AUTOHSCROLL
    CONTROL         &quot;IPAddress1&quot;,IDC_IPADDRESS,&quot;SysIPAddress32&quot;,WS_TABSTOP,
                    101,20,100,12
    LTEXT           &quot;IP Adresse : &quot;,IDC_STATIC,53,20,39,12,SS_CENTERIMAGE
    ICON            IDI_SCAN,IDC_STATIC,14,14,21,20,SS_REALSIZEIMAGE,
                    WS_EX_DLGMODALFRAME
    EDITTEXT        IDC_PORTSTART2,50,82,40,12,ES_AUTOHSCROLL
    EDITTEXT        IDC_PORTSTART3,50,97,40,12,ES_AUTOHSCROLL
    EDITTEXT        IDC_PORTSTART4,50,111,40,12,ES_AUTOHSCROLL
    EDITTEXT        IDC_PORTSTART5,50,126,40,12,ES_AUTOHSCROLL
    EDITTEXT        IDC_PORTSTART6,133,68,40,12,ES_AUTOHSCROLL
    EDITTEXT        IDC_PORTSTART7,133,82,40,12,ES_AUTOHSCROLL
    EDITTEXT        IDC_PORTSTART8,133,97,40,12,ES_AUTOHSCROLL
    EDITTEXT        IDC_PORTSTART9,133,111,40,12,ES_AUTOHSCROLL
    EDITTEXT        IDC_PORTSTART10,133,126,40,12,ES_AUTOHSCROLL
    GROUPBOX        &quot;&quot;,IDC_STATIC,7,7,209,37,BS_CENTER
    GROUPBOX        &quot;Ports : &quot;,IDC_STATIC,7,50,209,102,BS_CENTER
    GROUPBOX        &quot;Status&quot;,IDC_STATIC,7,157,209,65,BS_CENTER
END

/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
//

#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO DISCARDABLE 
BEGIN
    IDD_SCANNER, DIALOG
    BEGIN
        LEFTMARGIN, 7
        RIGHTMARGIN, 216
        TOPMARGIN, 7
        BOTTOMMARGIN, 245
    END
END
#endif    // APSTUDIO_INVOKED

/////////////////////////////////////////////////////////////////////////////
//
// 24
//

1                       24      DISCARDABLE     &quot;Res\\Style\\xpstyle.xml&quot;
#endif    // Deutsch (Deutschland) resources
/////////////////////////////////////////////////////////////////////////////

#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//

/////////////////////////////////////////////////////////////////////////////
#endif    // not APSTUDIO_INVOKED

[/code]
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/972352</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/972352</guid><dc:creator><![CDATA[Ascharan]]></dc:creator><pubDate>Sat, 21 Jan 2006 18:19:10 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit Portscanner on Sat, 21 Jan 2006 18:28:07 GMT]]></title><description><![CDATA[<p>Wenn Du nach einem LB_ADDSTRING nicht die Msg-Loop durchläufst, wird dies nicht gezeichnet...<br />
Deshalb musst Du die Msg-Loop einige Mal durchlaufen, bis Du wieder weitermachst... oder Du verlagerst Dein &quot;Scanner&quot; in einen anderen Thread als den UI-Thread.<br />
PS: Port-&quot;Scanner&quot; arbeiten nicht mit &quot;connect&quot;...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/972360</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/972360</guid><dc:creator><![CDATA[Jochen Kalmbach]]></dc:creator><pubDate>Sat, 21 Jan 2006 18:28:07 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit Portscanner on Sat, 21 Jan 2006 19:06:00 GMT]]></title><description><![CDATA[<p>Mit was dann auser connect<br />
bsp.:Raw <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/972382</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/972382</guid><dc:creator><![CDATA[Ascharan]]></dc:creator><pubDate>Sat, 21 Jan 2006 19:06:00 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit Portscanner on Sat, 21 Jan 2006 19:22:58 GMT]]></title><description><![CDATA[<p>Jau... mit RAW sockets und dem senden von SYN-Paketen... dazu kannst Du ja mal die RFC zu TCP/IP lesen...<br />
<a href="http://www.faqs.org/rfcs/rfc793.html" rel="nofollow">http://www.faqs.org/rfcs/rfc793.html</a></p>
<p>Beispiele (nicht verifiziert):<br />
<a href="http://www.codeproject.com/internet/NagTPortScanner.asp" rel="nofollow">http://www.codeproject.com/internet/NagTPortScanner.asp</a><br />
<a href="http://www.codeproject.com/internet/tcpscan.asp" rel="nofollow">http://www.codeproject.com/internet/tcpscan.asp</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/972392</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/972392</guid><dc:creator><![CDATA[Jochen Kalmbach]]></dc:creator><pubDate>Sat, 21 Jan 2006 19:22:58 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit Portscanner on Sat, 21 Jan 2006 19:28:05 GMT]]></title><description><![CDATA[<p>Hab bei den Beispielen n Kleines Problem Codeprojekt programmiert überwiegend mit mfc das ich aber nicht kann bsp nicht benutze.<br />
andere ideen <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /></p>
<p>Aber dank für die Schnelle Antwort <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/972397</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/972397</guid><dc:creator><![CDATA[Ascharan]]></dc:creator><pubDate>Sat, 21 Jan 2006 19:28:05 GMT</pubDate></item></channel></rss>