Memories of Ray

Memories of Ray

전체  |  PHOTO  |  WEB  |  FTP  |  CAMERA  |  IRC  

25   1/2  
     2005-05-04 15:37:24    5,555  
    IRC Proxy Daemon - PSYBNC
PSYBNC Daemon은 WinBNC보다 비교도 안될정도로 많은 기능과 편의성을 갖춘 Proxy Daemon입니다.
User추가및 IRC서버를 원하는대로 추가할수 있고 IRC서버에 맞는 Channel도 미리 지정하여 PSYBNC에
접속하는 것만으로 자동으로 모두 Connect및 Join할 수 있습니다.
(참고: 문서 마지막에 리눅스버젼 설치에 관한 글이 있습니다.)

1.PSYBNC 프로그램을 준비한다.
   href="">Down :

2.압축을 원하는 곳에 풀고 안에 설정화일(psybnc.cfg)을 자신에 맞게 수정한다.

PSYBNC.SYSTEM.PORT1=34420 //PSYBNC의 포트 원하는 포트로 지정
PSYBNC.SYSTEM.HOST1=*       //PSYBNC가 설치될 곳의 IP를 직접 입력해도 됨

3. cfg수정이 끝나면 바로 psybnc.exe를 실행합니다.  PSYBNC Daemon이 바로 로딩됩니다.

4. mIRC를 띄워 PSYBNC에 접속하기 위해 설정을 합니다.

5. mIRC설정이 끝나면 바로 Connect버튼을 눌러서PSYBNC에 접속합니다.
   PSYBNC는 미리 config화일에 Password를 설정하지 않고 처음 Access한 상태에서 넣어준 Password가
   Admin Password가 됩니다. 아래 그림처럼 "/quote pass 123456"를 입력하면 123456이 Admin Pass가 됩니다.

6. PSYBNC에 접속하면 처음 Access해서 사용할 Admin에게 사용할 수 있는 명령어를 모두 보여줍니다. (좀 기나)

7.이제 WinBNC를 통해서 IRC서버에 접속해 보겠습니다.
  /quote addserver :6667
  Addserver 하자 마자 바로 단군넷에 접속하는걸 보실 수 있습니다.

8.IRC서버에 접속이 되면 평소에 사용하는것과 같이 채널에 Join해서 사용하시면 됩니다.
  PSYBNC는 Default로 해당IRC서버에서 조인했던 채널을 저장해두고 다음에 접속하면 예전에 Join했던
  채널에 자동으로 접속합니다.  직접 psybnc.cfg 화일을 수정해서 설정할 수 있으며 console에서 RAW커맨드를
  이용해서 세부적인 부분들을 컨트롤 할 수 있습니다.

  여기까지 PSYBNC를 이용해서 IRC서버에 접속하는 기본적인 사항만 설명드렸습니다.
  아래 RAW Command를 참조해서 좀더 세부적이고 강력한 Bouncer로 구축하시기 바랍니다.

9.PSYBNC에 접속해서 사용할 수 있는 명령어는 다음과 같습니다.

Setting up your Account

The first thing you need to do is connect to your bnc. In mirc, open up the connect dialogue box and add in another server. Name it "My BNC" or something like that, enter the IP and port, and enter the password that you chose (either through menuconfig or in the conf file). Now make sure that your ident is set to your username. It's also a good idea to set your e-mail address to "". If psy can't get an ident response from you, it checks your e-mail addy as verification of the username. If everything goes well, you'll see this when you connect: -Welcome- psyBNC2.2.1

Now you need to get connected to irc: first, you need to select your vhost. To see what vhosts are available, type "vhosts" at your shell prompt. For security reasons, there is no way to view the vhosts in psy. After your vhost is selected, you'll need to add in some irc servers, and set a few other options. the commands follow below. All commands appear in RED, everything else after it is an explanation. All brackets are for my purposes, don't use brackets in any command!

/vhost [vhost] -- [vhost] is your vhost in alpha form (ie, and NOT
/addserver [server] :[port] -- server can be in alpha or numeric form...

Once you add in the server, psy will auto-connect to it in a short while. You can add in more servers so that if one goes down, psy can reconnect to a different one. Just use the command above again. For server managment:

/listservers -- lists all the servers you have added
/delserver [n] -- deletes the server with #[n] (as shown by the listservers command)
/jump -- disconnects you from your current server and attempts to connect to the next server in your list
/bquit -- disconnects you from the server until you force it to connect
/bconnect -- connects you to irc

Now, remember that psy will keep you connected to irc even when you're not connected to the bnc. So, these commands are helpful:

/setaway [message] -- psy will display this message to all channels you're on when you quit the bnc. It will NOT repeat this message (since that's gay). To remove the message, just type /setaway
/setawaynick [nick] -- when you quit the bnc, psy will auto-change your nick to the nick you set here. When you reconnect, it'll auto change it back to what's shown in the mirc nick.

OK, now for some more commands that ppl find useful. Remember that ALL commands are in the README file that came with psybnc. I'm not going to repeat all of them.

/playprivatelog -- plays the log of all messages sent to you when you were disconnected from the bnc. The log will be opened in a window called -psyBNC.
/eraseprivatelog -- erases the aforementioned log.


psy has a damn cool feature in that it allows encryption. You can encrypt text sent to a channel or a person. Each person needs to have the same key to view the text. This is helpful if you're paranoid, or if you want to have a private conversation in a public channel. (Why you wouldn't just pm is beyond me ;) It also makes you look l33t lol.

/encrypt [password] :[channel/person] -- make sure everyone you want to speak with has the same key. And they need to be using psybnc as well. duh.
/listencrypt -- lists your current encryptions
/delencrypt [n] -- deletes encryption #[n] as shown by the listencryption command.


User management

Obviously, if you have your bnc compiled as singleuser, this section is pointless for you. But for everyone else, I'm sure you want to add in other users, delete them, etc... Here's the commands to do it:

/adduser [user] :[real name] -- the [user] is what the person will have to set their ident to. The [real name] part is what ppl will see when doing a /whois. for example: /adduser jestrix :me love you long time --> shows this in the first line of a whois --> jestrix is ident@vhost * me love you long time.
/deluser [user] -- deletes the user.
/password [new pass] -- changes your password. If you're an admin, you can change other ppl's passwords: /password [user] :[pass]
/madmin [user] -- makes a user into an admin (choose your admins carefully!)
/unadmin [user] -- removes admin rights from a user.
/bwho --- see who is added to your bouncer. Also shows if they're connected, what server they're connected to, and what their IP is.

I recommend you secure your bnc even more by restricting what IPs can connect to it:
/addallow [IP or mask] --- lets whatever IP or mask you specify connect to the bnc. IPs can be definite, ie. or masked, 12.12.12.*. You can also use hostnames and masks such as *
/listallow --- lists the allowed connections.
/delallow [n] --- deletes allow #n as shown by listallow.

DCC stuff

This section assumes that you compiled your bnc with DCCFILE and DCCCHAT. If you did not, then you can do all your dcc stuff as you normally would in mirc, but remember that your real IP will be revealed by doing this. Like I sated before, the benefit to psy is that it hides your IP during DCC sessions, but in order to do this, your life gets a bit harder. First, let's go over the basic DCC commands:

/dccchat [user] --- opens a dcc chat session with the user you specify.
/dccsend [file] :[user] --- sends a file to the person you specify. The file MUST be in ~/psybnc/downloads/USERx (where USERx is your user #. Not sure what your user # is? do a /bwho
/dccanswer [user] --- if someone sends you a dcc chat request, psy will inform you through a notice. You must then type this to accept the request.
/dccget [file] :[user] --- gets a file that was dcc'd to you by someone. This file will be stored in the ~/psybnc/downloads/USERx directory.
/dccsendme [file] --- tells psy to send you the file you specify. Use this after you get a file from another user and then want to get it from your shell. This is the only way people without shell access can get their files.
/listdcc --- lists all dcc's
/dcccancel [n] --- cancels dcc # n as shown by /listdcc

Now for the cool stuff :) my favorite feature of psy is it's ability to stay permanently connected to a bot through a DCC, and to ask this bot for ops. As anyone who has experience with running a botnet knows, one of the easiest ways for a channel to be taken over is to have some idiot /msg [bot] OP [password], when the bot's nick was taken by someone else. With psy, however, the askop request can be done two ways: through the partyline when a DCC is initiated, or through a msg that first checks the mask of the person being sent the request. Sweet, eh? So, the commands to do it:

/adddcc [botname] [username] [password] :[host]:[port] --- The botname is obviously the name of the bot, The username and password are your personal l/p that you use to gain access to the bot's partyline. The host is the host of the bot. It can be either the alpha-form, or the actual IP address. I prefer the actual IP address, since it's possible DNS can be down. And finally, the port is the port that the bot listens on for user connections. Some bots listen for other bots on one port and for users on another, so make sure you get the right one :)
/listdcc --- lists all dcc's
/deldcc [n] --- deletes dcc # n as shown by /listdcc

Now, for the askops part: This part assumes you added in a DCC to the bot as shown above. If you don't have partyline access, you can still add an askop, but I'll get to that later.

/addask [#chan] [password] :-[botname] --- The chan is the channel you want to get ops on, the password is your password, and the bot's nick, preceded with a :-, is the bot which you have a dcc enabled to.
/listask --- lists all the askops you have
/delask [n] --- deletes askop # n as shown by /listask

Now, if you don't have partyline access, you can add the askop in this way:

/addask [#chan] [password] :[bothost] --- where chan is the channel you want to be opped on, your password is your password (duh), and the bothost is the bot's hostmask. A mostmask, for the uninformed, is formed like this: username!ident@host. Since a bot is set to use a different nick if someone takes their default, set the host for something like: *!

Multiple Networks

One of my other favorite things about psyBNC :) Do you have a bunch of channels you hang in on efnet, but also one or two channels on dalnet that you like to go to? If you're like me, you do...but you alo hate having multiple mirc sessions open. Fret no more! psyBNC can solve your problems by allowing you to connect to more than one network with the same mirc client. For this section I'll assume that you're familiar with most of the commands in psy. If not, get familiar with them before you try to do this. Ok, let's get into the commands.

The first thing you need to do is add in another network:
/addnetwork [name] --- adds in a network with the name you specify. Keep in mind that network names are case-sensitive. Furthermore, you'll be typing the name a lot, so if you're adding in dalnet, use the name "dal" or "dn" or something similar.

Once you have the network added, you need to choose your vhost for that network. If you don't choose one, it'll default to the IP the bnc is on, usually something gay like "". So:
/vhost [network]~[vhost] --- sets your vhost on the network you specify.

See this command? This is the format for ALL commands used on multiple networks. Simply prefix the syntax of the command with [network]. So, to give some other examples:

/addserver --- adds in the server with port 6667 to the "dn" network.
/join dn~#fxp --- joins #fxp on network dn. (btw, I hear that some freaky ppl hang in this particular channel ;)
/msg dn~joeschmoe beeyatch --- sends the message "beeyatch" to user with the nick joeschmoe on network dn.

Now, some weird things about multiple networks:
1. Your nick in the nicklists for channels on other networks will show the nick you're using on your primary network. So, even if you do: /nick dn~TwatMuffin, even though other ppl will now see you as TwatMuffin in their list, you'll see yourself as jestrix, or whatever nick you use.

2. If you get opped/voiced in a channel, you won't see it in the nicklist. You'll just appear to be a regular schmoe.

3. Let's say JoeSmith is in #chat on efnet, your primary network. You head over to dalnet, and he's there in #fxp. Everyone else in #fxp will look like dn~BobJones, but JoeSmith will be just JoeSmith. If you try to msg him by dbl-clicking on his nick int he dalnet channel, you'll really be sending a msg to him on efnet. You have to use dn~JoeSmith to talk with him on dalnet.

Some final things. Maybe you don't always want to be on more than one network. I prefer to always be on efnet, and then head to my other networks when I want to talk with ppl there. So:
/bconnect [network]~ --- connects you to the network you specify (assuming you have servers added for that network)
/bquit [network]~ --- quits you from that network. You'll still be connected to your primary network. Note, if you do /bquit, you'll be quitted from ALL your networks.

OK, multiple networks also includes the psy "internal network". Think of it as an ircd inside your bnc. By using the network name "int" you can create private channels that only ppl connected to your bnc can access. For example, /join int~#partyline will have you join the internal channel #partyline. You can set modes/ops/topic in the internal channels just like you would on a normal channel. do a whois on someone in an internal channel, it looks neat ;) You can also privately msg other people connected to your bnc: /msg $[nick]. Prefix it with a $ and psy will send it directly to the person on the bnc; it will not pass through the irc server.


A cool aspect of psy is the ability form a psy-net through the linkage of multiple psybncs. The benefit of this is to create a private internal network secure from snooping, and secure from takeovers! Furthermore, you can let ppl on other bouncers use your machine's vhosts if you wish.

So, to create a link to another bouncer:
/linkto [name of other bnc] :[IP]:[port]

The other bouncer would have to do the following:
/linkfrom [name of other bnc] :[IP]:[port]

To view all your links:

I love to have everything encrypted, including my links. To create an encrypted link:
/setlinkkey [link #] :[password]
After doing this on both psy's, do:
/relink [link #] on either bouncer to reset

To enable the sharing of vhosts:
/relaylink [name of other bnc] :n --- where n=0 to disable vhost sharing; 1 to enable it.

Final note: If you use hostmasks to restrict connections to your bnc, you must add the other bnc's IP as an allowed host!!


For one reason or another, you might want to edit your psybnc.conf (especially if menuconfig doesn't work for you). So, here are the applicable lines and what they mean. I'm sure I've missed a few lines, so if you find anything and know what it does, please email me. Note that ALL the variables in psybnc.conf are capitalized and that there are no spaces on either side of the =.

Variables are shown in orange.

PSYBNC.SYSTEM.PORT1= The port your bnc is going to listen on. use a PORTx variable if you want multiple ports.
PSYBNC.SYSTEM.ME= The name of your bouncer.
PSYBNC.SYSTEM.HOST1= The IP your bnc is going to listen on. Use HOSTx for multiple hosts.
PSYBNC.SYSTEM.DCCHOST= The IP that will be used for DCC sessions.
PSYBNC.HOSTALLOWS.ENTRY0= The first IP that will be allowed to connect to your bouncer. Use *;* for everyone. This can include masks. The first * indicates the IP, not sure what the * after the ; denotes... can't find anything anywhere about it.

(note that USER1 can be substituted for USERx)
USER1.USER.LOGIN= The login name for the user (ident)
USER1.USER.NICK= The nick the user will use on irc.
USER1.USER.USER= The 'real name' of the user (what appears in the whois)
USER1.USER.PASS= The password of the user (this will be shown in encrypted form; if you change the password in psybnc, then restart it, the password will become encrypted.)
USER1.USER.RIGHTS= 0-not an admin; 1-an admin
USER1.USER.ACOLLIDE= 0-disable anti-collide; 1-enable anti-collide
USER1.USER.SYSMSG= 0-Do not show system messages to the user; 1-Show them
USER1.USER.VHOST= The user's vhost
USER1.USER.AWAYNICK= The user's away nick
USER1.USER.AWAY= The user's away msg
USER3.USER.LEAVEMSG= The message shown when you disconnect from the bnc
USER1.USER.VLINK= (0/1) Not sure what this does (default =0)
USER1.USER.PPORT= (0/1) Not sure what this does (default =0)
USER1.USER.PARENT= (0/1) Not sure what this does (default =0)
USER1.USER.QUITTED= 0-User is connected to irc; 1-User is quitted
USER1.USER.DCCENABLED= 0-dcc is diabled; 1-dcc is enabled.
USER1.USER.AIDLE= 0-anti-idle is disabled; 1-it's enabled.
USER1.USER.LEAVEQUIT= 0-when the user disconnects from teh bnc, they stay on all their channels; 1-when they quit, they leave all the channels, but still stay connected to irc.
USER1.USER.AUTOREJOIN= 0-if you get kicked when not on the bnc, psy will not rejoin the channel; 1-psy sill rejoin the channel for you if you get kicked.
USER1.USER.LASTLOG= (0/1) Not sure what this does (default =0)
USER1.SERVERS.SERVER1= The first server of the user.
USER1.SERVERS.PORT1= The port for server number 1.
USER1.CHANNELS.ENTRY0= The first channel the user wants to sit on.
USER1.CHANNELS.KEY0= The key for the first channel. (This is NOT encrypted)
USER1.INTCHANS.ENTRY0= An internal channel the user wants to sit on.
USER1.AOP.ENTRY1= Entry for someone to get ops from your client int he form of hostmask;password. (not covered in this tutorial)

LINKS.LINK1.PORT= Port for link 1
LINKS.LINK1.NAME= name of the otehr bnc
LINKS.LINK1.IAM= name of the other bnc (redundant?)
LINKS.LINK1.HOST= IP of the link
LINKS.LINK1.PASS= Password for the link (used only by the bncs)
LINKS.LINK1.ALLOWRELAY= 0-Do not share vhosts; 1-Allow the sharing of vhosts
LINKS.LINK1.CRKEY= Key set by negotiation between the bncs
LINKS.LINK1.TYPE= 0-Your bouncer links to theirs; 1-Their bouncer links to yours.

(note: I don't recommend editing any of these variables through psybnc.onf -> use the commands in mirc.
USER1.DCC.ENTRY0= Stuff pertaining to DCC #0
USER1.ASK.ENTRY0= Stuff pertaining to AskOp #0

Setting Crontab

The basic form for a crontab entry is (to the best of my knowledge):

So, if you like to check every 10min, it would be:
0,10,20,30,40,50 * * * *

Included with psybnc is psybncchk. Open this file and change the line that reads PSYBNCPATH=/set/path/here. Set it to your psybnc directory of course. Make sure it has execute perms (chmod 700 psybncchk)!

Then add the following to your crontab (use crontab -e to edit your crontab): (this example is for a check every 10 minutes:
0,10,20,30,40,50 * * * * /l33t/shell/psybnc/psybncchk >/dev/null 2>&1

The >/dev/null 2>&1 part tells crontab not to send you an e-mail whenever it restarts psybnc. Omit that part if you like e-mail.

Linux shell에서도 기본적인 사용법은 같습니다.

1. tar xvfz psyBNC2.3.1.tar.gz (압축을풀고)

2. cd psybnc (풀린 폴더로 이동)

3. make menuconfig (config메뉴를 컴파일한후 기본적인 세팅해줄것만 넣고.  그냥 디폴트값 상태로 해도 상관없습니다.)

4. make (psybnc를 생성하기 위해 컴파일 합니다.)

5. ./psybnc (바운서를 실행하고 윈도우용과 똑같이 사용하시면 됩니다.)

리눅스용 소스 :
25 17
24 2371
23 3954
22 3358
21 3180
19 3391
18 3484
17 3504
16 3309
15 3363
14 3201
13 4045
12 10033
11 3486
10 3406
9 3512
8 3349
7 3710
6 3194
   1 [2]