r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[Rebol School] Rebol School

Vladimir
4-Nov-2008
[840x2]
basicly if I enter Binary mode, upload fails and it looks like it 
has to do something with port above 35000 problem.
If I enter passive mode nothing works....
it always responds with network timeout....
And once more..... total commander works :)
Graham
4-Nov-2008
[842]
well, in this case, you should use wireshark and do a tcp trace
Vladimir
4-Nov-2008
[843x3]
Im trying..... will report
here is command with error:
to-port: open/binary/new/direct server/:file
** Access Error: Network timeout
** Where: confirm
** Near: to-port: open/binary/new/direct server/:file
and here are log files from wireshark:

http://www.visaprom.com/wiresharklog.txt
http://www.visaprom.com/wiresharklog details.txt


If anyone has little time to read thru them and can tell me something 
I would appriciate it very much :)
Graham
4-Nov-2008
[846]
what I normally do is click on the relevant tcp lines, and the right 
click, and then choose "follow tcp stream" so that I only get the 
relevant data.
DideC
4-Nov-2008
[847]
It seems the problem is after the PORT command.

It  define the port used to receive or send the file data (depending 
the command you issue).

Use Wireshark to have a look to what Total commander do regarding 
its PORT command.
So we can compare with the Rebol commands.


I guess the router firewall block the one Rebol use, but Total commander 
do it in an over way.
Vladimir
5-Nov-2008
[848x2]
Here is log from rebol ftp upload:


No.     Time        Source                Destination           Protocol 
Info

     67 3.356898    192.168.2.108         194.9.94.127          TCP   
        spiral-admin > ftp [SYN] Seq=0 Win=16384 Len=0 MSS=1460

     79 3.982028    194.9.94.127          192.168.2.108         TCP   
        ftp > spiral-admin [SYN, ACK] Seq=0 Ack=1 Win=16384 Len=0 MSS=1100

     80 3.982082    192.168.2.108         194.9.94.127          TCP   
        spiral-admin > ftp [ACK] Seq=1 Ack=1 Win=16500 Len=0

     90 4.056926    194.9.94.127          192.168.2.108         FTP   
        Response: 220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------

     92 4.057544    192.168.2.108         194.9.94.127          FTP   
        Request: USER visaprom.com

    102 4.129540    194.9.94.127          192.168.2.108         FTP  
        Response: 331 User visaprom.com OK. Password required

    103 4.129689    192.168.2.108         194.9.94.127          FTP  
        Request: PASS Du4m1t0R

    106 4.241608    194.9.94.127          192.168.2.108         FTP  
        Response: 230-User visaprom.com has group access to:  www    
     

    107 4.241781    192.168.2.108         194.9.94.127          FTP  
        Request: SYST

    118 4.305921    194.9.94.127          192.168.2.108         FTP  
        Response: 215 UNIX Type: L8

    119 4.306117    192.168.2.108         194.9.94.127          FTP  
        Request: PWD

    134 4.367656    194.9.94.127          192.168.2.108         FTP  
        Response: 257 "/" is your current location

    136 4.370939    192.168.2.108         194.9.94.127          FTP  
        Request: PORT 192,168,2,108,13,111

    143 4.435976    194.9.94.127          192.168.2.108         FTP  
        Response: 200 PORT command successful

    144 4.468135    192.168.2.108         194.9.94.127          FTP  
        Request: CWD apl/

    194 5.499179    192.168.2.108         194.9.94.127          FTP  
        [TCP Retransmission] Request: CWD apl/

    198 5.565745    194.9.94.127          192.168.2.108         FTP  
        Response: 250 OK. Current directory is /apl

    199 5.565955    192.168.2.108         194.9.94.127          FTP  
        Request: TYPE I

    275 7.640872    194.9.94.127          192.168.2.108         FTP  
        Response: 200 TYPE is now 8-bit binary

    276 7.641186    192.168.2.108         194.9.94.127          FTP  
        Request: STOR ik104test.zip

    290 7.903130    194.9.94.127          192.168.2.108         TCP  
        ftp > spiral-admin [ACK] Seq=613 Ack=111 Win=16500 Len=0

   1279 37.655879   192.168.2.108         194.9.94.127          TCP 
        spiral-admin > ftp [FIN, ACK] Seq=111 Ack=613 Win=15888 Len=0
there goes pass again :)
Henrik
5-Nov-2008
[850]
Vladimir, be careful as this group is web public.
Vladimir
5-Nov-2008
[851x5]
I know .. Im to tired :)
no problem... will change it in a sek...
Ill post log from total commander in a minute and then try to spot 
the difference...
No.     Time        Source                Destination           Protocol 
Info

     90 2.750586    192.168.2.108         194.9.94.127          FTP   
        Request: TYPE I

     97 2.823074    194.9.94.127          192.168.2.108         FTP   
        Response: 200 TYPE is now 8-bit binary

     98 2.828500    192.168.2.108         194.9.94.127          FTP   
        Request: PASV

    113 3.171841    192.168.2.108         194.9.94.127          FTP  
        [TCP Retransmission] Request: PASV

    114 3.244193    194.9.94.127          192.168.2.108         TCP  
        [TCP Previous segment lost] ftp > mgemanagement [ACK] Seq=80 
    Ack=15 Win=16500 Len=0

    131 3.889034    194.9.94.127          192.168.2.108         FTP  
        [TCP Retransmission] Response: 227 Entering Passive Mode (194,9,94,127,250,69)

    137 3.984887    192.168.2.108         194.9.94.127          FTP  
        Request: STOR ik104test.zip

    149 4.247163    194.9.94.127          192.168.2.108         TCP  
        ftp > mgemanagement [ACK] Seq=80 Ack=35 Win=16500 Len=0

    210 7.046287    194.9.94.127          192.168.2.108         FTP  
        Response: 150 Accepted data connection

    241 7.218716    192.168.2.108         194.9.94.127          TCP  
        mgemanagement > ftp [ACK] Seq=35 Ack=110 Win=16269 Len=0

   1613 17.145048   194.9.94.127          192.168.2.108         FTP 
        Response: 226-File successfully transferred

   1617 17.172970   192.168.2.108         194.9.94.127          FTP 
        Request: SIZE ik104test.zip

   1620 17.277591   194.9.94.127          192.168.2.108         FTP 
        Response: 213 566605

   1623 17.375906   192.168.2.108         194.9.94.127          FTP 
        Request: TYPE A

   1628 17.498619   194.9.94.127          192.168.2.108         FTP 
        Response: 200 TYPE is now ASCII

   1629 17.516657   192.168.2.108         194.9.94.127          FTP 
        Request: PASV

   1633 17.644044   194.9.94.127          192.168.2.108         FTP 
        Response: 227 Entering Passive Mode (194,9,94,127,205,237)

   1637 17.750889   192.168.2.108         194.9.94.127          FTP 
        Request: LIST

   1643 17.835367   194.9.94.127          192.168.2.108         FTP 
        Response: 150 Accepted data connection

   1644 17.863490   194.9.94.127          192.168.2.108         FTP 
        Response: 226-Options: -a -l 

   1645 17.863548   192.168.2.108         194.9.94.127          TCP 
        mgemanagement > ftp [ACK] Seq=75 Ack=364 Win=16015 Len=0
there it is.... difference is:

in total cmd:
on Request: STOR ik104test.zip
ftp > mgemanagement [ACK] Seq=80 Ack=35 Win=16500 Len=0
Response: 150 Accepted data connection

and in rebol
response is

 290 7.903130    194.9.94.127          192.168.2.108         TCP  
     ftp > spiral-admin [ACK] Seq=613 Ack=111 Win=16500 Len=0
30 seconds pause

1279 37.655879   192.168.2.108         194.9.94.127          TCP 
     spiral-admin > ftp [FIN, ACK] Seq=111 Ack=613 Win=15888 Len=0 
   149 4.247163    194.9.94.127          192.168.2.108         TCP
Anton
5-Nov-2008
[856]
I note in the "wireshark log.txt" you linked above, there is [TCP 
CHECKSUM INCORRECT] soon after the STOR command. I don't know what 
it means exactly.
Pekr
5-Nov-2008
[857]
FIN, ACK - your PC closes the connection (REBOL version) after receiving 
previous ACK, dunno why. Why is "spiral-admin" btw?
Dockimbel
5-Nov-2008
[858]
Your REBOL FTP session doesn't seem to use passive mode while Total 
Cmd does.
Pekr
5-Nov-2008
[859]
I think we several times suggested to set system/schemes/ftp/passive: 
true, and IIRC Vladimir claimed that it made no change for him ....
Vladimir
5-Nov-2008
[860x6]
I set it to passive
same error.... here is the log
4 0.136676    194.9.94.127          192.168.2.108         FTP    
  Response: 220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------

      5 0.136919    192.168.2.108         194.9.94.127          FTP    
        Request: USER visaprom.com

      6 0.195551    194.9.94.127          192.168.2.108         FTP    
        Response: 331 User visaprom.com OK. Password required

      7 0.195740    192.168.2.108         194.9.94.127          FTP    
        Request: PASS pass

      8 0.298224    194.9.94.127          192.168.2.108         FTP    
        Response: 230-User visaprom.com has group access to:  www     

      9 0.298434    192.168.2.108         194.9.94.127          FTP    
        Request: SYST

     10 0.359996    194.9.94.127          192.168.2.108         FTP   
        Response: 215 UNIX Type: L8

     11 0.360264    192.168.2.108         194.9.94.127          FTP   
        Request: PWD

     12 0.424862    194.9.94.127          192.168.2.108         FTP   
        Response: 257 "/" is your current location

     13 0.425117    192.168.2.108         194.9.94.127          FTP   
        Request: PASV

     14 0.485707    194.9.94.127          192.168.2.108         FTP   
        Response: 227 Entering Passive Mode (194,9,94,127,205,50)

     18 0.547818    192.168.2.108         194.9.94.127          FTP   
        Request: CWD apl/

     19 1.613365    192.168.2.108         194.9.94.127          FTP   
        [TCP Retransmission] Request: CWD apl/

     20 1.675732    194.9.94.127          192.168.2.108         TCP   
        [TCP Previous segment lost] ftp > gtrack-ne [ACK] Seq=603 Ack=66 
     Win=16500 Len=0

    106 30.535545   192.168.2.108         194.9.94.127          TCP  
        gtrack-ne > ftp [FIN, ACK] Seq=66 Ack=568 Win=15933 Len=0

    107 30.600678   194.9.94.127          192.168.2.108         TCP  
        ftp > gtrack-ne [ACK] Seq=603 Ack=67 Win=16500 Len=0

    108 30.600776   194.9.94.127          192.168.2.108         FTP  
        Response: 250 Logout.

    109 30.600798   192.168.2.108         194.9.94.127          TCP  
        [TCP Dup ACK 106#1] gtrack-ne > ftp [ACK] Seq=67 Ack=568 Win=15933 
    Len=0 SLE=603 SRE=616

    110 30.601077   194.9.94.127          192.168.2.108         TCP  
        ftp > gtrack-ne [FIN, ACK] Seq=616 Ack=67 Win=16500 Len=0

    111 30.601086   192.168.2.108         194.9.94.127          TCP  
        [TCP Dup ACK 106#2] gtrack-ne > ftp [ACK] Seq=67 Ack=568 Win=15933 
    Len=0 SLE=603 SRE=617
what is gtrack-ne ?
I tried again... now it is "ca-idms" instead of "gtrack-ne" and Seq=604 
instead of 603....
I have no fu...ing... idea what this is...
If there is anyone outthere who knows what this could be... ?
btw. I sent mails to pheenet (router manufacturer) support... Maybe 
they can help....
DideC
5-Nov-2008
[866]
I see no PORT command in Totalcommander log. That seems going in 
the way I claim before.
Graham
5-Nov-2008
[867]
What are these retransmission requests??
Pekr
5-Nov-2008
[868]
Guys - those names, are just names for port numbers. You can turn 
the name resolution off. grack-ne = 3592
Graham
5-Nov-2008
[869]
total commander is also using PASV mode
Pekr
5-Nov-2008
[870x2]
Spiral-admin = 3438
One thing is clear - you have to have allowed connection tracking 
in your firewall, and ftp communication is being done by using so 
called "related" connections ...
Vladimir
5-Nov-2008
[872]
I uploaded manual for my router before:
http://www.2shared.com/file/4192455/b9f6ca7d/LB_Manual_1_1.html

Can someone tell me where are these settings for "connection tracking" 
?
Anton
5-Nov-2008
[873x3]
About TCP CHECKSUM INCORRECT
http://wiki.wireshark.org/TCP_Checksum_Verification
It should be VERY VERY rare to see corrupted packets in today's networks 
unless you have a router or a switch with a bad RAM module with a 
sticky bit. Still, it should be VERY rare to see this for packets 
that actually are corrupted.
Vladimir
15-Nov-2008
[876]
I got response from Pheenet tech support... It tokk couple of emails 
... me sending network drawing, log files and such stuff...

Finally they said they never expirienced anything like it in their 
practice... Well at least I know Im not idiot... :)
Only latest firmware could help...

They were very kind and sent me newest firmware... (its not even 
available online :)
AND IT WORKS!

So.... Rebol is still cool... It was not rebol mistake... it was 
router firmware... :)
Thanks to everyone who tried to help :)
Gregg
15-Nov-2008
[877]
Wow. Thanks for letting us know Vladimir.
DideC
15-Nov-2008
[878]
cool!
Anton
18-Nov-2008
[879]
Yep, appreciate the feedback.
Sunanda
19-Nov-2008
[880]
Can anyone help answer this question --- received as a Feed back 
message on REBOL.org. Thanks!
=====
Does Rebol support cyrillic?
I can't see symbols in my language in this simple program:

view layout/size [button "Нажми" [alert "Привет!"]] 400x300

How come that Rebol doesn't support UTF-8? Or maybe there is another 
way to see Russian letters on buttons?..
3 days of googling...nothing...

 example: view layout/size [button "Нажми" [alert "Привет!"]] 
 400x300
=====
Pekr
19-Nov-2008
[881]
not sure possible. He could probably convert apriori, but. Unicode 
is going to be supported in R3. Some VID 3.4 more public release 
due next week? (maybe). But even then - Unicode display is not supported 
AFAIK
Sunanda
19-Nov-2008
[882]
Thanks Petr. He may have to wait for a supported UNICODE-enabled 
release.


Having given it a few moments thought, he may be able to fake it 
in *some* controls with font-name:

    view layout [box "hello" font-name "xxx"]  ;; where xxx is the name 
    of an installed font on his machine.

I tried that with my ASCII chart script, making that change. And 
it does (for me) show some Cyrillic. Not sure it's a complete solution 
though:
   http://www.rebol.org/view-script.r?script=ascii-chart.r
Sunanda
21-Nov-2008
[883]
Can someone help make this code less Python and more REBOL:
http://www.reboltalk.com/forum/index.php/topic,2561.0.html
Pekr
21-Nov-2008
[884]
There is nothing wrong with his script, is there?
Sunanda
21-Nov-2008
[885]
It works.

But I think he's looking for something more parse-y or REBOL-elegant 
in some other way....And that scales up to the millions....So hash 
(or whetever the R3 replacement is called) might be useful.
Henrik
21-Nov-2008
[886]
I don't see a problem with it. I would have written it the same way.
Pekr
21-Nov-2008
[887]
Well, I can give him some other options, like telling him, that he 
could use sqlite, mysql, postgress, as we have drivers for them. 
Not sure about the hash and its speed, etc.
Sunanda
21-Nov-2008
[888]
I'd've written it the same way too -- though on the test dataset, 
the find could be a equality test:
    if row/2 = map/1 [change row/4 map/2]

I think he's hoping for a more set-related way rather than procedural 
method.
PeterWood
21-Nov-2008
[889]
I've posted a script that eliminates the inner foreach loop by building 
a hash! to use as a lookup. Should be a bit quicker but isn't really 
any more Rebolish.