Initial checkin of resolver.php
- 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
This commit is contained in:
@@ -6,7 +6,7 @@ if [ ! -z "`ls *.pcm 2>/dev/null`" ]; then
|
||||
basename=`basename ${filename} .pcm`
|
||||
echo -e "\t<Ring>" >>$outfile
|
||||
echo -e "\t\t<DisplayName>${basename}</DisplayName>" >>$outfile
|
||||
echo -e "\t\t<FileName>ringtones\${filename}</FileName>" >>$outfile
|
||||
echo -e "\t\t<FileName>ringtones\\${filename}</FileName>" >>$outfile
|
||||
echo -e "\t</Ring>" >>$outfile
|
||||
done
|
||||
fi
|
||||
@@ -15,7 +15,7 @@ if [ ! -z "`ls *.raw 2>/dev/null`" ]; then
|
||||
basename=`basename ${filename} .raw`
|
||||
echo -e "\t<Ring>" >>$outfile
|
||||
echo -e "\t\t<DisplayName>${basename}</DisplayName>" >>$outfile
|
||||
echo -e "\t\t<FileName>ringtones\${filename}</FileName>" >>$outfile
|
||||
echo -e "\t\t<FileName>ringtones\\${filename}</FileName>" >>$outfile
|
||||
echo -e "\t</Ring>" >>$outfile
|
||||
done
|
||||
fi
|
||||
|
Reference in New Issue
Block a user