File manager - Edit - /usr/local/cpanel/base/backend/cyberducksetup.cgi
Back
#!/usr/local/cpanel/3rdparty/bin/perl # Copyright 2026 WebPros International, LLC # All rights reserved. # copyright@cpanel.net http://cpanel.net # This code is subject to the cPanel license. Unauthorized copying is prohibited. use cPstrict; use Cpanel::Imports; use Cpanel::SSH (); use Cpanel::Encoder::URI (); use Cpanel::Encoder::Tiny (); use Cpanel::Validate::Domain::Tiny (); my $sshport = Cpanel::SSH::_getport(); my $proto; my ( $domain, $host, $user, $ssl ) = split( /\|/, Cpanel::Encoder::URI::uri_decode_str( $ENV{'QUERY_STRING'} ) ); if ( !$domain || !Cpanel::Validate::Domain::Tiny::validdomainname($domain) ) { logger->warn('Invalid domain name passed.'); my $invalidDomainTitle = Cpanel::Encoder::Tiny::safe_html_encode_str( locale->maketext('Invalid Domain') ); my $invalidDomainBody = Cpanel::Encoder::Tiny::safe_html_encode_str( locale->maketext('An invalid domain name was passed.') ); print "Content-type: text/html\r\n\r\n<html><head><title>$invalidDomainTitle</title></head><body>$invalidDomainBody</body></html>"; exit; } # Output encode the values $host = Cpanel::Encoder::Tiny::safe_html_encode_str($host); $user = Cpanel::Encoder::Tiny::safe_html_encode_str($user); # Normalize values $ssl = int($ssl); my $secure = $ssl ? 'Secure%20' : ''; my $securetxt = $ssl ? 'Secure ' : ''; my $port; if ($ssl) { $port = $sshport; $proto = 'sftp'; } else { $port = 21; $proto = 'ftp'; } print <<"EOM"; Content-Type: application/octet-stream; x-unix-mode=0644; name="${securetxt}$domain.duck" Content-Disposition: attachment; filename="${securetxt}$domain.duck" <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Hostname</key> <string>$host</string> <key>Nickname</key> <string>$domain $securetxt</string> <key>Port</key> <string>$port</string> <key>Protocol</key> <string>$proto</string> <key>Username</key> <string>$user</string> </dict> </plist> EOM
| ver. 1.4 |
Github
|
.
| PHP 8.1.34 | Generation time: 0.05 |
proxy
|
phpinfo
|
Settings