Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: HTTP remote control server (Read 13288 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

HTTP remote control server

This is a quick and dirty standalone HTTP remote control server.
The interface looks rather crude but as it uses templates it can be customized easily.

[attachment=2943:attachment]

It provides limited functionality, including
- play, pause, stop, next, previous
- showing the current song and status
- listing the playlist and selecting a song

You will need the foo_controlserver component:
http://www.hydrogenaudio.org/forums/index....showtopic=38114

The listening port and host&port of the machine foobar is running can be configured by editing webfoo.conf.txt
but in most cases the standard values will do it.

With standard configuration, the interface can be accessed through
http://localhost:2000

It's written in Ruby because I wanted to try out that language.
Jut unpack [attachment=2942:attachment] and run webfoo.exe.

Source:
[attachment=2944:attachment]

HTTP remote control server

Reply #1
Any idea why I always get an "Internal Server Error" for the playlist, when I try to access webfoo from another computer on the LAN? No problem at all when using localhost.. edit: Actually does it randomly on refresh on localhost, too.

The error is "undefined method `[]' for nil:NilClass".

More details:

WebFoo 0.1
HTTP remote interface for foobar2000
Copyright © 2007 by Marcel Schaeben
[2007-07-13 15:27:24] INFO  WEBrick 1.3.1
[2007-07-13 15:27:24] INFO  ruby 1.8.5 (2006-08-25) [i386-mswin32]
[2007-07-13 15:27:24] INFO  WEBrick::HTTPServer#start: pid=3576 port=2000
HTTP server started on port 2000.
Connected to foobar.
localhost - - [13/Jul/2007:15:27:32 FLE Standard Time] "GET /control HTTP/1.1" 200 433
http://127.0.0.1:2000/ -> /control
localhost - - [13/Jul/2007:15:27:32 FLE Standard Time] "GET /playlist HTTP/1.1" 200 69062
http://127.0.0.1:2000/ -> /playlist
localhost - - [13/Jul/2007:15:27:38 FLE Standard Time] "GET /control?cmd=next HTTP/1.1" 200 428
http://127.0.0.1:2000/control -> /control?cmd=next
10.0.0.3 - - [13/Jul/2007:15:28:37 FLE Standard Time] "GET / HTTP/1.1" 200 178 - -> /
10.0.0.3 - - [13/Jul/2007:15:30:06 FLE Standard Time] "GET /favicon.ico HTTP/1.1" 200 178
http://10.0.0.2:2000/ -> /favicon.ico
[2007-07-13 15:30:06] ERROR NoMethodError: undefined method `[]' for nil:NilClass
        C:\DOCUME~1\user\LOCALS~1\Temp\eee.webfoo.exe.8\app\webfoo.rb:92:in `getPlaylist'
        C:\DOCUME~1\user\LOCALS~1\Temp\eee.webfoo.exe.8\app\webfoo.rb:176
        C:\DOCUME~1\user\LOCALS~1\Temp\eee.webfoo.exe.8\app\webfoo.rb:172:in `gsub!'
        C:\DOCUME~1\user\LOCALS~1\Temp\eee.webfoo.exe.8\app\webfoo.rb:172
        C:/DOCUME~1/user/LOCALS~1/Temp/eee.webfoo.exe.8/lib/webrick/httpservlet/prochandler.rb:26:in `call'
        C:/DOCUME~1/user/LOCALS~1/Temp/eee.webfoo.exe.8/lib/webrick/httpservlet/prochandler.rb:26:in `do_GET'
        C:/DOCUME~1/user/LOCALS~1/Temp/eee.webfoo.exe.8/lib/webrick/httpservlet/abstract.rb:35:in `__send__'
        C:/DOCUME~1/user/LOCALS~1/Temp/eee.webfoo.exe.8/lib/webrick/httpservlet/abstract.rb:35:in `service'
        C:/DOCUME~1/user/LOCALS~1/Temp/eee.webfoo.exe.8/lib/webrick/httpserver.rb:104:in `service'
        C:/DOCUME~1/user/LOCALS~1/Temp/eee.webfoo.exe.8/lib/webrick/httpserver.rb:65:in `run'
        C:/DOCUME~1/user/LOCALS~1/Temp/eee.webfoo.exe.8/lib/webrick/server.rb:173:in `start_thread'
        C:/DOCUME~1/user/LOCALS~1/Temp/eee.webfoo.exe.8/lib/webrick/server.rb:162:in `start'
        C:/DOCUME~1/user/LOCALS~1/Temp/eee.webfoo.exe.8/lib/webrick/server.rb:162:in `start_thread'
        C:/DOCUME~1/user/LOCALS~1/Temp/eee.webfoo.exe.8/lib/webrick/server.rb:95:in `start'
        C:/DOCUME~1/user/LOCALS~1/Temp/eee.webfoo.exe.8/lib/webrick/server.rb:92:in `each'
        C:/DOCUME~1/user/LOCALS~1/Temp/eee.webfoo.exe.8/lib/webrick/server.rb:92:in `start'
        C:/DOCUME~1/user/LOCALS~1/Temp/eee.webfoo.exe.8/lib/webrick/server.rb:23:in `start'
        C:/DOCUME~1/user/LOCALS~1/Temp/eee.webfoo.exe.8/lib/webrick/server.rb:82:in `start'
        C:\DOCUME~1\user\LOCALS~1\Temp\eee.webfoo.exe.8\app\webfoo.rb:189
        C:\DOCUME~1\user\LOCALS~1\Temp\eee.webfoo.exe.8\bootstrap.rb:50:in `load'
        C:\DOCUME~1\user\LOCALS~1\Temp\eee.webfoo.exe.8\bootstrap.rb:50
10.0.0.3 - - [13/Jul/2007:15:29:13 FLE Standard Time] "GET /control HTTP/1.1" 200 456
http://10.0.0.2:2000/ -> /control
10.0.0.3 - - [13/Jul/2007:15:29:48 FLE Standard Time] "GET /playlist HTTP/1.1" 500 317
http://10.0.0.2:2000/ -> /playlist

HTTP remote control server

Reply #2
I compiled the source with latest versions of Ruby and rubyscript2exe, and it seemed to help somewhat. However webfoo still works very slow when accessed from outside localhost.

HTTP remote control server

Reply #3
Help.. Anyone?


 

HTTP remote control server

Reply #5
I compiled the source with latest versions of Ruby and rubyscript2exe, and it seemed to help somewhat. However webfoo still works very slow when accessed from outside localhost.


I dont have any idea on ruby language. If we can make another one of this by other language or maybe java or C++ I can help you. Give me the algorithm if it is okay so that we can try to use other language. Thanks.
Jon