This is a script that will test your ruTorrent installation from a remote computer. The most important thing it tests is that your RPC mounts are secure. If they're not, then your computer could be hacked. It currently tests this:
- RPC mount points are protected (requires password)
- user1 can't access user2's RPC mount point
- user1 can access his own RPC mount point
- No files in rutorrent/conf or rutorrent/share can be accessed
- Only an authenticated user can access ruTorrent
- .svn dirs can't be accessed
- user1 can't execute code (NOTE: only a few tests!)
These are only remote tests. Any user with shell access could do more stuff.
If you can think of other tests, let me know and I'll add them.
Code:
wget -O httpd-test.sh http://autodl-irssi.svn.sourceforge.net/viewvc/autodl-irssi/trunk/httpd-test.sh?content-type=text/plain
sh httpd-test.sh 192.168.0.123 /rutorrent user1 pass1 /RPC1 user2 pass2 /RPC2
sh httpd-test.sh 192.168.0.123 /rutorrent user1 pass1 /RPC1
The IP address is the server. /rutorrent is the URL path to ruTorrent. The rest are self-explanatory.
If you need HTTPS access, edit the file and change protocol=http to https and port=80 to 443.
You will need curl and xmlrpc installed. xmlrpc is compiled (but not automatically installed) when you compile XMLRPC-C. Debian/Ubuntu users: apt-get install libxmlrpc-c3-dev
- RPC mount points are protected (requires password)
- user1 can't access user2's RPC mount point
- user1 can access his own RPC mount point
- No files in rutorrent/conf or rutorrent/share can be accessed
- Only an authenticated user can access ruTorrent
- .svn dirs can't be accessed
- user1 can't execute code (NOTE: only a few tests!)
These are only remote tests. Any user with shell access could do more stuff.
If you can think of other tests, let me know and I'll add them.
Code:
wget -O httpd-test.sh http://autodl-irssi.svn.sourceforge.net/viewvc/autodl-irssi/trunk/httpd-test.sh?content-type=text/plain
sh httpd-test.sh 192.168.0.123 /rutorrent user1 pass1 /RPC1 user2 pass2 /RPC2
sh httpd-test.sh 192.168.0.123 /rutorrent user1 pass1 /RPC1
The IP address is the server. /rutorrent is the URL path to ruTorrent. The rest are self-explanatory.
If you need HTTPS access, edit the file and change protocol=http to https and port=80 to 443.
You will need curl and xmlrpc installed. xmlrpc is compiled (but not automatically installed) when you compile XMLRPC-C. Debian/Ubuntu users: apt-get install libxmlrpc-c3-dev