parent
e8b822a37f
commit
b0c1b75553
9 changed files with 120 additions and 5 deletions
@ -0,0 +1,10 @@ |
|||||||
|
{ |
||||||
|
my $rec = $DB->get('wpkg') || $DB->new_record('wpkg', { type => 'service' }); |
||||||
|
my $pw = $rec->prop('VNCPassword'); |
||||||
|
|
||||||
|
if (not $pw){ |
||||||
|
$pw = `/usr/bin/openssl rand -base64 6`; |
||||||
|
chomp($pw); |
||||||
|
$rec->set_prop('VNCPassword', $pw); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,53 @@ |
|||||||
|
Windows Registry Editor Version 5.00 |
||||||
|
|
||||||
|
{ |
||||||
|
|
||||||
|
use Crypt::DES; |
||||||
|
my $clear = $wpkg{'VNCPassword'} || 'secret'; |
||||||
|
my $key = pack ('H16', "E84AD660C4721AE0"); |
||||||
|
my $des = Crypt::DES->new($key); |
||||||
|
my $crypt = $des->encrypt($clear); |
||||||
|
my $pass = join(',', map {unpack('H2', $_)} split //, $cryptpass); |
||||||
|
|
||||||
|
my $out =<<"EOF"; |
||||||
|
|
||||||
|
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\TightVNC\\Server] |
||||||
|
"ExtraPorts"="" |
||||||
|
"QueryTimeout"=dword:0000001e |
||||||
|
"QueryAcceptOnTimeout"=dword:00000000 |
||||||
|
"LocalInputPriorityTimeout"=dword:00000003 |
||||||
|
"LocalInputPriority"=dword:00000000 |
||||||
|
"BlockRemoteInput"=dword:00000000 |
||||||
|
"BlockLocalInput"=dword:00000000 |
||||||
|
"IpAccessControl"="" |
||||||
|
"RfbPort"=dword:0000170c |
||||||
|
"HttpPort"=dword:000016a8 |
||||||
|
"DisconnectAction"=dword:00000000 |
||||||
|
"AcceptRfbConnections"=dword:00000001 |
||||||
|
"UseVncAuthentication"=dword:00000001 |
||||||
|
"UseControlAuthentication"=dword:00000001 |
||||||
|
"LoopbackOnly"=dword:00000000 |
||||||
|
"AcceptHttpConnections"=dword:00000000 |
||||||
|
"LogLevel"=dword:00000000 |
||||||
|
"EnableFileTransfers"=dword:00000001 |
||||||
|
"BlankScreen"=dword:00000000 |
||||||
|
"RemoveWallpaper"=dword:00000001 |
||||||
|
"EnableUrlParams"=dword:00000001 |
||||||
|
"Password"=hex:$pass |
||||||
|
"AlwaysShared"=dword:00000000 |
||||||
|
"NeverShared"=dword:00000000 |
||||||
|
"DisconnectClients"=dword:00000001 |
||||||
|
"PollingInterval"=dword:000003e8 |
||||||
|
"AllowLoopback"=dword:00000000 |
||||||
|
"VideoRecognitionInterval"=dword:00000bb8 |
||||||
|
"GrabTransparentWindows"=dword:00000001 |
||||||
|
"SaveLogToAllUsersPath"=dword:00000000 |
||||||
|
"RunControlInterface"=dword:00000001 |
||||||
|
"VideoClasses"="" |
||||||
|
"ControlPassword"=hex:$pass |
||||||
|
|
||||||
|
EOF |
||||||
|
|
||||||
|
$out =~ s/\n/\r\n/g; |
||||||
|
$OUT = $out; |
||||||
|
} |
@ -0,0 +1,53 @@ |
|||||||
|
Windows Registry Editor Version 5.00 |
||||||
|
|
||||||
|
{ |
||||||
|
|
||||||
|
use Crypt::DES; |
||||||
|
my $clear = $wpkg{'VNCPassword'} || 'secret'; |
||||||
|
my $key = pack ('H16', "E84AD660C4721AE0"); |
||||||
|
my $des = Crypt::DES->new($key); |
||||||
|
my $crypt = $des->encrypt($clear); |
||||||
|
my $pass = join(',', map {unpack('H2', $_)} split //, $cryptpass); |
||||||
|
|
||||||
|
my $out =<<"EOF"; |
||||||
|
|
||||||
|
[HKEY_LOCAL_MACHINE\\SOFTWARE\\TightVNC\\Server] |
||||||
|
"ExtraPorts"="" |
||||||
|
"QueryTimeout"=dword:0000001e |
||||||
|
"QueryAcceptOnTimeout"=dword:00000000 |
||||||
|
"LocalInputPriorityTimeout"=dword:00000003 |
||||||
|
"LocalInputPriority"=dword:00000000 |
||||||
|
"BlockRemoteInput"=dword:00000000 |
||||||
|
"BlockLocalInput"=dword:00000000 |
||||||
|
"IpAccessControl"="" |
||||||
|
"RfbPort"=dword:0000170c |
||||||
|
"HttpPort"=dword:000016a8 |
||||||
|
"DisconnectAction"=dword:00000000 |
||||||
|
"AcceptRfbConnections"=dword:00000001 |
||||||
|
"UseVncAuthentication"=dword:00000001 |
||||||
|
"UseControlAuthentication"=dword:00000001 |
||||||
|
"LoopbackOnly"=dword:00000000 |
||||||
|
"AcceptHttpConnections"=dword:00000000 |
||||||
|
"LogLevel"=dword:00000000 |
||||||
|
"EnableFileTransfers"=dword:00000001 |
||||||
|
"BlankScreen"=dword:00000000 |
||||||
|
"RemoveWallpaper"=dword:00000001 |
||||||
|
"EnableUrlParams"=dword:00000001 |
||||||
|
"Password"=hex:$pass |
||||||
|
"AlwaysShared"=dword:00000000 |
||||||
|
"NeverShared"=dword:00000000 |
||||||
|
"DisconnectClients"=dword:00000001 |
||||||
|
"PollingInterval"=dword:000003e8 |
||||||
|
"AllowLoopback"=dword:00000000 |
||||||
|
"VideoRecognitionInterval"=dword:00000bb8 |
||||||
|
"GrabTransparentWindows"=dword:00000001 |
||||||
|
"SaveLogToAllUsersPath"=dword:00000000 |
||||||
|
"RunControlInterface"=dword:00000001 |
||||||
|
"VideoClasses"="" |
||||||
|
"ControlPassword"=hex:$pass |
||||||
|
|
||||||
|
EOF |
||||||
|
|
||||||
|
$out =~ s/\n/\r\n/g; |
||||||
|
$OUT = $out; |
||||||
|
} |
Binary file not shown.
Binary file not shown.
Loading…
Reference in new issue