Join us at IRC!
It is the path of least resistance that makes rivers and men crooked. - Bj Palmer
Thursday, May 24, 2012
Navigation
Members Online
Total Online: 36
Web Spiders: 16
Guests Online: 32
Members Online: 4

Registered Members: 70201
Newest Member: subnick
Latest Articles
View Thread

HellBound Hackers | Computer General | Programming

Author

More Winsock Help

onejerlo
Member



Posts: 145
Location:
Joined: 02.11.08
Rank:
Elite
Posted on 02-07-10 05:36
I have been continuing work on my winsock.
My latest project is to make a program that will fetch the login prompt text from my router's(192.168.1.1) telnet prompt.The code mentioned below executes but shows a string I cannot make any sense of(its the same string always).

#include<winsock2.h>
#include<windows.h>
main()
{


WSADATA wsaData;
int starterr = WSAStartup(MAKEWORD(2,2), &wsaData);
SOCKET mysock = socket(AF_INET,SOCK_STREAM,0);
sockaddr_in anews;
anews.sin_port = htons(23);
anews.sin_addr.s_addr = inet_addr("192.168.1.1");
anews.sin_family = AF_INET;
connect(mysock,(sockaddr*)&anews, sizeof(anews));
char buf[200];
recv(mysock, buf, sizeof(buf), 0);
MessageBox(0,buf,"sd",0);
}


Thanks in advance for any suggestions.:)


While you read this message,corrupt politicians are gobbling up your hard earned money;rebels,armies and terrorists are torturing and killing hundreds of innocent men;companies are exploiting millions of people and ruining the environment,people are fighting each other on the basis of color,creed and religion and your nation is being slowly destroyed.

But whats REALLY worrying,is that I write color instead of colour.
Author

RE: More Winsock Help

mestar
Member

Posts: 26
Location: Croatia
Joined: 23.08.08
Rank:
HBH Guru
Posted on 11-07-10 00:37
well as i see it you are using telnet protocol so you should familiarize your self with it

http://www.faqs.org/rfcs/rfc854.html
Author

RE: More Winsock Help

gregorian
Member



Posts: 109
Location: India
Joined: 28.06.10
Rank:
God
Posted on 11-07-10 04:17
popen
Author

RE: More Winsock Help

gregorian
Member



Posts: 109
Location: India
Joined: 28.06.10
Rank:
God
Posted on 11-07-10 04:17
popen
Guest
Username

Password

Remember Me


Bookmark This Page
Affiliates
Adverts

 

 

Links
By using, viewing or obtaining any information contained on this site, you agree to the disclaimer.

© HellBound Hackers 2008- 2009. Since 3rd December 2004.