Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

A scripted IRC BNC daemon?

Name: Anonymous 2007-08-02 13:15 ID:ihmWLgE7

Hello,
For the few of you who are unaware of what a BNCd is, read this: http://en.wikipedia.org/wiki/Bouncer_%28networking%29#IRC_use
I know many of you will have access to unix(like) shell account somewhere on the web, some of you are actually running unix. My target audience is the former. Most readily available BNC programs are written in C, and the majority of them require compilation and execution. Popular ones include 'psyBNC' and 'ZNC' Many shell accounts do not allow their users the privilage of running processes such as BNC daemons. That is why I want to create I want to create a barebones BNCd, but create it using a widely accessable interpreted language, like Perl, PHP, Python, etc. This script could be executed in screen detaching software on the shell account and left to handle any incoming traffic, thereby turning your shell account(s) into fully functional IRC proxies.

The fundementals of the actual script are pretty basic. You're just creating a two way 'tunnel' for some IRC traffic: one socket connected to an IRC server and a second socket binded to a port and listening for connections and data. Any data recieved from the first socket will be written to the second, while any data recieved from the second socket will be written to the first. Seemingly simple.

While PHP and Python have pretty good socket libaries, I have been unable to successful create a satisfactory daemon. I have managed to code a somewhat rudimentary one in PHP, but the downside is that it's just deadly slow.
Would any EXPERT PROGRAMMERS be able to offer some advice or even some code?
Thanks.

Name: Anonymous 2007-08-02 13:29 ID:bIpJmbMt

l2programmulate

Name: Anonymous 2007-08-02 14:08 ID:Heaven

You are writing it in PHP, of course it is going to be slow.

Name: Anonymous 2007-08-02 15:47 ID:ihmWLgE7

>>3
Yeah, it's pretty much a given with PHP. I've been playing with Lua recently, but sockets functionality isn't even included in the standard lib.

Name: Anonymous 2007-08-02 16:02 ID:e9iuyxOX

what retard shell doesn't let you compile C programs?

Name: Anonymous 2007-08-02 16:16 ID:ihmWLgE7

>>5
Many shells will allow you compile stuff, but will not allow you run arbitrary executables.

Name: Anonymous 2007-08-02 16:24 ID:XfqpHqBb

You might want to take a look at the Perl IRC Daemon and write your BNCd on top of it.

http://pircd.sourceforge.net/

Name: Anonymous 2007-08-02 17:29 ID:ko8Z+cuN

PHP for a daemon?

Go kill yourself, you know nothing about programming. You are like that failure on ##php (freenode) who wanted to make PHP serve as a barcode reader. The moron wanted PHP to read the serial port -- I shit you not.

PHP lacks any form of threading, the permission model is shit... ugh. It works for some things, not for this.

Name: Anonymous 2007-08-02 17:47 ID:Heaven

>>8
The lack of threading in php is fucking ridiculous. I also agree about using php as a daemon, shit sucks.

Name: Anonymous 2007-08-02 19:27 ID:Heaven

Hm... This sounds like a job for netcat.

Name: Anonymous 2007-08-02 21:39 ID:ihmWLgE7

>>10
How would one utilise netcat for this purpose?

Name: Anonymous 2007-08-02 22:50 ID:Heaven

You want something akin to this, no?
http://www.governmentsecurity.org/archive/t3303.html

Name: Anonymous 2007-08-02 22:56 ID:7pXdBUCC

ONE WORD, PCNTL_FORK(), THREAD OVER

Name: Anonymous 2007-08-03 1:50 ID:EZHMDcjd

Wow, BNC? People still use that? I stopped around 1997 when I left the sinking spamhole that is IRCNet

Name: Anonymous 2010-12-20 21:14


Don't change these.
Name: Email:
Entire Thread Thread List