Hello,
I want to deploy UltraVNC 1.0.5.6 automatically and I need to compute the password stored in ultravnc.ini.
I made a little perl script to do it for 1.0.2, when it was stored in the registry.
Do you have any documentation for this ? I don't find it in the sources.
Regards.
Update: UltraVNC 1.4.3.6 and UltraVNC SC 1.4.3.6: viewtopic.php?t=37885
Important: Please update to latest version before to create a reply, a topic or an issue: viewtopic.php?t=37864
Join us on social networks and share our announcements:
- Website: https://uvnc.com/
- GitHub: https://github.com/ultravnc
- Mastodon: https://mastodon.social/@ultravnc
- Facebook: https://www.facebook.com/ultravnc1
- X/Twitter: https://x.com/ultravnc1
- Reddit community: https://www.reddit.com/r/ultravnc
- OpenHub: https://openhub.net/p/ultravnc
Important: Please update to latest version before to create a reply, a topic or an issue: viewtopic.php?t=37864
Join us on social networks and share our announcements:
- Website: https://uvnc.com/
- GitHub: https://github.com/ultravnc
- Mastodon: https://mastodon.social/@ultravnc
- Facebook: https://www.facebook.com/ultravnc1
- X/Twitter: https://x.com/ultravnc1
- Reddit community: https://www.reddit.com/r/ultravnc
- OpenHub: https://openhub.net/p/ultravnc
UltraVNC password encryption algorithm
Re: UltraVNC password encryption algotithme
just need to copy ultravnc.ini with the password set properly with winvnc on computer test/reference,
UltraVNC 1.0.9.6.1 (built 20110518)
OS Win: xp home + vista business + 7 home
only experienced user, not developer
OS Win: xp home + vista business + 7 home
only experienced user, not developer
Re: UltraVNC password encryption algotithme
The problem is that I need to deploy ultravnc on many sites, each site has WPKG to deploy application, and the password depends of the site.redge wrote:just need to copy ultravnc.ini with the password set properly with winvnc on computer test/reference,
Previously I was generating the password and put it in a reg file.
I wan to do the same with the ultravnc.ini:
- put a default configuration on each site server with a blank password
- run a script to update the password filed according to the site
- deploy it with WPKG.
Regards.
Re: UltraVNC password encryption algotithme
I finaly found it, it's the samedad wrote: The problem is that I need to deploy ultravnc on many sites, each site has WPKG to deploy application, and the password depends of the site.
Regards.
![Wink ;-)](./images/smilies/_icon_wink.gif)
Sorry for the noise.
Re: UltraVNC password encryption algotithme
For future reference:dad wrote:I finaly found it, it's the samedad wrote: The problem is that I need to deploy ultravnc on many sites, each site has WPKG to deploy application, and the password depends of the site.
Regards.
Sorry for the noise.
Code: Select all
#!/usr/bin/perl -w
use strict;
use warnings;
use Getopt::Long;
Getopt::Long::Configure('gnu_getopt');
use Pod::Usage;
use Crypt::DES;
my ($password, $help, $man);
GetOptions('help|?' => \$help, 'man' => \$man, 'password=s' => \$password) or pod2usage(2);
pod2usage(1) if $help;
pod2usage(-exitstatus => 0, -verbose =>2) if $man;
pod2usage (1) if !$password;
my $realkey = pack ('H16', "E84AD660C4721AE0");
my $cipher = Crypt::DES->new($realkey);
# truncate the password to 8 chars
$password = substr ($password, 0, 8) if length $password > 8;
my $cryptpass = $cipher->encrypt($password);
# Foreach byte, unpack it, join the result list and print it in
# uppercase
print uc join ('', map {unpack('H2', $_)} split (//, $cryptpass));
__END__
=head1 vncpass.pl
Generate a VNC password suitable for ultravnc.ini.
=head1 SYNOPSIS
vncpass.pl [options]
Options:
--help this help
--password password to encrypt
=head1 OPTIONS
=over 8
=item B<--help>
Print the online help
=item B<--password>
The password to encrypt.
=back
=head1 DESCRIPTION
B<vncpass.pl> generate a password suitable for ultravnc.ini.
=cut
Re: UltraVNC password encryption algotithme
Does anyone have an example of VNC password encryption in Delphi? This is the closest I've been able to get using Google searches, but it doesn't produce the correct encrypted key:
Thank you!
Code: Select all
uses
DECCipher, DECFmt;
var
FSharedSecret: RawByteString;
begin
FSharedSecret := #23#82#107#6#35#78#88#7;
with TCipher_1DES.Create do
try
Mode := cmCBCx;
Init(FSharedSecret);
lblEncrypted.Caption := EncodeBinary( edtClearText.Text, TFormat_HEX );
finally
Free;
end;
UltraVNC v1.0.0 RC 20.3
MS RC4 Plugin-v1.1.7.0
Windows XP Pro SP2
MS RC4 Plugin-v1.1.7.0
Windows XP Pro SP2
Re: UltraVNC password encryption algotithme
You'll want to append 2 characters to the end of the password hash generated by this perl tool. UltraVNC is expecting a hash 2 bytes longer though it doesn't use the final two bytes. You could just append a "00" onto the end of the generated hash.
dad wrote:dad wrote:For future reference:dad wrote: Sorry for the noise.
Code: Select all
#!/usr/bin/perl -w use strict; use warnings; use Getopt::Long; Getopt::Long::Configure('gnu_getopt'); use Pod::Usage; use Crypt::DES; my ($password, $help, $man); GetOptions('help|?' => \$help, 'man' => \$man, 'password=s' => \$password) or pod2usage(2); pod2usage(1) if $help; pod2usage(-exitstatus => 0, -verbose =>2) if $man; pod2usage (1) if !$password; my $realkey = pack ('H16', "E84AD660C4721AE0"); my $cipher = Crypt::DES->new($realkey); # truncate the password to 8 chars $password = substr ($password, 0, 8) if length $password > 8; my $cryptpass = $cipher->encrypt($password); # Foreach byte, unpack it, join the result list and print it in # uppercase print uc join ('', map {unpack('H2', $_)} split (//, $cryptpass)); __END__ =head1 vncpass.pl Generate a VNC password suitable for ultravnc.ini. =head1 SYNOPSIS vncpass.pl [options] Options: --help this help --password password to encrypt =head1 OPTIONS =over 8 =item B<--help> Print the online help =item B<--password> The password to encrypt. =back =head1 DESCRIPTION B<vncpass.pl> generate a password suitable for ultravnc.ini. =cut
Re: UltraVNC password encryption algorithm
Hey guys
Just updated the code for perl, its
Just updated the code for perl, its
Code: Select all
#!/usr/bin/perl -w
use strict;
use warnings;
use Getopt::Long;
Getopt::Long::Configure('gnu_getopt');
use Pod::Usage;
use Crypt::DES;
my ($password, $help, $man);
GetOptions('help|?' => \$help, 'man' => \$man, 'password=s' => \$password) or pod2usage(2);
pod2usage(1) if $help;
pod2usage(-exitstatus => 0, -verbose =>2) if $man;
pod2usage (1) if !$password;
my $realkey = pack ('H16', "E84AD660C4721AE0");
my $cipher = Crypt::DES->new($realkey);
# pad then truncate the password to 8 chars
$password = $password . "\x00\x00\x00\x00\x00\x00\x00\x00\x00";
$password = substr ($password, 0, 8) if length $password > 8;
my $cryptpass = $cipher->encrypt($password);
# Foreach byte, unpack it, join the result list and print it in
# uppercase
print uc join ('', map {unpack('H2', $_)} split (//, $cryptpass));
__END__
=head1 vncpass.pl
Generate a VNC password suitable for ultravnc.ini.
=head1 SYNOPSIS
vncpass.pl [options]
Options:
--help this help
--password password to encrypt
=head1 OPTIONS
=over 8
=item B<--help>
Print the online help
=item B<--password>
The password to encrypt.
=back
=head1 DESCRIPTION
B<vncpass.pl> generate a password suitable for ultravnc.ini.
=cut
Re: UltraVNC password encryption algorithm
Hello,
I have C# implementation, may be for someone it will be useful:
For more details view this article
I have C# implementation, may be for someone it will be useful:
Code: Select all
public static string EncryptPassword(string plainPassword)
{
DES des = CreateDES();
ICryptoTransform cryptoTransfrom = des.CreateEncryptor();
plainPassword = plainPassword + "\0\0\0\0\0\0\0\0";
plainPassword = plainPassword.Length > 8 ? plainPassword.Substring(0, 8) : plainPassword;
byte[] data = Encoding.ASCII.GetBytes(plainPassword);
byte[] encryptedBytes = cryptoTransfrom.TransformFinalBlock(data, 0, data.Length);
return ByteArrayToHex(encryptedBytes) + "00";
}
public static string DecryptPassword(string encryptedPassword)
{
DES des = CreateDES();
ICryptoTransform cryptoTransfrom = des.CreateDecryptor();
byte[] data = HexToByteArray(encryptedPassword.Substring(0, encryptedPassword.Length - 2));
byte[] decryptedBytes = cryptoTransfrom.TransformFinalBlock(data, 0, data.Length);
return Encoding.ASCII.GetString(decryptedBytes);
}
private static DES CreateDES()
{
byte[] key = { 0xE8, 0x4A, 0xD6, 0x60, 0xC4, 0x72, 0x1A, 0xE0 };
DES des = DES.Create();
des.Key = key;
des.IV = key;
des.Mode = CipherMode.ECB;
des.Padding = PaddingMode.Zeros;
return des;
}