[WinSock]Generic Failure
Ostatnio zmodyfikowano 2014-11-12 21:27
GGG205 Temat założony przez niniejszego użytkownika |
[WinSock]Generic Failure » 2014-11-10 23:08:41 Cześć. Chcę wysłać e-mail, ale mam błąd generic failure. SOCKET client = socket( AF_INET, SOCK_STREAM, IPPROTO_TCP ); SOCKADDR_IN addres; addres.sin_addr.s_addr = inet_addr( "213.180.147.145" ); addres.sin_family = AF_INET; addres.sin_port = htons( 25 );
connect( client,( SOCKADDR * ) & addres, sizeof( SOCKADDR ) ); char buf[ 1024 ]; recv( client, buf, 1024, 0 );
printf( buf );
memset( & buf, 0, 1024 ); send( client, "ehlo 213.180.147.145\n\r", strlen( "ehlo 213.180.147.145\n\r" ), 0 ); recv( client, buf, 1024, 0 ); printf( buf ); memset( & buf, 0, 1024 ); send( client, "AUTH LOGIN\n\r", strlen( "AUTH LOGIN\n\r" ), 0 ); recv( client, buf, 1024, 0 ); printf( buf ); memset( & buf, 0, 1024 ); send( client, "Zakodowany login\n\r", strlen( "zakodowany login\n\r" ), 0 ); recv( client, buf, 1024, 0 ); printf( buf ); memset( & buf, 0, 1024 ); send( client, "zakodowane haslo\n\r", strlen( "zakodowane haslo\n\r" ), 0 ); recv( client, buf, 1024, 0 ); printf( buf );
|
|
GGG205 Temat założony przez niniejszego użytkownika |
» 2014-11-12 21:27:45 Odświeżam |
|
« 1 » |