fargroup / far-netbox Goto Github PK
View Code? Open in Web Editor NEWThis project forked from michaellukashov/far-netbox
SFTP/SCP/FTP/FTPS/WebDAV client for Far Manager (http://farmanager.com/)
License: GNU General Public License v2.0
This project forked from michaellukashov/far-netbox
SFTP/SCP/FTP/FTPS/WebDAV client for Far Manager (http://farmanager.com/)
License: GNU General Public License v2.0
NetBox (latest release from here) can't connect to Ubuntu on OracleCloud using private key certificate (converted by PuTTY).
It's starts connecting, something like "Authorizing" quickly blinks on message dialog and plugin falls back to the session menu.
Standard Windows sftp program and WinSCP are working fine so it's a 100% NetBox plugin bug.
Could you please fix?
P.S. If you need a log or some additional information, please describe how to get it. BTW, it looks like not specific issue but outdated code base.
Far 3.0.0.5454 x64
NetBox Version 2.4.5 build 538
OS Windows 7 x64 and Windows 10 x64
When I try connect to webdav.yandex.ru
no any error or any other messages are shown.
The connection is not established.
Connection log with debug level 2:
. 2021-10-04 14:50:41.305 --------------------------------------------------------------------------
. 2021-10-04 14:50:41.305 NetBox Version 2.4.5 (Build 538) (OS 6.1.7601 Service Pack 1 - Windows 7 Enterprise)
. 2021-10-04 14:50:41.307 Configuration: NetBox 3\
. 2021-10-04 14:50:41.308 Working directory: C:\Program Files\Far3\Plugins
. 2021-10-04 14:50:41.308 Process ID: 11984
. 2021-10-04 14:50:41.308 Time zone: Current: GMT (Кавказское время (зима)), No DST
. 2021-10-04 14:50:41.308 --------------------------------------------------------------------------
. 2021-10-04 14:50:41.308 Transfer Protocol: WebDAV
. 2021-10-04 14:50:41.308 Code Page: 65001
. 2021-10-04 14:50:41.308 Proxy: None
. 2021-10-04 14:50:41.308 HTTPS: Yes [Client certificate: No]
. 2021-10-04 14:50:41.308 TLS/SSL versions: TLSv1.0-TLSv1.2
. 2021-10-04 14:50:41.308 Local directory: default, Remote directory: /, Update: Yes, Cache: No
. 2021-10-04 14:50:41.308 Cache directory changes: No, Permanent: No
. 2021-10-04 14:50:41.308 Recycle bin: Delete to: No, Overwritten to: No, Bin path:
. 2021-10-04 14:50:41.308 DST mode: Unix
. 2021-10-04 14:50:41.308 Compression: No
. 2021-10-04 14:50:41.308 --------------------------------------------------------------------------
. 2021-10-04 14:50:41.308 Warning: SSPI initialization failed.
. 2021-10-04 14:50:41.309 ah_create, for WWW-Authenticate
. 2021-10-04 14:50:41.309 Running pre_send hooks
. 2021-10-04 14:50:41.309 Sending request headers:
. 2021-10-04 14:50:41.309 OPTIONS / HTTP/1.1
. 2021-10-04 14:50:41.309 User-Agent: NetBox/2.4.5 neon/0.30.2
. 2021-10-04 14:50:41.309 Keep-Alive:
. 2021-10-04 14:50:41.309 Connection: TE, Keep-Alive
. 2021-10-04 14:50:41.309 TE: trailers
. 2021-10-04 14:50:41.309 Host: webdav.yandex.ru
. 2021-10-04 14:50:41.309 Sending request-line and headers:
. 2021-10-04 14:50:41.309 Doing DNS lookup on webdav.yandex.ru...
. 2021-10-04 14:50:41.334 req: Connecting to 213.180.204.148:443
. 2021-10-04 14:50:41.355 Doing SSL negotiation.
. 2021-10-04 14:50:41.379 ssl: Verify callback @ 2 => 20
. 2021-10-04 14:50:41.379 ssl: Verify failures |= 8 => 8
. 2021-10-04 14:50:41.401 Verifying certificate for "Yandex LLC, ITO, Moscow, RU" with fingerprint 00:4d:53:30:cc:6d:31:3c:51:3d:3a:2d:90:9a:4c:b7:1c:d4:bc:de and 08 failures
. 2021-10-04 14:50:41.570 Certificate verified against Windows certificate store
. 2021-10-04 14:50:41.570 sess: Destroying session.
. 2021-10-04 14:50:41.570 sess: Closing connection.
. 2021-10-04 14:50:41.570 sess: Connection closed.
* 2021-10-04 14:50:41.572
* 2021-10-04 14:50:41.572 Connection failed.
While copying files, window move/resize leads to broken interface all time file coping...
Reproduce steps:
NetBox 2.4.5 with TLS/SSL Explicit encryption failed to connect:
. 2022-07-22 22:55:03.839 --------------------------------------------------------------------------
. 2022-07-22 22:55:03.840 NetBox Version 2.4.5 (Build 544) (OS 6.1.7601 Service Pack 1 - Windows 7 Professional)
. 2022-07-22 22:55:03.841 Configuration: NetBox 3\
. 2022-07-22 22:55:03.841 Working directory: C:\
. 2022-07-22 22:55:03.842 Process ID: 6640
. 2022-07-22 22:55:03.842 Time zone: Current: GMT (Standard Time), No DST
. 2022-07-22 22:55:03.842 --------------------------------------------------------------------------
. 2022-07-22 22:55:03.842 Transfer Protocol: FTP
. 2022-07-22 22:55:03.842 Code Page: 65001
. 2022-07-22 22:55:03.842 Ping type: Dummy, Ping interval: 30 sec; Timeout: 15 sec
. 2022-07-22 22:55:03.842 Disable Nagle: Yes
. 2022-07-22 22:55:03.842 Proxy: None
. 2022-07-22 22:55:03.842 Send buffer: 262144
. 2022-07-22 22:55:03.842 UTF: Off
. 2022-07-22 22:55:03.842 FTPS: Explicit SSL/TLS [Client certificate: No]
. 2022-07-22 22:55:03.842 FTP: Passive: Yes [Force IP: Auto]; MLSD: Auto [List all: Auto]; HOST: Auto
. 2022-07-22 22:55:03.842 Session reuse: Yes
. 2022-07-22 22:55:03.842 TLS/SSL versions: TLSv1.0-TLSv1.2
. 2022-07-22 22:55:03.842 Local directory: default, Remote directory: home, Update: Yes, Cache: No
. 2022-07-22 22:55:03.842 Cache directory changes: No, Permanent: No
. 2022-07-22 22:55:03.842 Recycle bin: Delete to: No, Overwritten to: No, Bin path:
. 2022-07-22 22:55:03.842 Timezone offset: 0h 0m
. 2022-07-22 22:55:03.842 --------------------------------------------------------------------------
. 2022-07-22 22:55:03.842 Username prompt (no username provided)
. 2022-07-22 22:55:04.861 Connecting to pureftpd.example.org ...
. 2022-07-22 22:55:04.867 TLS layer changed state from unconnected to connecting
. 2022-07-22 22:55:07.087 TLS layer changed state from connecting to connected
. 2022-07-22 22:55:07.137 Connected with pureftpd.example.org, negotiating TLS connection...
< 2022-07-22 22:55:07.137 220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
< 2022-07-22 22:55:07.137 220-You are user number 1 of 100 allowed.
< 2022-07-22 22:55:07.137 220-Local time is now 22:55. Server port: 21.
< 2022-07-22 22:55:07.137 220-This is a private system - No anonymous login
< 2022-07-22 22:55:07.137 220 You will be disconnected after 15 minutes of inactivity.
> 2022-07-22 22:55:07.137 AUTH SSL
< 2022-07-22 22:55:07.137 500 This security scheme is not implemented
. 2022-07-22 22:55:07.137 Got reply 1004 to the command 1
* 2022-07-22 22:55:07.139
* 2022-07-22 22:55:07.139
* 2022-07-22 22:55:07.139 This security scheme is not implemented
WinSCP 5.21 connects fine to the same server, using AUTH TLS:
. 2022-07-22 23:22:58.235 --------------------------------------------------------------------------
. 2022-07-22 23:22:58.235 WinSCP Version 5.21.1 (Build 12643 2022-06-24) (OS 6.1.7601 Service Pack 1 - Windows 7 Professional)
. 2022-07-22 23:22:58.236 Configuration: C:\Programs\WinSCP 5.21\WinSCP.ini
. 2022-07-22 23:22:58.236 Log level: Debug 2
. 2022-07-22 23:22:58.236 Local account: Comp\Login
. 2022-07-22 23:22:58.236 Working directory: C:\Programs\WinSCP 5.21
. 2022-07-22 23:22:58.236 Process ID: 2348
. 2022-07-22 23:22:58.238 Ancestor processes: ...
. 2022-07-22 23:22:58.239 Command-line: "C:\Programs\WinSCP 5.21\WinSCP.exe"
. 2022-07-22 23:22:58.239 Time zone: Current: GMT+ (Standard Time), No DST
. 2022-07-22 23:22:58.239 Login time: 22 Июль 2022 г. 23:22:58
. 2022-07-22 23:22:58.239 --------------------------------------------------------------------------
. 2022-07-22 23:22:58.239 Session name: pureftpd.example.org (Ad-Hoc site)
. 2022-07-22 23:22:58.239 Host name: pureftpd.example.org (Port: 21)
. 2022-07-22 23:22:58.239 User name: (Password: No, Key file: No, Passphrase: No)
. 2022-07-22 23:22:58.239 Transfer Protocol: FTP
. 2022-07-22 23:22:58.239 Ping type: Dummy, Ping interval: 30 sec; Timeout: 15 sec
. 2022-07-22 23:22:58.239 Disable Nagle: No
. 2022-07-22 23:22:58.239 Proxy: None
. 2022-07-22 23:22:58.239 Send buffer: 262144
. 2022-07-22 23:22:58.239 UTF: Auto
. 2022-07-22 23:22:58.239 FTPS: Explicit TLS/SSL [Client certificate: No]
. 2022-07-22 23:22:58.239 FTP: Passive: Yes [Force IP: Auto]; MLSD: Auto [List all: Auto]; HOST: Auto
. 2022-07-22 23:22:58.239 Session reuse: Yes
. 2022-07-22 23:22:58.239 TLS/SSL versions: TLSv1.0-TLSv1.3
. 2022-07-22 23:22:58.239 Local directory: default, Remote directory: home, Update: Yes, Cache: Yes
. 2022-07-22 23:22:58.239 Cache directory changes: Yes, Permanent: Yes
. 2022-07-22 23:22:58.239 Recycle bin: Delete to: No, Overwritten to: No, Bin path:
. 2022-07-22 23:22:58.239 Timezone offset: 0h 0m
. 2022-07-22 23:22:58.239 --------------------------------------------------------------------------
. 2022-07-22 23:22:58.250 Username prompt (no username provided)
. 2022-07-22 23:23:01.605 Session upkeep
. 2022-07-22 23:23:01.616 Connecting to pureftpd.example.org ...
. 2022-07-22 23:23:01.616 Connected
. 2022-07-22 23:23:01.616 TLS layer changed state from unconnected to connecting
. 2022-07-22 23:23:01.619 TLS layer changed state from connecting to connected
. 2022-07-22 23:23:01.619 Connected with pureftpd.example.org, negotiating TLS connection...
. 2022-07-22 23:23:01.621 Read 266 bytes
< 2022-07-22 23:23:01.621 220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
< 2022-07-22 23:23:01.621 220-You are user number 1 of 100 allowed.
< 2022-07-22 23:23:01.621 220-Local time is now 23:23. Server port: 21.
< 2022-07-22 23:23:01.621 220-This is a private system - No anonymous login
< 2022-07-22 23:23:01.621 220 You will be disconnected after 15 minutes of inactivity.
> 2022-07-22 23:23:01.621 AUTH TLS
. 2022-07-22 23:23:01.622 Read 18 bytes
< 2022-07-22 23:23:01.622 234 AUTH TLS OK.
. 2022-07-22 23:23:01.623 No data to read
. 2022-07-22 23:23:01.625 TLS connect: SSLv3/TLS write client hello
. 2022-07-22 23:23:01.639 TLS connect: SSLv3/TLS read server hello
. 2022-07-22 23:23:01.643 TLS connect: SSLv3/TLS read server certificate
. 2022-07-22 23:23:01.644 TLS connect: SSLv3/TLS read server key exchange
. 2022-07-22 23:23:01.644 TLS connect: SSLv3/TLS read server done
. 2022-07-22 23:23:01.652 TLS connect: SSLv3/TLS write client key exchange
. 2022-07-22 23:23:01.652 TLS connect: SSLv3/TLS write change cipher spec
. 2022-07-22 23:23:01.652 TLS connect: SSLv3/TLS write finished
. 2022-07-22 23:23:01.653 TLS connect: SSLv3/TLS write finished
. 2022-07-22 23:23:01.653 TLS connect: SSLv3/TLS read server session ticket
. 2022-07-22 23:23:01.653 TLS connect: SSLv3/TLS read change cipher spec
. 2022-07-22 23:23:01.653 TLS connect: SSLv3/TLS read finished
. 2022-07-22 23:23:01.653 Verifying certificate for "" with fingerprint *************** and 20 failures
. 2022-07-22 23:23:01.653 Certificate common name "pureftpd.example.org" matches hostname
. 2022-07-22 23:23:01.705 Certificate verified against Windows certificate store
. 2022-07-22 23:23:01.705 Using TLSv1.2, cipher TLSv1.2: ECDHE-RSA-AES256-GCM-SHA384, 2048 bit RSA, ECDHE-RSA-AES256-GCM-SHA384 TLSv1.2 Kx=ECDH Au=RSA Enc=AESGCM(256) Mac=AEAD
. 2022-07-22 23:23:01.718 TLS connection established. Waiting for welcome message...
Could you please add PPK v3 support?
Now I get the error "Unable to load key (PuTTY key format too new).
Please add support for ed25519 keys. Both PuTTY and WinSCP have built-in support for ed25519 keys for quite a while now and NetBox heeds to catch up. ed25519 is replacing RSA and ECDSA in more and more places and a lack of support from NetBox becomes a real inconvenience.
NetBox appears to trim trailing spaces on FTP listings (and in other places).
While at least CFtpListResult::parseAsMlsd()
honours RFC 3659 and says it does not trim, that function is fed data from CFtpListResult::GetLine()
, that explicitly removes tailing spaces and tabs.
This leads to an invalid directory listing that can't be used for further operations.
Assuming one knows the correct name of a directory, punching in CD "test "
in the command line can work around this.
Behaviour reproduced at least with pure-ftpd (over MLSD) and vsftpd (on whatever it emits for LIST) and I imagine it should be similar with any backing filesystem and FTP server allowing trailing spaces in filenames.
While I agree that this is bad practice, more so with a badly defined protocol, this is compatibility problem first.
From the log for MLSD:
. 2020-09-15 19:18:03.395 type=dir;sizd=2;modify=20200915124101;UNIX.mode=0755;UNIX.uid=1001;UNIX.gid=1001;unique=39g45c4e1; test
. 2020-09-15 19:18:03.396 test;D;0;2020-09-15T12:41:01.000Z;3;"1001" [0];"1001" [0];rwxr-xr-x;0
NetBox/WebDav sometimes treats valid certificates as invalid due to what seems to be some rounding error in datetime conversions.
Example of a valid certificate rejected by NetBox: myfiles.fastmail.com
According to https://www.ssllabs.com, at the time of writing the certificate is valid until Thu, 02 Nov 2023 23:59:59.
The issue seems to be related to the fact that the certificate expires one second before the midnight.
I briefly debugged the issue and discovered that DateTimeToTimeStamp returns invalid Result.Time (86400000) when it converts this timestamp. This value is incorrect because it is exactly the number of milliseconds in a day so the valid range of values in this field is 0-86399999. Later on this incorrect value causes error in some other function (forgot to write down which one).
Below are few details.
TWebDAVFileSystem::DoNeonServerSSLCallback gets the certificate valid till 02 Nov 2023 23:59:59.
ValidUntil = 1698998399
It converts it to TDateTime format:
Data.ValidUntil.FValue = 45232.99998842592322
Sysutils::DateTimeToTimeStamp gets called for this value. It calculates fractpart as:
fractpart = 0.99998842592322034761
Later on Result.Time gets calculated as ToInt(fractpart * MSecsPerDay + 0.5):
Result.Time = 86400000
Relevant callstack:
00 0000003c8eafc370 00007ffd
7ccc22d9 NetBox!Sysutils::DateTimeToTimeStamp+0x41 [D:\a\Far-NetBox\Far-NetBox\src\base\Sysutils.cpp @ 499]
01 0000003c8eafc3a0 00007ffd
7ccc229f NetBox!Sysutils::DecodeDateFully+0x2d [D:\a\Far-NetBox\Far-NetBox\src\base\Sysutils.cpp @ 1269]
02 0000003c8eafc3f0 00007ffd
7ccdf542 NetBox!Sysutils::DecodeDate+0x13 [D:\a\Far-NetBox\Far-NetBox\src\base\Sysutils.cpp @ 1328]
03 0000003c8eafc440 00007ffd
7cd32354 NetBox!Sysutils::FormatDateTime+0x4a [D:\a\Far-NetBox\Far-NetBox\src\base\Sysutils.cpp @ 1452]
04 0000003c8eafc530 00007ffd
7cccf4e3 NetBox!TWebDAVFileSystem::VerifyCertificate+0x2cc [D:\a\Far-NetBox\Far-NetBox\src\core\WebDAVFileSystem.cpp @ 2536]
05 0000003c8eafc6e0 00007ffd
7ceaecd3 NetBox!TWebDAVFileSystem::DoNeonServerSSLCallback+0x1fb [D:\a\Far-NetBox\Far-NetBox\src\core\WebDAVFileSystem.cpp @ 2651]
File saved from the editor has a timestamp NOW - 1 hour
when daylight saving time is used on the client.
I use SCP file protocol and "Upload after every save" flag if it makes any difference.
I'm trying to get interactive bash on scp. I've set Shell: "/bin/bash -i" in connection properties and getting this while executing ls:
root@host:/home/ubuntu#
ls ; echo "NetBox: this is end-of-file:$
...list of files...
Windows 10 Version 1607 build 14393
Far30b5885.x64.20210901.7z
When i connect by SFTP protocol to remote host, which not online at this moment, i always get "Confirmation" dialog with "Abort" timer, which auto-reconnect after 60 seconds.
Now auto-reconnect not work, and "Abort" timer always freeze on (60 s) position:
╔═ Confirmation
║ **Host is not communicating for more than 15 seconds.
║ Still waiting...**
║
║ Note: If the problem repeats, try turning off 'Optimize
║ connection buffer size'.
║
║ Abort (60 s)
╚═
FAR version: 3.0.5800 x64
NetBox plugin version: 2.4.5 build 534
Ping to ftp server - 5ms
File size: 390 files, total size 63479755 bytes
Download time via ftp protocol: 51 sec
For comparison, the time of downloading the same files from the same server using:
OpenSSH disables RSA-SHA1 signatures by default since version 8.8, which prevents NetBox from connecting to these servers. Would it be possible to add support for RSA-SHA256?
3.0
10
FTP server will be useful on the same or different machine
Create new FTP or edit existing FTP connection in NetBox. Set FTP (not SFTP!) port to any value except 21 (for example, 443). Close the dialog and open it again. See, that port reversed to default value 21. Actually internally it looks like the new port number is set correctly (for the session, at least) and it's possible to connect with the new port number. But FTP dialog still shows wrong default 21 port number.
Preserved NetBox FTP connection session should save the new defined port (like 443, for example).
FTP dialog shows 21 port number for FTP connection but (for at least in the current session) uses the new port defined by the user.
copy-paste from michaellukashov#318
Reproducible at any time:
Exception: 0xC0000005 - EXCEPTION_ACCESS_VIOLATION
Details: Memory at 0xFFFFFFFFFFFFFFFF ! (get the pdb) could not be read
errno: 0x00000000 - No error
LastError: 0x00000000 - Operace byla dokončena úspěšně.
NTSTATUS: 0xC0000100 - Znamená, že zadaná proměnná prostředí nebyla nalezena v zadaném bloku prostředí.
Address: 0x00027ABF - NetBox.dll!tinylog::TinyLog::operator delete[]
Function: ProcessPanelInputW
Source:
File: C:\Program Files\Far\Plugins\NetBox\NetBox.dll
Plugin: NetBox 2.4.535.5 (SFTP/FTP(S)/SCP/WebDAV client for FAR 3.0 x86/x64, Michael Lukashov)
Far: 3.0.5883.0 x64 (2d720a0)
OS: 10.0.19042.2.0.0.256.1 (version 20H2, OS build 19042.1110)
Kernel: 10.0.19041.1110 (WinBuild.160101.0800)
Hello! Is there a chance to implement windows' openssh integration? Main idea - to let netbox read ~/.ssh/config to use its host-specific rules, such as ProxyJump, hosts, defined keys etc.
How I see this integration:
Some strings are too short, last character is ommitted in some dialogs.
This may be related to the use of abbreviations (&).
For example - config, integration:
Language file (lines: 579+, in English):
"&Putty path"
"&Remember session password and pass it to PuTTY"
"Page&ant path"
"PuTTY&gen path"
"Open &Telnet sessions in PuTTY for FTP sessions"
Планирую последний пул реквест, который добавляет новый режим просмотра сессий.
Что будет сделано:
Что можно будет сделать в дальнейшем:
Если пул реквест с такими изменениями будет принят, я его сформирую.
Если есть какие то замечания или предложения, напишите здесь.
Far Manager version: Far30b5959.x64.20220202.7z
OS version: Microsoft Windows [Version 10.0.19044.1415]
Steps to reproduce:
left panel: local files
right panel: SFTP remote files
copy files from left panel to right panel
F11 > Advanced compare > Compare: > [x] time + [x] two seconds precision
Expected behavior: No selected files (because files timestamps match)
Actual behavior: All files selected
Far v3.0.6060.0 x64 (a834cf2) with NetBox 2.4.545.5. Crashed when I tried to change directory permissions on the remote Linux machine to "r-- r-- r--" (444) via "Ctrl + A".
"bug_report.txt" and "far.mdmp": Far_20230411_144237973_11828_crash_info.zip.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.