a4ebaee7766c4fdba8cd93044dad43836d9eda1a
- use \\ instead of just \ in FileName - Use file_put_contents instead of open/write - Use file_exist instead of stat - Added /lib directory - Moved /tftpboot/index.cfg -> /config.ini - Moved /tftpboot/resolver.php -> /lib/resolver.php - Added /lib/config.php - include /lib/config.php in resolver.php and index.php - Changed $config array - Remove print_r($config['main']['base_path']) from config.php - Add isValidRequest() function - Use Boolean in tree_base data - Simplify config['subdirs'] substitution - Add lib/utils.php file - Added simple shell/utf/html escape checking - Added a collection of test cases (we need some more escape checking ones) - Added lib/logger.php (copied from tftpserver.php, so that it can be reused for that). - Clarify config.ini logformat - Update logger implementation - Replaced index.php with version that uses lib/resolver.php - Replaced ../etc/nginx/sites-available/tftpboot Example file
Provisioner for Skinny/Sccp Phones
Skinny/SCCP Phones expect all the firmware and configuration jumbled together in the root of the tftp directory, which looks very messy to me.
To get around this, the provision_sccp project uses regex rewrite rules, to redirect incoming traffic to their destination (currently nginx and tftp-hpa).
The project also serves as a repository of current / up to date cisco skinny/sccp firmware maintained for posterity (incase cisco were to drop support/fw-download for these phones).
Dependencies
Usage
- Clone the repository
- Move the tftpboot directory (depends on your operating system):
- OpenSuSE / Ubuntu / Debian : /srv
- BSD : /var/lib/tftp
- RedHat : /tftpboot
- Copy etc/nginx/sites-available/tftpboot to /etc/nginx/sites-available/tftpboot
- Update the tftpboot directory location in /etc/nginx/sites-available/tftpboot
- Copy etc/tftp-hpa/rewrite-rules to /etc/tftp-hpa
- Update the tftpboot directory location in etc/tftp-hpa/rewrite-rules
- Update your init system for tftp-hpa so it can find the rewrite-rules:
- Ubuntu / Debian : /etc/defaults (Example present in etc/defaults)
- OpenSuse / Redhat : /etc/sysconfig (No example yet, have a look as etc/default and adapt)
- BSD : /etc/rc.conf (No example yet, have a look as etc/default and adapt)
- Restart your tftp-hpa and nginx services
- Monitor the debug logging:
- tail -f /var/log/syslog /var/log/nginx/tftp.*.log
Want to Contribute:
License:
Languages
Perl
51.1%
HTML
23%
PHP
13.7%
Shell
9.8%
Python
1.7%
Other
0.7%