Articles

Metasploit Framework Windows Tutorial
Remote Desktop Connection
Windows Processes That May Be Dangerous
How-To use NetCat a Tutorial
Common Linux Commands
Common Ports
Netcat Commands
HTTP Response Codes
War-Google Hack Terms
Wardriving
Avoiding Social Engineering and Phishing Attacks
Intrusion Detection on Linux
Linux Intrusion Detection
Penetration Testing Guide
Penetration Testing Tools
Social Engineering Fundamentals, Part I: Hacker Tactics
Social engineering (computer security)
The Psychology of Social Engineering

The Archives

General GSO
GovernmentSecurity.org News & Suggestions
In The News
Open Topic
General Security Information
Trash Can
Exploit & Vulnerability Mailing List Archives
Trial Member Forum
Product and Program Reviews GSO Tutorials
System Security
Windows Systems
Beginners Section
Linux & Unix Systems
File Downloads
Exploit Research & Discussion Trojan & Virus Errata
Networking Security / Firewall / IDS / VPN / Routers
System Hardening
E-Mail Security
Wifi Security
Trial Member Uploads
Upload discovered Trojans & Mal ware
GSO Programming Section
C , C++ , VC++
Visual Basic.NET
Perl /CGI
Java/Javascript
PHP/XML/ASP/HTML
Assembly + Other
The Cork Board
Network Security Consultant Directory
Network Security Jobs
The Archives
Encryption Information
General Network Security
Internet Anonymity
HTTP Protocol Security
Linux Security
MS IIS Information
Exploit Articles
Programming / Tool Design
GSO Software Projects
Public Downloads
Microsoft Security Questions and Papers

Full Version: C# And Irc
jead99
Any1 got any sourcecode or suggestions on how to connect to a irc server and join a channel using C# ?
jead99
Well, i solved it myself. It was easier than i expected (duh!)

If any1 else should be interested here's some small snippets:

CODE

1) Connect to irc server:
TcpClient irc = new TcpClient(Server, Port);

2) Join a channel:
NetworkStream stream = irc.GetStream ();
StreamWriter writer = new StreamWriter (stream);
writer.WriteLine ("JOIN " + Channel);

Where Server, Port and Channel are variables you must declare to suit your needs.
linuxwolf
See what a little searching can do for you? And don't you feel better doing it yourself? smile.gif. If you'd like to get into writing irc with c# further, ask me. Or you could go and find the c# irc module smile.gif. Or whatever it's called.
jead99
Indeed it feels better to solve the problem by myself smile.gif

That C# irc module you mentioned is that part of the .net base classes ?
chris105
Its a little more complex than that Im afraid Jead but yeah thats the basic bit.

You have to respond to pings from the server and send your username etc etc. The best way is to get a copy of the RFC (http://www.irchelp.org/irchelp/rfc/). The RFC is like a command list if you will. Its best to write a basic implementation and build on top of it. Possibly writing an IRC class (never done this myself).

Good luck, I built one in VB before, any problems post here and one of us will get back to you.
AgentOrange
I have such code wrtten in ANSI C, C++ and asm. (differnt kinds of bots, such a backdoors)

Screw C#, horrible idea...

Reenactment:
Hey guys, Java (filtered) rules, lets totally rip off java then make it so it not only just runs under windows, but they have to install the shitty .net framework!

Grow some balls and lean how to properly allocate memory.

peace
vnet576
Agentorange, the last part wasn't necessary at all. C .net is what it is, and honestly whether we like it or not, its not going anywhere. In fact within a few years most windows programs will be migrating to that language. So learn to deal with it.

Oh and btw, last time that I checked, java also requires a "shitty framework" in order to run.

As for manually allocating memory, why would you want to make things harder? If you're a programmer, I don't understand why you would want to do things manually when they can be automated for you. Isn't that why you program in the first place? To make things easier and more automated?

Of course not...lets reinvent the wheel every time we write a program.

Also, all of this is objective since I personally dislike C .net, but not for the false reasons that you provided.
t0bban
Great response mate.
Regarding the irc bit, I've built 2 IRC projects using C# and they totally rule ;P
One is a bot, working excellent... The other is a chat client..
Anyhow, for some sourcecode I'd have to dig into my server to find something, lemme see.. I'll get back if I find something.

QUOTE(vnet576 @ Feb 27 2005, 03:14 AM)
Agentorange, the last part wasn't necessary at all. C .net is what it is, and honestly whether we like it or not, its not going anywhere. In fact within a few years most windows programs will be migrating to that language. So learn to deal with it.

Oh and btw, last time that I checked, java also requires a "shitty framework" in order to run.

As for manually allocating memory, why would you want to make things harder? If you're a programmer, I don't understand why you would want to do things manually when they can be automated for you. Isn't that why you program in the first place? To make things easier and more automated?

Of course not...lets reinvent the wheel every time we write a program.

Also, all of this is objective since I personally dislike C .net, but not for the false reasons that you provided.
*


jead99
QUOTE(AgentOrange @ Feb 27 2005, 01:24 AM)
I have such code wrtten in ANSI C,  C++ and asm.  (differnt kinds of bots,  such a backdoors)

Screw C#,  horrible idea...

Reenactment:
Hey guys,  Java (filtered) rules,  lets totally rip off java then make it so it not only just runs under windows,  but they have to install the shitty .net framework! 

Grow some balls and lean how to properly allocate memory.

peace
*



Well, the only reason why i choose C# is because i wanna learn the language. It doesn't require a high iq to see where windows programming is heading.
t0bban
And a good choise it is, imo.
Learn C#, and develop the future. More and more is going over to the .NET framework, and soon the entire Microsoft market will be depending on it, making us .NET developers an important part of the future developement of systems to come smile.gif
linuxwolf
QUOTE(t0bban @ Feb 27 2005, 12:23 PM)
And a good choise it is, imo.
Learn C#, and develop the future. More and more is going over to the .NET framework, and soon the entire Microsoft market will be depending on it, making us .NET developers an important part of the future developement of systems to come smile.gif
*


Oh how true that is. That's the exact reason that i moved over to c# and .NET. Oh, and this module isn't part of the frame work. And i found the api i was looking for (while rooting around code project without a clue):
Smartirc4net - the C# irc library.
QUOTE
Introduction
I wrote SmartIrc4net for having a high-level IRC API for .NET/C#. I started long time ago with IRC programming for PHP, I wrote Net_SmartIRC. Net_SmartIRC is a PEAR class. Later, I was disappointed that the OO features of PHP are so limited. I was starting to port the project to C++, after a few weeks I stopped, so many things are missing and have to be written (even simple things like string manipulation). Then I found C#. And I ported SmartIRC in about 1-2 weeks! After that the API got better and better, it's just great what it is now... so here we are SmartIrc4net.

Object Design
This library has a 3 layered API, allows developers to pick the layer/features he needs. You could use any layer for writing IRC applications, the question is how much IRC abstraction and features you need. You have the choice!


Url: http://www.codeproject.com/csharp/smartirc...Irc4net-020.zip (if you have a www.codeproject.com account, and http://www.codeproject.com/csharp/smartirc4net.asp then signup if you don't! It'll be worth your while.)

Ben
jead99
@linuxwolf: thanks for the links, i'll take a look and contact if i run into some problems smile.gif

@t0bban: are you a certified c# developer ?

linuxwolf
and t0bban, if you are, how much does it cost in £ or $ to take the course and test? Or test alone?
chris105
Yeah I would also like to know that, and is it difficult? Is there a age limit etc ?
jead99
As i recall the certification is called MSCD and consists of several tests.
linuxwolf
Thanks.
IcedOut3E
QUOTE
Smartirc4net - the C# irc library.

Introduction
I wrote SmartIrc4net for having a high-level IRC API for .NET/C#. I started long time ago with IRC programming for PHP, I wrote Net_SmartIRC. Net_SmartIRC is a PEAR class. Later, I was disappointed that the OO features of PHP are so limited. I was starting to port the project to C++, after a few weeks I stopped, so many things are missing and have to be written (even simple things like string manipulation). Then I found C#. And I ported SmartIRC in about 1-2 weeks! After that the API got better and better, it's just great what it is now... so here we are SmartIrc4net.

Object Design
This library has a 3 layered API, allows developers to pick the layer/features he needs. You could use any layer for writing IRC applications, the question is how much IRC abstraction and features you need. You have the choice!


Url: http://www.codeproject.com/csharp/smartirc...Irc4net-020.zip (if you have a www.codeproject.com account, and http://www.codeproject.com/csharp/smartirc4net.asp then signup if you don't! It'll be worth your while.)

Ben


Thanks a ton for that man, should be very useful. I just got an internship doing C# and ASP.NET so I'll be learning both here pretty soon. Although I'm not an entire huge fan of microsoft, I feel that what everyone has said is probably pretty much true. Sometimes, whether you like it or not, you gotta adapt to whats hot or what might be hot.

My .2 cents.

Peace.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2005 Invision Power Services, Inc.