⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.144
Server IP:
157.245.143.252
Server:
Linux www 6.11.0-9-generic #9-Ubuntu SMP PREEMPT_DYNAMIC Mon Oct 14 13:19:59 UTC 2024 x86_64
Server Software:
nginx/1.26.0
PHP Version:
8.3.11
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
lib
/
python3.12
/
__pycache__
/
View File Name :
sndhdr.cpython-312.pyc
CRh d Z ddlZ ej ed ddgZddlmZ edd Zd ej _ dej _ dej _ d ej _ dej _ d Z d Zg Zd Zej# e d Zej# e d Zej# e d Zej# e d Zej# e d Zej# e d Zej# e d Zej# e d Zd Zd Zd Zd Zd Zedk( r e yy) a Routines to help recognizing sound files. Function whathdr() recognizes various types of sound file headers. It understands almost all headers that SOX can decode. The return tuple contains the following items, in this order: - file type (as SOX understands it) - sampling rate (0 if unknown or hard to decode) - number of channels (0 if unknown or hard to decode) - number of frames in the file (-1 if unknown or hard to decode) - number of bits/sample, or 'U' for U-LAW, or 'A' for A-LAW If the file doesn't have a recognizable type, it returns None. If the file can't be opened, OSError is raised. To compute the total time, divide the number of frames by the sampling rate (a frame contains a sample for each channel). Function what() calls whathdr(). (It used to also use some heuristics for raw data, but this doesn't work very well.) Finally, the function test() is a simple main program that calls what() for all files mentioned on the argument list. For directory arguments it calls what() for all files in that directory. Default argument is "." (testing all files in the current directory). The option -r tells it to recurse down directories found inside explicitly given directories. N) )removewhatwhathdr) namedtuple SndHeadersz.filetype framerate nchannels nframes sampwidthzThe value for type indicates the data type and will be one of the strings 'aifc', 'aiff', 'au','hcom', 'sndr', 'sndt', 'voc', 'wav', '8svx', 'sb', 'ub', or 'ul'.zYThe sampling_rate will be either the actual value or 0 if unknown or difficult to decode.z^The number of channels or 0 if it cannot be determined or if the value is difficult to decode.z?The value for frames will be either the number of frames or -1.zAEither the sample size in bits or 'A' for A-LAW or 'U' for u-LAW.c t | }|S )zGuess the type of a sound file.)r )filenameress /usr/lib/python3.12/sndhdr.pyr r 8 s ( CJ c t | d 5 }|j d }t D ] } ||| }|st | c cddd S ddd y# 1 sw Y yxY w)zRecognize sound headers.rbi N)openreadtestsr )r fhtfr s r r r > sU h FF3KBQ(C!3'' s &A AAAc t j 5 t j dt ddl}ddd | j d sy| dd dk( rd }n| dd d k( rd}ny|j d j |d }||j |j |j d|j z fS # 1 sw Y xY w# t j f$ r Y yw xY w) zAIFC and AIFF filesignore)categoryr N FORM s AIFCaifcs AIFFaiffr)warningscatch_warningssimplefilterDeprecationWarningr startswithseekr EOFErrorErrorgetframerategetnchannels getnframesgetsampwidth)r r r fmtas r test_aifcr. O s "h1CD # << 2w' 1RG FF1IIIa !1>>#3 LLNA 002 2! # " djj! s C8C CC0/C0c * | j d rt }n| dd dv rt }nyd} || dd } || dd } || dd } || dd } || d d }d} |dk( rd} n|d k( rd} n|dk( rd} d } nd} | |z }|r||z }nd}||||| fS )zAU and SND filess .sndN )s ds.s dns.aur r U r ?)r$ get_long_beget_long_le) r r funcfiletypehdr_size data_sizeencodingrate nchannelssample_sizesample_bits frame_sizenframes r test_aurG g s ||G 2A% %HAaF|HQqW IAbH~H"R>DQr"XIK1} Q Qy(JZ'T9fk99r c b | dd dk7 s| dd dk7 ryt | dd }|rd |z }nd}d|d ddfS )z HCOM fileA E s FSSD s HCOMN i"V r hcomr5 r9 r )r: )r r divisorrA s r test_hcomrQ sR Bx7aCjG3!C*%Gw4B!!r c | j d syt | dd }d}d|cxk rdk r&n n#| | dk( rd| |d z z }|rt d |z }d|ddd fS )zVOC files Creative Voice FileNr3 r i r5 r0 g .Avocr9 r )r$ get_short_leint)r r sbseekrA ratecodes r test_vocrZ ss <<23 !Br( #FDFSQvY!^6!8$y8+,D$2q r c P ddl }| j d r| dd dk7 s| dd dk7 ry|j d |j |d }d |j |j |j d|j z fS # t |j f$ r Y yw xY w)zWAV filer Ns RIFFr r s WAVEr2 s fmt r wav) waver$ r% r r&