From f6c9582b2cb485e2e7989b7ddc38cad39ff5d98e Mon Sep 17 00:00:00 2001 From: Phantom Date: Tue, 13 Aug 2019 10:41:06 +0300 Subject: [PATCH 1/3] - Change Sccp class driver --- tftpboot/index.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tftpboot/index.php b/tftpboot/index.php index cda59ee..bcd4455 100644 --- a/tftpboot/index.php +++ b/tftpboot/index.php @@ -57,6 +57,9 @@ if ($print_debug == 'on') { print(""); print_r("
Request:
");
     print_r($request);
+//    print_r("
All Files:
");
+//    print_r($config['firmware']);
+//    print_r( find_all_files($config['firmware']));
     print("
"); } @@ -86,7 +89,7 @@ if (!empty($req_file)) { $tmp_file = explode('.', $req_file_name); if (strpos_array($req_file_name, $fw_suffix,'any') !== FALSE) { // Firmware file was requested - $firmware_list = find_all_files($config['tftproot'].'/'.$config['firmware']); + $firmware_list = find_all_files($config['firmware']); $pos2 = strpos_array($firmware_list, $req_file_name, 'any'); // case unsensitive if ($pos2 !== FALSE) { // Request Firmware $req_file_full_path = $firmware_list[$pos2]; From ccf9c52bc42d549c71ee47887fc18071fb2b9b41 Mon Sep 17 00:00:00 2001 From: Phantom Date: Thu, 15 Aug 2019 11:51:15 +0300 Subject: [PATCH 2/3] - Change Sccp class driver - bug fix --- tftpboot/index.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tftpboot/index.php b/tftpboot/index.php index bcd4455..7d85e54 100644 --- a/tftpboot/index.php +++ b/tftpboot/index.php @@ -48,7 +48,8 @@ $ringtones_list = array('distinctive.xml', 'ringlist.xml','distinctiveringlist.x $ringtones_suffix = array('.raw', '.pcm', '.rwb'); $locale_list = array('-dictionary.', 'dictionary-ext.', '-dictionary.utf-8.', '-kate.xml', '-font.xml', '-font.dat','-tones.xml', - 'be-sccp.jar', 'tc-sccp.jar', 'td-sccp.jar', 'ipc-sccp.jar', 'mk-sccp.jar', '_locale.loads', 'i-button-help.xml'); + 'be-sccp.jar', 'tc-sccp.jar', 'td-sccp.jar', 'ipc-sccp.jar', 'mk-sccp.jar', '_locale.loads', 'i-button-help.xml', + 'tc-sip.jar', 'td-sipp.jar'); # Show debug output if ($print_debug == 'on') { @@ -57,9 +58,6 @@ if ($print_debug == 'on') { print("
"); print_r("
Request:
");
     print_r($request);
-//    print_r("
All Files:
");
-//    print_r($config['firmware']);
-//    print_r( find_all_files($config['firmware']));
     print("
"); } @@ -144,6 +142,7 @@ if (!empty($req_file)) { if ($print_debug == 'on'){ print_r('
File : '. $orig_req_file_name. ' not found.
');} if (empty($tmp_file)) { if (!empty($config['log'])) { to_log(array('GET :'.$orig_req_file_name, 'no match found'),'E',$config['log']); } + header("HTTP/1.0 404 Not Found"); die('ERROR: no match found.'); } $req_file_full_path = $tmp_file; @@ -156,6 +155,7 @@ if (!empty($req_file)) { $req_file_full_path .= '.sgn'; } if (!file_exists($req_file_full_path)) { + header("HTTP/1.0 404 Not Found"); die('Could not find:'. $req_file_full_path); } if ($print_debug == 'on'){ print_r('
Returning: '. $req_file_full_path. '
');} From 26169eabb2908da47f34784be884ab297015a037 Mon Sep 17 00:00:00 2001 From: Phantom Date: Thu, 14 Nov 2019 14:49:53 +0300 Subject: [PATCH 3/3] Update index.php - Wallpapers Bug Fix. --- tftpboot/index.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tftpboot/index.php b/tftpboot/index.php index 7d85e54..495d0ce 100644 --- a/tftpboot/index.php +++ b/tftpboot/index.php @@ -102,7 +102,7 @@ if (!empty($req_file)) { if (strpos(strtolower($req_file_name), '.cnf.xml') !== FALSE) { // Request Settings $tmp_file = $config['settings'].'/'.$req_file_name; } - else if (strpos(strtolower($req_file), '/desktops/') !== FALSE) { // Request Wallpapers + else if (strpos(strtolower($req_file), 'desktops/') !== FALSE) { // Request Wallpapers $tmp_file = $config['wallpapers'].'/'. $req_data_ar[$req_data_len-1].'/'. $req_file_name; } else if (strpos_array($ringtones_list, $req_file_name, 'any') !== FALSE) { // Request RingTones @@ -141,14 +141,14 @@ if (!empty($req_file)) { */ if ($print_debug == 'on'){ print_r('
File : '. $orig_req_file_name. ' not found.
');} if (empty($tmp_file)) { - if (!empty($config['log'])) { to_log(array('GET :'.$orig_req_file_name, 'no match found'),'E',$config['log']); } + if (!empty($config['log'])) { to_log(array('GET ('.$req_file.'):'.$orig_req_file_name, 'no match found'),'E',$config['log']); } header("HTTP/1.0 404 Not Found"); die('ERROR: no match found.'); } $req_file_full_path = $tmp_file; } } - if (!empty($config['log'])) { to_log(array('GET :'.$orig_req_file_name, 'Remap :'.$req_file_full_path),'i',$config['log']); } + if (!empty($config['log'])) { to_log(array('GET ('.$req_file.') :'.$orig_req_file_name, 'Remap :'.$req_file_full_path),'i',$config['log']); } if (!empty($req_file_full_path)) { if ($signed) {