Programming a simple IRC (Internet-Relay-Chat) Client - ruby

I started using IRC at a young age, and I have always been fascinated with it. As a language exercise, I was thinking about programming a simple IRC client in Ruby with Shoes as a graphical front-end. My question to you, kind-sirs, what do I need to become familiar with to start on this great adventure (besides shoes and Ruby of course)? I imagine there is some-sort of specification on IRC Protocol. Any pointers?

An earlier post mentioned RFC1459. While it is a very good introduction to IRC, it has actually been superseded by RFCs 2810-2813. Here is a more complete list of documentation you need to program anything IRC-related:
RFC1459 (original RFC; superseded, but still useful)
RFC2810 (IRC architecture)
RFC2811 (IRC channel management)
RFC2812 (IRC client protocol)
RFC2813 (IRC server protocol)
CTCP specification
DCC specification
Updated CTCP specification (not all clients support this)
ISupport (response code 005) draft (almost all servers support this nowadays)
Client capabilities (CAP command) draft (supported by some servers/clients)
IRCv3 standards and proposals (the future features of IRC, some of which are already widely supported)

The IRC Specification is laid out in RFC 1459
http://www.irchelp.org/irchelp/rfc/rfc.html

I found this gem on Wikipedia. Sounds intimidating.
It's actually not.
Telnet onto an IRC Server and witness the simplicity of the protocol first hand. The hardest part is the handshake, after that its very simple.

I once implemented a client and a server with 2 more guys (as part of a course).
I can tell you that the RFC you were already linked to is great.
I'd also try simply sniffing a connection with an existing client to see for yourself how stuff work.

Not exactly an answer to your question, but it may be helpful. If you are using Ruby, I have found the Autumn Leaves project to be a great way to build an IRC bot using Ruby:
http://github.com/RISCfuture/autumn/tree/master
It is pretty much the Jibble of the Ruby world.

Related

How to implement SignalR using websockets

I am trying mostly for learning purposes to implement a module similar to SignalR(still a beginner in SignalR) using raw websockets. (I am already very familiar with websockets)
Is there any guide or something that explains what functionality does SignalR have on top of websockets? (so that i know what features i need to implement) ? .
From what i understood it keeps a persistent connection , and can fallback to other protocols if websockets are not supported (long polling ...etc).
I have already checked this video but i need something more in detail.
I had written one article regarding SignalR one year back. It contains SignalR basic information and code example.
Following is the link of it -
https://medium.com/#aparnagadgil/real-time-web-functionality-using-signalr-ba483efcb959
Hope this helps you!

Is there a socket.io port to Dart?

I've taken a look at the basic websocket capabilities in Dart, using this simple example:
https://github.com/financeCoding/chat-websocket-dart
But I was wondering if there's a nice library I could use to build a realtime online game using websockets. I've had experience in this using node.js with socket.io, which worked out quite well. I need to be able to have "rooms", join rooms, leave rooms, broadcast to clients in a room, etc. as well as some nice notion of connection "health", reconnection etc. So what I'm asking is if there's a nice library for dart that has similar functionality? Even cooler would be a library on top of that library that could enable nice RPC functionality with variable syncing etc. such as http://nowjs.com/ which achieves this using socket.io. But I guess that might be too ambitious.
If anyone's had any experience or found a project which is similar to what I'm talking about, let me know :)
Duct is clone of Socket.IO in Dart which aims to be protocol-level compatible with the original implementation.
https://github.com/petrhosek/duct
Sorry, at the time of this writing, I'm not aware of a socket.io port for Dart. socket.io is nice because it has a bunch of implementation options for browsers that don't support Web sockets.
Sounds like a good idea for a hackathon project!

net-snmp: how should I approach the project of making a bilingual snmpd?

I apologize that this question comes from the uninformed, huddled masses: I've been away from net-snmp for three years and I've missed all of the developments.
I have to deliver a bilingual v2c/v3 snmpd for use in an embedded Linux system.
I expect to use the superb net-snmp sources. What is the right approach to marshalling these sources, where "right" == straightforward, uncomplicated, vanilla, and "it just works"?
Thanks so much, everybody. And I apologize again for my out-of-dateness.
Edit: Why do I need this input? I have a lot of experience with snmp v2c in general; some experience with net-snmp; and little experience with snmp v3. Because I'm new to v3, I'm looking for a cookbook approach from someone who's done it so I can avoid the many undocumented pitfalls and hurdles that my experience tells me lie in the path of anyone building an agent from net-snmp sources.
First, Net-SNMP is already tri-lingual under the hood. If you configure it to accept v1, v2c and v3 it'll happily accept and respond to all 3 protocol versions without changing a thing.
Second, to get snmpv1/2c working, all you need in your snmpd.conf file is:
rocommunity COMMUNITYNAME
Where, COMMUNITYNAME is the super-secret insecure community/password you want to use.
For SNMPv3, I'm assuming you want to use SNMPv3 with USM. I suggest you start by reading the Net-SNMP tutorial on Securing SNMP traffic and go from there.
Note also, you can run snmpconf -g basic_setup to get more help with the above as well as with other options.

Ruby Torrent Library

Is there any good library for Ruby to work with BitTorrent trackers? To download or seed files. There's a rubytorrent library on rubyforge, but it was last updated in 2005 and doesn't seem like working anymore.
see lib-torrent ruby...
https://github.com/maran/libtorrent-ruby
I'm not sure if this is what you want.
Also see this post which contains some potentially useful comments as well, including a Ruby wrapper for the Transmission API using RPCs.
My experience with libtorrent derived clients has been very positive, I would like to see something new here. (I prefer the high density interface & advanced features of qbittorrent to the sparse UI of Transmission.)
A torrent client that exchanges DHT buckets to crawl the public DHT... ?
(No web searching required.)

How to add proxy support to c# socket connection?

I have a socket app that needs to have support for SOCKS 4 and 5 proxy connections, since my users may be behind firewalls. I am using WPF and C# 3.5 SP1. I see no options in the default Socket class for proxys, do I have to roll my own?
I'd prefer not to use 3rd party libs if possible - how difficult is it to enable proxy support with a standard C# Socket?
It is not terribly hard but you have to read through a couple of RFCs. You need to read the RFC spec on Socks v4, Socks v4a and Socks v5. I wrote a library that will do all the work for you but if you would rather write you own that is cool too. My library was mentioned in the previous post (Starksoft). You can implement the Socks protocol using a standard TcpClient object or a Socket connection. The TcpClient is easier. You simply need to send the commands immediately after connection to your proxy server. Those command will instruct the proxy server what final end point you are interested in connecting to. There is also specs for a UDP Socks connection but it sounds like you won't be needing that.
You can find all the RFCs and generation information on wikipedia. I can't post more because this crazy stackoverflow site limits the number of hyperlinks I am allowed to 1 since I am not a regular user. Very annoying.
http://en.wikipedia.org/wiki/SOCKS
Finally, you can rip off my code if you like since it is under the MIT license and I let you do that kind of thing. :) Take at look at my class Socks4ProxyClient.cs that implements the Socks v4 protocol. The method of most interest to you is named SendCommand() located on line 282. You can find my code at Google Code. Search for Starksoft. Or you can go to my web site directly and I have link to the source code in Google.
Socks5 implementation is a little trickier with more options to specify and a little more chatter to the server but basically very similar to Socks4.
Good luck and you should implement a solution yourself if you want to learn Socks. So, kudos to you!
Benton
You could ask google for some info. One of the first links will lead you to Mentalis.org and their free proxy implementation. They were once well known for their free network and security stuff but the projects seem to not being maintained for a while.
But it might be worth a look anyway.
I know you said that you did not want to use 3rd party librarys if possbile, but I would like to recommend this http://www.starksoft.com/prod_proxy.html.

Resources