Valhalla Legends Archive

Programming => General Programming => C/C++ Programming => Topic started by: Final on February 11, 2006, 10:07 PM

Title: Need some help if you could?
Post by: Final on February 11, 2006, 10:07 PM
Um Well Ive been wondering about telnet and what information to send to bnet to connect to it could someone direect me to it or what format of data  i need to send in c++ that would help alot.
Title: Re: Need some help if you could?
Post by: Kp on February 11, 2006, 10:19 PM
First, you must SYN.  If you're religious, you should then REPENT.  Otherwise wait for the peer to SYN|ACK.  Once you've got that down, return and we shall talk further.
Title: Re: Need some help if you could?
Post by: Zorm on February 11, 2006, 11:26 PM
Quote from: Kp on February 11, 2006, 10:19 PM
First, you must SYN.  If you're religious, you should then REPENT.  Otherwise wait for the peer to SYN|ACK.  Once you've got that down, return and we shall talk further.

With jokes like that you're well on your way to becoming a teacher someday. Thats almost as bad as some of the ones my economics teacher tells.
Title: Re: Need some help if you could?
Post by: Final on February 11, 2006, 11:42 PM
?? I just wanted to know how would i connect to telnet using c++ winsock I use Asynchrounised sockets.

Opsy I didnt think that was a regular joke at the first but I didnt think you would tell me what i needed in one so my bad So i checked out SYN and ACK TCP SYN was Syncrhounized packets and ACK was acknoledge packets
Title: Re: Need some help if you could?
Post by: Zorm on February 12, 2006, 01:14 AM
Theres a nice sample on the vL page in the documents section that you might be able to learn from. Look for MiniChat by Skywing.
Title: Re: Need some help if you could?
Post by: Final on February 12, 2006, 01:48 AM
Uh That didnt help much anything else?
Title: Re: Need some help if you could?
Post by: FrOzeN on February 12, 2006, 01:49 AM
Zorm said have a look at this, http://www.valhallalegends.com/skywing/files/MiniChat.cpp

It's a Telnet Bot made completely in C++ and it connects and works fine, I fail to see what more you want? :-\
Title: Re: Need some help if you could?
Post by: Explicit on February 12, 2006, 05:01 AM
It's as Lord said
Quote from: FrOzeN on February 12, 2006, 01:49 AM
Zorm said have a look at this, http://www.valhallalegends.com/skywing/files/MiniChat.cpp

It's a Telnet Bot made completely in C++ and it connects and works fine, I fail to see what more you want? :-\

It's how Eric said he was in a post from awhile ago:
http://forum.valhallalegends.com/index.php?topic=13906.msg141958#msg141958
Title: Re: Need some help if you could?
Post by: Final on February 12, 2006, 02:46 PM
no i didnt mean i didnt get the page location i got that but the source coding is for vc++ and i use devc++
and i looked it for a while but didnt see anything that could help me out or i wassent looking correctly.

Ok now i know i wassent looking correctly cuz i found some information that may help well ill give a heads up if i have any luck or need some help thanks again.
Title: Re: Need some help if you could?
Post by: Kp on February 12, 2006, 02:53 PM
Quote from: Final on February 12, 2006, 02:46 PM
no i didnt mean i didnt get the page location i got that but the source coding is for vc++ and i use devc++
and i looked it for a while but didnt see anything that could help me out or i wassent looking correctly.

It's not that hard to convert from C++ code with Microsoft-specific extensions (if MiniChat even has any) to C++ code with gcc-specific extensions (or no extensions at all).  If you can't get it converted on your own, perhaps you should state so and ask for help performing that conversion instead of just giving up and moving on to some other program!
Title: Re: Need some help if you could?
Post by: Final on February 12, 2006, 03:14 PM
No its not that ill just need to look at it for a while cuz my socket programming is in asynchrounous so i need to know what i need to send and what else so im not getting all of it im reading what i need.

Update*
1. I have gotten a conection.
2. I have a login error though.

Case #2
                About the login error I get  connected but then it tells  me to put in username and password or use anonymis  you know and type in my userrname then password but nothing happens i have a friends bot that connects to telnet and for somereason it conflicts with one another so i dont really know whats going on on the other side.

How would i send username and password with this information:
"\x03\x04""Anonymous\r\n"

*Update Fix ok now for some bazarr reason it keeps reconnecting ? i dk what happening but it reconnects everytime a new user connects to the channel or what ?

Title: Re: Need some help if you could?
Post by: Kp on February 12, 2006, 03:36 PM
Your post has exceeded the complexity limit for the amount of structure present.  Please edit your post to be less complex, or add appropriate grammatical constructs and spelling corrections such that it could achieve at least a 'B' in an English course.  To make it easy, we'll grade to the standard of the American public school system.
Title: Re: Need some help if you could?
Post by: Spilled on February 12, 2006, 07:07 PM
Quote from: Kp on February 12, 2006, 03:36 PM
To make it easy, we'll grade to the standard of the American public school system.
hahahahaha, that made my day.

@Final: I don't know what exactly your looking for. What I told you via AIM was more then enough to keep you busy. If it wasn't, there is pleny resources on this forum and BnetDocs.
Title: Re: Need some help if you could?
Post by: Final on February 13, 2006, 01:51 AM
Well Thanks everyone i made a connection thought id show it if you want to see what i came out with its my first attempt at a telnet bot. it was way easier than i made it out to be sorry for all that trouble i caused.

File:
~ Link Removed ~
- FrOzeN


Thanks Frozen Means alot that you care hehe.
Title: Re: Need some help if you could?
Post by: FrOzeN on February 13, 2006, 04:13 AM
Final, I removed the link from your post. I don't think you realised that as you hardcoded your password in, when users login they'll notice that there on a different name and knowing the abilities of the members on these forums they could retrieve it with a simple packet log.

Seeing as your password is generic I just used it to logon to your account to remove the link, I suggest adding two textbox's to the Telnet Chat Bot for users to input there own username/password to connect with.
Title: Re: Need some help if you could?
Post by: Yegg on February 13, 2006, 09:29 AM
Quote from: FrOzeN on February 13, 2006, 04:13 AM
Final, I removed the link from your post. I don't think you realised that as you hardcoded your password in, when users login they'll notice that there on a different name and knowing the abilities of the members on these forums they could retrieve it with a simple packet log.

Seeing as your password is generic I just used it to logon to your account to remove the link, I suggest adding two textbox's to the Telnet Chat Bot for users to input there own username/password to connect with.

I'm sure he knew he hardcoded the password in. That's what I would do if I were testing something as simple as a telnet connection. Why bother writing a few extra lines to read a file for an account and password when you can just temporarily hardcode it in?
Title: Re: Need some help if you could?
Post by: MyndFyre on February 13, 2006, 11:16 AM
Especially if it's something useful like your forum or e-mail account password!
Title: Re: Need some help if you could?
Post by: Yegg on February 13, 2006, 01:14 PM
Quote from: MyndFyre on February 13, 2006, 11:16 AM
Especially if it's something useful like your forum or e-mail account password!

Who are you directing that statement toward? I'm guessing me. If so, I'm not really sure what you are trying to get across to me. Maybe he didn't think about the fact that his password was going to be shown when he uploaded the file, but it isn't a bad idea to keep the password hardcoded if you're the only one with the file, and it's only for temporary usage.
Title: Re: Need some help if you could?
Post by: MyndFyre on February 13, 2006, 01:22 PM
Quote from: Yegg on February 13, 2006, 01:14 PM
Quote from: MyndFyre on February 13, 2006, 11:16 AM
Especially if it's something useful like your forum or e-mail account password!

Who are you directing that statement toward? I'm guessing me. If so, I'm not really sure what you are trying to get across to me. Maybe he didn't think about the fact that his password was going to be shown when he uploaded the file, but it isn't a bad idea to keep the password hardcoded if you're the only one with the file, and it's only for temporary usage.

The quote to which I made reference seemed to indicate that it wasn't a problem that he left his password hardcoded.  I merely pointed out (with some sarcastic undertones) that taking this attitude is moronic.  That is all.
Title: Re: Need some help if you could?
Post by: FrOzeN on February 13, 2006, 10:13 PM
Quote from: Yegg on February 13, 2006, 09:29 AM
Quote from: FrOzeN on February 13, 2006, 04:13 AM
Final, I removed the link from your post. I don't think you realised that as you hardcoded your password in, when users login they'll notice that there on a different name and knowing the abilities of the members on these forums they could retrieve it with a simple packet log.

Seeing as your password is generic I just used it to logon to your account to remove the link, I suggest adding two textbox's to the Telnet Chat Bot for users to input there own username/password to connect with.

I'm sure he knew he hardcoded the password in. That's what I would do if I were testing something as simple as a telnet connection. Why bother writing a few extra lines to read a file for an account and password when you can just temporarily hardcode it in?
I ment along the lines that he forgot the .exe had his password hardcoded it in before he posted the download link. He obviously would of known he hardcoded it when he wrote the bot.

I just removed the link to prevent others gaining access to his password, which could lead to further misuse.