MozRepl (Mozilla Plugin) lets you program Firefox and other Mozilla-based applications from the inside using a telnet client.
MozRepl Is a plugin for Mozilla-based applications. It is an read/eval/print loop, that acts like a telnet server within e.g. Firefox.
The server allowing you connect to the "telnet server" using any application and send commands to Firefox. Commands sent to Firefox by MozRepl are executed as if it was run from the browser.
Example of client: WWW::Mechanize::Firefox what uses MozRepl and allows automate Firefox via perl through the Mozrepl plugin.