Page 1 of 1
FTP over SSL file list
Posted: 22 Feb 2017 18:45
by fagci
When I use FTP over SSL server, I can't get file list, but directory creating function works.
Here is debug log from lftp (directory listing available):
Code: Select all
WARNING: Certificate verification: Not trusted
<--- 200 Using default language en_US.UTF-8
---> OPTS UTF8 ON
<--- 200 UTF8 set to on
---> OPTS MLST modify;perm;size;type;UNIX.group;UNIX.mode;UNIX.owner;
<--- 200 OPTS MLST modify;perm;size;type;UNIX.group;UNIX.mode;UNIX.owner;
---> USER ****
<--- 331 Password required for ****
---> PASS ****
<--- 230 User **** logged in
---> PBSZ 0
<--- 200 PBSZ 0 successful
---> PROT P
<--- 200 Protection set to Private
---> PASV
<--- 227 Entering Passive Mode (xx,xxx,xxx,xx,203,201).
---- Connecting data socket to (xx.xxx.xxx.xx) port 52169
---- Data connection established
---> LIST -la
<--- 150 Opening ASCII mode data connection for file list
Log from tls module:
Code: Select all
2017-02-23 02:37:20,663 mod_tls/2.4.5[7317]: TLS/TLS-C requested, starting TLS handshake
2017-02-23 02:37:20,938 mod_tls/2.4.5[7317]: client supports secure renegotiations
2017-02-23 02:37:20,938 mod_tls/2.4.5[7317]: TLSv1/SSLv3 connection accepted, using cipher DHE-RSA-AES128-GCM-SHA256 (128 bits)
2017-02-22 19:37:21,293 mod_tls/2.4.5[7317]: SSL/TLS required but absent on data channel, denying LIST command
Other app got file list after some tweaks (DNS mascuerading).
Tried both: internet and local net addresses, same result - empty file list screen in FTP Init file list action.
Re: FTP over SSL file list
Posted: 22 Feb 2017 20:53
by Martin
Hi,
Could you please try the next EAP version to see if anything changes? I've updated the included FTP library which hopefully resolves this issue.
Regards,
Martin
Re: FTP over SSL file list
Posted: 23 Feb 2017 07:10
by fagci
Ok, Martin, thanks =)
Will wait for next EAP version =)
...maybe, we already can use SFTP, if SSH command execution implemented...
Re: FTP over SSL file list
Posted: 23 Feb 2017 16:21
by fagci
ftp download action hangs without connection timeout (cant connect to local IP, because my mistake)
Code: Select all
23.02.2017 23:19:00.012 Active wake lock: WakeLockTracker{creationTimeMillis=Thu Feb 23 23:14:14 GMT+07:00 2017, wakeLock=WakeLock{2e17a9e held=true, refCount=1}, name='[Flow3]', lastCheckTimeMillis=Thu Feb 23 23:14:16 GMT+07:00 2017, createdThrowable=java.lang.Throwable: Creation hint
at ch.gridvision.ppam.androidautomagic.util.co.<init>(SourceFile:46)
at ch.gridvision.ppam.androidautomagic.c.c.i.<init>(SourceFile:73)
at ch.gridvision.ppam.androidautomagic.c.c.e.b(SourceFile:535)
at ch.gridvision.ppam.androidautomagic.c.c.k$b.a(SourceFile:58)
at ch.gridvision.ppam.androidautomagic.c.c.e.a(SourceFile:527)
at ch.gridvision.ppam.androidautomagic.FlowActivity.onOptionsItemSelected(SourceFile:1022)
at android.app.Activity.onMenuItemSelected(Activity.java:2914)
at com.android.internal.policy.PhoneWindow.onMenuItemSelected(PhoneWindow.java:1201)
at com.android.internal.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:761)
at com.android.internal.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:152)
at com.android.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:904)
at com.android.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:894)
at com.android.internal.view.menu.MenuPopupHelper.onItemClick(MenuPopupHelper.java:200)
at android.widget.AdapterView.performItemClick(AdapterView.java:310)
at android.widget.AbsListView.performItemClick(AbsListView.java:1145)
at android.widget.AbsListView$PerformClick.run(AbsListView.java:3066)
at android.widget.AbsListView$3.run(AbsListView.java:3903)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5461)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:102)
, lastCheckThrowable=java.lang.Throwable: Last check
at ch.gridvision.ppam.androidautomagic.util.co.a(SourceFile:65)
at ch.gridvision.ppam.androidautomagic.c.c.e.a(SourceFile:726)
at ch.gridvision.ppam.androidautomagic.c.c.e.a(SourceFile:690)
at ch.gridvision.ppam.androidautomagic.c.a.av$1.b(SourceFile:295)
at ch.gridvision.ppam.androidautomagiclib.util.ck$1$1.run(SourceFile:51)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5461)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:102)
}
Re: FTP over SSL file list
Posted: 24 Feb 2017 11:46
by fagci
If I paste variable into password field, then share that flow to other Automagic user, password field becomes empty.
Request feature: field of text type when I check "[V] Use variable / visible password" to save field with variable.
//editing exported flow by hand is solution, but so hacky.
Re: FTP over SSL file list
Posted: 24 Feb 2017 17:56
by Martin
I probably found the reason for the FTP action to fail when listing files. I'll try to add a new option to the FTP actions to specify the type of encryption used by the data connection. It looks like the FTP library in use defaults to clear text for the data connection. lftp changes to P with the PROT command.
Regards,
Martin
Re: FTP over SSL file list
Posted: 26 Feb 2017 22:32
by Martin
It seems that the new option to change the data channel to P should work however some servers require a configuration so that the control channel and the data channel don't have to use the same SSL/TSL session. Reusing the same session is not supported by the FTP library in use and it seems that it will not be supported in the near future. The option required to turn session reuse requirement off on the server is named require_ssl_reuse=NO for vsftpd respectively NoSessionReuseRequired for ProFTP. I assume that other servers have similar options.
Regards,
Martin
Re: FTP over SSL file list
Posted: 27 Feb 2017 01:34
by fagci
Got it. Thank you, Martin!