Bare Metal IRC Client

nik=clf$RANDOM;;expect -c "set timeout -1;spawn nc $sr 6666;set send_human {.1 .2 1 .2 1};expect AUTH*\n ;send -h \"user $nik * * :$nik commandlinefu\nnick $nik\n\"; interact -o -re (PING.:)(.*\$) {send \"PONG :\$interact_out(2,string)\"}"
Uses the extremely cool utilities netcat and expect. "expect" logs in & monitors for server PING checks. When a PING is received it sends the PONG needed to stay connected. IRC commands to try: HELP, TIME, MOTD, JOIN and PRIVMSG The "/" in front of IRC commands are not needed, e.g. type JOIN #mygroup Learn about expect: The sample output shows snippets from an actual IRC session. Please click UP button if you like it!
Sample Output 376 clf3990 :End of /MOTD command.
privmsg clf3990 :hello to myself...
:clf3990!~clf3990@ PRIVMSG clf3990 :hello to myself...
join #happyplace
:clf3990!~clf3990@ JOIN :#happyplace MODE #happyplace +nt 353 clf3990 = #happyplace :@clf3990
privmsg #happyplace :hello all, I am clf3990 the creator of #happyplace
:Closing Link: (Quit: clf3990)

By: omap7777
2015-03-18 09:10:28

What Others Think

Or you could just install an IRC client, which is safer, easier, and has more features. Why would you want to do this? It's a kludge.
blutgens · 350 weeks ago
@blutgens - It's useful in situations where you're using a system with limited resources/privileges. You could use a method like this to pipe through a vps systems that may be low on space, if you wanted that system to act as a cheap proxy to prevent IP leakage. A tool is only as useless/useful as the imagination of the person wielding it.
cyberpsych0sis · 350 weeks ago
this is genius, didn't know about 'expect' but i'll study it now. thanks!
caesarsol · 348 weeks and 4 days ago
This is nice, but on most of our machines there is no netcat (our security team considered it harmful, so we uninstalled it). If we can install netcat, we can also install irssi or any similar client, though.
gergelypolonkai · 339 weeks and 6 days ago
I have read the information you have shared with us and I found its very interesting.
malkovich · 62 weeks and 1 day ago
This seems way too complicated for a noob like me to understand. If you have heard of metalprofy that’s where I get my fix for these things. I think it’s the best because I don’t need to get into such complications.
KayGasaway · 52 weeks ago
MaxRemind is not just a medical billing company for electrophysiology physicians and all other medical specialties but we also provide a complete and comprehensive solution to physicians. MaxRemind Inc offers Electrophysiology Medical Billing Services and home healthcare software in all states of USA.
stevematt · 45 weeks and 1 day ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this? is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands

Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.


Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: