Extension and Command Line tools to make webpages in firefox browser interact with underlying platform and shell.
$ ./PBotConfig PBot Configuration: Enter Script Base Path /home/administrator/PBotScripts
Then to add Script for a webpage: How to Write Scripts
$ bash AddScript.sh Add Script Enter Script Path: /tmp/T1.js Enter WebSite: www.google.com Installed Script
Then Run:
$ ./PBotManagerto run the server. Load webpages in firefox and the scripts for those pages will be loaded.
All script needs to be Stored in
pBot.onLoad(function() { /* JavaScript to Run on WebPages For Example: alert("Welcome to PBot"); */ });
Use
pBot.exec(executable_path:string,callback)to execute shell commands.
executable_path: The command to execute. callback : A function that receives the object with the following keys:
- output:the output of command
- err_code: the error code of the command
Make use of pBot.onError() that receives a function with error details as parameter to catch the errors.
Use : pBot.requireFile(javascript_file_path,callback) to import external data.
pBot.on(event,callback) is triggered when PBotClient program is executed with the following arguments:
$ ./PBotClient --help PBotClient: Usage: PBotClient RECEIVER EVENT_NAME JSON_DATARECEIVER is the website for which script is executing EVENT_NAME and JSON_DATA are passed to callback of pBot.on() function