Jump to content


Photo

FTP Client (not as a plugin)

ET6000

  • Please log in to reply
128 replies to this topic

Re: FTP Client (not as a plugin) #61 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 20 April 2015 - 18:46

Nice this bitbake recipe.
If now somebody would build this for me, It would be great.
 
Willy


If it is a usefull application we can add yafc to OpenPLi builds (feed).

Here it is.

Attached Files


Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: FTP Client (not as a plugin) #62 doglover

  • Rytec EPG Team
  • 17,015 posts

+639
Excellent

Posted 21 April 2015 - 08:18

Thanks, will try it.

 

I had a problem previous.

On of the FTPsites I need to log in with an user: hupedepup@something.co.uk

Now in yafc you need to open the site with

 

open [options] [proto://][user[:password]@]hostname[:port][/directory] ...

 

So this become open [options] ftp://hupedepup@something.co.uk:password@url:21

 

You see the problem.   2 @ symbols in there.  And yafc gets confused.  I am sure there is a solution for this.  But I have not found it.

 

Willy


Edited by doglover, 21 April 2015 - 08:19.

~~Rytec Team~~
Maxytec Multibox SE OpenPli (used as mediaplayer)
Mutant HD2400 OpenPli
Vu+ Duo OpenPli (backup)

Synology NAS

Sat: 13E, 19.2E, 23.5E and 28.2E
*Pli/Rytec EPG POWERED*


Re: FTP Client (not as a plugin) #63 betacentauri

  • PLi® Core member
  • 7,185 posts

+323
Excellent

Posted 21 April 2015 - 10:12

Maybe a \ before the first @ helps.
Xtrend ET-9200, ET-8000, ET-10000, OpenPliPC on Ubuntu 12.04

Re: FTP Client (not as a plugin) #64 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 21 April 2015 - 12:32

You can also try to use bookmarks there is an option to save passwords via bookmarks.


Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: FTP Client (not as a plugin) #65 doglover

  • Rytec EPG Team
  • 17,015 posts

+639
Excellent

Posted 21 April 2015 - 13:01

Maybe a \ before the first @ helps.

 

 

No it did not.

Will try the bookmarks.

 

Willy

 

BTW:  on a site which has not these special characters, the program works normally.


Edited by doglover, 21 April 2015 - 13:03.

~~Rytec Team~~
Maxytec Multibox SE OpenPli (used as mediaplayer)
Mutant HD2400 OpenPli
Vu+ Duo OpenPli (backup)

Synology NAS

Sat: 13E, 19.2E, 23.5E and 28.2E
*Pli/Rytec EPG POWERED*


Re: FTP Client (not as a plugin) #66 doglover

  • Rytec EPG Team
  • 17,015 posts

+639
Excellent

Posted 21 April 2015 - 13:50

Set some bookmarks and got this:

                                                

yafc> open kingserver                                                          
The host key for this server was not found but another type of key exists.     
An attacker might change the default server key to confuse your client into thiking the key does not exist    

 

And here I am lost at the moment.

 

Willy                                             


~~Rytec Team~~
Maxytec Multibox SE OpenPli (used as mediaplayer)
Mutant HD2400 OpenPli
Vu+ Duo OpenPli (backup)

Synology NAS

Sat: 13E, 19.2E, 23.5E and 28.2E
*Pli/Rytec EPG POWERED*


Re: FTP Client (not as a plugin) #67 LraiZer

  • Senior Member
  • 101 posts

+19
Neutral

Posted 21 April 2015 - 13:52

#!/bin/sh

yafc <<**
open ftp://hupedepup%40something.co.uk:password@url:21
ls
quit

maybe try changing the @ in login name in your script to %40



Re: FTP Client (not as a plugin) #68 LraiZer

  • Senior Member
  • 101 posts

+19
Neutral

Posted 21 April 2015 - 14:12

Set some bookmarks and got this:

                                                

yafc> open kingserver                                                          
The host key for this server was not found but another type of key exists.     
An attacker might change the default server key to confuse your client into thiking the key does not exist    

 

And here I am lost at the moment.

 

Willy                                             

Maybe this post can help here?



Re: FTP Client (not as a plugin) #69 doglover

  • Rytec EPG Team
  • 17,015 posts

+639
Excellent

Posted 21 April 2015 - 14:23

Seems to work on other servers with bookmarks.

The above is still a problem.

 

Passwords special characters can be escaped by adding [base64]in front of it, and of course coding it in base64.

 

Willy


~~Rytec Team~~
Maxytec Multibox SE OpenPli (used as mediaplayer)
Mutant HD2400 OpenPli
Vu+ Duo OpenPli (backup)

Synology NAS

Sat: 13E, 19.2E, 23.5E and 28.2E
*Pli/Rytec EPG POWERED*


Re: FTP Client (not as a plugin) #70 doglover

  • Rytec EPG Team
  • 17,015 posts

+639
Excellent

Posted 21 April 2015 - 14:42

#!/bin/sh

yafc <<**
open ftp://hupedepup%40something.co.uk:password@url:21
ls
quit

maybe try changing the @ in login name in your script to %40

 

 

This helped.  Works.

 

Willy


~~Rytec Team~~
Maxytec Multibox SE OpenPli (used as mediaplayer)
Mutant HD2400 OpenPli
Vu+ Duo OpenPli (backup)

Synology NAS

Sat: 13E, 19.2E, 23.5E and 28.2E
*Pli/Rytec EPG POWERED*


Re: FTP Client (not as a plugin) #71 doglover

  • Rytec EPG Team
  • 17,015 posts

+639
Excellent

Posted 21 April 2015 - 14:43

 

Set some bookmarks and got this:

                                                

yafc> open kingserver                                                          
The host key for this server was not found but another type of key exists.     
An attacker might change the default server key to confuse your client into thiking the key does not exist    

 

And here I am lost at the moment.

 

Willy                                             

Maybe this post can help here?

 

 

Helped in a way, that I removed the known_host file from my box, and it stored a new key.

(from this post I knew where to look)

 

Willy


~~Rytec Team~~
Maxytec Multibox SE OpenPli (used as mediaplayer)
Mutant HD2400 OpenPli
Vu+ Duo OpenPli (backup)

Synology NAS

Sat: 13E, 19.2E, 23.5E and 28.2E
*Pli/Rytec EPG POWERED*


Re: FTP Client (not as a plugin) #72 doglover

  • Rytec EPG Team
  • 17,015 posts

+639
Excellent

Posted 21 April 2015 - 16:32

Still to do: automate the thing.

 

Found a script with an example:

#!/bin/bash
# format of the open command is proto://username:password@HOSTorIP/
# proto is either ftp or ssh
# special characters in the username or password are not well tolerated
# anything in the EOF tags are direct commands to yafc. Test if unsure
DIR=`date +%F`
yafc <<EOF
open ftp://username:password@ftp.example.com/
cd backup-dir
mkdir $DIR
cd $DIR
put -p -r *
close
exit
EOF

Hopefully this works.

 

Willy


~~Rytec Team~~
Maxytec Multibox SE OpenPli (used as mediaplayer)
Mutant HD2400 OpenPli
Vu+ Duo OpenPli (backup)

Synology NAS

Sat: 13E, 19.2E, 23.5E and 28.2E
*Pli/Rytec EPG POWERED*


Re: FTP Client (not as a plugin) #73 doglover

  • Rytec EPG Team
  • 17,015 posts

+639
Excellent

Posted 22 April 2015 - 09:19

Got it working.  Although I am a bit disappointed by it.

 

The reason I wanted this is the possibility to use -n (newer) and -p (preserve timestamps and permissions).

This works for downloads.  So when I download a series of files, only the newer files are downloaded.

 

However, during an upload these switches seem not to work.  The files are always uploaded.  And they get the timestamp of the time of upload.

It seem that both switches are not working.

So the upload is still taking place all the time.

 

Although when I upload to the sftp server with the sftp program the timestamps are kept.  But the file still being uploaded, due to the missing -n switch in the sftp program.

Uploading to this server with yafc, (with -n -p) will overwrite all the files, and timestamps are not kept.

 

It is not all lost though.  I have to download the files from a very slow server.  So in this case when I have the most current file, at least it is not wasting time anymore downloading files which I already have.

 

Willy


~~Rytec Team~~
Maxytec Multibox SE OpenPli (used as mediaplayer)
Mutant HD2400 OpenPli
Vu+ Duo OpenPli (backup)

Synology NAS

Sat: 13E, 19.2E, 23.5E and 28.2E
*Pli/Rytec EPG POWERED*


Re: FTP Client (not as a plugin) #74 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 22 April 2015 - 09:23

Hi Willy,

 

 

I guess it would be better to notify the maintainer by submiting an issue here: https://github.com/s...nas/yafc/issues

 

Interestly with the experience from this thead you can also close this issue https://github.com/s.../yafc/issues/52 by sharing knowledge ;)


Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: FTP Client (not as a plugin) #75 doglover

  • Rytec EPG Team
  • 17,015 posts

+639
Excellent

Posted 22 April 2015 - 09:44

Done.

 

Willy


~~Rytec Team~~
Maxytec Multibox SE OpenPli (used as mediaplayer)
Mutant HD2400 OpenPli
Vu+ Duo OpenPli (backup)

Synology NAS

Sat: 13E, 19.2E, 23.5E and 28.2E
*Pli/Rytec EPG POWERED*


Re: FTP Client (not as a plugin) #76 doglover

  • Rytec EPG Team
  • 17,015 posts

+639
Excellent

Posted 22 April 2015 - 12:13

These options seem to work:

 

put --force --newer --resume --preserve *.gz

 

These are the long version of the options.  So there is a solution (I hope)

 

Willy


~~Rytec Team~~
Maxytec Multibox SE OpenPli (used as mediaplayer)
Mutant HD2400 OpenPli
Vu+ Duo OpenPli (backup)

Synology NAS

Sat: 13E, 19.2E, 23.5E and 28.2E
*Pli/Rytec EPG POWERED*


Re: FTP Client (not as a plugin) #77 doglover

  • Rytec EPG Team
  • 17,015 posts

+639
Excellent

Posted 24 April 2015 - 12:34

I am using yafc now for a couple of days for the upload of the EPG data:

 

The newer switch still has some problems.

During the download of files from the remote PC's to my box, the --newer switch seems to work properly.

Fri Apr 24 11:05:01 CEST 2015
yafc 1.3.5
This program comes with ABSOLUTELY NO WARRANTY; for details type 'warranty'.
This is free software; type 'copyright' for details.
local working directory is '/media/hdd/epg'
                                     
  1.3% [                         ] 1.4KiB/104.7KiB ETA 1:16 1.4KiB/s
12.0% [###                      ] 12.6KiB/104.7KiB ETA 0:07 12.6KiB/s
60.5% [###############          ] 63.3KiB/104.7KiB ETA 0:01 31.7KiB/s
Transferred 1 files, Skipped 29 files, total size 1993699718 hiB.

Here an example where i updated one file in the server, and subsequently ran the update program on the linux box.  Only the updated file is transferred.

 

However when I upload to the distribution servers, the --newer switch does not seems to work properly.

Some of the files are updated, other files which should be updated are skipped.

Leaving the updates incomplete.

 

To be fair, also with WinSCP and CoreFTP on my windows machines, I see the same behaviour.  Here also I could never get the files updated reliably when I used the -newer switch.

 

It looks that the servers are not storing, or returning reliable data about the last modification time of the file or the FTP programs cannot interpret this data properly.

 

I have read somewhere on the net, that the checking the HEAD of the file on the internet is unreliable or leads to unreliable decisions.

 

Willy


Edited by doglover, 24 April 2015 - 12:36.

~~Rytec Team~~
Maxytec Multibox SE OpenPli (used as mediaplayer)
Mutant HD2400 OpenPli
Vu+ Duo OpenPli (backup)

Synology NAS

Sat: 13E, 19.2E, 23.5E and 28.2E
*Pli/Rytec EPG POWERED*


Re: FTP Client (not as a plugin) #78 doglover

  • Rytec EPG Team
  • 17,015 posts

+639
Excellent

Posted 24 April 2015 - 14:18

There seems to be an update on the GitHub, regarding this problem.

athoik, Can you compile a new version for me pls.

 

Just the yafc file is enough.

 

 

Willy


~~Rytec Team~~
Maxytec Multibox SE OpenPli (used as mediaplayer)
Mutant HD2400 OpenPli
Vu+ Duo OpenPli (backup)

Synology NAS

Sat: 13E, 19.2E, 23.5E and 28.2E
*Pli/Rytec EPG POWERED*


Re: FTP Client (not as a plugin) #79 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 24 April 2015 - 16:06

Here you are:

 

 

Attached Files


Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: FTP Client (not as a plugin) #80 doglover

  • Rytec EPG Team
  • 17,015 posts

+639
Excellent

Posted 24 April 2015 - 16:18

Thanks.

 

Willy


~~Rytec Team~~
Maxytec Multibox SE OpenPli (used as mediaplayer)
Mutant HD2400 OpenPli
Vu+ Duo OpenPli (backup)

Synology NAS

Sat: 13E, 19.2E, 23.5E and 28.2E
*Pli/Rytec EPG POWERED*




Also tagged with one or more of these keywords: ET6000

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users