View Single Post
Old 08-18-2003, 05:57 AM  
phrek
Junior Member
 
Join Date: Aug 2003
Posts: 6
Default

in case you dont think it works on that site (it does) i did it in tcl with sockets using the tls1.4 package:

(bin) 145 % set sock [tls::socket arthur.runestig.com 21]
sock556
(bin) 146 % proc bahga {sock} {
> if {[eof $sock] || [catch {gets $sock line}]} {
> close $sock
> } else {
> puts $line
> }
> }
(bin) 147 % fconfigure $sock -buffering line
(bin) 148 % fileevent $sock readable[list bahga $sock]
(bin) 149 % set sock [socket arthur.runestig.com 21]
sock608
(bin) 150 % proc bahga {sock} {
> if {[eof $sock] || [catch {gets $sock line}]} {
> close $sock
> } else {
> puts $line
> }
> }
(bin) 151 % fconfigure $sock -buffering line
(bin) 152 % fileevent $sock readable[list bahga $sock]
220 arthur.runestig.com FTP server (Version 6.5/OpenBSD TLS) ready.
(bin) 153 % puts $sock "AUTH TLS"
234 AUTH TLS successful
(bin) 154 % tls::import $sock -require false -tls1 true
sock608
(bin) 155 % tls::handshake $sock
1
(bin) 156 % puts $sock "USER anonymous"
331 Guest login ok, send your email address as password.

(bin) 157 % puts $sock "PASS anonymous"
230 Guest login ok, access restrictions apply.

(bin) 159 % puts "PBSZ 1"
PBSZ 1
(bin) 160 % puts $sock "PBSZ 1"
200 PBSZ=0 successful

(bin) 161 % puts $sock "PROT P"
200 Protection set to Private

(bin) 162 % puts $sock "PASV"
(bin) 163 % 227 Entering Passive Mode (62,108,199,166,233,155)


(bin) 163 % 8216 233,155
59803
(bin) 164 % set sock2 [socket 62.108.199.166 59803]
sock612
(bin) 165 % fconfigure $sock2 -buffering line
(bin) 166 %
(bin) 166 % proc bahg2 {sock} {
> if {[eof $sock] || [catch {gets $sock line}]} {
> close $sock
> } else {
> puts stdout $line
> }
> }
(bin) 167 %
(bin) 167 % fileevent $sock2 readable[list bahg2 $sock2]
(bin) 168 % puts $sock "LIST"
(bin) 169 % 150 Opening ASCII mode data connection for '/bin/ls'.


(bin) 169 % tls::import $sock2 -require false -tls1 true
sock612
(bin) 170 % tls::handshake $sock2
1
226 Transfer complete.

total 8

dr-xr-xr-x 2 root root 40 Aug 6 1999 bin

dr-xr-xr-x 2 root root 31 Jan 9 2002 etc

dr-xr-xr-x 2 root root 132 Nov 24 2001 lib

dr-xrwxr-x 15 ftp 669 4096 May 16 13:04 pub
phrek is offline