IP : 18.191.122.218Hostname : server86.web-hosting.comKernel : Linux server86.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64Disable Function : None :) OS : Linux
PATH:
/
home/
servlmvm/
public_html/
ad917/
./
ad917/
../
../
wp-includes/
ID3/
module.audio.flac.php/
/
<?php
///////////////////////////////////////////////////////////////// /// getID3() by James Heinrich <info@getid3.org> // // available at https://github.com/JamesHeinrich/getID3 // // or https://www.getid3.org // // or http://getid3.sourceforge.net // // see readme.txt for more details // ///////////////////////////////////////////////////////////////// // // // module.audio.flac.php // // module for analyzing FLAC and OggFLAC audio files // // dependencies: module.audio.ogg.php // // /// /////////////////////////////////////////////////////////////////
if (!defined('GETID3_INCLUDEPATH')) { // prevent path-exposing attacks that access modules directly on public webservers exit; } getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.audio.ogg.php', __FILE__, true);
if (($BlockOffset + 4 + $BlockLength) > $info['avdataend']) { $this->warning('METADATA_BLOCK_HEADER.BLOCK_TYPE ('.$BlockTypeText.') at offset '.$BlockOffset.' extends beyond end of file'); break; } if ($BlockLength < 1) { if ($BlockTypeText != 'reserved') { // probably supposed to be zero-length $this->warning('METADATA_BLOCK_HEADER.BLOCK_LENGTH ('.$BlockTypeText.') at offset '.$BlockOffset.' is zero bytes'); continue; } $this->error('METADATA_BLOCK_HEADER.BLOCK_LENGTH ('.$BlockLength.') at offset '.$BlockOffset.' is invalid'); break; }
// set md5_data_source - built into flac 0.5+ if (isset($info['flac']['STREAMINFO']['audio_signature'])) {
if ($info['flac']['STREAMINFO']['audio_signature'] === str_repeat("\x00", 16)) { $this->warning('FLAC STREAMINFO.audio_signature is null (known issue with libOggFLAC)'); } else { $info['md5_data_source'] = ''; $md5 = $info['flac']['STREAMINFO']['audio_signature']; for ($i = 0; $i < strlen($md5); $i++) { $info['md5_data_source'] .= str_pad(dechex(ord($md5[$i])), 2, '00', STR_PAD_LEFT); } if (!preg_match('/^[0-9a-f]{32}$/', $info['md5_data_source'])) { unset($info['md5_data_source']); } } }
if (isset($info['flac']['STREAMINFO']['bits_per_sample'])) { $info['audio']['bits_per_sample'] = $info['flac']['STREAMINFO']['bits_per_sample']; if ($info['audio']['bits_per_sample'] == 8) { // special case // must invert sign bit on all data bytes before MD5'ing to match FLAC's calculated value // MD5sum calculates on unsigned bytes, but FLAC calculated MD5 on 8-bit audio data as signed $this->warning('FLAC calculates MD5 data strangely on 8-bit audio, so the stored md5_data_source value will not match the decoded WAV file'); } }