code: def cmd_certclone(hostname, port, keyfile, certfile, copy_extensions, expired, verbose):
      
  
      context = ssl.create_default_context()
  
      with socket.create_connection((hostname, port), timeout=3) as sock:
          with context.wrap_socket(sock, server_hostname=hostname) as ssock:
              original = ssock.getpeercert(binary_form=True)
  
      key, cert = certclone(original, copy_extensions=copy_extensions, expired=expired)
  
      keyfile.write(key)
      certfile.write(cert)
docs: Connect to an SSL/TLS server, get the certificate and generate
      a certificate with the same options and field values.
  
      Note: The generated certificate is invalid, but can be used for social engineering attacks
  
      Example:
  
      \b
      $ habu.certclone www.google.com 443 /tmp/key.pem /tmp/cert.pem