403Webshell
Server IP : 156.238.232.47  /  Your IP : 216.73.216.150
Web Server : nginx/1.25.3
System : Linux C202504152095410 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User : www ( 1000)
PHP Version : 8.3.25
Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python2.7/site-packages/cloudinit/config/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python2.7/site-packages/cloudinit/config/cc_ssh_authkey_fingerprints.pyc
�
oB�]c@s�dZddlZddlZddlmZddlmZddlmZddlm	Z	d�Z
dd	�Zd
�Zddd�Z
d
�ZdS(s
SSH Authkey Fingerprints
------------------------
**Summary:** log fingerprints of user ssh keys

Write fingerprints of authorized keys for each user to log. This is enabled by
default, but can be disabled using ``no_ssh_fingerprints``. The hash type for
the keys can be specified, but defaults to ``md5``.

**Internal name:** `` cc_ssh_authkey_fingerprints``

**Module frequency:** per instance

**Supported distros:** all

**Config keys**::

    no_ssh_fingerprints: <true/false>
    authkey_hash: <hash type>
i����N(tSimpleTable(tug_util(tssh_util(tutilcCsEg}x8tdt|�d�D]}|j|||d!�qW|S(Nii(trangetlentappend(tbin_hashtsplit_upti((sP/usr/lib/python2.7/site-packages/cloudinit/config/cc_ssh_authkey_fingerprints.pyt_split_hash&stmd5cCsk|s
dSyBtj|�}|jtj|��djt|j���SWntt	fk
rfdSXdS(Ntt:t?(
thashlibtnewtupdatetbase64t	b64decodetjoinR
t	hexdigestt	TypeErrort
ValueError(tb64_textt	hash_meththasher((sP/usr/lib/python2.7/site-packages/cloudinit/config/cc_ssh_authkey_fingerprints.pyt_gen_fingerprint-scCsSt|j|j|j|jg�rO|jrO|jj�j�dkrOtSntS(Nsssh-dsssssh-rsa(sssh-dsssssh-rsa(	tanytkeytypeRtcommenttoptionstlowertstriptTruetFalse(tentry((sP/usr/lib/python2.7/site-packages/cloudinit/config/cc_ssh_authkey_fingerprints.pyt_is_printable_key<s
$	s	ci-info: c	CsO|s'd||f}tj|�dSdd|ddg}t|�}xi|D]a}t|�rP|jpndt|j|�p�d|jp�d|jp�dg}	|j	|	�qPqPW|j
�}
|
j�}tt
|dt��}tjd||fd	|�g}
|
j|�x4|
D],}tjd
d||fdtd
t�qWdS(Ns9%sno authorized ssh keys fingerprints found for user %s.
tKeytypesFingerprint (%s)tOptionstCommentt-tkeys#Authorized keys from %s for user %st+ttexts%s%s
tstderrtconsole(Rt	multi_logRR%RRRRRtadd_rowt
get_stringt
splitlinesRtmaxtcentertextendR#R"(tusertkey_fntkey_entriesRtprefixtmessaget
tbl_fieldsttblR$trowt	authtbl_st
authtbl_linestmax_lentlinestline((sP/usr/lib/python2.7/site-packages/cloudinit/config/cc_ssh_authkey_fingerprints.pyt_pprint_key_entriesDs0


	
	

cCs�tj|jdt��r/|jd|�dStj|dd�}tj||j�\}}xB|j	�D]4\}}	t
j|�\}
}t||
||�qlWdS(Ntno_ssh_fingerprintss>Skipping module named %s, logging of ssh fingerprints disabledtauthkey_hashR(
Rtis_truetgetR#tdebugtget_cfg_option_strRtnormalize_users_groupstdistrotitemsRtextract_authorized_keysRC(tnametcfgtcloudtlogt_argsRtuserst_groupst	user_namet_cfgR7R8((sP/usr/lib/python2.7/site-packages/cloudinit/config/cc_ssh_authkey_fingerprints.pythandlebs		(t__doc__RRtcloudinit.simpletableRtcloudinit.distrosRt	cloudinitRRR
RR%RCRW(((sP/usr/lib/python2.7/site-packages/cloudinit/config/cc_ssh_authkey_fingerprints.pyt<module>s		

Youez - 2016 - github.com/yon3zu
LinuXploit