⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.24
Server IP:
50.6.168.112
Server:
Linux server-617809.webnetzimbabwe.com 5.14.0-570.25.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jul 9 04:57:09 EDT 2025 x86_64
Server Software:
Apache
PHP Version:
8.4.10
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
opt
/
alt
/
python311
/
lib64
/
python3.11
/
__pycache__
/
View File Name :
sndhdr.cpython-311.pyc
>Ev d Z ddlZ ej ed ddgZddlmZ edd Zd ej _ dej _ dej _ d ej _ dej _ d Z d Zg Zd Ze e d Ze e d Ze e d Ze e d Ze e d Ze e d Ze e d Ze e d Zd Zd Zd Zd Zd Zedk r e dS dS ) 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 -/opt/alt/python311/lib64/python3.11/sndhdr.pyr r 8 s ( CJ c t | d 5 }| d }t D ]'} ||| }|rt | c cddd S ( ddd dS # 1 swxY w Y dS )zRecognize sound headers.rbi N)openreadtestsr )r fhtfr s r r r > s h FF3KK ( (B"Q((C (!3''' ( s 7A$A$$A(+A(c : t j 5 t j dt ddl}ddd n# 1 swxY w Y | d sdS | dd dk rd }n| dd d k rd}ndS | d | |d }n# t |j f$ r Y dS w xY w|| | | d| z fS ) zAIFC and AIFF filesignore)categoryr N FORM s AIFCaifcs AIFFaiffr)warningscatch_warningssimplefilterDeprecationWarningr startswithseekr EOFErrorErrorgetframerategetnchannels getnframesgetsampwidth)r r r fmtas r test_aifcr. O sm " " h1CDDDD << t2w' 1R4G tFF1IIIIIadj! tt!!1>>#3#3 LLNNA 0 002 2s# A AAB3 3CCc | d rt }n| dd dv rt }ndS d} || 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 2A2% % %tHtAacF||HQqtW ItAbeH~~H4"R%>>DQr"uXIK1}} Q Qy(J Z'T9fk99r c | dd dk s| dd dk rdS t | 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 sj Bx7aCjG33t!CG*%%G w4B!!r c | d sdS t | dd }d}d|cxk rdk r1n n.| | dk r"d| |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 s <<233 t !BrE( # #FDFSQvY!^^6!8$ -y8+,,D$2q r c ddl }| d r| dd dk s| dd dk rdS | d | |d }n# t |j f$ r Y dS w xY wd | | | d| z fS )zWAV filer Ns RIFFr r s WAVEr2 s fmt r wav) waver$ r% r r&