- GRAYBYTE UNDETECTABLE CODES -

403Webshell
Server IP : 184.154.167.98  /  Your IP : 3.133.137.40
Web Server : Apache
System : Linux pink.dnsnetservice.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64
User : puertode ( 1767)
PHP Version : 8.2.26
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python3.6/site-packages/bcc/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3.6/site-packages/bcc/__pycache__/usdt.cpython-36.pyc
3

:�)g5$�@s�ddlmZddlZddlZddlmZmZmZm	Z	m
Z
mZGdd�de�Z
Gdd�de�ZGd	d
�d
e�ZGdd�de�ZGd
d�de�ZdS)�)�print_functionN�)�lib�_USDT_CB�_USDT_PROBE_CB�bcc_usdt_location�bcc_usdt_argument�BCC_USDT_ARGUMENT_FLAGSc@seZdZdS)�
USDTExceptionN)�__name__�
__module__�__qualname__�rr�/usr/lib/python3.6/usdt.pyr
sr
c@s,eZdZdd�Zdd�Zdd�Zdd�Zd	S)
�USDTProbeArgumentcCs�|jdk|_t|j�|_|j|_|jtj@dkr8|j|_|jtj@dkrP|j|_|jtj	@dkrh|j
|_
|jtj@dkr�|j|_|jtj
@dkr�|j|_|jtj@dkr�|j|_dS)Nr)�size�signed�abs�validr	�CONSTANT�constant�DEREF_OFFSET�deref_offset�DEREF_IDENT�deref_ident�BASE_REGISTER_NAME�base_register_name�INDEX_REGISTER_NAME�index_register_name�SCALE�scale)�selfZargumentrrr�__init__szUSDTProbeArgument.__init__cCsd|j|jrdndfS)Nz%d %s byteszsigned  Zunsigned)rr)r!rrr�_size_prefix+szUSDTProbeArgument._size_prefixcCsB|jtj@dkrd|jS|jtj@dkr8d|jj�S|jtj@dkr�|jtj@dkr�|jtj@dkr�d|j	j�}|jtj
@dkr�|d|j7}nd}|jdkr�dnd}d	|jj�|t
|j�|fS|jtj@dk�r8|jtj@dk�r8|jtj@dk�r8|jd
k�r8|jdk�rdnd}d|jj�|t
|j�fSd|jS)
Nrz%dz%sz + %sz * %d��+�-z
*(%s %s %d%s)Zipz*(&%s %s %d)z&unrecognized argument format, flags %d)rr	rrrr�decoderrrrr rrrr)r!Zindex_offsetZsignrrr�_format/s,


zUSDTProbeArgument._formatcCsd|j�|j�fS)Nz%s @ %s)r#r()r!rrr�__str__MszUSDTProbeArgument.__str__N)rrr
r"r#r(r)rrrrrsrc@s$eZdZdd�Zdd�Zdd�ZdS)�USDTProbeLocationcCs(||_||_|j|_|j|_|j|_dS)N)�probe�index�
num_arguments�address�bin_path)r!r+r,�locationrrrr"Qs
zUSDTProbeLocation.__init__cCsd|jj�|jfS)Nz%s 0x%x)r/r'r.)r!rrrr)XszUSDTProbeLocation.__str__cCsPt�}tj|jj|jj|jj|j|tj	|��}|dkrHt
d||jf��t|�S)Nrz.error retrieving probe argument %d location %d)rrZbcc_usdt_get_argumentr+�context�provider�namer,�ct�byrefr
r)r!r,�arg�resrrr�get_argument[szUSDTProbeLocation.get_argumentN)rrr
r"r)r8rrrrr*Psr*c@s,eZdZdd�Zdd�Zdd�Zdd�Zd	S)
�	USDTProbecCs:||_|j|_|j|_|j|_|j|_|j|_|j|_dS)N)r1r2r3r/�	semaphoreZ
num_locationsr-)r!r1r+rrrr"gszUSDTProbe.__init__cCsd|jj�|jj�|jfS)Nz%s:%s [sema 0x%x])r2r'r3r:)r!rrrr)pszUSDTProbe.__str__cCsd|jj�|jj�fS)Nz%s:%s)r2r'r3)r!rrr�
short_nametszUSDTProbe.short_namecCsDt�}tj|j|j|j|tj|��}|dkr8td|��t	|||�S)Nrz"error retrieving probe location %d)
rrZbcc_usdt_get_locationr1r2r3r4r5r
r*)r!r,�locr7rrr�get_locationwszUSDTProbe.get_locationN)rrr
r"r)r;r=rrrrr9fs	r9c@s^eZdZddd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Zdd�Z	dd�Z
dd�Zdd�ZdS)�USDTNcCs�|rX|dkrX||_|r,tj||jd��|_ntj|tjd��|_|jdkr�td|��n<|r�||_tj	|jd��|_|jdkr�td|��ntd��dS)Nr�asciirz USDT failed to instrument PID %dz!USDT failed to instrument path %sz/either a pid or a binary path must be specified���)
�pidrZbcc_usdt_new_frompid�encoder1r4Zc_char_pr
�pathZbcc_usdt_new_frompath)r!rArCrrrr"�s

z
USDT.__init__cCstj|j�dS)N)rZbcc_usdt_closer1)r!rrr�__del__�szUSDT.__del__cCsz|jdd�}t|�dkr6tj|j|jd�|jd��}n,|\}}tj|j|jd�|jd�|jd��}|dkrvtd|��dS)N�:rr?ra.Failed to enable USDT probe '%s':
the specified pid might not contain the given language's runtime,
or the runtime was not built with the required USDT probes. Look
for a configure flag similar to --with-dtrace or --enable-dtrace.
To check which probes are present in the process, use the tplist tool.
)�split�lenrZbcc_usdt_enable_prober1rBZ%bcc_usdt_enable_fully_specified_prober
)r!r+�fn_name�probe_parts�ret�
provider_name�
probe_namerrr�enable_probe�szUSDT.enable_probecCsPy|j||�Wn:tk
rJ}zt|tjd�tjd�WYdd}~XnXdS)N)�filer)rMr
�print�sys�stderr�exit)r!r+rH�errr�enable_probe_or_bail�s
zUSDT.enable_probe_or_bailcCs|jS)N)r1)r!rrr�get_context�szUSDT.get_contextcCs,tjd�}tj|j�|d<tj|d�j�S)Nrr)r4Zc_void_pr1rZbcc_usdt_genargsr')r!Z	ctx_arrayrrr�get_text�sz
USDT.get_textcCs`|jdd�}t|�dkr2tj|j|jd�|�j�S|\}}tj|j|jd�|jd�|�j�SdS)NrErr?)rFrGrZbcc_usdt_get_probe_argctyper1rBr'Z+bcc_usdt_get_fully_specified_probe_argctype)r!rLZ	arg_indexrIrKr+rrr�get_probe_arg_ctype�szUSDT.get_probe_arg_ctypecs(g���fdd�}tj�jt|���S)Ncs�jt�j|j��dS)N)�appendr9r1�contents)r+)�probesr!rr�
_add_probe�sz)USDT.enumerate_probes.<locals>._add_probe)rZbcc_usdt_foreachr1r)r!r[r)rZr!r�enumerate_probes�szUSDT.enumerate_probescCsD|j�}x6|D].\}}}}|r"d}|j|j�|j�||d�qWdS)Nr)r3rH�addrrAr@)�enumerate_active_probesZ
attach_uprober')r!ZbpfZattach_usdt_ignore_pidrZ�binpathrHr]rArrr�attach_uprobes�szUSDT.attach_uprobescs&g��fdd�}tj|jt|���S)Ncs�j||||f�dS)N)rX)r_rHr]rA)rZrrr[�sz0USDT.enumerate_active_probes.<locals>._add_probe)rZbcc_usdt_foreach_uprober1r)r!r[r)rZrr^�szUSDT.enumerate_active_probes)NN)
rrr
r"rDrMrTrUrVrWr\r`r^rrrrr>s


r>)Z
__future__rZctypesr4rPZlibbccrrrrrr	�	Exceptionr
�objectrr*r9r>rrrr�<module>s 7

Youez - 2016 - github.com/yon3zu
LinuXploit