chmod750 Posted August 5, 2015 Share Posted August 5, 2015 Hello, Thanks for this product. Is it possible to develop new modules? If yes, can you provide any procedure or wiki page to do it? Thanks in advance Have a nice day :) Quote Link to comment Share on other sites More sharing options...
Darren Kitchen Posted August 6, 2015 Share Posted August 6, 2015 When I get back from DEF CON I'll be updating with wiki with proper developer documentation - but until then I'll just brain dump here: - Any executable in /etc/turtle/modules will be treated as a module and show up in the modules menu - For the current version, the executable should be a bash script (though it can call any language with an interpreter supported on the LAN Turtle like php and python) - In addition to the interpreter also include /usr/lib/turtle/turtle_module (For example: #!/bin/bash /usr/lib/turtle/turtle_module) - Modules should include the variables VERSION and DESCRIPTION (We will also add support for AUTHOR in the future) - When the module menu is loaded, all modules are queried for their status - All modules must support the functions start, stop, status and configure - Status should echo a 1 if running and 0 if not - When modules are enabled, the system will run the start function of the module on LAN Turtle boot - Publishing a module to the LAN Turtle download center (modulemanager) is a matter of submitting a pull request with your module to https://github.com/hak5/lanturtle-wiki/tree/gh-pages/modules - In lieu of an official "style guide", I recommend keeping to the dialog sizes used in the other modules (usually 18 72) - To familiarize yourself with dialog and the module structure, open up any of the existing modules and see how they work Example Stop Function: function stop { /etc/init.d/openvpn stop } Example Status Function: function status { if pgrep openvpn > /dev/null; then echo "1"; else echo "0"; fi } 1 Quote Link to comment Share on other sites More sharing options...
chmod750 Posted August 6, 2015 Author Share Posted August 6, 2015 Perfect! Let's begin :) Quote Link to comment Share on other sites More sharing options...
Shad Posted August 26, 2015 Share Posted August 26, 2015 Hi Darren! Thanks for the nice little toy the Lan Turtle is :) I have uploaded my first module. It's a very simple automatic MAC cloner of the client's address into the WAN interface, for added transparency of the bridging and bypass of mac filtering. Is there any way to call a function in the module when it is enabled/disabled in the gui so that as to run some "installation" code? That way the start function doesn't need to also hold the code for persistance after reboot. Also, I am not sure if I sent the pull request correctly, could you confirm? Thanks again! Quote Link to comment Share on other sites More sharing options...
compiledkn Posted August 30, 2015 Share Posted August 30, 2015 Hi Darren, Be prepared, this is possible a stupid question The existing modules are based on OS / pre-installed binaries like NetCat, nmap etc. In case I want to publish a new module to the 'download center' / module repository, what's the preferred way to distribute a binary (cross-compiled for Atheros/MIPS) together with the module? Do I need to manage the download of the binary in the module code myself? (backgrounded wget or something) Thanks, Martijn Quote Link to comment Share on other sites More sharing options...
Darren Kitchen Posted September 9, 2015 Share Posted September 9, 2015 Hi Darren, Be prepared, this is possible a stupid question The existing modules are based on OS / pre-installed binaries like NetCat, nmap etc. In case I want to publish a new module to the 'download center' / module repository, what's the preferred way to distribute a binary (cross-compiled for Atheros/MIPS) together with the module? Do I need to manage the download of the binary in the module code myself? (backgrounded wget or something) Thanks, Martijn We'll be redoing the module center to handle modules in tar.gz form in the future but for now a dependency install in config or at first start like the pineapple does would do the trick. Quote Link to comment Share on other sites More sharing options...
G@te_Keep3r Posted October 28, 2015 Share Posted October 28, 2015 Is there any info out about "Code one in bash, python, or php with a dead simple API." I got a module more or less designed, but implementation will depend on the api as to not over complicate it. Quote Link to comment Share on other sites More sharing options...
Orm Posted November 10, 2015 Share Posted November 10, 2015 Hi, has anyone a small example of a small module written in Python? I have written a script I would like to rewrite so it will work on the Turtle. I'm just unsure how the dialogs are created with the installed Python. Regards Orm Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.