git clone git://github.com/firebreath/FireBreath.git -b firebreath-1.5 firebreath-1.5
python fbgen.py
alex@alex-laptop:~$ git clone git://github.com/firebreath/FireBreath.git -b firebreath-1.5 firebreath-1.5
Initialized empty Git repository in /home/alex/firebreath-1.5/.git/
remote: Counting objects: 16089, done.
remote: Compressing objects: 100% (4841/4841), done.
remote: Total 16089 (delta 12322), reused 14495 (delta 11066)
Receiving objects: 100% (16089/16089), 11.28 MiB | 535 KiB/s, done.
Resolving deltas: 100% (12322/12322), done.
alex@alex-laptop:~$ cd firebreath-1.5/
alex@alex-laptop:~/firebreath-1.5$ python fbgen.py
Plugin Name []: readFile
Plugin Identifier [readFile]:
Plugin Prefix [RFI]:
Plugin MIME type [application/x-readfile]:
Plugin Description []:
Invalid syntax: Description must be one or more characters long!
Plugin Description []: Read test.txt from ~ folder
Plugin has no UI [false]:
Company Name []:
Invalid syntax: Name must be at least one character, and may not contain carriage returns.
Company Name []: Takeforce
Company Identifier [Takeforce]:
Company Domain [takeforce.com]:
Done. Files placed in /home/alex/firebreath-1.5/projects/readFile
FB::variant readFileAPI::write(const FB::variant& msg) { string message; if (msg.is_of_type<FB::JSObjectPtr>()) { message = msg.cast<FB::JSObjectPtr>()->Invoke("ToString", FB::variant_list_of()).convert_cast<std::string > (); } else { message = msg.convert_cast<std::string > (); } ofstream myfile; myfile.open ("/home/alex/log.txt"); myfile << message; myfile.close(); return msg; }
registerMethod("write", make_method(this, &readFileAPI::write));
apt-get install cmake libgtk2.0-dev git
plugin().write('Hello');
Source: https://habr.com/ru/post/118897/