Eugeny / tabby

A terminal for a more modern age
https://tabby.sh
MIT License
59.83k stars 3.41k forks source link

Telnet not connecting as should #4164

Closed eugenov closed 3 years ago

eugenov commented 3 years ago

Version: 1.0.145 Platform: win32 10.0.19043 Plugins: save-output

Hello! After connecting with telnet profile i see some garbage symbols, but Tabby says session is connected.

 Telnet  Connecting to [host]
 Telnet  Connected
���� ��#��'��$
> 

Tried various telnet i/o options - no luck.

Eugeny commented 3 years ago

This looks like the actual output from the host. What kind of protocol are you expecting? You can also enable hexdump mode to see exactly what's being received

eugenov commented 3 years ago

This is output of telnet session from linux host:

[root@host-01 ~]# telnet [someIP]
Trying [someIP]...
Connected to [someIP].
Escape character is '^]'.
Login:

And this is from tabby, telnet profile

 Telnet  Connecting to [someIP]
 Telnet  Connected

  ���� ��#��'��$
>
eugenov commented 3 years ago

After 147alpha, i see

 Telnet  Connecting to [someIP]
 Telnet  Connected

> 

no garbage symbols, but still no real connection

Eugeny commented 3 years ago

Thanks for testing. Could you please post the Devtools console log, or even better, a Wireshark dump of the session?

eugenov commented 3 years ago

Devtools console output

entry.ts:56 Window bootstrap data: Object
plugins.ts:131 Found community-color-schemes in C:\apps\tabby\resources\builtin-plugins
plugins.ts:131 Found core in C:\apps\tabby\resources\builtin-plugins
plugins.ts:131 Found electron in C:\apps\tabby\resources\builtin-plugins
plugins.ts:131 Found local in C:\apps\tabby\resources\builtin-plugins
plugins.ts:131 Found plugin-manager in C:\apps\tabby\resources\builtin-plugins
plugins.ts:131 Found serial in C:\apps\tabby\resources\builtin-plugins
plugins.ts:131 Found settings in C:\apps\tabby\resources\builtin-plugins
plugins.ts:131 Found ssh in C:\apps\tabby\resources\builtin-plugins
plugins.ts:131 Found telnet in C:\apps\tabby\resources\builtin-plugins
plugins.ts:131 Found terminal in C:\apps\tabby\resources\builtin-plugins
2plugins.ts:131 Found save-output in C:\apps\tabby\data\plugins\node_modules
plugins.ts:139 Plugin terminus-save-output already exists, skipping
entry.ts:67 Starting with plugins: Array(11)
plugins.ts:177 Loading terminal: C:\apps\tabby\resources\builtin-plugins\tabby-terminal\dist\index.js
plugins.ts:177 Loading telnet: C:\apps\tabby\resources\builtin-plugins\tabby-telnet\dist\index.js
plugins.ts:177 Loading ssh: C:\apps\tabby\resources\builtin-plugins\tabby-ssh\dist\index.js
plugins.ts:177 Loading settings: C:\apps\tabby\resources\builtin-plugins\tabby-settings\dist\index.js
plugins.ts:177 Loading serial: C:\apps\tabby\resources\builtin-plugins\tabby-serial\dist\index.js
plugins.ts:177 Loading plugin-manager: C:\apps\tabby\resources\builtin-plugins\tabby-plugin-manager\dist\index.js
plugins.ts:177 Loading local: C:\apps\tabby\resources\builtin-plugins\tabby-local\dist\index.js
plugins.ts:177 Loading electron: C:\apps\tabby\resources\builtin-plugins\tabby-electron\dist\index.js
plugins.ts:177 Loading core: C:\apps\tabby\resources\builtin-plugins\tabby-core\dist\index.js
plugins.ts:177 Loading community-color-schemes: C:\apps\tabby\resources\builtin-plugins\tabby-community-color-schemes\dist\index.js
plugins.ts:177 Loading save-output: C:\apps\tabby\data\plugins\node_modules\tabby-save-output\dist\index.js
C:\apps\tabby\resources\builtin-plugins\tabby-core\dist\index.js:17808 [main] v 1.0.147
C:\apps\tabby\resources\builtin-plugins\tabby-core\dist\index.js:17808 [updater] Error: Can not find Squirrel
    at AutoUpdater.method [as checkForUpdates] (electron/js2c/browser_init.js:17:1405)
    at handler (C:\apps\tabby\resources\app.asar\dist\webpack:\tabby\node_modules\@electron\remote\dist\src\main\server.js:454:64)
    at IpcMainImpl.<anonymous> (C:\apps\tabby\resources\app.asar\dist\webpack:\tabby\node_modules\@electron\remote\dist\src\main\server.js:313:27)
    at IpcMainImpl.emit (events.js:315:20)
    at IpcMainImpl.EventEmitter.emit (domain.js:467:12)
    at Object.<anonymous> (electron/js2c/browser_init.js:161:10099)
    at Object.emit (events.js:315:20)
    at Object.apply [as emit] (domain.js:467:12)
    at Object.n.emit (C:\apps\tabby\resources\app.asar\dist\webpack:\tabby\node_modules\@sentry\electron\dist\main\integrations\electron.js:63:25)
doLog @ C:\apps\tabby\resources\builtin-plugins\tabby-core\dist\index.js:17808
C:\apps\tabby\resources\builtin-plugins\tabby-core\dist\index.js:17808 [hostApp] CLI arguments received: Object
5DevTools failed to load source map: Could not parse content for file:///C:/apps/tabby/app.asar.unpacked/assets/webpack/index.js.map: Unexpected end of JSON input
DevTools failed to load source map: Could not parse content for file:///C:/apps/tabby/resources/app.asar/dist/index.js.map: Unexpected end of JSON input
5DevTools failed to load source map: Could not parse content for file:///C:/apps/tabby/app.asar.unpacked/assets/webpack/index.js.map: Unexpected end of JSON input
DevTools failed to load source map: Could not parse content for file:///C:/apps/tabby/resources/app.asar/dist/index.js.map: Unexpected end of JSON input
index.html:1 Autofocus processing was blocked because a document already has a focused element.
C:\apps\tabby\resources\builtin-plugins\tabby-core\dist\index.js:17808 [telnet-10.1.154.254-23] Connecting to 10.1.154.254
C:\apps\tabby\resources\builtin-plugins\tabby-core\dist\index.js:17808 [telnet-10.1.154.254-23] Connected
Eugeny commented 3 years ago

Thanks. Could you please also make a Wireshark dump of the connection?

eugenov commented 3 years ago

Heh, could someone accept that telnet works fine? Then I will dig this issue inside my system. Wireshark logs are on the way...

eugenov commented 3 years ago

Ehm, maybe you could hint me what I have to sniff exactly with Wireshark? I have no experience with it at all... There is large output, I can't understand what to send here.

Eugeny commented 3 years ago

Select all interfaces for capture and then use a filter like "tcp.port == 23" (or your telnet port).

On Fri, 23 Jul 2021, 22:20 eugenov, @.***> wrote:

Ehm, maybe you could hint me what I have to sniff exactly with Wireshark? I have no experience with it at all...

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/Eugeny/tabby/issues/4164#issuecomment-885893328, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABHNRDXPXNGR6MQTHIFNFTTZHFIRANCNFSM5AAE5TGA .

eugenov commented 3 years ago

Is that the data that you did require? I also have pcapng binary result, if you need it...

Eugeny commented 3 years ago

This doesn't include the actual data unfortunately. Use "File > Save as" to save a full capture.

eugenov commented 3 years ago

telnet.pcapng.txt

Eugeny commented 3 years ago

Could you please test this nightly build? https://github.com/Eugeny/tabby/actions/runs/1133406367

GitHub
telnet: added potentially missing WILL responses · Eugeny/tabby@3584af5
A terminal for a more modern age (formerly Terminus) - telnet: added potentially missing WILL responses · Eugeny/tabby@3584af5
eugenov commented 3 years ago

I'm sorry, everything is the same:

 Telnet  Connecting to 10.1.154.254
 Telnet  Connected

>

while from linux host:

# telnet 10.1.154.254
Trying 10.1.154.254...
Connected to 10.1.154.254.
Escape character is '^]'.
Login:
Eugeny commented 3 years ago

Thanks, could you please also post me a new packet capture? If you could also capture one from the linux client, that would be perfect.

eugenov commented 3 years ago

wireshark_telnet_v2.zip Sorry for delay, fresh capture in attachment.

Eugeny commented 3 years ago

Thanks - please test this build when you have time: https://github.com/Eugeny/tabby/actions/runs/1243407347

GitHub
don't copy text if empty · Eugeny/tabby@8d3f413
A terminal for a more modern age (formerly Terminus) - don't copy text if empty · Eugeny/tabby@8d3f413
eugenov commented 3 years ago

Bingo! Now i see

  Telnet  Connecting to 10.1.154.254
 Telnet  Connected
Login: 
> 

This is something. I can login, insert password and such. Just need to get rid of this new line and ">" symbol, as it breaks input in number of cases.

Eugeny commented 3 years ago

Great! You can disable it by setting the Input mode to "normal" in the profile settings: image

eugenov commented 3 years ago

Yes, telnet now works perfectly! Thank you!