classes/ssl: Add configurable Ultra java applet Filexfer Drives

drop down (e.g. ftpDropDown=Home.Desktop.bin).  Document all
applet parameters in classes/ssl/README.
pull/1/head
runge 16 years ago
parent 8d55891ded
commit a774823bdf

@ -84,3 +84,192 @@ SignedUltraViewerSSL.jar
ultra.vnc ultra.vnc
ultraproxy.vnc ultraproxy.vnc
ultravnc-102-JavaViewer-ssl-etc.patch ultravnc-102-JavaViewer-ssl-etc.patch
---------------------------------------------------------------
Applet Parameters:
Some additional applet parameters can be set via the URL, e.g.
http://host:5800/?param=value
http://host:5800/ultra.vnc?param=value
https://host:5900/ultra.vnc?param=value
etc. If running java from command line as show above, it comes
in as java ... VncViewer param value ...
There is a limitation with libvncserver that param and value can
only be alphanumeric, underscore, "+" (for space), or "."
We have added some applet parameters to the stock VNC java
viewers. Here are the applet parameters:
Both TightVNC and UltraVNC Java viewers:
HOST
string, default: none.
The Hostname to connect to.
PORT
number, default: 0
The VNC server port to connect to.
Open New Window
yes/no, default: no
Run applet in separate frame.
Show Controls
yes/no, default: yes
Show Controls button panel.
Show Offline Desktop
yes/no, default: no
Do we continue showing desktop on remote disconnect?
Defer screen updates
number, default: 20
Milliseconds delay
Defer cursor updates
number, default: 10
Milliseconds delay
Defer update requests
number, default: 50
Milliseconds delay
The following are added by x11vnc and/or ssvnc project
VNCSERVERPORT
number, default: 0
Like PORT, but if there is a firewall this is the Actual VNC
server port. PORT might be a redir port on the firewall.
DisableSSL
yes/no, default: no
Do unencrypted connection, no SSL.
httpsPort
number, default: none
When checking for proxy, use this at the url port number.
CONNECT
string, default: none
Sets to host:port for the CONNECT line to a Web proxy.
The Web proxy should connect us to it.
GET
yes/no, default: no
Set to do a special HTTP GET (/request.https.vnc.connection)
to the vnc server that will cause it to switch to VNC instead.
This is to speedup/make more robust, the single port HTTPS and VNC
mode of x11vnc (e.g. both services thru port 5900, etc)
urlPrefix
string, default: none
set to a string that will be prefixed to all URL's when contacting
the VNC server. Idea is a special proxy will use this to indicate
internal hostname, etc.
oneTimeKey
string, default: none
set a special hex "key" to correspond to an SSL X.509 cert.
See the 'onetimekey' helper script. Can also be PROMPT to
prompt the user to paste the hex key string in.
This is to try to work around the problem that the Java
applet cannot keep an SSL keystore on disk, etc.
E.g. if they log into an HTTPS website via password they
are authenticated and encrypted, then the website can
safely put oneTimeKey=... on the URL. The Vncviewer
authenticates the VNC server with this key.
forceProxy
yes/no, default: no
Assume there is a proxy.
ignoreProxy
yes/no, default: no
Don't check for a proxy, assume there is none.
trustAllVncCerts
yes/no, default: no
Automatically trust any cert received from the VNC server
(obviously this could be dangerous and lead to man in the
middle attack). Do not ask the user to verify any of these
certs from the VNC server.
trustUrlVncCert
yes/no, default: no
Automatically trust any cert that the web browsers has accepted.
E.g. the user said "Yes" or "Continue" to a web browser dialog
regarding a certificate. If we get the same cert from the VNC
server we trust it without prompting the user.
TightVNC Java viewer only:
Offer Relogin
yes/no, default: yes
"Offer Relogin" set to "No" disables "Login again"
SocketFactory
string, default: none
set Java Socket class factory.
UltraVNC Java viewer only:
PASSWORD
string, default: none
VNC session password in plain text.
ENCPASSWORD
string, default: none
VNC session password in encrypted in DES with KNOWN FIXED
key. It is a hex string. This is like the ~/.vnc/passwd format.
The following are added by x11vnc and/or ssvnc project
ftpDropDown
string, default: none
Sets the file transfer "drives" dropdown to the "." separated
list. Use "+" for space. The default is
My+Documents.Desktop.Home
for 3 entries in the dropdown in addition to the "drives"
(e.g. C:\) These items should be expanded properly by the VNC
Server. x11vnc will prepend $HOME to them, which is normally
what one wants. To include a "/" use "_2F_". Another example:
Home.Desktop.bin_2F_linux
ftpOnly
yes/no, default: no
The VNC viewer only shows the filetransfer panel, no desktop
is displayed.
graftFtp
yes/no, default: no
As ftpOnly, the VNC viewer only shows the filetransfer panel,
no desktop is displayed, however it is "grafted" onto an existing
SSVNC unix vncviewer. The special SSVNC vncviewer merges the two
channels.
dsmActive
yes/no, default: no
Special usage mode with the SSVNC unix vncviewer. The UltraVNC
DSM encryption is active. Foolishly, UltraVNC DSM encryption
*MODIFIES* the VNC protocol when active (it is not a pure tunnel).
This option indicates to modify the VNC protocol to make this work.
Usually only used with graftFtp and SSVNC unix vncviewer.
delayAuthPanel
yes/no, default: no
This is another special usage mode with the SSVNC unix vncviewer.
A login panel is delayed (not shown at startup.) Could be useful
for non SSVNC usage too.
ignoreMSLogonCheck
yes/no, default: no
Similar to delayAuthPanel, do not put up a popup asking for
Windows username, etc.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -23,6 +23,7 @@
# #
# -verify /path/to/cacert.pem # -verify /path/to/cacert.pem
# -mycert /path/to/mycert.pem # -mycert /path/to/mycert.pem
# -crl /path/to/my_crl.pem (or directory)
# -proxy host:port # -proxy host:port
# #
# -verify specifies a CA cert PEM file (or a self-signed one) for # -verify specifies a CA cert PEM file (or a self-signed one) for
@ -125,8 +126,25 @@ fi
PATH=$PATH:/usr/sbin:/usr/local/sbin:/dist/sbin; export PATH PATH=$PATH:/usr/sbin:/usr/local/sbin:/dist/sbin; export PATH
# work out which stunnel t use (debian installs as stunnel4) localhost="localhost"
if uname | grep Darwin >/dev/null; then
localhost="127.0.0.1"
fi
# work out which stunnel to use (debian installs as stunnel4)
if [ "X$STUNNEL" = "X" ]; then if [ "X$STUNNEL" = "X" ]; then
check_stunnel=1
if [ "X$SSVNC_BASEDIRNAME" != "X" ]; then
if [ -x "$SSVNC_BASEDIRNAME/stunnel" ]; then
type stunnel > /dev/null 2>&1
if [ $? = 0 ]; then
# found ours
STUNNEL=stunnel
check_stunnel=0
fi
fi
fi
if [ "X$check_stunnel" = "X1" ]; then
type stunnel4 > /dev/null 2>&1 type stunnel4 > /dev/null 2>&1
if [ $? = 0 ]; then if [ $? = 0 ]; then
STUNNEL=stunnel4 STUNNEL=stunnel4
@ -134,6 +152,7 @@ if [ "X$STUNNEL" = "X" ]; then
STUNNEL=stunnel STUNNEL=stunnel
fi fi
fi fi
fi
help() { help() {
tail -n +2 "$0" | sed -e '/^$/ q' tail -n +2 "$0" | sed -e '/^$/ q'
@ -164,6 +183,11 @@ reverse=""
ciphers="" ciphers=""
anondh="ALL:RC4+RSA:+SSLv2:@STRENGTH" anondh="ALL:RC4+RSA:+SSLv2:@STRENGTH"
anondh_set=""
stunnel_debug="6"
if [ "X$SS_DEBUG" != "X" -o "X$SSVNC_VENCRYPT_DEBUG" != "X" -o "X$SSVNC_STUNNEL_DEBUG" != "X" ]; then
stunnel_debug="7"
fi
if [ "X$1" = "X-viewerflavor" ]; then if [ "X$1" = "X-viewerflavor" ]; then
# special case, try to guess which viewer: # special case, try to guess which viewer:
@ -193,16 +217,9 @@ if [ "X$1" = "X-viewerflavor" ]; then
fi fi
exit 0 exit 0
fi fi
if [ "X$1" = "X-viewerhelp" ]; then
# maxconn is something we added to stunnel, this disables it: $VNCVIEWERCMD -h 2>&1
if [ "X$SS_VNCVIEWER_NO_MAXCONN" != "X" ]; then exit 0
STUNNEL_EXTRA_OPTS=`echo "$STUNNEL_EXTRA_OPTS" | sed -e 's/maxconn/#maxconn/'`
elif echo "$VNCVIEWERCMD" | egrep -i '^(xmessage|sleep )' > /dev/null; then
STUNNEL_EXTRA_OPTS=`echo "$STUNNEL_EXTRA_OPTS" | sed -e 's/maxconn/#maxconn/'`
else
STUNNEL_ONCE=1; export STUNNEL_ONCE
STUNNEL_MAX_CLIENTS=1; export STUNNEL_MAX_CLIENTS
STUNNEL_NO_SYSLOG=1; export STUNNEL_NO_SYSLOG
fi fi
# grab our cmdline options: # grab our cmdline options:
@ -213,6 +230,8 @@ do
;; ;;
"-mycert") shift; mycert="$1" "-mycert") shift; mycert="$1"
;; ;;
"-crl") shift; crl="$1"
;;
"-proxy") shift; proxy="$1" "-proxy") shift; proxy="$1"
;; ;;
"-ssh") use_ssh=1 "-ssh") use_ssh=1
@ -225,6 +244,7 @@ do
"-sshargs") shift; ssh_args="$1" "-sshargs") shift; ssh_args="$1"
;; ;;
"-anondh") ciphers="ciphers=$anondh" "-anondh") ciphers="ciphers=$anondh"
anondh_set=1
;; ;;
"-ciphers") shift; ciphers="ciphers=$1" "-ciphers") shift; ciphers="ciphers=$1"
;; ;;
@ -246,6 +266,8 @@ do
;; ;;
"-scale") shift; SSVNC_SCALE="$1"; export SSVNC_SCALE "-scale") shift; SSVNC_SCALE="$1"; export SSVNC_SCALE
;; ;;
"-onelisten") SSVNC_LISTEN_ONCE=1; export SSVNC_LISTEN_ONCE
;;
"-escape") shift; VNCVIEWER_ESCAPE="$1"; export VNCVIEWER_ESCAPE "-escape") shift; VNCVIEWER_ESCAPE="$1"; export VNCVIEWER_ESCAPE
;; ;;
"-ssvnc_encodings") shift; VNCVIEWER_ENCODINGS="$1"; export VNCVIEWER_ENCODINGS "-ssvnc_encodings") shift; VNCVIEWER_ENCODINGS="$1"; export VNCVIEWER_ENCODINGS
@ -268,7 +290,28 @@ do
shift shift
done done
# this is the -t ssh option (gives better keyboard responsd thru SSH tunnel) # maxconn is something we added to stunnel, this disables it:
if [ "X$SS_VNCVIEWER_NO_MAXCONN" != "X" ]; then
STUNNEL_EXTRA_OPTS=`echo "$STUNNEL_EXTRA_OPTS" | sed -e 's/maxconn/#maxconn/'`
elif echo "$VNCVIEWERCMD" | egrep -i '^(xmessage|sleep )' > /dev/null; then
STUNNEL_EXTRA_OPTS=`echo "$STUNNEL_EXTRA_OPTS" | sed -e 's/maxconn/#maxconn/'`
elif [ "X$reverse" != "X" ]; then
STUNNEL_EXTRA_OPTS=`echo "$STUNNEL_EXTRA_OPTS" | sed -e 's/maxconn/#maxconn/'`
else
# new way (our patches). other than the above, we set these:
if [ "X$SKIP_STUNNEL_ONCE" = "X" ]; then
STUNNEL_ONCE=1; export STUNNEL_ONCE
fi
if [ "X$SKIP_STUNNEL_MAX_CLIENTS" = "X" ]; then
STUNNEL_MAX_CLIENTS=1; export STUNNEL_MAX_CLIENTS
fi
fi
# always set this one:
if [ "X$SKIP_STUNNEL_NO_SYSLOG" = "X" ]; then
STUNNEL_NO_SYSLOG=1; export STUNNEL_NO_SYSLOG
fi
# this is the -t ssh option (gives better keyboard response thru SSH tunnel)
targ="-t" targ="-t"
if [ "X$SS_VNCVIEWER_NO_T" != "X" ]; then if [ "X$SS_VNCVIEWER_NO_T" != "X" ]; then
targ="" targ=""
@ -289,18 +332,18 @@ if [ "X$reverse" != "X" ]; then
# check proxy usage under reverse connection: # check proxy usage under reverse connection:
if [ "X$use_ssh" = "X" -a "X$use_sshssl" = "X" ]; then if [ "X$use_ssh" = "X" -a "X$use_sshssl" = "X" ]; then
echo "" echo ""
if echo "$proxy" | egrep "repeater://" > /dev/null; then if echo "$proxy" | egrep -i "(repeater|vencrypt)://" > /dev/null; then
: :
else else
echo "*Warning*: SSL -listen and a Web proxy does not make sense." echo "*Warning*: SSL -listen and a Web proxy does not make sense."
sleep 3 sleep 2
fi fi
elif echo "$proxy" | grep "," > /dev/null; then elif echo "$proxy" | grep "," > /dev/null; then
: :
else else
echo "" echo ""
echo "*Warning*: -listen and a single proxy/gateway does not make sense." echo "*Warning*: -listen and a single proxy/gateway does not make sense."
sleep 3 sleep 2
fi fi
SSVNC_LISTEN_ONCE=1; export SSVNC_LISTEN_ONCE SSVNC_LISTEN_ONCE=1; export SSVNC_LISTEN_ONCE
fi fi
@ -320,6 +363,14 @@ if uname -sr | egrep 'SunOS 5\.[5-8]' > /dev/null; then
dL="-h" dL="-h"
fi fi
rchk() {
# a kludge to set $RANDOM if we are not bash:
if [ "X$BASH_VERSION" = "X" ]; then
RANDOM=`date +%S``sh -c 'echo $$'``ps -elf 2>&1 | sum 2>&1 | awk '{print $1}'`
fi
}
rchk
# a portable, but not absolutely safe, tmp file creator # a portable, but not absolutely safe, tmp file creator
mytmp() { mytmp() {
tf=$1 tf=$1
@ -397,6 +448,7 @@ if echo "$orig" | grep '^vnc://' > /dev/null; then
orig=`echo "$orig" | sed -e 's,vnc://,,'` orig=`echo "$orig" | sed -e 's,vnc://,,'`
verify="" verify=""
mycert="" mycert=""
crl=""
use_ssh="" use_ssh=""
use_sshssl="" use_sshssl=""
direct_connect=1 direct_connect=1
@ -417,6 +469,7 @@ fi
if [ "X$SSVNC_ULTRA_DSM" != "X" ]; then if [ "X$SSVNC_ULTRA_DSM" != "X" ]; then
verify="" verify=""
mycert="" mycert=""
crl=""
use_ssh="" use_ssh=""
use_sshssl="" use_sshssl=""
direct_connect=1 direct_connect=1
@ -459,7 +512,7 @@ fi
host=`echo "$orig" | awk -F: '{print $1}'` host=`echo "$orig" | awk -F: '{print $1}'`
disp=`echo "$orig" | awk -F: '{print $2}'` disp=`echo "$orig" | awk -F: '{print $2}'`
if [ "X$host" = "X" ]; then if [ "X$host" = "X" ]; then
host=localhost host=$localhost
fi fi
if [ "X$disp" = "X" ]; then if [ "X$disp" = "X" ]; then
port="" # probably -listen mode. port="" # probably -listen mode.
@ -483,9 +536,9 @@ inuse=""
if uname | grep Linux > /dev/null; then if uname | grep Linux > /dev/null; then
inuse=`netstat -ant | egrep 'LISTEN|WAIT|ESTABLISH|CLOSE' | awk '{print $4}' | sed 's/^.*://'` inuse=`netstat -ant | egrep 'LISTEN|WAIT|ESTABLISH|CLOSE' | awk '{print $4}' | sed 's/^.*://'`
elif uname | grep SunOS > /dev/null; then elif uname | grep SunOS > /dev/null; then
inuse=`netstat -an -f inet -P tcp | grep LISTEN | awk '{print $1}' | sed 's/^.*\.//'` inuse=`netstat -an -f inet -P tcp | egrep 'LISTEN|WAIT|ESTABLISH|CLOSE' | awk '{print $1}' | sed 's/^.*\.//'`
elif uname | grep -i bsd > /dev/null; then elif uname | egrep -i 'bsd|darwin' > /dev/null; then
inuse=`netstat -ant -f inet | grep LISTEN | awk '{print $4}' | sed 's/^.*\.//'` inuse=`netstat -ant -f inet | egrep 'LISTEN|WAIT|ESTABLISH|CLOSE' | awk '{print $4}' | sed 's/^.*\.//'`
# add others... # add others...
fi fi
@ -590,7 +643,14 @@ final() {
if [ "X$reverse" = "X" ]; then if [ "X$reverse" = "X" ]; then
# normal connections try 5930-5999: # normal connections try 5930-5999:
if [ "X$showcert" = "X" ]; then
use=`findfree 5930` use=`findfree 5930`
else
# move away from normal place for (possibly many) -showcert
pstart=`date +%S`
pstart=`expr 6130 + $pstart + $pstart`
use=`findfree $pstart`
fi
if [ $use -ge 5900 ]; then if [ $use -ge 5900 ]; then
N=`expr $use - 5900` N=`expr $use - 5900`
else else
@ -612,14 +672,6 @@ if echo "$0" | grep vncip > /dev/null; then
VNCVIEWERCMD="$VNCIPCMD" VNCVIEWERCMD="$VNCIPCMD"
fi fi
rchk() {
# a kludge to set $RANDOM if we are not bash:
if [ "X$BASH_VERSION" = "X" ]; then
RANDOM=`date +%S``sh -c 'echo $$'``ps -elf 2>&1 | sum 2>&1 | awk '{print $1}'`
fi
}
rchk
# trick for the undocumented rsh://host:port method. # trick for the undocumented rsh://host:port method.
rsh_setup() { rsh_setup() {
if echo "$ssh_host" | grep '@' > /dev/null; then if echo "$ssh_host" | grep '@' > /dev/null; then
@ -670,7 +722,7 @@ if (exists $ENV{PPROXY_SLEEP}) {
foreach my $var (qw(PPROXY_PROXY PPROXY_SOCKS PPROXY_DEST PPROXY_LISTEN foreach my $var (qw(PPROXY_PROXY PPROXY_SOCKS PPROXY_DEST PPROXY_LISTEN
PPROXY_REVERSE PPROXY_REPEATER PPROXY_REMOVE PPROXY_KILLPID PPROXY_SLEEP)) { PPROXY_REVERSE PPROXY_REPEATER PPROXY_REMOVE PPROXY_KILLPID PPROXY_SLEEP)) {
if (0 || $ENV{SS_DEBUG}) { if (0 || $ENV{SS_DEBUG} || $ENV{SSVNC_VENCRYPT_DEBUG}) {
print STDERR "$var: $ENV{$var}\n"; print STDERR "$var: $ENV{$var}\n";
} }
} }
@ -683,7 +735,7 @@ if ($ENV{PPROXY_SOCKS} ne "" && $ENV{PPROXY_PROXY} !~ m,^socks5?://,i) {
} }
} }
my $rfbSecTypeTlsVnc = 18; my $rfbSecTypeAnonTls = 18;
my $rfbSecTypeVencrypt = 19; my $rfbSecTypeVencrypt = 19;
my $rfbVencryptPlain = 256; my $rfbVencryptPlain = 256;
@ -755,13 +807,24 @@ if ($ENV{PPROXY_REVERSE} ne "") {
die "pproxy: $! -- PPROXY_REVERSE\n"; die "pproxy: $! -- PPROXY_REVERSE\n";
} }
print STDERR "PPROXY_REVERSE: connected to $rhost $rport\n"; print STDERR "PPROXY_REVERSE: connected to $rhost $rport\n";
} elsif ($ENV{PPROXY_LISTEN} ne "") { } elsif ($ENV{PPROXY_LISTEN} ne "") {
my $listen_sock = IO::Socket::INET->new( my $listen_sock = "";
if ($ENV{PPROXY_LISTEN} =~ /^INADDR_ANY:(.*)/) {
my $p = $1;
$listen_sock = IO::Socket::INET->new(
Listen => 2,
LocalPort => $p,
Proto => "tcp"
);
} else {
$listen_sock = IO::Socket::INET->new(
Listen => 2, Listen => 2,
LocalAddr => "localhost", LocalAddr => "127.0.0.1",
LocalPort => $ENV{PPROXY_LISTEN}, LocalPort => $ENV{PPROXY_LISTEN},
Proto => "tcp" Proto => "tcp"
); );
}
if (! $listen_sock) { if (! $listen_sock) {
die "pproxy: $! -- PPROXY_LISTEN\n"; die "pproxy: $! -- PPROXY_LISTEN\n";
} }
@ -770,6 +833,7 @@ if ($ENV{PPROXY_REVERSE} ne "") {
if (! $listen_handle) { if (! $listen_handle) {
die "pproxy: $!\n"; die "pproxy: $!\n";
} }
close $listen_sock;
} }
my $sock = IO::Socket::INET->new( my $sock = IO::Socket::INET->new(
@ -786,6 +850,13 @@ if (! $sock) {
unlink($0) if $ENV{PPROXY_REMOVE}; unlink($0) if $ENV{PPROXY_REMOVE};
if ($ENV{PPROXY_PROXY} =~ /^vencrypt:/ && $ENV{PPROXY_LISTEN} =~ /^INADDR_ANY:/) {
print STDERR "PPROXY: vencrypt+reverse: swapping listen socket with connect socket.\n";
my $tmp_swap = $sock;
$sock = $listen_handle;
$listen_handle = $tmp_swap;
}
$cur_proxy = $first; $cur_proxy = $first;
setmode($mode_1st); setmode($mode_1st);
@ -810,7 +881,14 @@ if ($second ne "") {
$parent = $$; $parent = $$;
$child = fork; $child = fork;
if (! defined $child) { if (! defined $child) {
kill "TERM", $ENV{PPROXY_KILLPID} if $ENV{PPROXY_KILLPID}; if ($ENV{PPROXY_KILLPID}) {
foreach my $p (split(/,/, $ENV{PPROXY_KILLPID})) {
if ($p =~ /^(\+|-)/) {
$p = $parent + $p;
}
kill "TERM", $p;
}
}
exit 1; exit 1;
} }
@ -824,7 +902,7 @@ if ($child) {
select(undef, undef, undef, 0.25); select(undef, undef, undef, 0.25);
if (kill 0, $child) { if (kill 0, $child) {
select(undef, undef, undef, 1.5); select(undef, undef, undef, 1.5);
#print STDERR "pproxy\[$$]: kill TERM $child\n"; print STDERR "pproxy\[$$]: kill TERM $child\n";
kill "TERM", $child; kill "TERM", $child;
} }
} else { } else {
@ -837,16 +915,20 @@ if ($child) {
select(undef, undef, undef, 0.25); select(undef, undef, undef, 0.25);
if (kill 0, $parent) { if (kill 0, $parent) {
select(undef, undef, undef, 1.5); select(undef, undef, undef, 1.5);
#print STDERR "pproxy\[$$]: kill TERM $parent\n"; print STDERR "pproxy\[$$]: kill TERM $parent\n";
kill "TERM", $parent; kill "TERM", $parent;
} }
} }
if ($ENV{PPROXY_KILLPID} ne "") { if ($ENV{PPROXY_KILLPID} ne "") {
if ($ENV{PPROXY_KILLPID} =~ /^(\+|-)/) { if ($ENV{PPROXY_KILLPID}) {
$ENV{PPROXY_KILLPID} = $$ + $ENV{PPROXY_KILLPID}; foreach my $p (split(/,/, $ENV{PPROXY_KILLPID})) {
if ($p =~ /^(\+|-)/) {
$p = $parent + $p;
}
print STDERR "kill TERM, $p (PPROXY_KILLPID)\n";
kill "TERM", $p;
}
} }
print STDERR "kill TERM, $ENV{PPROXY_KILLPID}\n";
kill "TERM", $ENV{PPROXY_KILLPID};
} }
exit; exit;
@ -1079,12 +1161,12 @@ sub vdie {
exit(1); exit(1);
} }
sub tlsvnc_handshake { sub anontls_handshake {
my ($vmode, $db) = @_; my ($vmode, $db) = @_;
print STDERR "PPROXY: Doing TLSVNC Handshake\n"; print STDERR "PPROXY: Doing ANONTLS Handshake\n";
my $psec = pack("C", $rfbSecTypeTlsVnc); my $psec = pack("C", $rfbSecTypeAnonTls);
syswrite($sock, $psec, 1); syswrite($sock, $psec, 1);
append_handshake("done\n"); append_handshake("done\n");
@ -1097,6 +1179,13 @@ sub vencrypt_handshake {
print STDERR "PPROXY: Doing VeNCrypt Handshake\n"; print STDERR "PPROXY: Doing VeNCrypt Handshake\n";
my $psec = pack("C", $rfbSecTypeVencrypt); my $psec = pack("C", $rfbSecTypeVencrypt);
if (exists $ENV{SSVNC_TEST_SEC_TYPE}) {
my $fake = $ENV{SSVNC_TEST_SEC_TYPE};
print STDERR "PPROXY: sending sec-type: $fake\n";
$psec = pack("C", $fake);
}
syswrite($sock, $psec, 1); syswrite($sock, $psec, 1);
my $vmajor; my $vmajor;
@ -1108,10 +1197,14 @@ sub vencrypt_handshake {
$vmajor = unpack("C", $vmajor); $vmajor = unpack("C", $vmajor);
$vminor = unpack("C", $vminor); $vminor = unpack("C", $vminor);
print STDERR "$vmajor.$vminor\n" if $db; print STDERR "server vencrypt version $vmajor.$vminor\n" if $db;
if (exists $ENV{SSVNC_TEST_SEC_TYPE}) {
print STDERR "PPROXY: continuing on in test mode.\n";
} else {
vdie if $vmajor ne 0; vdie if $vmajor ne 0;
vdie if $vminor < 2; vdie if $vminor < 2;
}
$vmajor = pack("C", 0); $vmajor = pack("C", 0);
$vminor = pack("C", 2); $vminor = pack("C", 2);
@ -1122,6 +1215,7 @@ sub vencrypt_handshake {
my $result; my $result;
sysread($sock, $result, 1); sysread($sock, $result, 1);
print STDERR "result empty\n" if $db && $result eq "";
vdie if $result eq ""; vdie if $result eq "";
$result = unpack("C", $result); $result = unpack("C", $result);
@ -1170,12 +1264,23 @@ sub vencrypt_handshake {
$subtype = $rfbVencryptTlsPlain; $subtype = $rfbVencryptTlsPlain;
print STDERR "selected rfbVencryptTlsPlain\n" if $db; print STDERR "selected rfbVencryptTlsPlain\n" if $db;
} }
if (exists $ENV{SSVNC_TEST_SEC_SUBTYPE}) {
my $fake = $ENV{SSVNC_TEST_SEC_SUBTYPE};
print STDERR "PPROXY: sending sec-subtype: $fake\n";
$subtype = $fake;
}
append_handshake("subtype=$subtype\n"); append_handshake("subtype=$subtype\n");
my $pst = pack("N", $subtype); my $pst = pack("N", $subtype);
syswrite($sock, $pst, 4); syswrite($sock, $pst, 4);
if (exists $ENV{SSVNC_TEST_SEC_SUBTYPE}) {
print STDERR "PPROXY: continuing on in test mode.\n";
} else {
vdie if $subtype == 0; vdie if $subtype == 0;
}
my $ok; my $ok;
sysread($sock, $ok, 1); sysread($sock, $ok, 1);
@ -1192,11 +1297,12 @@ sub vencrypt_dialog {
my $db = 0; my $db = 0;
$db = 1 if exists $ENV{SS_DEBUG}; $db = 1 if exists $ENV{SS_DEBUG};
$db = 1 if exists $ENV{SSVNC_VENCRYPT_DEBUG};
append_handshake("mode=$vmode\n"); append_handshake("mode=$vmode\n");
my $server_rfb = ""; my $server_rfb = "";
syswrite($sock, $rep, 250); #syswrite($sock, $rep, 250);
for (my $i = 0; $i < 12; $i++) { for (my $i = 0; $i < 12; $i++) {
my $c; my $c;
sysread($sock, $c, 1); sysread($sock, $c, 1);
@ -1246,10 +1352,10 @@ sub vencrypt_dialog {
print STDERR "found rfbSecTypeVencrypt\n" if $db; print STDERR "found rfbSecTypeVencrypt\n" if $db;
append_handshake("sectype=$rfbSecTypeVencrypt\n"); append_handshake("sectype=$rfbSecTypeVencrypt\n");
vencrypt_handshake($vmode, $db); vencrypt_handshake($vmode, $db);
} elsif (exists $sectypes{$rfbSecTypeTlsVnc}) { } elsif (exists $sectypes{$rfbSecTypeAnonTls}) {
print STDERR "found rfbSecTypeTlsVnc\n" if $db; print STDERR "found rfbSecTypeAnonTls\n" if $db;
append_handshake("sectype=$rfbSecTypeTlsVnc\n"); append_handshake("sectype=$rfbSecTypeAnonTls\n");
tlsvnc_handshake($vmode, $db); anontls_handshake($vmode, $db);
} else { } else {
print STDERR "No supported sec-type found\n" if $db; print STDERR "No supported sec-type found\n" if $db;
vdie; vdie;
@ -1296,9 +1402,12 @@ sub xfer {
close($out); close($out);
} }
' '
# '
# xpg_echo will expand \n \r, etc. # xpg_echo will expand \n \r, etc.
# try to unset and then test for it. # try to unset and then test for it.
if type shopt > /dev/null 2>&1; then
shopt -u xpg_echo >/dev/null 2>&1 shopt -u xpg_echo >/dev/null 2>&1
fi
v='print STDOUT "abc\n";' v='print STDOUT "abc\n";'
echo "$v" > $tf echo "$v" > $tf
chmod 700 $tf chmod 700 $tf
@ -1314,6 +1423,67 @@ sub xfer {
perl -e 'use IO::Socket::INET; select(undef, undef, undef, 0.01)' >/dev/null 2>&1 perl -e 'use IO::Socket::INET; select(undef, undef, undef, 0.01)' >/dev/null 2>&1
} }
# make_tcert is no longer invoked via the ssvnc gui (Listen mode).
# make_tcert is for testing only now via -mycert BUILTIN
make_tcert() {
tcert="/tmp/ss_vnc_viewer_tcert${RANDOM}.$$"
tcert=`mytmp "$tcert"`
cat > $tcert <<END
-----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEAvkfXxb0wcxgrjV2ziFikjII+ze8iKcTBt47L0GM/c21efelN
+zZpJUUXLu4zz8Ryq8Q+sQgfNy7uTOpN9bUUaOk1TnD7gaDQnQWiNHmqbW2kL+DS
OKngJVPo9dETAS8hf7+D1e1DBZxjTc1a4RQqWJixwpYj99ixWzu8VC2m/xXsjvOs
jp4+DLBB490nbkwvstmhmiWm1CmI5O5xOkgioVNQqHvQMdVKOSz9PpbjvZiRX1Uo
qoMrk+2NOqwP90TB35yPASXb9zXKpO7DLhkube+yYGf+yk46aD707L07Eb7cosFP
S84vNZ9gX7rQ0UOwm5rYA/oZTBskgaqhtIzkLwIDAQABAoIBAD4ot/sXt5kRn0Ca
CIkU9AQWlC+v28grR2EQW9JiaZrqcoDNUzUqbCTJsi4ZkIFh2lf0TsqELbZYNW6Y
6AjJM7al4E0UqYSKJTv2WCuuRxdiRs2BMwthqyBmjeanev7bB6V0ybt7u3Y8xU/o
MrTuYnr4vrEjXPKdLirwk7AoDbKsRXHSIiHEIBOq1+dUQ32t36ukdnnza4wKDLZc
PKHiCdCk/wOGhuDlxD6RspqUAlRnJ8/aEhrgWxadFXw1hRhRsf/v1shtB0T3DmTe
Jchjwyiw9mryb9JZAcKxW+fUc4EVvj6VdQGqYInQJY5Yxm5JAlVQUJicuuJEvn6A
rj5osQECgYEA552CaHpUiFlB4HGkjaH00kL+f0+gRF4PANCPk6X3UPDVYzKnzmuu
yDvIdEETGFWBwoztUrOOKqVvPEQ+kBa2+DWWYaERZLtg2cI5byfDJxQ3ldzilS3J
1S3WgCojqcsG/hlxoQJ1dZFanUy/QhUZ0B+wlC+Zp1Q8AyuGQvhHp68CgYEA0lBI
eqq2GGCdJuNHMPFbi8Q0BnX55LW5C1hWjhuYiEkb3hOaIJuJrqvayBlhcQa2cGqp
uP34e9UCfoeLgmoCQ0b4KpL2NGov/mL4i8bMgog4hcoYuIi3qxN18vVR14VKEh4U
RLk0igAYPU+IK2QByaQlBo9OSaKkcfm7U1/pK4ECgYAxr6VpGk0GDvfF2Tsusv6d
GIgV8ZP09qSLTTJvvxvF/lQYeqZq7sjI5aJD5i3de4JhpO/IXQJzfZfWOuGc8XKA
3qYK/Y2IqXXGYRcHFGWV/Y1LFd55mCADHlk0l1WdOBOg8P5iRu/Br9PbiLpCx9oI
vrOXpnp03eod1/luZmqguwKBgQCWFRSj9Q7ddpSvG6HCG3ro0qsNsUMTI1tZ7UBX
SPogx4tLf1GN03D9ZUZLZVFUByZKMtPLX/Hi7K9K/A9ikaPrvsl6GEX6QYzeTGJx
3Pw0amFrmDzr8ySewNR6/PXahxPEuhJcuI31rPufRRI3ZLah3rFNbRbBFX+klkJH
zTnoAQKBgDbUK/aQFGduSy7WUT7LlM3UlGxJ2sA90TQh4JRQwzur0ACN5GdYZkqM
YBts4sBJVwwJoxD9OpbvKu3uKCt41BSj0/KyoBzjT44S2io2tj1syujtlVUsyyBy
/ca0A7WBB8lD1D7QMIhYUm2O9kYtSCLlUTHt5leqGaRG38DqlX36
-----END RSA PRIVATE KEY-----
-----BEGIN CERTIFICATE-----
MIIDzDCCArQCCQDSzxzxqhyqLzANBgkqhkiG9w0BAQQFADCBpzELMAkGA1UEBhMC
VVMxFjAUBgNVBAgTDU1hc3NhY2h1c2V0dHMxDzANBgNVBAcTBkJvc3RvbjETMBEG
A1UEChMKTXkgQ29tcGFueTEcMBoGA1UECxMTUHJvZHVjdCBEZXZlbG9wbWVudDEZ
MBcGA1UEAxMQd3d3Lm5vd2hlcmUubm9uZTEhMB8GCSqGSIb3DQEJARYSYWRtaW5A
bm93aGVyZS5ub25lMB4XDTA3MDMyMzE4MDc0NVoXDTI2MDUyMjE4MDc0NVowgacx
CzAJBgNVBAYTAlVTMRYwFAYDVQQIEw1NYXNzYWNodXNldHRzMQ8wDQYDVQQHEwZC
b3N0b24xEzARBgNVBAoTCk15IENvbXBhbnkxHDAaBgNVBAsTE1Byb2R1Y3QgRGV2
ZWxvcG1lbnQxGTAXBgNVBAMTEHd3dy5ub3doZXJlLm5vbmUxITAfBgkqhkiG9w0B
CQEWEmFkbWluQG5vd2hlcmUubm9uZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC
AQoCggEBAL5H18W9MHMYK41ds4hYpIyCPs3vIinEwbeOy9BjP3NtXn3pTfs2aSVF
Fy7uM8/EcqvEPrEIHzcu7kzqTfW1FGjpNU5w+4Gg0J0FojR5qm1tpC/g0jip4CVT
6PXREwEvIX+/g9XtQwWcY03NWuEUKliYscKWI/fYsVs7vFQtpv8V7I7zrI6ePgyw
QePdJ25ML7LZoZolptQpiOTucTpIIqFTUKh70DHVSjks/T6W472YkV9VKKqDK5Pt
jTqsD/dEwd+cjwEl2/c1yqTuwy4ZLm3vsmBn/spOOmg+9Oy9OxG+3KLBT0vOLzWf
YF+60NFDsJua2AP6GUwbJIGqobSM5C8CAwEAATANBgkqhkiG9w0BAQQFAAOCAQEA
vGomHEp6TVU83X2EBUgnbOhzKJ9u3fOI/Uf5L7p//Vxqow7OR1cguzh/YEzmXOIL
ilMVnzX9nj/bvcLAuqEP7MR1A8f4+E807p/L/Sf49BiCcwQq5I966sGKYXjkve+T
2GTBNwMSq+5kLSf6QY8VZI+qnrAudEQMeJByQhTZZ0dH8Njeq8EGl9KUio+VWaiW
CQK6xJuAvAHqa06OjLmwu1fYD4GLGSrOIiRVkSXV8qLIUmzxdJaIRznkFWsrCEKR
wAH966SAOvd2s6yOHMvyDRIL7WHxfESB6rDHsdIW/yny1fBePjv473KrxyXtbz7I
dMw1yW09l+eEo4A7GzwOdw==
-----END CERTIFICATE-----
END
chmod 600 $tcert
echo "$tcert"
}
Kecho() { Kecho() {
if [ "X$USER" = "Xrunge" ]; then if [ "X$USER" = "Xrunge" ]; then
echo "dbg: $*" echo "dbg: $*"
@ -1326,7 +1496,7 @@ if [ "X$use_ssh" = "X1" ]; then
# #
ssh_port="22" ssh_port="22"
ssh_host="$host" ssh_host="$host"
vnc_host="localhost" vnc_host="$localhost"
# let user override ssh via $SSH # let user override ssh via $SSH
ssh=${SSH:-"ssh -x"} ssh=${SSH:-"ssh -x"}
@ -1444,9 +1614,9 @@ if [ "X$use_ssh" = "X1" ]; then
u=`echo "$host" | sed -e 's/@.*$/@/'` u=`echo "$host" | sed -e 's/@.*$/@/'`
fi fi
proxy="${u}localhost:$nd" proxy="${u}$localhost:$nd"
else else
proxy="${sproxy1_user}localhost:$nd" proxy="${sproxy1_user}$localhost:$nd"
fi fi
if [ "X$sproxy_rest" != "X" ]; then if [ "X$sproxy_rest" != "X" ]; then
proxy="$proxy,$sproxy_rest" proxy="$proxy,$sproxy_rest"
@ -1487,7 +1657,7 @@ if [ "X$use_ssh" = "X1" ]; then
ssh_args="$ssh_args -o NoHostAuthenticationForLocalhost=yes" ssh_args="$ssh_args -o NoHostAuthenticationForLocalhost=yes"
sleep 1 sleep 1
stty sane stty sane
proxy="${ssh_user2}localhost:$proxport" proxy="${ssh_user2}$localhost:$proxport"
fi fi
if [ "X$proxy" != "X" ]; then if [ "X$proxy" != "X" ]; then
@ -1515,14 +1685,14 @@ if [ "X$use_ssh" = "X1" ]; then
getport="" getport=""
teeport="" teeport=""
if echo "$ssh_cmd" | egrep "^(PORT=|P=)" > /dev/null; then if echo "$ssh_cmd" | egrep "(PORT=|P=) " > /dev/null; then
getport=1 getport=1
if echo "$ssh_cmd" | egrep "^P=" > /dev/null; then if echo "$ssh_cmd" | egrep "P= " > /dev/null; then
teeport=1 teeport=1
fi fi
PORT="" PORT=""
ssh_cmd=`echo "$ssh_cmd" | sed -e 's/^PORT=[ ]*//' -e 's/^P=//'` ssh_cmd=`echo "$ssh_cmd" | sed -e 's/PORT=[ ]*//' -e 's/P=//'`
SSVNC_NO_ENC_WARN=1 SSVNC_NO_ENC_WARN=1
if [ "X$use_sshssl" = "X" ]; then if [ "X$use_sshssl" = "X" ]; then
direct_connect=1 direct_connect=1
@ -1561,7 +1731,7 @@ if [ "X$use_ssh" = "X1" ]; then
tport=`mytmp "$tport"` tport=`mytmp "$tport"`
if [ "X$rsh" != "X1" ]; then if [ "X$rsh" != "X1" ]; then
if echo "$ssh_cmd" | grep -w sudo > /dev/null; then if echo "$ssh_cmd" | grep "sudo " > /dev/null; then
echo "" echo ""
echo "Initial ssh with 'sudo id' to prime sudo so hopefully the next one" echo "Initial ssh with 'sudo id' to prime sudo so hopefully the next one"
echo "will require no password..." echo "will require no password..."
@ -1634,9 +1804,9 @@ if [ "X$use_ssh" = "X1" ]; then
PPROXY_SOCKS=5 PPROXY_SOCKS=5
fi fi
export PPROXY_SOCKS export PPROXY_SOCKS
host="localhost" host="$localhost"
port="$PORT" port="$PORT"
proxy="localhost:$use" proxy="$localhost:$use"
else else
if [ "X$rsh" != "X1" ]; then if [ "X$rsh" != "X1" ]; then
@ -1665,14 +1835,20 @@ if [ "X$use_ssh" = "X1" ]; then
c=0 c=0
pssh="" pssh=""
mssh=`echo "$ssh" | sed -e 's/^env.*ssh/ssh/'` while [ $c -lt 40 ]
while [ $c -lt 30 ]
do do
p=`expr $pmark + $c` p=`expr $pmark + $c`
if ps -p "$p" 2>&1 | grep "$mssh" > /dev/null; then pout=`ps -p "$p" 2>/dev/null | grep -v '^[ ]*PID' | sed -e 's/-L.*$//' -e 's/-x .*$//'`
if echo "$pout" | grep "ssh" > /dev/null; then
if echo "$pout" | egrep -i 'ssh.*(-add|-agent|-ask|-keygen|-argv0|vnc)' >/dev/null; then
:
elif echo "$pout" | egrep -i 'scp|sshd' >/dev/null; then
:
else
pssh=$p pssh=$p
break break
fi fi
fi
c=`expr $c + 1` c=`expr $c + 1`
done done
if [ "X$getport" != "X" ]; then if [ "X$getport" != "X" ]; then
@ -1697,20 +1873,20 @@ if [ "X$use_ssh" = "X1" ]; then
echo "sleep $SSVNC_EXTRA_SLEEP" echo "sleep $SSVNC_EXTRA_SLEEP"
sleep $SSVNC_EXTRA_SLEEP sleep $SSVNC_EXTRA_SLEEP
fi fi
#echo "pssh=\"$pssh\"" echo "ssh_pid='$pssh'"; echo
if [ "X$use_sshssl" = "X" -a "X$getport" = "X" ]; then if [ "X$use_sshssl" = "X" -a "X$getport" = "X" ]; then
echo "Running viewer:" echo "Running viewer:"
trap "final" 0 2 15 trap "final" 0 2 15
if [ "X$reverse" = "X" ]; then if [ "X$reverse" = "X" ]; then
echo "$VNCVIEWERCMD" "$@" localhost:$N echo "$VNCVIEWERCMD" "$@" $localhost:$N
echo "" echo ""
$VNCVIEWERCMD "$@" localhost:$N $VNCVIEWERCMD "$@" $localhost:$N
if [ $? != 0 ]; then if [ $? != 0 ]; then
echo "vncviewer command failed: $?" echo "vncviewer command failed: $?"
if [ "X$secondtry" = "X1" ]; then if [ "X$secondtry" = "X1" ]; then
sleep 2 sleep 2
$VNCVIEWERCMD "$@" localhost:$N $VNCVIEWERCMD "$@" $localhost:$N
fi fi
fi fi
else else
@ -1734,7 +1910,7 @@ if [ "X$use_ssh" = "X1" ]; then
use2=`findfree 5960` use2=`findfree 5960`
host0=$host host0=$host
port0=$port port0=$port
host=localhost host=$localhost
port=$use port=$use
use=$use2 use=$use2
N=`expr $use - 5900` N=`expr $use - 5900`
@ -1760,6 +1936,13 @@ fi
if [ "X$mycert" != "X" ]; then if [ "X$mycert" != "X" ]; then
cert="cert = $mycert" cert="cert = $mycert"
fi fi
if [ "X$crl" != "X" ]; then
if [ -d $crl ]; then
crl="CRLpath = $crl"
else
crl="CRLfile = $crl"
fi
fi
ptmp="" ptmp=""
if [ "X$proxy" != "X" ]; then if [ "X$proxy" != "X" ]; then
@ -1769,7 +1952,12 @@ if [ "X$proxy" != "X" ]; then
pcode "$ptmp" pcode "$ptmp"
if [ "X$showcert" != "X1" -a "X$direct_connect" = "X" ]; then if [ "X$showcert" != "X1" -a "X$direct_connect" = "X" ]; then
if uname | egrep 'Darwin|SunOS' >/dev/null; then if uname | egrep 'Darwin|SunOS' >/dev/null; then
# on mac we need to listen on socket instead of stdio: vout=`echo "$proxy" | grep -i vencrypt`
if [ "X$vout" != "X" -a "X$reverse" = "X1" ]; then
# need to exec for reverse vencrypt
connect="exec = $ptmp"
else
# on mac and solaris we need to listen on socket instead of stdio:
nd=`findfree 6700` nd=`findfree 6700`
PPROXY_LISTEN=$nd PPROXY_LISTEN=$nd
export PPROXY_LISTEN export PPROXY_LISTEN
@ -1777,11 +1965,11 @@ if [ "X$proxy" != "X" ]; then
#$ptmp 2>/dev/null & #$ptmp 2>/dev/null &
$ptmp & $ptmp &
fi fi
#sleep 3
sleep 2 sleep 2
host="localhost" host="$localhost"
port="$nd" port="$nd"
connect="connect = localhost:$nd" connect="connect = $localhost:$nd"
fi
else else
# otherwise on unix we can exec it: # otherwise on unix we can exec it:
connect="exec = $ptmp" connect="exec = $ptmp"
@ -1803,7 +1991,7 @@ if [ "X$showcert" = "X1" ]; then
$ptmp 2>/dev/null & $ptmp 2>/dev/null &
fi fi
sleep 1 sleep 1
host="localhost" host="$localhost"
port="$use" port="$use"
fi fi
cipher_args="" cipher_args=""
@ -1811,8 +1999,63 @@ if [ "X$showcert" = "X1" ]; then
cipher_args=`echo "$ciphers" | sed -e 's/ciphers=/-cipher /'` cipher_args=`echo "$ciphers" | sed -e 's/ciphers=/-cipher /'`
fi fi
#echo "openssl s_client $cipher_args -connect $host:$port" #echo "openssl s_client $cipher_args -connect $host:$port"
if [ "X$reverse" = "X" ]; then
openssl s_client $cipher_args -prexit -connect $host:$port 2>&1 < /dev/null openssl s_client $cipher_args -prexit -connect $host:$port 2>&1 < /dev/null
rc=$? rc=$?
else
tcert=""
if [ "X$mycert" = "X" ]; then
tcert=`make_tcert`
cert_args="-cert $tcert -CAfile $tcert"
else
cert_args="-cert $mycert -CAfile $mycert"
fi
tmp_out=/tmp/showcert_out${RANDOM}.$$
tmp_out=`mytmp "$tmp_out"`
tmp_err=/tmp/showcert_err${RANDOM}.$$
tmp_err=`mytmp "$tmp_err"`
#echo "openssl s_server $cipher_args $cert_args -accept $port -verify 2 > $tmp_out 2> $tmp_err" 1>&2
perl -e "
\$p = open(O, \"|openssl s_server $cipher_args $cert_args -accept $port -verify 2 1>$tmp_out 2> $tmp_err\");
exit 1 unless \$p;
while (1) {
sleep 1;
if (!open(F, \"<$tmp_out\")) {
kill \$p;
exit 1;
}
while (<F>) {
if (/RFB 00/) {
fsleep(0.25);
print O \"RFB 000.000\\n\";
fsleep(1.00);
kill \$p;
fsleep(0.25);
exit 0;
}
}
close F;
}
sub fsleep {
select(undef, undef, undef, shift);
}
";
echo ""
cat $tmp_out
echo ""
echo "----2----"
cat $tmp_err
if grep BEGIN.CERTIFICATE $tmp_out >/dev/null; then
rc=0
else
rc=1
fi
rm -f $tmp_out $tmp_err
fi
if [ "X$SSVNC_PREDIGESTED_HANDSHAKE" != "X" ]; then if [ "X$SSVNC_PREDIGESTED_HANDSHAKE" != "X" ]; then
rm -f $SSVNC_PREDIGESTED_HANDSHAKE rm -f $SSVNC_PREDIGESTED_HANDSHAKE
fi fi
@ -1860,7 +2103,7 @@ if [ "X$direct_connect" != "X" ]; then
PPROXY_LISTEN=$use PPROXY_LISTEN=$use
export PPROXY_LISTEN export PPROXY_LISTEN
else else
PPROXY_REVERSE="localhost:$use" PPROXY_REVERSE="$localhost:$use"
export PPROXY_REVERSE export PPROXY_REVERSE
pps=3 pps=3
if [ "X$SSVNC_EXTRA_SLEEP" != "X" ]; then if [ "X$SSVNC_EXTRA_SLEEP" != "X" ]; then
@ -1877,7 +2120,7 @@ if [ "X$direct_connect" != "X" ]; then
#echo T sleep 1 #echo T sleep 1
sleep 1 sleep 1
fi fi
host="localhost" host="$localhost"
disp="$N" disp="$N"
port=`expr $disp + 5900` port=`expr $disp + 5900`
fi fi
@ -1894,7 +2137,7 @@ if [ "X$direct_connect" != "X" ]; then
pf=`findfree 5970` pf=`findfree 5970`
cmd="$SSVNC_ULTRA_DSM -$pf $host:$port" cmd="$SSVNC_ULTRA_DSM -$pf $host:$port"
pf=`expr $pf - 5900` pf=`expr $pf - 5900`
hostdisp="localhost:$pf" hostdisp="$localhost:$pf"
ustr=`echo "$cmd" | sed -e 's/pw=[^ ]*/pw=******/g'` ustr=`echo "$cmd" | sed -e 's/pw=[^ ]*/pw=******/g'`
echo "Running:" echo "Running:"
echo echo
@ -1930,7 +2173,7 @@ if [ "X$direct_connect" != "X" ]; then
VNCVIEWER_LISTEN_LOCALHOST=1 VNCVIEWER_LISTEN_LOCALHOST=1
export VNCVIEWER_LISTEN_LOCALHOST export VNCVIEWER_LISTEN_LOCALHOST
dport=`expr 5500 + $disp` dport=`expr 5500 + $disp`
cmd="$SSVNC_ULTRA_DSM $dport localhost:$use" cmd="$SSVNC_ULTRA_DSM $dport $localhost:$use"
ustr=`echo "$cmd" | sed -e 's/pw=[^ ]*/pw=******/g'` ustr=`echo "$cmd" | sed -e 's/pw=[^ ]*/pw=******/g'`
echo "Running:" echo "Running:"
echo echo
@ -1961,69 +2204,10 @@ fi
tmp_cfg=/tmp/ss_vncviewer${RANDOM}.$$ tmp_cfg=/tmp/ss_vncviewer${RANDOM}.$$
tmp_cfg=`mytmp "$tmp_cfg"` tmp_cfg=`mytmp "$tmp_cfg"`
# make_tcert is no longer invoked via the ssvnc gui (Listen mode).
# make_tcert is for testing only now via -mycert BUILTIN
make_tcert() {
tcert="/tmp/ss_vnc_viewer_tcert${RANDOM}.$$"
tcert=`mytmp "$tcert"`
cat > $tcert <<END
-----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEAvkfXxb0wcxgrjV2ziFikjII+ze8iKcTBt47L0GM/c21efelN
+zZpJUUXLu4zz8Ryq8Q+sQgfNy7uTOpN9bUUaOk1TnD7gaDQnQWiNHmqbW2kL+DS
OKngJVPo9dETAS8hf7+D1e1DBZxjTc1a4RQqWJixwpYj99ixWzu8VC2m/xXsjvOs
jp4+DLBB490nbkwvstmhmiWm1CmI5O5xOkgioVNQqHvQMdVKOSz9PpbjvZiRX1Uo
qoMrk+2NOqwP90TB35yPASXb9zXKpO7DLhkube+yYGf+yk46aD707L07Eb7cosFP
S84vNZ9gX7rQ0UOwm5rYA/oZTBskgaqhtIzkLwIDAQABAoIBAD4ot/sXt5kRn0Ca
CIkU9AQWlC+v28grR2EQW9JiaZrqcoDNUzUqbCTJsi4ZkIFh2lf0TsqELbZYNW6Y
6AjJM7al4E0UqYSKJTv2WCuuRxdiRs2BMwthqyBmjeanev7bB6V0ybt7u3Y8xU/o
MrTuYnr4vrEjXPKdLirwk7AoDbKsRXHSIiHEIBOq1+dUQ32t36ukdnnza4wKDLZc
PKHiCdCk/wOGhuDlxD6RspqUAlRnJ8/aEhrgWxadFXw1hRhRsf/v1shtB0T3DmTe
Jchjwyiw9mryb9JZAcKxW+fUc4EVvj6VdQGqYInQJY5Yxm5JAlVQUJicuuJEvn6A
rj5osQECgYEA552CaHpUiFlB4HGkjaH00kL+f0+gRF4PANCPk6X3UPDVYzKnzmuu
yDvIdEETGFWBwoztUrOOKqVvPEQ+kBa2+DWWYaERZLtg2cI5byfDJxQ3ldzilS3J
1S3WgCojqcsG/hlxoQJ1dZFanUy/QhUZ0B+wlC+Zp1Q8AyuGQvhHp68CgYEA0lBI
eqq2GGCdJuNHMPFbi8Q0BnX55LW5C1hWjhuYiEkb3hOaIJuJrqvayBlhcQa2cGqp
uP34e9UCfoeLgmoCQ0b4KpL2NGov/mL4i8bMgog4hcoYuIi3qxN18vVR14VKEh4U
RLk0igAYPU+IK2QByaQlBo9OSaKkcfm7U1/pK4ECgYAxr6VpGk0GDvfF2Tsusv6d
GIgV8ZP09qSLTTJvvxvF/lQYeqZq7sjI5aJD5i3de4JhpO/IXQJzfZfWOuGc8XKA
3qYK/Y2IqXXGYRcHFGWV/Y1LFd55mCADHlk0l1WdOBOg8P5iRu/Br9PbiLpCx9oI
vrOXpnp03eod1/luZmqguwKBgQCWFRSj9Q7ddpSvG6HCG3ro0qsNsUMTI1tZ7UBX
SPogx4tLf1GN03D9ZUZLZVFUByZKMtPLX/Hi7K9K/A9ikaPrvsl6GEX6QYzeTGJx
3Pw0amFrmDzr8ySewNR6/PXahxPEuhJcuI31rPufRRI3ZLah3rFNbRbBFX+klkJH
zTnoAQKBgDbUK/aQFGduSy7WUT7LlM3UlGxJ2sA90TQh4JRQwzur0ACN5GdYZkqM
YBts4sBJVwwJoxD9OpbvKu3uKCt41BSj0/KyoBzjT44S2io2tj1syujtlVUsyyBy
/ca0A7WBB8lD1D7QMIhYUm2O9kYtSCLlUTHt5leqGaRG38DqlX36
-----END RSA PRIVATE KEY-----
-----BEGIN CERTIFICATE-----
MIIDzDCCArQCCQDSzxzxqhyqLzANBgkqhkiG9w0BAQQFADCBpzELMAkGA1UEBhMC
VVMxFjAUBgNVBAgTDU1hc3NhY2h1c2V0dHMxDzANBgNVBAcTBkJvc3RvbjETMBEG
A1UEChMKTXkgQ29tcGFueTEcMBoGA1UECxMTUHJvZHVjdCBEZXZlbG9wbWVudDEZ
MBcGA1UEAxMQd3d3Lm5vd2hlcmUubm9uZTEhMB8GCSqGSIb3DQEJARYSYWRtaW5A
bm93aGVyZS5ub25lMB4XDTA3MDMyMzE4MDc0NVoXDTI2MDUyMjE4MDc0NVowgacx
CzAJBgNVBAYTAlVTMRYwFAYDVQQIEw1NYXNzYWNodXNldHRzMQ8wDQYDVQQHEwZC
b3N0b24xEzARBgNVBAoTCk15IENvbXBhbnkxHDAaBgNVBAsTE1Byb2R1Y3QgRGV2
ZWxvcG1lbnQxGTAXBgNVBAMTEHd3dy5ub3doZXJlLm5vbmUxITAfBgkqhkiG9w0B
CQEWEmFkbWluQG5vd2hlcmUubm9uZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC
AQoCggEBAL5H18W9MHMYK41ds4hYpIyCPs3vIinEwbeOy9BjP3NtXn3pTfs2aSVF
Fy7uM8/EcqvEPrEIHzcu7kzqTfW1FGjpNU5w+4Gg0J0FojR5qm1tpC/g0jip4CVT
6PXREwEvIX+/g9XtQwWcY03NWuEUKliYscKWI/fYsVs7vFQtpv8V7I7zrI6ePgyw
QePdJ25ML7LZoZolptQpiOTucTpIIqFTUKh70DHVSjks/T6W472YkV9VKKqDK5Pt
jTqsD/dEwd+cjwEl2/c1yqTuwy4ZLm3vsmBn/spOOmg+9Oy9OxG+3KLBT0vOLzWf
YF+60NFDsJua2AP6GUwbJIGqobSM5C8CAwEAATANBgkqhkiG9w0BAQQFAAOCAQEA
vGomHEp6TVU83X2EBUgnbOhzKJ9u3fOI/Uf5L7p//Vxqow7OR1cguzh/YEzmXOIL
ilMVnzX9nj/bvcLAuqEP7MR1A8f4+E807p/L/Sf49BiCcwQq5I966sGKYXjkve+T
2GTBNwMSq+5kLSf6QY8VZI+qnrAudEQMeJByQhTZZ0dH8Njeq8EGl9KUio+VWaiW
CQK6xJuAvAHqa06OjLmwu1fYD4GLGSrOIiRVkSXV8qLIUmzxdJaIRznkFWsrCEKR
wAH966SAOvd2s6yOHMvyDRIL7WHxfESB6rDHsdIW/yny1fBePjv473KrxyXtbz7I
dMw1yW09l+eEo4A7GzwOdw==
-----END CERTIFICATE-----
END
chmod 600 $tcert
echo "$tcert"
}
stunnel_exec="" stunnel_exec=""
if echo $STUNNEL_EXTRA_SVC_OPTS | grep '#stunnel-exec' > /dev/null; then if [ "X$SSVNC_USE_OURS" != "X1" ]; then
:
elif echo $STUNNEL_EXTRA_SVC_OPTS | grep '#stunnel-exec' > /dev/null; then
stunnel_exec="#" stunnel_exec="#"
fi fi
@ -2042,25 +2226,29 @@ if [ "X$reverse" = "X" ]; then
foreground = yes foreground = yes
pid = pid =
client = yes client = yes
debug = 6 debug = $stunnel_debug
$ciphers $ciphers
$STUNNEL_EXTRA_OPTS $STUNNEL_EXTRA_OPTS
$STUNNEL_EXTRA_OPTS_USER $STUNNEL_EXTRA_OPTS_USER
$verify
$cert $cert
$crl
$verify
${stunnel_exec}[vnc_stunnel] ${stunnel_exec}[vnc_stunnel]
${stunnel_exec}accept = localhost:$use ${stunnel_exec}accept = $localhost:$use
$connect $connect
$STUNNEL_EXTRA_SVC_OPTS $STUNNEL_EXTRA_SVC_OPTS
$STUNNEL_EXTRA_SVC_OPTS_USER $STUNNEL_EXTRA_SVC_OPTS_USER
END END
else else
# REVERSE case:
stunnel_exec="" # doesn't work for listening. stunnel_exec="" # doesn't work for listening.
p2=`expr 5500 + $N` p2=`expr 5500 + $N`
connect="connect = localhost:$p2" connect="connect = $localhost:$p2"
if [ "X$cert" = "XBUILTIN" ]; then if [ "X$cert" = "XBUILTIN" ]; then
ttcert=`make_tcert` ttcert=`make_tcert`
cert="cert = $ttcert" cert="cert = $ttcert"
@ -2068,22 +2256,33 @@ else
# Note for listen mode, an empty cert will cause stunnel to fail. # Note for listen mode, an empty cert will cause stunnel to fail.
# The ssvnc gui will have already taken care of this. # The ssvnc gui will have already taken care of this.
STUNNEL_EXTRA_OPTS=`echo "$STUNNEL_EXTRA_OPTS" | sed -e 's/maxconn/#maxconn/'`
hloc="" hloc=""
if [ "X$use_ssh" = "X1" ]; then if [ "X$use_ssh" = "X1" ]; then
hloc="localhost:" hloc="$localhost:"
fi
if echo "$proxy" | grep -i '^vencrypt:' > /dev/null; then
hloc="$localhost:"
pv=`findfree 5570`
proxy="vencrypt:$pv:$port"
port=$pv
if [ "X$anondh_set" = "X1" ]; then
# not needed for ANONDH in this mode
#ciphers="ciphers = ADH:@STRENGTH"
:
fi
fi fi
cat > "$tmp_cfg" <<END cat > "$tmp_cfg" <<END
foreground = yes foreground = yes
pid = pid =
client = no client = no
debug = 6 debug = $stunnel_debug
$ciphers $ciphers
$STUNNEL_EXTRA_OPTS $STUNNEL_EXTRA_OPTS
$STUNNEL_EXTRA_OPTS_USER $STUNNEL_EXTRA_OPTS_USER
$verify
$cert $cert
$crl
$verify
[vnc_stunnel] [vnc_stunnel]
accept = $hloc$port accept = $hloc$port
@ -2092,6 +2291,7 @@ $STUNNEL_EXTRA_SVC_OPTS
$STUNNEL_EXTRA_SVC_OPTS_USER $STUNNEL_EXTRA_SVC_OPTS_USER
END END
fi fi
echo "" echo ""
@ -2114,11 +2314,21 @@ if [ "X$stunnel_exec" = "X" ]; then
# pause here to let the user supply a possible passphrase for the # pause here to let the user supply a possible passphrase for the
# mycert key: # mycert key:
if [ "X$mycert" != "X" ]; then if [ "X$mycert" != "X" ]; then
sleep 1 nsl=10
dsl=0
if [ ! -f $mycert ]; then
dsl=0
elif grep -i 'Proc-Type.*ENCRYPTED' "$mycert" > /dev/null 2>/dev/null; then
dsl=1
fi
if [ "X$dsl" = "X1" ]; then
echo ""
echo "(** pausing $nsl secs for possible certificate passphrase dialog **)"
echo "" echo ""
echo "(** pausing for possible certificate passphrase dialog **)" sleep $nsl
echo "(** done pausing for passphrase **)"
echo "" echo ""
sleep 4 fi
fi fi
#echo T sleep 1 #echo T sleep 1
sleep 1 sleep 1
@ -2133,7 +2343,7 @@ if [ "X$SSVNC_EXTRA_SLEEP" != "X" ]; then
fi fi
echo "Running viewer:" echo "Running viewer:"
if [ "X$reverse" = "X" ]; then if [ "X$reverse" = "X" ]; then
vnc_hp=localhost:$N vnc_hp=$localhost:$N
if [ "X$stunnel_exec" != "X" ]; then if [ "X$stunnel_exec" != "X" ]; then
vnc_hp="exec=$STUNNEL $tmp_cfg" vnc_hp="exec=$STUNNEL $tmp_cfg"
fi fi
@ -2163,8 +2373,18 @@ else
trap "final" 0 2 15 trap "final" 0 2 15
echo "" echo ""
if [ "X$proxy" != "X" ]; then if [ "X$proxy" != "X" ]; then
PPROXY_REVERSE="localhost:$port"; export PPROXY_REVERSE if echo "$proxy" | grep -i '^vencrypt:' > /dev/null; then
pstunnel=`echo "$proxy" | awk -F: '{print $2}'`
plisten=`echo "$proxy" | awk -F: '{print $3}'`
PPROXY_LISTEN="INADDR_ANY:$plisten"; export PPROXY_LISTEN
PPROXY_PROXY="vencrypt://$localhost:$pstunnel"; export PPROXY_PROXY
PPROXY_DEST="$localhost:$pstunnel"; export PPROXY_DEST
STUNNEL_ONCE=1; export STUNNEL_ONCE
STUNNEL_MAX_CLIENTS=1; export STUNNEL_MAX_CLIENTS
else
PPROXY_REVERSE="$localhost:$port"; export PPROXY_REVERSE
PPROXY_SLEEP=1; export PPROXY_SLEEP; PPROXY_SLEEP=1; export PPROXY_SLEEP;
fi
PPROXY_KILLPID=+1; export PPROXY_KILLPID; PPROXY_KILLPID=+1; export PPROXY_KILLPID;
$ptmp & $ptmp &
fi fi

@ -121,7 +121,7 @@ diff -Naur JavaViewer.orig/ButtonPanel.java JavaViewer/ButtonPanel.java
} }
diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
--- JavaViewer.orig/FTPFrame.java 2005-03-15 23:53:14.000000000 -0500 --- JavaViewer.orig/FTPFrame.java 2005-03-15 23:53:14.000000000 -0500
+++ JavaViewer/FTPFrame.java 2008-10-04 18:09:36.000000000 -0400 +++ JavaViewer/FTPFrame.java 2009-01-11 12:10:06.000000000 -0500
@@ -24,8 +24,17 @@ @@ -24,8 +24,17 @@
import java.io.*; import java.io.*;
import java.util.ArrayList; import java.util.ArrayList;
@ -244,7 +244,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
// Loop through the string to create a String[] // Loop through the string to create a String[]
for (int i = 0; i < size; i = i + 3) { for (int i = 0; i < size; i = i + 3) {
@@ -150,26 +231,52 @@ @@ -150,26 +231,62 @@
driveType = str.substring(i + 2, i + 3); driveType = str.substring(i + 2, i + 3);
if (driveType.compareTo("f") == 0) if (driveType.compareTo("f") == 0)
drive[i / 3] += "\\ Floppy"; drive[i / 3] += "\\ Floppy";
@ -265,11 +265,21 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
remoteDrivesComboBox.addItem(drive[i / 3]); remoteDrivesComboBox.addItem(drive[i / 3]);
+System.out.println("ComboBox: Add " + idx + " '" + drive[i/3] + "'"); +System.out.println("ComboBox: Add " + idx + " '" + drive[i/3] + "'");
+ idx++; + idx++;
} + }
+ +
+ // runge + // runge
+ if (viewer.ftpDropDown != null) {
+ String[] dd = viewer.ftpDropDown.split("\\.");
+ for (int i=0; i < dd.length; i++) {
+ if (!dd[i].equals("")) {
+ remoteDrivesComboBox.addItem(" [" + dd[i] + "]");
+ }
+ }
+ } else {
+ remoteDrivesComboBox.addItem(" [My Documents]"); + remoteDrivesComboBox.addItem(" [My Documents]");
+ remoteDrivesComboBox.addItem(" [Desktop]"); + remoteDrivesComboBox.addItem(" [Desktop]");
+ remoteDrivesComboBox.addItem(" [Home]");
}
+ +
//sf@ - Select Drive C:as default if possible //sf@ - Select Drive C:as default if possible
boolean bFound = false; boolean bFound = false;
@ -303,7 +313,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
updateDriveList = false; updateDriveList = false;
return drive; return drive;
} }
@@ -185,6 +292,8 @@ @@ -185,6 +302,8 @@
stopButton.setVisible(true); stopButton.setVisible(true);
stopButton.setEnabled(true); stopButton.setEnabled(true);
receiveButton.setEnabled(false); receiveButton.setEnabled(false);
@ -312,7 +322,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
remoteTopButton.setEnabled(false); remoteTopButton.setEnabled(false);
sendButton.setEnabled(false); sendButton.setEnabled(false);
remoteFileTable.setEnabled(false); remoteFileTable.setEnabled(false);
@@ -207,6 +316,8 @@ @@ -207,6 +326,8 @@
stopButton.setVisible(false); stopButton.setVisible(false);
stopButton.setEnabled(false); stopButton.setEnabled(false);
receiveButton.setEnabled(true); receiveButton.setEnabled(true);
@ -321,7 +331,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
remoteTopButton.setEnabled(true); remoteTopButton.setEnabled(true);
sendButton.setEnabled(true); sendButton.setEnabled(true);
remoteFileTable.setEnabled(true); remoteFileTable.setEnabled(true);
@@ -221,10 +332,11 @@ @@ -221,10 +342,11 @@
/* /*
* Print Directory prints out all the contents of a directory * Print Directory prints out all the contents of a directory
*/ */
@ -334,7 +344,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
} }
remoteFileTable.setListData(remoteList); remoteFileTable.setListData(remoteList);
} }
@@ -235,10 +347,12 @@ @@ -235,10 +357,12 @@
* @return void * @return void
*/ */
private void initialize() { private void initialize() {
@ -348,7 +358,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
/** /**
* This method initializes jContentPane. This is the main content pane * This method initializes jContentPane. This is the main content pane
* *
@@ -253,6 +367,33 @@ @@ -253,6 +377,33 @@
jContentPane.add(getRemotePanel(), java.awt.BorderLayout.EAST); jContentPane.add(getRemotePanel(), java.awt.BorderLayout.EAST);
jContentPane.add(getLocalPanel(), java.awt.BorderLayout.WEST); jContentPane.add(getLocalPanel(), java.awt.BorderLayout.WEST);
jContentPane.add(getButtonPanel(), java.awt.BorderLayout.CENTER); jContentPane.add(getButtonPanel(), java.awt.BorderLayout.CENTER);
@ -382,7 +392,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
} }
return jContentPane; return jContentPane;
} }
@@ -270,6 +411,7 @@ @@ -270,6 +421,7 @@
topPanelLocal.add(getLocalMachineLabel(), java.awt.BorderLayout.CENTER); topPanelLocal.add(getLocalMachineLabel(), java.awt.BorderLayout.CENTER);
topPanelLocal.add(getLocalTopButton(), java.awt.BorderLayout.EAST); topPanelLocal.add(getLocalTopButton(), java.awt.BorderLayout.EAST);
topPanelLocal.setBackground(java.awt.Color.lightGray); topPanelLocal.setBackground(java.awt.Color.lightGray);
@ -390,7 +400,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
} }
return topPanelLocal; return topPanelLocal;
} }
@@ -288,6 +430,7 @@ @@ -288,6 +440,7 @@
topPanelRemote.add(getRemoteMachineLabel(), java.awt.BorderLayout.CENTER); topPanelRemote.add(getRemoteMachineLabel(), java.awt.BorderLayout.CENTER);
topPanelRemote.add(getRemoteTopButton(), java.awt.BorderLayout.EAST); topPanelRemote.add(getRemoteTopButton(), java.awt.BorderLayout.EAST);
topPanelRemote.setBackground(java.awt.Color.lightGray); topPanelRemote.setBackground(java.awt.Color.lightGray);
@ -398,7 +408,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
} }
return topPanelRemote; return topPanelRemote;
} }
@@ -301,6 +444,7 @@ @@ -301,6 +454,7 @@
if (topPanelCenter == null) { if (topPanelCenter == null) {
topPanelCenter = new javax.swing.JPanel(); topPanelCenter = new javax.swing.JPanel();
topPanelCenter.add(getDummyButton(), null); topPanelCenter.add(getDummyButton(), null);
@ -406,7 +416,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
} }
return topPanelCenter; return topPanelCenter;
} }
@@ -328,6 +472,7 @@ @@ -328,6 +482,7 @@
topPanel.add(getRemoteTopButton(), null); topPanel.add(getRemoteTopButton(), null);
topPanel.setBackground(java.awt.Color.lightGray); topPanel.setBackground(java.awt.Color.lightGray);
*/ */
@ -414,7 +424,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
} }
return topPanel; return topPanel;
} }
@@ -348,6 +493,7 @@ @@ -348,6 +503,7 @@
statusPanel.add(getJProgressBar(), null); statusPanel.add(getJProgressBar(), null);
statusPanel.add(getConnectionStatus(), null); statusPanel.add(getConnectionStatus(), null);
statusPanel.setBackground(java.awt.Color.lightGray); statusPanel.setBackground(java.awt.Color.lightGray);
@ -422,7 +432,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
} }
return statusPanel; return statusPanel;
@@ -368,6 +514,7 @@ @@ -368,6 +524,7 @@
remotePanel.add(getRemoteScrollPane(), null); remotePanel.add(getRemoteScrollPane(), null);
remotePanel.add(getRemoteStatus(), null); remotePanel.add(getRemoteStatus(), null);
remotePanel.setBackground(java.awt.Color.lightGray); remotePanel.setBackground(java.awt.Color.lightGray);
@ -430,7 +440,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
} }
return remotePanel; return remotePanel;
} }
@@ -390,6 +537,7 @@ @@ -390,6 +547,7 @@
localPanel.setComponentOrientation( localPanel.setComponentOrientation(
java.awt.ComponentOrientation.UNKNOWN); java.awt.ComponentOrientation.UNKNOWN);
localPanel.setName("localPanel"); localPanel.setName("localPanel");
@ -438,7 +448,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
} }
return localPanel; return localPanel;
} }
@@ -405,12 +553,15 @@ @@ -405,12 +563,15 @@
buttonPanel = new javax.swing.JPanel(); buttonPanel = new javax.swing.JPanel();
buttonPanel.setLayout(null); buttonPanel.setLayout(null);
buttonPanel.add(getReceiveButton(), null); buttonPanel.add(getReceiveButton(), null);
@ -454,7 +464,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
} }
return buttonPanel; return buttonPanel;
} }
@@ -422,10 +573,11 @@ @@ -422,10 +583,11 @@
private javax.swing.JButton getSendButton() { private javax.swing.JButton getSendButton() {
if (sendButton == null) { if (sendButton == null) {
sendButton = new javax.swing.JButton(); sendButton = new javax.swing.JButton();
@ -467,7 +477,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
} }
return sendButton; return sendButton;
@@ -438,7 +590,7 @@ @@ -438,7 +600,7 @@
private javax.swing.JButton getReceiveButton() { private javax.swing.JButton getReceiveButton() {
if (receiveButton == null) { if (receiveButton == null) {
receiveButton = new javax.swing.JButton(); receiveButton = new javax.swing.JButton();
@ -476,7 +486,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
receiveButton.setText("<< Receive"); receiveButton.setText("<< Receive");
receiveButton.setName("receiveButton"); receiveButton.setName("receiveButton");
receiveButton.addActionListener(this); receiveButton.addActionListener(this);
@@ -453,7 +605,7 @@ @@ -453,7 +615,7 @@
private javax.swing.JButton getDeleteButton() { private javax.swing.JButton getDeleteButton() {
if (deleteButton == null) { if (deleteButton == null) {
deleteButton = new javax.swing.JButton(); deleteButton = new javax.swing.JButton();
@ -485,7 +495,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
deleteButton.setText("Delete File"); deleteButton.setText("Delete File");
deleteButton.setName("deleteButton"); deleteButton.setName("deleteButton");
deleteButton.addActionListener(this); deleteButton.addActionListener(this);
@@ -468,7 +620,7 @@ @@ -468,7 +630,7 @@
private javax.swing.JButton getNewFolderButton() { private javax.swing.JButton getNewFolderButton() {
if (newFolderButton == null) { if (newFolderButton == null) {
newFolderButton = new javax.swing.JButton(); newFolderButton = new javax.swing.JButton();
@ -494,7 +504,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
newFolderButton.setText("New Folder"); newFolderButton.setText("New Folder");
newFolderButton.setName("newFolderButton"); newFolderButton.setName("newFolderButton");
newFolderButton.addActionListener(this); newFolderButton.addActionListener(this);
@@ -476,6 +628,39 @@ @@ -476,6 +638,39 @@
return newFolderButton; return newFolderButton;
} }
@ -534,7 +544,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
/** /**
* This method initializes stopButton * This method initializes stopButton
* *
@@ -486,7 +671,7 @@ @@ -486,7 +681,7 @@
if (stopButton == null) if (stopButton == null)
{ {
stopButton = new javax.swing.JButton(); stopButton = new javax.swing.JButton();
@ -543,7 +553,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
stopButton.setText("Stop"); stopButton.setText("Stop");
stopButton.setName("stopButton"); stopButton.setName("stopButton");
stopButton.addActionListener(this); stopButton.addActionListener(this);
@@ -503,8 +688,12 @@ @@ -503,8 +698,12 @@
private javax.swing.JButton getCloseButton() { private javax.swing.JButton getCloseButton() {
if (closeButton == null) { if (closeButton == null) {
closeButton = new javax.swing.JButton(); closeButton = new javax.swing.JButton();
@ -558,7 +568,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
closeButton.setName("closeButton"); closeButton.setName("closeButton");
closeButton.addActionListener(this); closeButton.addActionListener(this);
} }
@@ -551,6 +740,7 @@ @@ -551,6 +750,7 @@
//Select the second entry (e.g. C:\) //Select the second entry (e.g. C:\)
// localDrivesComboBox.setSelectedIndex(1); // localDrivesComboBox.setSelectedIndex(1);
localDrivesComboBox.addActionListener(this); localDrivesComboBox.addActionListener(this);
@ -566,7 +576,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
} }
updateDriveList = false; updateDriveList = false;
return localDrivesComboBox; return localDrivesComboBox;
@@ -567,6 +757,7 @@ @@ -567,6 +767,7 @@
remoteDrivesComboBox.setFont( remoteDrivesComboBox.setFont(
new java.awt.Font("Dialog", java.awt.Font.PLAIN, 10)); new java.awt.Font("Dialog", java.awt.Font.PLAIN, 10));
remoteDrivesComboBox.addActionListener(this); remoteDrivesComboBox.addActionListener(this);
@ -574,7 +584,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
} }
return remoteDrivesComboBox; return remoteDrivesComboBox;
@@ -587,6 +778,7 @@ @@ -587,6 +788,7 @@
localMachineLabel.setFont( localMachineLabel.setFont(
new java.awt.Font("Dialog", java.awt.Font.BOLD, 11)); new java.awt.Font("Dialog", java.awt.Font.BOLD, 11));
localMachineLabel.setEditable(false); localMachineLabel.setEditable(false);
@ -582,7 +592,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
} }
return localMachineLabel; return localMachineLabel;
} }
@@ -622,6 +814,7 @@ @@ -622,6 +824,7 @@
localTopButton.setFont( localTopButton.setFont(
new java.awt.Font("Dialog", java.awt.Font.BOLD, 10)); new java.awt.Font("Dialog", java.awt.Font.BOLD, 10));
localTopButton.addActionListener(this); localTopButton.addActionListener(this);
@ -590,7 +600,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
} }
return localTopButton; return localTopButton;
} }
@@ -638,6 +831,7 @@ @@ -638,6 +841,7 @@
remoteTopButton.setFont( remoteTopButton.setFont(
new java.awt.Font("Dialog", java.awt.Font.BOLD, 10)); new java.awt.Font("Dialog", java.awt.Font.BOLD, 10));
remoteTopButton.addActionListener(this); remoteTopButton.addActionListener(this);
@ -598,7 +608,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
} }
return remoteTopButton; return remoteTopButton;
} }
@@ -650,9 +844,24 @@ @@ -650,9 +854,24 @@
private javax.swing.JList getLocalFileTable() { private javax.swing.JList getLocalFileTable() {
if (localFileTable == null) { if (localFileTable == null) {
localList = new Vector(0); localList = new Vector(0);
@ -623,7 +633,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
} }
return localFileTable; return localFileTable;
} }
@@ -669,6 +878,7 @@ @@ -669,6 +888,7 @@
localScrollPane.setFont( localScrollPane.setFont(
new java.awt.Font("Dialog", java.awt.Font.PLAIN, 10)); new java.awt.Font("Dialog", java.awt.Font.PLAIN, 10));
localScrollPane.setName("localFileList"); localScrollPane.setName("localFileList");
@ -631,7 +641,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
} }
return localScrollPane; return localScrollPane;
} }
@@ -680,10 +890,25 @@ @@ -680,10 +900,25 @@
private javax.swing.JList getRemoteFileTable() { private javax.swing.JList getRemoteFileTable() {
if (remoteFileTable == null) { if (remoteFileTable == null) {
remoteList = new Vector(0); remoteList = new Vector(0);
@ -657,7 +667,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
} }
return remoteFileTable; return remoteFileTable;
@@ -698,6 +923,7 @@ @@ -698,6 +933,7 @@
remoteScrollPane = new javax.swing.JScrollPane(); remoteScrollPane = new javax.swing.JScrollPane();
remoteScrollPane.setViewportView(getRemoteFileTable()); remoteScrollPane.setViewportView(getRemoteFileTable());
remoteScrollPane.setPreferredSize(new java.awt.Dimension(325, 418)); remoteScrollPane.setPreferredSize(new java.awt.Dimension(325, 418));
@ -665,7 +675,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
} }
return remoteScrollPane; return remoteScrollPane;
} }
@@ -716,6 +942,7 @@ @@ -716,6 +952,7 @@
remoteLocation.setBackground(new Color(255,255,238)); remoteLocation.setBackground(new Color(255,255,238));
remoteLocation.setFont( remoteLocation.setFont(
new java.awt.Font("Dialog", java.awt.Font.PLAIN, 10)); new java.awt.Font("Dialog", java.awt.Font.PLAIN, 10));
@ -673,7 +683,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
} }
return remoteLocation; return remoteLocation;
} }
@@ -732,6 +959,7 @@ @@ -732,6 +969,7 @@
localLocation.setBackground( new Color(255,255,238)); localLocation.setBackground( new Color(255,255,238));
localLocation.setFont( localLocation.setFont(
new java.awt.Font("Dialog", java.awt.Font.PLAIN, 10)); new java.awt.Font("Dialog", java.awt.Font.PLAIN, 10));
@ -681,7 +691,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
} }
return localLocation; return localLocation;
} }
@@ -748,6 +976,7 @@ @@ -748,6 +986,7 @@
localStatus.setFont( localStatus.setFont(
new java.awt.Font("Dialog", java.awt.Font.PLAIN, 10)); new java.awt.Font("Dialog", java.awt.Font.PLAIN, 10));
localStatus.setEditable(false); localStatus.setEditable(false);
@ -689,7 +699,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
} }
return localStatus; return localStatus;
} }
@@ -764,6 +993,7 @@ @@ -764,6 +1003,7 @@
remoteStatus.setFont( remoteStatus.setFont(
new java.awt.Font("Dialog", java.awt.Font.PLAIN, 10)); new java.awt.Font("Dialog", java.awt.Font.PLAIN, 10));
remoteStatus.setEditable(false); remoteStatus.setEditable(false);
@ -697,7 +707,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
} }
return remoteStatus; return remoteStatus;
} }
@@ -777,9 +1007,10 @@ @@ -777,9 +1017,10 @@
historyComboBox = new javax.swing.JComboBox(); historyComboBox = new javax.swing.JComboBox();
historyComboBox.setFont( historyComboBox.setFont(
new java.awt.Font("Dialog", java.awt.Font.BOLD, 10)); new java.awt.Font("Dialog", java.awt.Font.BOLD, 10));
@ -709,7 +719,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
} }
return historyComboBox; return historyComboBox;
} }
@@ -791,6 +1022,7 @@ @@ -791,6 +1032,7 @@
private javax.swing.JProgressBar getJProgressBar() { private javax.swing.JProgressBar getJProgressBar() {
if (jProgressBar == null) { if (jProgressBar == null) {
jProgressBar = new javax.swing.JProgressBar(); jProgressBar = new javax.swing.JProgressBar();
@ -717,7 +727,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
} }
return jProgressBar; return jProgressBar;
} }
@@ -806,6 +1038,7 @@ @@ -806,6 +1048,7 @@
connectionStatus.setBackground(java.awt.Color.lightGray); connectionStatus.setBackground(java.awt.Color.lightGray);
connectionStatus.setFont( connectionStatus.setFont(
new java.awt.Font("Dialog", java.awt.Font.PLAIN, 10)); new java.awt.Font("Dialog", java.awt.Font.PLAIN, 10));
@ -725,7 +735,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
} }
connectionStatus.setEditable(false); connectionStatus.setEditable(false);
return connectionStatus; return connectionStatus;
@@ -815,7 +1048,12 @@ @@ -815,7 +1058,12 @@
* Implements Action listener. * Implements Action listener.
*/ */
public void actionPerformed(ActionEvent evt) { public void actionPerformed(ActionEvent evt) {
@ -739,7 +749,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
if (evt.getSource() == closeButton) if (evt.getSource() == closeButton)
{ // Close Button { // Close Button
@@ -829,15 +1067,27 @@ @@ -829,15 +1077,27 @@
{ {
doReceive(); doReceive();
} }
@ -769,7 +779,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
} }
else if (evt.getSource() == localTopButton) else if (evt.getSource() == localTopButton)
{ {
@@ -845,12 +1095,17 @@ @@ -845,12 +1105,17 @@
} }
else if (evt.getSource() == remoteTopButton) else if (evt.getSource() == remoteTopButton)
{ {
@ -787,7 +797,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
else if(evt.getSource()==newFolderButton) else if(evt.getSource()==newFolderButton)
{ {
doNewFolder(); doNewFolder();
@@ -864,7 +1119,7 @@ @@ -864,7 +1129,7 @@
private void doNewFolder() private void doNewFolder()
{ {
@ -796,7 +806,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
if(selectedTable.equals("remote")) if(selectedTable.equals("remote"))
{ {
name = remoteLocation.getText()+name; name = remoteLocation.getText()+name;
@@ -880,34 +1135,106 @@ @@ -880,34 +1145,106 @@
historyComboBox.setSelectedIndex(0); historyComboBox.setSelectedIndex(0);
} }
} }
@ -913,7 +923,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
return; return;
} }
@@ -916,7 +1243,7 @@ @@ -916,7 +1253,7 @@
// sf@2004 - Delete prompt // sf@2004 - Delete prompt
if (remoteList.contains(sFileName)) if (remoteList.contains(sFileName))
{ {
@ -922,7 +932,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
if (r == JOptionPane.NO_OPTION) if (r == JOptionPane.NO_OPTION)
return; return;
} }
@@ -926,18 +1253,22 @@ @@ -926,18 +1263,22 @@
} }
else else
{ {
@ -948,7 +958,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
if (r == JOptionPane.NO_OPTION) if (r == JOptionPane.NO_OPTION)
return; return;
} }
@@ -952,21 +1283,25 @@ @@ -952,21 +1293,25 @@
private void doReceive() private void doReceive()
{ {
@ -978,7 +988,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
if (r == JOptionPane.NO_OPTION) if (r == JOptionPane.NO_OPTION)
return; return;
} }
@@ -979,23 +1314,101 @@ @@ -979,23 +1324,101 @@
viewer.rfb.requestRemoteFile(remoteFileName,localDestinationPath); viewer.rfb.requestRemoteFile(remoteFileName,localDestinationPath);
} }
@ -1084,7 +1094,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
if (r == JOptionPane.NO_OPTION) if (r == JOptionPane.NO_OPTION)
return; return;
} }
@@ -1013,6 +1426,7 @@ @@ -1013,6 +1436,7 @@
// //
private void doStop() private void doStop()
{ {
@ -1092,7 +1102,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
viewer.rfb.fAbort = true; viewer.rfb.fAbort = true;
} }
/** /**
@@ -1024,6 +1438,14 @@ @@ -1024,6 +1448,14 @@
System.out.println("History: " + message); System.out.println("History: " + message);
historyComboBox.insertItemAt(new String(message), 0); historyComboBox.insertItemAt(new String(message), 0);
} }
@ -1107,7 +1117,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
/** /**
* This method updates the file table to the current selection of the remoteComboBox * This method updates the file table to the current selection of the remoteComboBox
@@ -1034,11 +1456,41 @@ @@ -1034,11 +1466,44 @@
remoteSelection = null; remoteSelection = null;
if (!updateDriveList) { if (!updateDriveList) {
@ -1128,6 +1138,9 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
+ } else { + } else {
+ drive = instr.substring(2); + drive = instr.substring(2);
+ } + }
+ if (drive.equals("Home")) {
+ drive = "";
+ }
+ drive += "\\"; + drive += "\\";
+ doingShortcutDir = true; + doingShortcutDir = true;
+ } else { + } else {
@ -1152,7 +1165,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
remoteFileTable.setListData(remoteList); remoteFileTable.setListData(remoteList);
} }
/** /**
@@ -1048,6 +1500,7 @@ @@ -1048,6 +1513,7 @@
private void changeLocalDrive() private void changeLocalDrive()
{ {
File currentDrive = new File(localDrivesComboBox.getSelectedItem().toString()); File currentDrive = new File(localDrivesComboBox.getSelectedItem().toString());
@ -1160,7 +1173,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
if(currentDrive.canRead()) if(currentDrive.canRead())
{ {
localSelection = null; localSelection = null;
@@ -1057,9 +1510,11 @@ @@ -1057,9 +1523,11 @@
else else
{ {
localList.clear(); localList.clear();
@ -1172,7 +1185,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
} }
/** /**
* Determines which FileTable was double-clicked and updates the table * Determines which FileTable was double-clicked and updates the table
@@ -1098,10 +1553,18 @@ @@ -1098,10 +1566,18 @@
selectedTable = "remote"; selectedTable = "remote";
localFileTable.setBackground(new Color(238, 238, 238)); localFileTable.setBackground(new Color(238, 238, 238));
remoteFileTable.setBackground(new Color(255, 255, 255)); remoteFileTable.setBackground(new Color(255, 255, 255));
@ -1193,7 +1206,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
} }
/* /*
@@ -1115,10 +1578,38 @@ @@ -1115,10 +1591,38 @@
localFileTable.setBackground(new Color(255, 255, 255)); localFileTable.setBackground(new Color(255, 255, 255));
File currentSelection = new File(currentLocalDirectory, getTrimmedSelection()); File currentSelection = new File(currentLocalDirectory, getTrimmedSelection());
@ -1233,7 +1246,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
/** /**
* Updates the Remote File Table based on selection. Called from mouseClicked handler * Updates the Remote File Table based on selection. Called from mouseClicked handler
*/ */
@@ -1126,20 +1617,29 @@ @@ -1126,20 +1630,29 @@
String name = null; String name = null;
String action = null; String action = null;
String drive = null; String drive = null;
@ -1265,7 +1278,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
remoteFileTable.setListData(remoteList); remoteFileTable.setListData(remoteList);
} }
else if (!name.substring(0, 2).equals(" [") && !name.substring((name.length() - 1), name.length()).equals("]")) else if (!name.substring(0, 2).equals(" [") && !name.substring((name.length() - 1), name.length()).equals("]"))
@@ -1149,6 +1649,7 @@ @@ -1149,6 +1662,7 @@
remoteSelection = remoteLocation.getText() + name.substring(0, name.length()); remoteSelection = remoteLocation.getText() + name.substring(0, name.length());
drive = remoteLocation.getText(); drive = remoteLocation.getText();
// ?? // ??
@ -1273,7 +1286,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
} }
else else
{ {
@@ -1159,10 +1660,12 @@ @@ -1159,10 +1673,12 @@
remoteLocation.setText(drive); remoteLocation.setText(drive);
viewer.rfb.readServerDirectory(drive); viewer.rfb.readServerDirectory(drive);
remoteList.clear(); remoteList.clear();
@ -1286,7 +1299,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
/** /**
* Updates the Local File Table based on selection. Called from MouseClicked handler * Updates the Local File Table based on selection. Called from MouseClicked handler
*/ */
@@ -1188,6 +1691,7 @@ @@ -1188,6 +1704,7 @@
else if (currentSelection.isFile()) else if (currentSelection.isFile())
{ {
localSelection = currentSelection.getAbsoluteFile(); localSelection = currentSelection.getAbsoluteFile();
@ -1294,7 +1307,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
} }
else if (currentSelection.isDirectory()) else if (currentSelection.isDirectory())
{ {
@@ -1201,13 +1705,22 @@ @@ -1201,13 +1718,22 @@
* *
*/ */
private String getTrimmedSelection(){ private String getTrimmedSelection(){
@ -1324,7 +1337,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
} }
/* /*
@@ -1241,36 +1754,148 @@ @@ -1241,36 +1767,148 @@
return null; return null;
} }
@ -1481,7 +1494,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
FilesList.clear(); FilesList.clear();
DirsList.clear(); DirsList.clear();
@@ -1296,3 +1921,147 @@ @@ -1296,3 +1934,147 @@
} }
} // @jve:visual-info decl-index=0 visual-constraint="10,10" } // @jve:visual-info decl-index=0 visual-constraint="10,10"
@ -4208,7 +4221,7 @@ diff -Naur JavaViewer.orig/VncCanvas.java JavaViewer/VncCanvas.java
result = 0; // Transparent pixel result = 0; // Transparent pixel
diff -Naur JavaViewer.orig/VncViewer.java JavaViewer/VncViewer.java diff -Naur JavaViewer.orig/VncViewer.java JavaViewer/VncViewer.java
--- JavaViewer.orig/VncViewer.java 2006-05-24 15:14:40.000000000 -0400 --- JavaViewer.orig/VncViewer.java 2006-05-24 15:14:40.000000000 -0400
+++ JavaViewer/VncViewer.java 2008-09-14 10:36:37.000000000 -0400 +++ JavaViewer/VncViewer.java 2009-01-11 12:28:55.000000000 -0500
@@ -80,11 +80,11 @@ @@ -80,11 +80,11 @@
GridBagLayout gridbag; GridBagLayout gridbag;
ButtonPanel buttonPanel; ButtonPanel buttonPanel;
@ -4232,7 +4245,7 @@ diff -Naur JavaViewer.orig/VncViewer.java JavaViewer/VncViewer.java
String passwordParam; String passwordParam;
String encPasswordParam; String encPasswordParam;
boolean showControls; boolean showControls;
@@ -115,28 +115,67 @@ @@ -115,28 +115,68 @@
int i; int i;
// mslogon support 2 end // mslogon support 2 end
@ -4243,6 +4256,7 @@ diff -Naur JavaViewer.orig/VncViewer.java JavaViewer/VncViewer.java
+String urlPrefix; +String urlPrefix;
+String httpsPort; +String httpsPort;
+String oneTimeKey; +String oneTimeKey;
+String ftpDropDown;
+boolean forceProxy; +boolean forceProxy;
+boolean ignoreProxy; +boolean ignoreProxy;
+boolean trustAllVncCerts; +boolean trustAllVncCerts;
@ -4306,7 +4320,7 @@ diff -Naur JavaViewer.orig/VncViewer.java JavaViewer/VncViewer.java
// authenticator = new AuthPanel(false); // mslogon support : go to connectAndAuthenticate() // authenticator = new AuthPanel(false); // mslogon support : go to connectAndAuthenticate()
if (RecordingFrame.checkSecurity()) if (RecordingFrame.checkSecurity())
rec = new RecordingFrame(this); rec = new RecordingFrame(this);
@@ -147,10 +186,11 @@ @@ -147,10 +187,11 @@
cursorUpdatesDef = null; cursorUpdatesDef = null;
eightBitColorsDef = null; eightBitColorsDef = null;
@ -4320,7 +4334,7 @@ diff -Naur JavaViewer.orig/VncViewer.java JavaViewer/VncViewer.java
rfbThread = new Thread(this); rfbThread = new Thread(this);
rfbThread.start(); rfbThread.start();
} }
@@ -186,6 +226,30 @@ @@ -186,6 +227,30 @@
gbc.weightx = 1.0; gbc.weightx = 1.0;
gbc.weighty = 1.0; gbc.weighty = 1.0;
@ -4351,7 +4365,7 @@ diff -Naur JavaViewer.orig/VncViewer.java JavaViewer/VncViewer.java
// Add ScrollPanel to applet mode // Add ScrollPanel to applet mode
// Create a panel which itself is resizeable and can hold // Create a panel which itself is resizeable and can hold
@@ -286,6 +350,24 @@ @@ -286,6 +351,24 @@
void connectAndAuthenticate() throws Exception { void connectAndAuthenticate() throws Exception {
@ -4376,7 +4390,7 @@ diff -Naur JavaViewer.orig/VncViewer.java JavaViewer/VncViewer.java
// If "ENCPASSWORD" parameter is set, decrypt the password into // If "ENCPASSWORD" parameter is set, decrypt the password into
// the passwordParam string. // the passwordParam string.
@@ -336,7 +418,22 @@ @@ -336,7 +419,22 @@
// //
@ -4400,7 +4414,7 @@ diff -Naur JavaViewer.orig/VncViewer.java JavaViewer/VncViewer.java
authenticator = new AuthPanel(mslogon); authenticator = new AuthPanel(mslogon);
@@ -390,6 +487,10 @@ @@ -390,6 +488,10 @@
break; break;
//mslogon support end //mslogon support end
@ -4411,7 +4425,7 @@ diff -Naur JavaViewer.orig/VncViewer.java JavaViewer/VncViewer.java
// Retry on authentication failure. // Retry on authentication failure.
authenticator.retry(); authenticator.retry();
} }
@@ -405,9 +506,11 @@ @@ -405,9 +507,11 @@
void prologueDetectAuthProtocol() throws Exception { void prologueDetectAuthProtocol() throws Exception {
@ -4425,7 +4439,7 @@ diff -Naur JavaViewer.orig/VncViewer.java JavaViewer/VncViewer.java
System.out.println("RFB server supports protocol version " + System.out.println("RFB server supports protocol version " +
rfb.serverMajor + "." + rfb.serverMinor); rfb.serverMajor + "." + rfb.serverMinor);
@@ -431,16 +534,36 @@ @@ -431,16 +535,36 @@
boolean tryAuthenticate(String us, String pw) throws Exception { boolean tryAuthenticate(String us, String pw) throws Exception {
@ -4468,7 +4482,7 @@ diff -Naur JavaViewer.orig/VncViewer.java JavaViewer/VncViewer.java
switch (authScheme) { switch (authScheme) {
@@ -629,6 +752,10 @@ @@ -629,6 +753,10 @@
void doProtocolInitialisation() throws IOException { void doProtocolInitialisation() throws IOException {
@ -4479,7 +4493,7 @@ diff -Naur JavaViewer.orig/VncViewer.java JavaViewer/VncViewer.java
rfb.writeClientInit(); rfb.writeClientInit();
rfb.readServerInit(); rfb.readServerInit();
@@ -775,8 +902,25 @@ @@ -775,8 +903,25 @@
} }
} }
@ -4507,7 +4521,7 @@ diff -Naur JavaViewer.orig/VncViewer.java JavaViewer/VncViewer.java
if (inAnApplet) { if (inAnApplet) {
str = readParameter("Open New Window", false); str = readParameter("Open New Window", false);
@@ -804,6 +948,95 @@ @@ -804,6 +949,105 @@
deferScreenUpdates = readIntParameter("Defer screen updates", 20); deferScreenUpdates = readIntParameter("Defer screen updates", 20);
deferCursorUpdates = readIntParameter("Defer cursor updates", 10); deferCursorUpdates = readIntParameter("Defer cursor updates", 10);
deferUpdateRequests = readIntParameter("Defer update requests", 50); deferUpdateRequests = readIntParameter("Defer update requests", 50);
@ -4549,6 +4563,16 @@ diff -Naur JavaViewer.orig/VncViewer.java JavaViewer/VncViewer.java
+ } + }
+ System.out.println("urlPrefix: '" + urlPrefix + "'"); + System.out.println("urlPrefix: '" + urlPrefix + "'");
+ +
+ ftpDropDown = readParameter("ftpDropDown", false);
+ if (ftpDropDown != null) {
+ ftpDropDown = ftpDropDown.replaceAll("%2F", "/");
+ ftpDropDown = ftpDropDown.replaceAll("%2f", "/");
+ ftpDropDown = ftpDropDown.replaceAll("_2F_", "/");
+ ftpDropDown = ftpDropDown.replaceAll("%20", " ");
+ System.out.println("ftpDropDown: '" + ftpDropDown + "'");
+ }
+
+
+ oneTimeKey = readParameter("oneTimeKey", false); + oneTimeKey = readParameter("oneTimeKey", false);
+ if (oneTimeKey != null) { + if (oneTimeKey != null) {
+ System.out.println("oneTimeKey: is set"); + System.out.println("oneTimeKey: is set");

@ -1,3 +1,8 @@
2009-01-11 Karl Runge <runge@karlrunge.com>
* classes/ssl: Add configurable Ultra java applet Filexfer Drives
drop down (e.g. ftpDropDown=Home.Desktop.bin). Document all
applet parameters in classes/ssl/README.
2009-01-10 Karl Runge <runge@karlrunge.com> 2009-01-10 Karl Runge <runge@karlrunge.com>
* x11vnc: fix failure of -8to24 on default depth 24 due to * x11vnc: fix failure of -8to24 on default depth 24 due to
nonstandard indexed color support changes. Fix small window nonstandard indexed color support changes. Fix small window

File diff suppressed because it is too large Load Diff

@ -2,7 +2,7 @@
.TH X11VNC "1" "January 2009" "x11vnc " "User Commands" .TH X11VNC "1" "January 2009" "x11vnc " "User Commands"
.SH NAME .SH NAME
x11vnc - allow VNC connections to real X11 displays x11vnc - allow VNC connections to real X11 displays
version: 0.9.7, lastmod: 2009-01-07 version: 0.9.7, lastmod: 2009-01-11
.SH SYNOPSIS .SH SYNOPSIS
.B x11vnc .B x11vnc
[OPTION]... [OPTION]...

@ -1,7 +1,7 @@
/* /*
* x11vnc: a VNC server for X displays. * x11vnc: a VNC server for X displays.
* *
* Copyright (c) 2002-2008 Karl J. Runge <runge@karlrunge.com> * Copyright (c) 2002-2009 Karl J. Runge <runge@karlrunge.com>
* All rights reserved. * All rights reserved.
* *
* This is free software; you can redistribute it and/or modify * This is free software; you can redistribute it and/or modify

@ -15,7 +15,7 @@ int xtrap_base_event_type = 0;
int xdamage_base_event_type = 0; int xdamage_base_event_type = 0;
/* date +'lastmod: %Y-%m-%d' */ /* date +'lastmod: %Y-%m-%d' */
char lastmod[] = "0.9.7 lastmod: 2009-01-07"; char lastmod[] = "0.9.7 lastmod: 2009-01-11";
/* X display info */ /* X display info */

Loading…
Cancel
Save