|
I was brainstorming this with a friend of mine who is in the same major as I am. Basically, this project would be of our own doing and not for any class or whatever and we will be using C++ mainly to do this. I was wondering what we would need as in programming "skills" or whatever you'd like to call it, and other stuff to create this:
A chat client that would encode "blah" and while it transfers, "blah" it will add various hex into the ascii, then on the other side, receives the "blah" minus the hex.
It's an interesting idea though, isn't it? I have taken a C course years ago but I would love to get back into it because I enjoy programming.
|
Korea (South)11568 Posts
do you mean something like AIM or MSN?
|
WinSock would probably be nice to know as well as the Win32 API or MFC. And if you're interested in using .NET, that would be good to learn too.
|
Canada9720 Posts
there's already more than enough open source chat clients. your idea doesn't really make sense, though. so no, it's not an interesting idea
|
Well, you have to start somewhere. Obviously some ideas will be pretty retarded and will serve 0 purpose whatsoever, but programming SOMETHING is better than nothing.
|
On April 29 2009 10:09 CaucasianAsian wrote: do you mean something like AIM or MSN? right now its only a thought stage but later on we'd want to implement it into AIM, but not msn(unicode).
On April 29 2009 10:43 CTStalker wrote: there's already more than enough open source chat clients. your idea doesn't really make sense, though. so no, it's not an interesting idea
oh theres plenty, but do they do this?
person1 types blah. blah goes through the server, etc, the blah gets attached hex onto it(so software, etc, cant read it). person2 receives it as blah without the hex.
|
what is the point of the hex? are you trying to encrypt the message?
i made a very simple mirc like server/client for a university course. it is surprising not that difficult or long. i did everything using C++ and POSIX sockets libary on linux. my solution is multithreaded.
write down all the use cases before you start.
|
On April 29 2009 11:33 haduken wrote: what is the point of the hex? are you trying to encrypt the message?
i made a very simple mirc like server/client for a university course. it is surprising not that difficult or long. i did everything using C++ and POSIX sockets libary on linux. my solution is multithreaded.
write down all the use cases before you start. yeah encrypting, etc. i mean its just something to do you know? hes starting to learn C++ on his own and i have some prior knowledge of it already. i have no idea what POSIX sockets are, id have to look into it. the "surprising not that difficult or long" is giving me some more interests.
|
There are many available C++ lib and framework (different programming models too)that cater for network programming. POSIX is a set of standards for UNIX libs that comes with development packages. It is also available under Windows but I heard that it is not as mature as UNIX base. Network socket programming is very low level, i don't recommend it for real programming but can be interesting for students who are into that sort of stuff.
|
low level, such as assembly?
|
On April 29 2009 12:23 Raithed wrote: low level, such as assembly?
No, low-level in the sense that you have to make do without libraries which offer convenient functions which get most of the stuff done for you. Low-level in a high-level language context means using the most basic of tools/functions available to you (i.e. those that are directly available without installing (and requiring from the user) to install additional libs). The upside of this is of course that you have much more control over the gory details. The downside is that it requires more code, is more error-prone and often boring and time-intensive. You decide.
Writing a chat client is pretty easy though, at least the basics. I think that's one of the first things someone who just gets into network programming does: a very basic client/server chat program. Just know that the well-known chat services like MSN, ICQ, AIM etc. all use special protocols, so if you want to write a client that's compatible with these networks, you'd have to make sure your client sends the data in a special way so that the server accepts it. Also know that if you really want to do encryption you better do it the right way and use good libraries (e.g. openssl) which handle all the details for you, because what you intend to do (converting data into hex and back?) is everything but safe. At least use something like RC4. Of course things get much more complicated if you also wanted to include a modular structure, plugins maybe, if the code size generally becomes big enough (few thousand lines), if you want to add a nice GUI, or if you start adding a lot of features. But the basic thing is really easy. And considering your questions here, you should start very basic.
|
yeah we are starting something very very simple, like D- newbie shit. thanks for the help though. but what does XOR or RC4 mean?
|
Forget about (lone) XOR. RC4 see Wikipedia. In short: it's a simple to implement encryption method which is better than if you were to "invent" a new encryption type. But encryption stuff generally is hard so you should absolutely use a lib for that.
|
oh silly kids...you're in above your heads....try writing the encryptor first...
|
the basics of a server/client chat program should take you no more than 2 man weeks to write. msg me if you want some ideas.
|
Is it difficult to implement RSA? I'd use that as a first choice if I really had to do some sort of encryption, because it won't be broken in 5 seconds.
If you're simply attaching some hex to the end of a message after it's been sent and removing it before it's viewed, I think that would be useful for covert communication between the two computers (such as botnet commands, perhaps, or protecting a communicator's identity).
|
On April 29 2009 21:39 BottleAbuser wrote: Is it difficult to implement RSA? I'd use that as a first choice if I really had to do some sort of encryption, because it won't be broken in 5 seconds.
The math is simple enough, but implementing it well, efficient and secure is not trivial. I'd certainly go with OpenSSL as was already suggested.
Much more important than the little details is the planning for you guys. Spend sufficient time laying out a specification for the program, lay out all use cases, all features and everything you could possibly ever want. Then prioritize and make a roadmap. Sure things won't go according to plan, the less experience you have, the less according to plan it will be, but at least you have a sense of where you're going and how far you have progressed.
Maybe it's obvious, but as you're just starting out I'll point it out nevertheless: you want to use version control, e.g. SVN. Especially if the project is likely to be more than a few 100 lines and has more than one person working on it. Otherwise failure is inevitable ;-)
And, if it's not too much to get your head around at the beginning (I don't know your background), consider test-driven development. Make it a compulsive habit, eventually you'll be very glad you did.
|
|
|
|