Install psybnc on fvdw firmware?

Install psybnc on fvdw firmware?

Postby benji1984 » Thu Nov 08, 2012 7:18 pm

Hi,

I would like to install psyBNC on my SPD8020 ... Is there someone who succeeded in compiling psyBNC from source?
psyBNC: http://www.psybnc.at/
Or are there simpler alternatives I am overlooking?

Thanks in advance,

Benjamin
benji1984
 
Posts: 10
Joined: Sun Sep 23, 2012 2:56 am
Location: Netherlands

Re: Install psybnc on fvdw firmware?

Postby fvdw » Thu Nov 08, 2012 7:44 pm

I could compile it for you, but what is your intended use of the program...
fvdw
Site Admin - expert
 
Posts: 13245
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: Install psybnc on fvdw firmware?

Postby Jocko » Thu Nov 08, 2012 7:47 pm

I quickly read some web pages.

If I understand well, the user must have a shell access to use it. So only the adminuser will be able to use it (with a root permission).

So you could not use it with the other user accounts.
Jocko
Site Admin - expert
 
Posts: 11367
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: Install psybnc on fvdw firmware?

Postby benji1984 » Thu Nov 08, 2012 7:53 pm

Hi guys,

I would like to have psyBNC so I am always online on some IRC channels. This means when I close my IRC client, my bouncer is still online and people can leave messages for me.
More info:
http://en.wikipedia.org/wiki/BNC_(software)

Regards,

Benjamin
benji1984
 
Posts: 10
Joined: Sun Sep 23, 2012 2:56 am
Location: Netherlands

Re: Install psybnc on fvdw firmware?

Postby fvdw » Thu Nov 08, 2012 10:52 pm

I compiled it for you, see attached file. I included the default conf file and the README file from the source code as well as the key files you need when using ssl connection (it is compiled with ssl support)
You will need to modify the configuration file (see README file of the source code).
Ps do not store the log file in the system directory it will then run out of space soon. Make a new shared folder and put the files in the attachement there and run psybnc from that directory, the log file then will be stored in the shared folder in subfolder log (or set it in the conf file using full path to the folder /share/1000/name-of-shared-folder)

I fired up the program and it start listening
Code: Select all
root@fvdwsl-nwsp2:/share/1000/fvdw/psybnc # ./psybnc
.-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-.
 ,----.,----.,-.  ,-.,---.,--. ,-.,----.
 |  O ||  ,-' \ \/ / | o ||   \| || ,--'
 |  _/ _\  \   \  /  | o< | |\   || |__
 |_|  |____/   |__|  |___||_|  \_| \___|
      Version 2.3.2-9 (c) 1999-2003
              the most psychoid
      and  the cool lam3rz Group IRCnet

`-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=tCl=-'
** WARNING ** You run psybnc as root
Configuration File: psybnc.conf
Language File: psyBNC Language File - English
No logfile specified, logging to log/psybnc.log
Listening on: 0.0.0.0 port 31337
psyBNC2.3.2-9-cBtITLdDMNEFX started (PID 5127)
root@fvdwsl-nwsp2:/share/1000/fvdw/psybnc #


below the output during compiling including the settings used to generate the ssl keys. Of course you can generate new key yourself using openssl as present in the firmware

Code: Select all
root@fvdwsl-nwsp2:/share/1000/fvdw/psybnc # make
Initializing bouncer compilation
[*] Running Conversion Tool for older psyBNC Data.
Using existent configuration File.
[*] Running Autoconfig.
System: Linux
Socket Libs: Internal.
Environment: Internal.
Time-Headers: in time.h and sys/time.h
Byte order: Big Endian.
IPv6-Support: Yes.
async-DNS-Support: Yes.
SSL-Support: Yes.
Creating Makefile
[*] Compiling MakeSalt for Encryption..
Using existent Salt-File
[*] Compiling Bouncer..
make[1]: Entering directory `/share/1000/fvdw/psybnc'
gcc -o psybnc -O src/psybnc.o src/match.o src/p_client.o src/p_crypt.o src/p_dcc.o src/p_hash.o src/p_idea.o src/p_inifunc.o src/p_link.o src/p_log.o src/p_memory.o src/p_network.o src/p_parse.o src/p_peer.o src/p_server.o src/p_socket.o src/p_string.o src/p_sysmsg.o src/p_userfile.o src/p_uchannel.o src/p_script.o src/p_topology.o src/p_intnet.o src/p_blowfish.o src/p_translate.o src/p_coredns.o src/snprintf.o  -lm  -L/usr/local/ssl/lib -lssl -lcrypto  -lresolv
*** GENERATING SSL-KEYS FROM CERTIFICATE **
* You will be prompted for Cert-Contents  *
*  This Infos will be used only for SSL   *
* Alter the informations to your values   *
* for the sake of correct Cert-Checking   *
*******************************************
Generating certificate request ..
Generating a 2048 bit RSA private key
....................+++
...............................................................................................+++
writing new private key to 'key/psybnc.key.pem'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name [DE]:
State/Province [Somewhere]:
Locality Name (eg, city) []:
Organization Name (eg, company) [tCl]:
Organizational Unit Name (eg, section) [psyBNC]:
Common Name (Full domain of your server) []:
Generating self-signed certificate ..
Generating fingerprint ..
subject= /C=DE/ST=Somewhere/O=tCl/OU=psyBNC
notBefore=Nov  8 20:03:03 2012 GMT
notAfter=Nov  8 20:03:03 2013 GMT
MD5 Fingerprint=3D:4C:06:8D:7A:93:18:9F:3C:38:B9:35:97:3C:B1:7C
psyBNC2.3.2-9-Linux ready. Please read the README before you run psybnc.
make[1]: Leaving directory `/share/1000/fvdw/psybnc'
-rwxr-xr-x  1 root root 221304 2012-11-08 21:00 psybnc
done.
root@fvdwsl-nwsp2:/share/1000/fvdw/psybnc #
You do not have the required permissions to view the files attached to this post.
fvdw
Site Admin - expert
 
Posts: 13245
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: Install psybnc on fvdw firmware?

Postby benji1984 » Fri Nov 09, 2012 12:17 am

Hi fvdw,

Thanks a lot for compiling :) Couldn't find a way to get it to work...

I have created a share for psyBNC in /share/1000/:
Code: Select all
root@tomcat:/share/1000 # ls -al
total 92
drwxr-xr-x  12 root      root       4096 2012-11-09 01:09 .
drwxrwxrwx   3 root      root       4096 2011-06-03 02:37 ..
drwxrwxrwx   2 root      root       4096 2012-11-09 01:09 fvdw
drwx------   2 root      root      16384 2000-01-01 21:40 lost+found
drwxrwxrwx   2 root      root       4096 2010-12-22 14:30 mt-daapd
-rw-r--r--   1 root      root      25314 2010-12-22 14:51 mt-daapd.log
drwxrwxrwx   3 root      root       4096 2012-11-08 20:08 private
drwxrwxrwx   8 benjamind benjamind  4096 2012-11-09 00:40 psybnc
drwxrwxrwx   8 root      root       8192 2012-11-09 00:34 public
drwxrwxrwx   4 root      root       4096 2012-09-23 12:12 tf-downloads
drwxrwxrwx   3 root      root       4096 2012-09-23 12:15 tflux
drwxrwxrwx   5 root      root       4096 2012-11-06 21:46 tr-daemon
drwxrwxrwx   2 root      root       4096 2012-09-23 12:02 tr-downloads

However, when I run the psybnc script I get a 'permission denied' failure:
Code: Select all
root@tomcat:/share/1000 # ./psybnc
-sh: ./psybnc: Permission denied

I'm quite new to Linux, so bear with me :) Do you know what I'm doing wrong here? Does this have something to do with user benjamind who is owner of this folder?

*edit after some google searches :)*

Hmm, I've changed the owner of de folder + files, but still I do not seem to have permission to run the script:

Code: Select all
root@tomcat:/share/1000/psybnc # sudo chown -R root:root /share/1000/psybnc/


Code: Select all
drwxr-xr-x  12 root root  4096 2012-11-09 01:09 .
drwxrwxrwx   3 root root  4096 2011-06-03 02:37 ..
drwxrwxrwx   2 root root  4096 2012-11-09 01:09 fvdw
drwx------   2 root root 16384 2000-01-01 21:40 lost+found
drwxrwxrwx   2 root root  4096 2010-12-22 14:30 mt-daapd
-rw-r--r--   1 root root 25314 2010-12-22 14:51 mt-daapd.log
drwxrwxrwx   3 root root  4096 2012-11-08 20:08 private
drwxrwxrwx   8 root root  4096 2012-11-09 00:40 psybnc
drwxrwxrwx   8 root root  8192 2012-11-09 00:34 public
drwxrwxrwx   4 root root  4096 2012-09-23 12:12 tf-downloads
drwxrwxrwx   3 root root  4096 2012-09-23 12:15 tflux
drwxrwxrwx   5 root root  4096 2012-11-06 21:46 tr-daemon
drwxrwxrwx   2 root root  4096 2012-09-23 12:02 tr-downloads


Code: Select all
drwxrwxrwx   8 root root   4096 2012-11-09 00:40 .
drwxr-xr-x  12 root root   4096 2012-11-09 01:09 ..
-rw-rw-rw-   1 root root  16169 2008-10-13 18:57 FAQ
drwxrwxrwx   2 root root   8192 2012-11-09 00:41 help
drwxrwxrwx   2 root root   4096 2012-11-09 00:40 key
drwxrwxrwx   2 root root   4096 2012-11-09 00:40 lang
drwxrwxrwx   2 root root   4096 2012-11-09 00:40 log
drwxrwxrwx   2 root root   4096 2012-11-09 00:40 motd
-rw-rw-rw-   1 root root 221304 2012-11-08 23:34 psybnc
-rw-rw-rw-   1 root root     77 2007-03-20 14:52 psybnc.conf
-rw-rw-rw-   1 root root  35502 2008-10-22 19:59 README
drwxrwxrwx   3 root root   4096 2012-11-09 00:40 scripts
benji1984
 
Posts: 10
Joined: Sun Sep 23, 2012 2:56 am
Location: Netherlands

Re: Install psybnc on fvdw firmware?

Postby Jocko » Fri Nov 09, 2012 8:47 am

Hi benji1984
Code: Select all
-rw-rw-rw-   1 root root 221304 2012-11-08 23:34 psybnc
You must set excute permission.

So just do :
Code: Select all
chmod 755 /share/1000/psybnc/psybnc


after running this command, you must get :
Code: Select all
-rwxr-xr-x   1 root root 221304 2012-11-08 23:34 psybnc
Jocko
Site Admin - expert
 
Posts: 11367
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: Install psybnc on fvdw firmware?

Postby benji1984 » Tue Nov 13, 2012 7:16 pm

Hi guys,

Thanks again for all your help.
However, psyBNC does not seem to work, as psyBNC tells me that it is not listening to the port I configured:

Code: Select all
.-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-.
 ,----.,----.,-.  ,-.,---.,--. ,-.,----.
 |  O ||  ,-' \ \/ / | o ||   \| || ,--'
 |  _/ _\  \   \  /  | o< | |\   || |__
 |_|  |____/   |__|  |___||_|  \_| \___|
      Version 2.3.2-9 (c) 1999-2003
              the most psychoid
      and  the cool lam3rz Group IRCnet

`-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=tCl=-'
** WARNING ** You run psybnc as root
Configuration File: psybnc.conf
Language File: psyBNC Language File - English
No logfile specified, logging to log/psybnc.log
[color=#FF4000]Cannot create listening port .. aborting[/color]


In the setup of fvdw it seems to work.

My config file looks like this:
Code: Select all
PSYBNC.SYSTEM.PORT1=31337
PSYBNC.SYSTEM.HOST1=192.168.1.101
PSYBNC.HOSTALLOWS.ENTRY0=*;*


ifconfig -a:
Code: Select all
eth0      Link encap:Ethernet  HWaddr 00:90:3E:7E:C8:4A
          inet addr:192.168.1.101  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:56660511 errors:21394 dropped:21394 overruns:0 frame:0
          TX packets:44929717 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:2497736533 (2.3 GiB)  TX bytes:105534830 (100.6 MiB)
          Interrupt:21


Any ideas on what I'm doing wrong?

*EDIT*

Never mind guys :) A reboot of the NAS did the trick! :

Code: Select all
root@tomcat:/share/1000/psybnc # ./psybnc
.-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-.
 ,----.,----.,-.  ,-.,---.,--. ,-.,----.
 |  O ||  ,-' \ \/ / | o ||   \| || ,--'
 |  _/ _\  \   \  /  | o< | |\   || |__
 |_|  |____/   |__|  |___||_|  \_| \___|
      Version 2.3.2-9 (c) 1999-2003
              the most psychoid
      and  the cool lam3rz Group IRCnet

`-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=tCl=-'
** WARNING ** You run psybnc as root
Configuration File: psybnc.conf
Language File: psyBNC Language File - English
No logfile specified, logging to log/psybnc.log
Listening on: 192.168.1.101 port 31337
psyBNC2.3.2-9-cBtITLdDMNEFX started (PID 857)
root@tomcat:/share/1000/psybnc #
benji1984
 
Posts: 10
Joined: Sun Sep 23, 2012 2:56 am
Location: Netherlands

Re: Install psybnc on fvdw firmware?

Postby Jocko » Tue Nov 13, 2012 7:43 pm

Hi benji1984,

Check the port is not already in use

In putty window make
Code: Select all
netstat -pan
and search if a process doesn't use your port.

If yes kill it with the pid displayed in the relevant line.

---Edit---
I just read your add

So if after rebooting, you don't have issue, then the port had to be in use
Jocko
Site Admin - expert
 
Posts: 11367
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: Install psybnc on fvdw firmware?

Postby benji1984 » Tue Nov 13, 2012 10:22 pm

All works fine now :) Many thanks!
benji1984
 
Posts: 10
Joined: Sun Sep 23, 2012 2:56 am
Location: Netherlands

Next

Return to Development

Who is online

Users browsing this forum: No registered users and 3 guests