forked from KermitProject/ckermit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ckuus2.c
14919 lines (14099 loc) · 551 KB
/
ckuus2.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/* C K U U S 2 -- User interface strings & help text module for C-Kermit */
/*
Authors:
Frank da Cruz <fdc@columbia.edu>,
The Kermit Project, New York City
Jeffrey E Altman <jaltman@secure-endpoints.com>
Secure Endpoints Inc., New York City
David Goodwin, New Zealand.
Copyright (C) 1985, 2022,
Trustees of Columbia University in the City of New York.
All rights reserved. See the C-Kermit COPYING.TXT file or the
copyright text in the ckcmai.c module for disclaimer and permissions.
Last updates: 22 Aug 2022 (HELP TYPE adds /INTERPRET switch).
20 Sep 2022 (HELP COPY adds /INTERPRET, /TOSCREEN switches).
This module contains HELP command and other long text strings.
IMPORTANT: Character string constants longer than about 250 are not portable.
Longer strings should be broken up into arrays of strings and accessed with
hmsga() rather than hmsg(). (This statement was true in the 1980s and
probably is not a big concern in the 21st Century, but you never know;
there still might exist some 16-bit platforms and C compilers that have
restrictions like this.
*/
#include "ckcsym.h"
#include "ckcdeb.h"
#include "ckcnet.h"
#include "ckcasc.h"
#include "ckcker.h"
#include "ckuusr.h"
#include "ckcxla.h"
#ifdef OS2
#ifdef NT
#include <windows.h>
#else /* not NT */
#define INCL_KBD
#ifdef OS2MOUSE
#define INCL_MOU
#endif /* OS2MOUSE */
#define INCL_DOSMISC
#define INCL_DOSDEVICES
#include <os2.h> /* This pulls in a whole load of stuff */
#undef COMMENT
#endif /* NT */
#include "ckocon.h"
#include "ckokvb.h"
#include "ckokey.h"
#endif /* OS2 */
extern char * ck_cryear; /* For copyright notice */
extern xx_strp xxstring;
extern char * ccntab[];
/*
hlptok contains the string for which the user requested help. This is
useful for distinguishing synonyms, in case different help text is needed
depending on which synonym was given.
*/
extern char * hlptok;
#ifndef NOIKSD
extern int inserver;
#endif /* IKSD */
#ifndef NOICP
extern int cmflgs;
#ifdef DCMDBUF
extern char *cmdbuf, *atmbuf;
#else
extern char cmdbuf[], atmbuf[];
#endif /* DCMDBUF */
#endif /* NOICP */
extern char *xarg0;
extern int nrmt, nprm, dfloc, local, parity, escape;
extern int turn, flow;
extern int binary, quiet, keep;
extern int success, xaskmore;
#ifdef OS2
extern int tt_rows[], tt_cols[];
#else /* OS2 */
extern int tt_rows, tt_cols;
#endif /* OS2 */
extern int cmd_rows, cmd_cols;
extern long speed;
extern char *dftty, *versio, *ckxsys;
#ifndef NOHELP
extern char *helpfile;
#endif /* NOHELP */
extern struct keytab prmtab[];
#ifndef NOXFER
extern struct keytab remcmd[];
#endif /* NOXFER */
#ifndef NOICP
/* Interactive help strings */
/* Top-level HELP text. IMPORTANT: Also see tophlpi[] for IKSD. */
static char *tophlp[] = {
"Trustees of Columbia University in the City of New York.\n",
#ifndef NOHELP
" Type EXIT to exit.",
#ifdef OS2
" Type INTRO for a brief introduction to the C-Kermit Command screen.",
#else
" Type INTRO for a brief introduction to C-Kermit.",
#endif /* OS2 */
" Type LICENSE to see the C-Kermit license.",
" Type HELP followed by a command name for help about a specific command.",
#ifndef NOPUSH
#ifdef UNIX
" Type MANUAL to access the C-Kermit manual page.",
#else
#ifdef VMS
" Type MANUAL to access the C-Kermit help topic.",
#else
" Type MANUAL to access the C-Kermit manual.",
#endif /* VMS */
#endif /* UNIX */
#endif /* NOPUSH */
" Type NEWS for news about new features.",
" Type SUPPORT to learn how to get technical support.",
" Press ? (question mark) at the prompt, or anywhere within a command,",
" for a menu (context-sensitive help, menu on demand).",
#else
"Press ? for a list of commands; see documentation for detailed descriptions.",
#endif /* NOHELP */
#ifndef NOCMDL
#ifndef NOHELP
" ",
" Type HELP OPTIONS for help with command-line options.",
#endif /* NOHELP */
#endif /* NOCMDL */
" ",
#ifndef OS2
#ifdef MAC
"Documentation for Command Window: \"Using C-Kermit\" by Frank da Cruz and",
"Christine M. Gianone, Digital Press, 1997, ISBN: 1-55558-164-1",
#else
"DOCUMENTATION: \"Using C-Kermit\" by Frank da Cruz and Christine M. Gianone,",
"2nd Edition, Digital Press / Butterworth-Heinemann 1997, ISBN 1-55558-164-1,",
"plus supplements at http://www.kermitproject.org/ckermit.html#doc.",
#endif /* MAC */
#endif /* OS2 */
#ifdef MAC
" ",
"Also see the Mac Kermit Doc and Bwr files on the Mac Kermit diskette.\n",
#else
#ifdef HPUX10
" ",
"See the files in /usr/share/lib/kermit/ for additional information.",
#endif /* HPUX10 */
#endif /* MAC */
""
};
#ifndef NOIKSD
static char *tophlpi[] = { /* Top-level help for IKSD */
"Trustees of Columbia University in the City of New York.\n",
#ifndef NOHELP
" Type INTRO for a brief introduction to Kermit commands.",
" Type VERSION for version and copyright information.",
" Type HELP followed by a command name for help about a specific command.",
" Type SUPPORT to learn how to get technical support.",
" Type LOGOUT (or EXIT) to log out.",
" Press ? (question mark) at the prompt, or anywhere within a command,",
" for a menu (context-sensitive help, menu on demand).",
#else
"Press ? for a list of commands; see documentation for detailed descriptions.",
#endif /* NOHELP */
" ",
"DOCUMENTATION: \"Using C-Kermit\" by Frank da Cruz and Christine M. Gianone,",
"2nd Edition, Digital Press (1997), ISBN 1-55558-164-1. More info at the",
"Kermit Project website, http://www.kermitproject.org/.",
""
};
#endif /* NOIKSD */
#ifndef NOHELP
char *newstxt[] = {
#ifdef OS2
#ifdef NT
"Welcome to C-Kermit for Windows, the Open-Source successor to",
#else
"Welcome to C-Kermit for OS/2, the Open-Source successor to",
#endif
"Columbia University's Kermit 95 package.",
#ifdef BETATEST
" ",
"THIS IS A PRERELEASE TEST VERSION NOT YES SUITABLE FOR PRODUCTION USE.",
"FOR DETAILS, SEE http://www.kermitproject.org/ckw10beta.html",
#endif /* BETATEST */
" ",
"Major new features since the final Kermit 95 release include:",
" . Open Source Simplified 3-Clause BSD License",
#else
"Welcome to C-Kermit 10.0.",
"New features since version 9.0 of 2011 include:",
#endif /* OS2 */
#ifdef OS2
" . Source code! The Windows edition of C-Kermit, formerly known",
" as Kermit 95 or K-95, is now available under the Revised 3-Clause",
" BSD Open Source license.",
" . Up-to-date fully exportable SSH v2 client",
" . Mouse wheel support, customizable with SET MOUSE WHEEL",
" (see HELP SET MOUSE for details)",
#endif /* OS2 */
#ifndef OS2
#ifdef COMMENT
" . Full 64-bit memory model on platforms that support it",
" . Large file support (64-bit file size) on most platforms",
" . Long integer variables and constants in commands and scripts",
#endif /* COMMENT */
/* For 10.0 */
" . Updated for longevity... Adapted to 2020s compilers and OS's without",
" sacrificing compatability with older platforms going back to the 1970s",
" and 1980s; at least that's the intention.",
" . The first new C-Kermit release for Windows in 20 years.",
" . A simpler version number: 10.0.",
" . Updated OpenSSL support for built-in HTTP, FTP, and Telnet clients.",
" . New serial port speeds up to 4000000 bps.",
" . 'set speed ?' now lists serial speeds in numerical order.",
" . New functions and built-in variables for the scripting language.",
" . New ability of Kermit scripts to run in a Unix pipelines.",
" . New CHANGE command for changing strings in external text files.",
" . DIRECTORY command fixed to once again allow multiple filespecs.",
" . TOUCH command fixed after being broken in C-Kermit 9.0.",
" . Lots more; see https://kermitproject.org/updates.html",
#endif /* OS2 */
#ifdef COMMENT
/* These were for 9.0 */
" . Bigger maximum command and macro lengths",
" . Bigger filename expansion space",
" . New super-flexible RENAME command (HELP RENAME)",
" . New CHANGE command for changing text files (HELP CHANGE)",
" . New COPY and DIRECTORY command options (HELP COPY, HELP DIRECTORY)",
" . New TOUCH command (HELP TOUCH)",
#ifdef UNIX
" . Limited Unix Locale support (HELP SET LOCALE)",
#endif /* UNIX */
#ifdef CK_SSL
" . Raw SSL/TLS connections for connecting to POP3 and similar services",
#endif /* CK_SSL */
" . At the prompt, Ctrl-K recalls most recent filename",
" . Scripting and performance improvements",
#endif /* COMMENT */
" ",
"Documentation:",
" . https://www.kermitproject.org/ckbindex.html",
" Online index to C-Kermit documentation.",
#ifdef OS2
" . https://kermitproject.org/k95manual/index.html",
" The Kermit 95 manual from 1995-2003.",
#endif /* OS2 */
" . https://www.kermitproject.org/ckututor.html",
" C-Kermit tutorial.",
" ",
"If the release date shown by the VERSION command is long past, be sure to",
"check the Kermit website to see if there have been updates:",
" ",
" https://www.kermitproject.org/ (Kermit Project home page)",
" https://www.kermitproject.org/ckermit.html (C-Kermit home page)",
#ifdef BETATEST
" https://www.kermitproject.org/ckupdates.html (Beta test progress)",
" https://www.kermitproject.org/ck10devbuilds.html (Beta test builds table)",
#endif /* BETATEST */
" ",
"If the Kermit Project website is gone, look on Github:",
" ",
" https://github.com/KermitProject",
#ifdef OS2
" https://github.com/search?q=c-kermit+windows",
#endif /* OS2 */
""
};
#endif /* NOHELP */
#ifndef NOHELP
char *introtxt[] = {
#ifdef OS2
#ifdef NT
"Welcome to C-Kermit for Windows, communication software for:",
#else
"Welcome to C-Kermit for OS/2, communication software for:",
#endif
#else
#ifdef UNIX
"Welcome to UNIX C-Kermit communications software for:",
#else
#ifdef VMS
"Welcome to VMS C-Kermit communications software for:",
#else
#ifdef VOS
"Welcome to VOS C-Kermit communications software for:",
#else
#ifdef MAC
"Welcome to Mac Kermit communications software for:",
#else
"Welcome to C-Kermit communications software for:",
#endif /* MAC */
#endif /* VOS */
#endif /* VMS */
#endif /* UNIX */
#endif /* OS2 */
#ifndef NOXFER
" . Error-free and efficient file transfer",
#endif /* NOXFER */
#ifndef NOLOCAL
#ifdef OS2
" . VT320/220/102/100/52, ANSI, Wyse, Linux, Televideo, and other emulations",
#else
#ifdef MAC
" . VT220 terminal emulation",
#else
" . Terminal connection",
#endif /* MAC */
#endif /* OS2 */
#endif /* NOLOCAL */
#ifndef NOSPL
" . Script programming",
#endif /* NOSPL */
#ifndef NOICS
" . International character set conversion",
#endif /* NOICS */
#ifndef NODIAL
#ifndef NOSPL
" . Numeric and alphanumeric paging",
#endif /* NOSPL */
#endif /* NODIAL */
#ifndef NOLOCAL
" ",
"Supporting:",
" . Serial connections, direct or dialed.",
#ifndef NODIAL
" . Automatic modem dialing",
#endif /* NODIAL */
#ifdef TCPSOCKET
" . TCP/IP network connections:",
#ifdef TNCODE
" - Telnet sessions",
#endif /* TNCODE */
#ifdef SSHBUILTIN
" - SSH v1 and v2 connections",
#else
#ifdef ANYSSH
" - SSH connections via external agent",
#endif /* ANYSSH */
#endif /* SSHBUILTIN */
#ifdef RLOGCODE
" - Rlogin sessions",
#endif /* RLOGCODE */
#ifdef NEWFTP
" - FTP sessions",
#endif /* NEWFTP */
#ifdef CKHTTP
" - HTTP 1.1 sessions",
#endif /* CKHTTP */
#ifdef IKSD
" - Internet Kermit Service",
#endif /* IKSD */
#endif /* TCPSOCKET */
#ifdef ANYX25
" . X.25 network connections",
#endif /* ANYX25 */
#ifdef OS2
#ifdef DECNET
" . DECnet/PATHWORKS LAT Ethernet connections",
#endif /* DECNET */
#ifdef SUPERLAT
" . Meridian Technologies' SuperLAT connections",
#endif /* SUPERLAT */
#ifdef NPIPE
" . Named-pipe connections",
#endif /* NPIPE */
#ifdef CK_NETBIOS
" . NETBIOS connections",
#endif /* CK_NETBIOS */
#endif /* OS2 */
#endif /* NOLOCAL */
" ",
"While typing commands, you may use the following special characters:",
" . DEL, RUBOUT, BACKSPACE, CTRL-H: Delete the most recent character typed.",
" . CTRL-W: Delete the most recent word typed.",
" . CTRL-U: Delete the current line.",
" . CTRL-R: Redisplay the current line.",
#ifdef CK_RECALL
#ifdef OS2
" . Uparrow: Command recall - go backwards in command recall buffer.",
" . Downarrow: Command recall - go forward in command recall buffer.",
#ifndef NOIKSD
" (Note: Arrow keys can be used only on the PC's physical keyboard.)",
#endif /* NOIKSD */
#endif /* OS2 */
" . CTRL-P: Command recall - go backwards in command recall buffer.",
" . CTRL-B: Command recall - same as Ctrl-P.",
" . CTRL-N: Command recall - go forward in command recall buffer.",
#endif /* CK_RECALL */
#ifndef NOLASTFILE
" . CTRL-K: Insert the most recently entered local file specifiction.",
#endif /* NOLASTFILE */
" . ? (question mark) Display a menu for the current command field."
,
" . ESC (or TAB or Ctrl-I) Attempt to complete the current field.",
" . \\ (backslash) include the following character literally",
#ifndef NOSPL
" or introduce a backslash code, variable, or function.",
#else
" or introduce a numeric backslash code.",
#endif /* NOSPL */
" ",
"IMPORTANT: Since backslash (\\) is Kermit's command-line escape character,",
"you must enter DOS, Windows, or OS/2 pathnames using either forward slash (/)"
,
"or double backslash (\\\\) as the directory separator in most contexts.",
"Examples: C:/TMP/README.TXT, C:\\\\TMP\\\\README.TXT.",
" ",
"Command words other than filenames can be abbreviated in most contexts.",
" ",
"Basic commands:",
" EXIT Exit from Kermit",
" HELP Request general help",
" HELP command Request help about the given command",
" TAKE Execute commands from a file",
" TYPE Display a file on your screen",
" ORIENTATION Explains directory structure",
" ",
#ifndef NOXFER
"Commands for file transfer:",
" SEND Send files",
" RECEIVE Receive files",
" GET Get files from a Kermit server",
#ifdef CK_RESEND
" RESEND Recover an interrupted send",
" REGET Recover an interrupted get from a server",
#endif /* CK_RESEND */
#ifndef NOSERVER
" SERVER Be a Kermit server",
#endif /* NOSERVER */
" ",
"File-transfer speed selection:",
" FAST Use fast settings -- THIS IS THE DEFAULT",
" CAUTIOUS Use slower, more cautious settings",
" ROBUST Use extremely slow and cautious settings",
" ",
"File-transfer performance fine tuning:",
" SET RECEIVE PACKET-LENGTH Kermit packet size",
" SET WINDOW Number of sliding window slots",
" SET PREFIXING Amount of control-character prefixing",
#endif /* NOXFER */
#ifndef NOLOCAL
" ",
"To make a direct serial connection:",
#ifdef OS2
#ifdef NT
#ifdef CK_TAPI
" SET PORT TAPI Select TAPI communication device",
#endif /* CK_TAPI */
" SET PORT Select serial communication device",
#else
" SET PORT Select serial communication port or server",
#endif /* NT */
#else
" SET LINE Select serial communication device",
#endif /* OS2 */
" SET SPEED Select communication speed",
" SET PARITY Communications parity (if necessary)",
#ifdef CK_RTSCTS
" SET FLOW Communications flow control, such as RTS/CTS",
#else
" SET FLOW Communications flow control, such as XON/XOFF",
#endif /* CK_RTSCTS */
" CONNECT Begin terminal connection",
#ifndef NODIAL
" ",
"To dial out with a modem:",
" SET DIAL DIRECTORY Specify dialing directory file (optional)",
" SET DIAL COUNTRY-CODE Country you are dialing from (*)",
" SET DIAL AREA-CODE Area-code you are dialing from (*)",
" LOOKUP Lookup entries in your dialing directory (*)",
" SET MODEM TYPE Select modem type",
#ifdef OS2
#ifdef NT
#ifdef CK_TAPI
" SET PORT TAPI Select TAPI communication device",
#endif /* CK_TAPI */
" SET PORT Select serial communication device",
#else
" SET PORT Select serial communication port or server",
#endif /* NT */
#else
" SET LINE Select serial communication device",
#endif /* OS2 */
" SET SPEED Select communication speed",
" SET PARITY Communications parity (if necessary)",
" DIAL Dial the phone number",
" CONNECT Begin terminal connection",
" ",
#ifdef OS2
"Further info: HELP DIAL, HELP SET MODEM, HELP SET PORT, HELP SET DIAL",
#else
"Further info: HELP DIAL, HELP SET MODEM, HELP SET LINE, HELP SET DIAL",
#endif /* OS2 */
"(*) (For use with optional dialing directory)",
#endif /* NODIAL */
#ifdef NETCONN
" ",
"To make a network connection:",
#ifndef NODIAL
" SET NETWORK DIRECTORY Specify a network services directory (optional)",
" LOOKUP Lookup entries in your network directory",
#endif /* NODIAL */
" SET NETWORK TYPE Select network type (if more than one available)",
" SET HOST Make a network connection but stay in command mode",
" CONNECT Begin terminal connection",
#ifdef TNCODE
" TELNET Select a Telnet host and CONNECT to it",
#endif /* TNCODE */
#ifdef RLOGCODE
" RLOGIN Select an Rlogin host and CONNECT to it",
#endif /* RLOGCODE */
#ifdef ANYSSH
" SSH [ OPEN ] Select an SSH host and CONNECT to it",
#endif /* ANYSSH */
#ifdef NEWFTP
" FTP [ OPEN ] Make an FTP connection",
#endif /* NEWFTP */
#ifdef CKHTTP
" HTTP OPEN Make an HTTP connection",
#endif /* CKHTTP */
#endif /* NETCONN */
#ifdef NT
" ",
"To return from the terminal window to the C-Kermit> prompt:",
#else
#ifdef OS2
" ",
"To return from the terminal window to the C-Kermit> prompt:",
#else
" ",
"To return from a terminal connection to the C-Kermit prompt:",
#endif /* OS2 */
#endif /* NT */
#ifdef OS2
" \
Press the key or key-combination shown after \"Command:\" in the status line",
" (such as Alt-x) or type your escape character followed by the letter C.",
#else
" Type your escape character followed by the letter C.",
#endif /* OS2 */
" ",
"To display your escape character:",
" SHOW ESCAPE",
" ",
"To display other settings:",
" SHOW COMMUNICATIONS, SHOW TERMINAL, SHOW FILE, SHOW PROTOCOL, etc.",
#else /* !NOLOCAL */
" ",
"To display settings:",
" SHOW COMMUNICATIONS, SHOW FILE, SHOW PROTOCOL, etc.",
#endif /* NOLOCAL */
" ",
"The manual for C-Kermit is the book \"Using C-Kermit\". For information",
"about the manual, visit:",
" http://www.kermitproject.org/usingckermit.html",
" ",
"For an online C-Kermit tutorial, visit:",
" http://www.kermitproject.org/ckututor.html",
" ",
"To learn about script programming and automation:",
" http://www.kermitproject.org/ckscripts.html",
" ",
"For further information about a particular command, type HELP xxx,",
"where xxx is the name of the command. For documentation, news of new",
"releases, and information about other Kermit software, visit the",
"Kermit Project website:",
" ",
" http://www.kermitproject.org/",
" ",
"For information about technical support please visit this page:",
" ",
" http://www.kermitproject.org/support.html",
""
};
static char * hmxymatch[] = {
"SET MATCH { DOTFILE, FIFO } { ON, OFF }",
" Tells whether wildcards should match dotfiles (files whose names begin",
" with period) or UNIX FIFO special files. MATCH FIFO default is OFF.",
" MATCH DOTFILE default is OFF in UNIX, ON elsewhere.",
""
};
#ifndef NOSEXP
static char * hmxysexp[] = {
"SET SEXPRESSION { DEPTH-LIMIT, ECHO-RESULT, TRUNCATE-ALL-RESULTS }",
" DEPTH-LIMIT sets a limit on the depth of nesting or recursion in",
" S-Expressions to prevent the program from crashing from memory exhaustion.",
" ECHO-RESULT tells whether S-Expression results should be displayed as",
" a result of evaluating an expression; the default is to display only at",
" top (interactive) level; OFF means never display; ON means always display.",
" TRUNCATE-ALL-RESULTS ON means the results of all arithmetic operations",
" should be forced to integers (whole numbers) by discarding any fractional",
" part. The default is OFF. SHOW SEXPRESSION displays the current settings."
,""
};
#endif /* NOSEXP */
#ifdef OS2
#ifdef KUI
static char * hmxygui[] = {
"SET GUI CLOSE OFF",
" Disables the System Menu Close and File->Exit functions which could be",
" used to exit Kermit. Once disabled these functions cannot be re-enabled",
" and the only way to exit Kermit is via the Kermit Script EXIT command.",
" ",
"SET GUI DIALOGS { ON, OFF }",
" ON means that popups, alerts, use GUI dialogs; OFF means to use",
" text-mode popups or prompts. ON by default.",
" ",
"SET GUI FONT name size",
" Chooses the font and size. Type \"set gui font ?\" to see the list of",
" choices. The size can be a whole number or can contain a decimal point",
" and a fraction (which is rounded to the nearest half point).",
" ",
"SET GUI MENUBAR OFF",
" Disables menubar functions which could be used to modify the Kermit",
" session configuration. Once disabled the menubar functions cannot be",
" re-enabled.",
" ",
"SET GUI RGBCOLOR colorname redvalue greenvalue bluevalue",
" Specifies the red-green-blue mixture to be used to render the given",
" color name. Type \"set gui rgbcolor\" to see a list of colornames.",
" the RGB values are whole numbers from 0 to 255.",
" ",
"SET GUI TOOLBAR OFF",
" Disables toolbar functions which could be used to modify the Kermit",
" session configuration. Once disabled the toolbar functions cannot be",
" re-enabled.",
" ",
"SET GUI WINDOW POSITION x y",
" Moves the C-Kermit window to the given X,Y coordinates, pixels from top",
" left. (Not yet implemented -- use command-line options to do this.)",
" ",
"SET GUI WINDOW RESIZE-MODE { CHANGE-DIMENSIONS, SCALE-FONT }",
" Default is CHANGE-DIMENSIONS.",
"",
"SET GUI WINDOW RUN-MODE { MAXIMIZE, MINIMIZE, RESTORE }",
" Changes the run mode state of the GUI window.",
""
};
#endif /* KUI */
#endif /* OS2 */
static char * hmxxfunc[] = {
"KERMIT FUNCTIONS",
" ",
" Functions are part of Kermit's programming language used in writing",
" scripts. They are like functions in other programming languages like C",
" and Perl; each function has a name and an argument list, and it returns",
" (is replaced by) a value. In a Kermit script, the function name preceded",
" by a backslash (\\) and then the letter F; for example:",
" ",
" \\Findex(string1,string2).",
" ",
" The argument list is in parentheses. In this example the name of the",
" function is 'index', the arguments are string1 and string2, and the return",
" value is the starting position of string2 in string1; type HELP FUNC INDEX",
" for details.",
" ",
" Type SHOW FUNCTIONS to see a list of available functions.",
" ",
" Type HELP FUNCTION xxx more information about specific functions:",
" ",
" . If xxx matches only one function name the documentation for that",
" function is printed; example: HELP FUNCTION INDEX.",
" ",
" . If xxx matches more than one function name, a list of all functions",
" whose names contain xxx is printed; example: HELP FUNCTION DATE.",
""
};
#ifdef ANYSSH
static char * hmxxssh[] = {
#ifdef SSHBUILTIN
"Syntax: SSH { ADD, AGENT, CLEAR, KEY, [ OPEN ], V2 } operands...",
" Performs an SSH-related action, depending on the keyword that follows:",
" ",
"SSH ADD LOCAL-PORT-FORWARD local-port host port",
" Adds a port forwarding triplet to the local port forwarding list.",
" The triplet specifies a local port to be forwarded and the hostname /",
" ip-address and port number to which the port should be forwarded from",
" the remote host. Port forwarding is activated at connection",
" establishment and continues until the connection is terminated.",
" ",
"SSH ADD REMOTE-PORT-FORWARD remote-port host port",
" Adds a port forwarding triplet to the remote port forwarding list.",
" The triplet specifies a remote port to be forwarded and the",
" hostname/ip-address and port number to which the port should be",
" forwarded from the local machine. Port forwarding is activated at",
" connection establishment and continues until the connection is",
" terminated.",
" ",
"SSH AGENT ADD [ identity-file ]",
" Adds the contents of the identity-file (if any) to the SSH AGENT",
" private key cache. If no identity-file is specified, all files",
" specified with SET SSH IDENTITY-FILE are added to the cache.",
" ",
"SSH AGENT DELETE [ identity-file ]",
" Deletes the contents of the identity-file (if any) from the SSH AGENT",
" private key cache. If no identity-file is specified, all files",
" specified with SET SSH IDENTITY-FILE are deleted from the cache.",
" ",
"SSH AGENT LIST [ /FINGERPRINT ]",
" Lists the contents of the SSH AGENT private key cache. If /FINGERPRINT",
" is specified, the fingerprint of the private keys are displayed instead",
" of the keys.",
" ",
"SSH CLEAR LOCAL-PORT-FORWARD",
" Clears the local port forwarding list.",
" ",
"SSH CLEAR REMOTE-PORT-FORWARD",
" Clears the remote port forwarding list.",
" ",
"SSH KEY commands:",
" The SSH KEY commands create and manage public and private key pairs",
" (identities). There are four forms of SSH keys. Each key pair is",
" stored in its own set of files:",
" ",
" Key Type Private Key File Public Key File",
" RSA keys \\v(home).ssh/id_rsa \\v(home).ssh/id_rsa.pub",
" DSA keys \\v(home).ssh/id_dsa \\v(home).ssh/id_dsa.pub",
" ECDSA keys \\v(home).ssh/id_ecdsa \\v(home).ssh/id_ecdsa.pub",
" ED25519 keys \\v(home).ssh/id_ed25519 \\v(home).ssh/id_ed25519.pub",
" ",
" Keys are stored using the OpenSSH keyfile format. The private key",
" files can be (optionally) protected by specifying a passphrase. A",
" passphrase is a longer version of a password. English text provides",
" no more than 2 bits of key data per character. 56-bit keys can be",
" broken by a brute force attack in approximately 24 hours. When used,",
" private key files should therefore be protected by a passphrase of at",
" least 40 characters (about 80 bits).",
" ",
" To install a public key file on the host, you must transfer the file",
" to the host and append it to your \"authorized_keys\" file. The file",
" permissions must be 600 (or equivalent).",
" ",
"SSH KEY CHANGE-PASSPHRASE [ /NEW-PASSPHRASE:passphrase",
" /OLD-PASSPHRASE:passphrase ] filename",
" This re-encrypts the specified private key file with a new passphrase.",
" The old passphrase is required. If the passphrases (and filename) are",
" not provided Kermit prompts your for them.",
" ",
"SSH KEY CREATE [ /BITS:bits /PASSPHRASE:passphrase",
" /TYPE:{ DSS, ECDSA, ED25519, RSA } ] filename",
" This command creates a new private/public key pair. The defaults is",
" TYPE:ED25519. The filename is the name of the private key file. The",
" The public key is created with the same name with .pub appended to it.",
" If a filename is not specified Kermit prompts you for it. Key length ",
" options (/BITS:) depends on the key type:",
" ",
" ECDSA: 256 (default), 384, 521",
" RSA: 1024, 2048, 3072 (default), 4096, 8192",
" DSS: 1024 (default), 2048",
" ",
" ED25519 does not support being given a key length and any value supplied",
" via /BITS: will be ignored.",
" ",
#ifdef COMMENT
"SSH KEY DISPLAY [ /FORMAT:{FINGERPRINT,IETF,OPENSSH,SSH.COM} ] filename",
" This command displays the contents of a public or private key file.",
" The default format is OPENSSH.",
" ",
#endif
"SSH KEY DISPLAY [ /FORMAT:{FINGERPRINT,OPENSSH,SSH.COM} ] filename",
" This command displays the fingerprint or public key for the specified key.",
" Default action is to show the fingerprint.",
" ",
#ifdef COMMENT
"SSH KEY V1 SET-COMMENT filename comment",
" This command replaces the comment associated with a V1 RSA key file.",
" ",
#endif
"SSH [ OPEN ] host [ port ] [ /COMMAND:command /USER:username",
" /PASSWORD:pwd /VERSION:{ 1, 2 } /X11-FORWARDING:{ ON, OFF } ]",
" This command establishes a new connection using SSH version 1 or",
" version 2 protocol. The connection is made to the specified host on",
" the SSH port (you can override the port by including a port name or",
" number after the host name). Once the connection is established the",
" authentication negotiations begin. If the authentication is accepted,",
" the local and remote port forwarding lists are used to establish the",
" desired connections. If X11 Forwarding is active, this results in a",
" remote port forwarding between the X11 clients on the remote host and",
" X11 Server on the local machine. If a /COMMAND is provided, the",
" command is executed on the remote host in place of your default shell.",
" ",
" An example of a /COMMAND to execute C-Kermit in SERVER mode is:",
" SSH OPEN hostname /COMMAND:{kermit -x -l 0}",
" ",
#ifdef COMMENT
"SSH V2 REKEY",
" Requests that an existing SSH V2 connection generate new session keys.",
#endif
#else /* SSHBUILTIN */
"Syntax: SSH [ options ] <hostname> [ command ]",
" Makes an SSH connection using the external ssh program via the SET SSH",
" COMMAND string, which is \"ssh -e none\" by default. Options for the",
" external ssh program may be included. If the hostname is followed by a",
" command, the command is executed on the host instead of an interactive",
" shell.",
#endif /* SSHBUILTIN */
""
};
static char *hmxyssh[] = {
#ifdef SSHBUILTIN
"SET SSH AGENT-FORWARDING { ON, OFF }",
" If an authentication agent is in use, setting this value to ON",
" results in the connection to the agent being forwarded to the remote",
" computer. The default is OFF.",
" ",
"SET SSH CHECK-HOST-IP { ON, OFF }",
" Specifies whether the remote host's ip-address should be checked",
" against the matching host key in the known_hosts file. This can be",
" used to determine if the host key changed as a result of DNS spoofing.",
" The default is ON.",
" ",
"SET SSH COMPRESSION { ON, OFF }",
" Specifies whether compression will be used. The default is ON.",
" ",
"SET SSH DYNAMIC-FORWARDING { ON, OFF }",
" Specifies whether Kermit is to act as a SOCKS4 service on port 1080",
" when connected to a remote host via SSH. When Kermit acts as a SOCKS4",
" service, it accepts connection requests and forwards the connections",
" through the remote host. The default is OFF.",
" ",
"SET SSH GATEWAY-PORTS { ON, OFF }",
" Specifies whether Kermit should act as a gateway for forwarded",
" connections received from the remote host. The default is OFF.",
" ",
"SET SSH GSSAPI DELEGATE-CREDENTIALS { ON, OFF }",
" Specifies whether Kermit should delegate GSSAPI credentials to ",
" the remote host after authentication. Delegating credentials allows",
" the credentials to be used from the remote host. The default is OFF.",
" ",
"SET SSH HEARTBEAT-INTERVAL <seconds>",
" Specifies a number of seconds of idle time after which an IGNORE",
" message will be sent to the server. This pulse is useful for",
" maintaining connections through HTTP Proxy servers and Network",
" Address Translators. The default is OFF (0 seconds).",
" ",
"SET SSH IDENTITY-FILE filename [ filename [ ... ] ]",
" Specifies one or more files from which the user's authorization",
" identities (private keys) are to be read when using public key",
" authorization. These are files used in addition to the default files:",
" ",
" \\v(appdata)ssh/identity V1 RSA",
" \\v(appdata)ssh/id_rsa V2 RSA",
" \\v(appdata)ssh/id_dsa V2 DSA",
" ",
#ifdef COMMENT
"SET SSH KERBEROS4 TGT-PASSING { ON, OFF }",
" Specifies whether Kermit should forward Kerberos 4 TGTs to the host.",
" The default is OFF.",
" ",
"SET SSH KERBEROS5 TGT-PASSING { ON, OFF }",
" Specifies whether Kermit should forward Kerberos 5 TGTs to to the",
" host. The default is OFF.",
" ",
#endif
"SET SSH PRIVILEGED-PORT { ON, OFF }",
" Specifies whether a privileged port (less than 1024) should be used",
" when connecting to the host. Privileged ports are not required except",
" when using SSH V1 with Rhosts or RhostsRSA authorization. The default",
" is OFF.",
" ",
#ifdef COMMENT
"SET SSH PROXY-COMMAND [ command ]",
" Specifies the command to be executed in order to connect to the remote",
" host. ",
" ",
#endif
"SET SSH QUIET { ON, OFF }",
" Specifies whether all messages generated in conjunction with SSH",
" protocols should be suppressed. The default is OFF.",
" ",
"SET SSH STRICT-HOST-KEY-CHECK { ASK, ON, OFF }",
" Specifies how Kermit should behave if the the host key check fails.",
" When strict host key checking is OFF, the new host key is added to the",
" protocol-version-specific user-known-hosts-file. When strict host key",
" checking is ON, the new host key is refused and the connection is",
" dropped. When set to ASK, Kermit prompt you to say whether the new",
" host key should be accepted. The default is ASK.",
" ",
" Strict host key checking protects you against Trojan horse attacks.",
" It depends on you to maintain the contents of the known-hosts-file",
" with current and trusted host keys.",
" ",
"SET SSH USE-OPENSSH-CONFIG { ON, OFF }",
" Specifies whether Kermit should parse an OpenSSH configuration file",
" after applying Kermit's SET SSH commands. The configuration file",
" would be located at \\v(home)ssh/ssh_config. The default is OFF.",
" ",
#ifdef COMMENT
"SET SSH V1 CIPHER { 3DES, BLOWFISH, DES }",
" Specifies which cipher should be used to protect SSH version 1",
" connections. The default is 3DES.",
" ",
"SET SSH V1 GLOBAL-KNOWN-HOSTS-FILE filename",
" Specifies the location of the system-wide known-hosts file. The",
" default is:",
" ",
" \v(common)ssh_known_hosts",
" ",
"SET SSH V1 USER-KNOWN-HOSTS-FILE filename",
" Specifies the location of the user-known-hosts-file. The default",
" location is:",
" ",
" \\v(appdata)ssh/known_hosts",
" ",
#endif
"SET SSH V2 AUTHENTICATION { GSSAPI, KEYBOARD-INTERACTIVE, PASSWORD, ",
" PUBKEY } [ ... ]",
" Specifies an unordered list of SSH version 2 authentication methods to",
" be used when connecting to the remote host. The default list is:",
" ",
" publickey keyboard-interactive password none",
" ",
"SET SSH V2 AUTO-REKEY { ON, OFF }",
" Specifies whether Kermit automatically issues rekeying requests",
" once an hour when SSH version 2 in in use. The default is ON.",
" ",
"SET SSH V2 CIPHERS { 3DES-CBC, AES128-CBC, AES192-CBC, AES256-CBC, ",
" AES128-CTR, AES192-CTR, AES256-CTR, AES128-GCM@OPENSSH.COM, ",
" AES256-GCM@OPENSSH.COM, CHACHAE20-POLY1305 }",
" Specifies an ordered list of SSH version ciphers to be used to encrypt",
" the established connection. The default list is:",
" ",
" aes256-gcm@openssh.com aes128-gcm@openssh.com aes256-ctr aes192-ctr",
" aes128-ctr aes256-cbc aes192-cbc aes128-cbc 3des-cbc",
" ",
"SET SSH V2 GLOBAL-KNOWN-HOSTS-FILE filename",
" Specifies the location of the system-wide known-hosts file. The default",
" location is:",
" ",
" \\v(common)ssh/known_hosts2",
" ",
"SET SSH V2 HOSTKEY-ALGORITHMS { ECDSA-SHA2-NISTP256, ECDSA-SHA2-NISTP384, ",
" ECDSA-SHA2-NISTP521, RSA-SHA2-256, RSA-SHA2-512, SSH-DSS, SSH-ED25519, ",
" SSH-RSA }",
" Specifies an ordered list of hostkey algorithms to be used to verify",
" the identity of the host. The default list is",
" ",
" ssh-ed25519 ecdsa-sha2-nistp521 ecdsa-sha2-nistp384 ecdsa-sha2-nistp256",
" rsa-sha2-512 rsa-sha2-256 ssh-rsa",
" ",
"SET SSH V2 KEY-EXCHANGE-METHODS { CURVE25519-SHA256, ",
" CURVE25519-SHA256@LIBSSH.ORG, DIFFIE-HELLMAN-GROUP1-SHA1, ",
" DIFFIE-HELLMAN-GROUP14-SHA1, DIFFIE-HELLMAN-GROUP14-SHA256, ",
" DIFFIE-HELLMAN-GROUP16-SHA512, DIFFIE-HELLMAN-GROUP18-SHA512, ",
" DIFFIE-HELLMAN-GROUP-EXCHANGE-SHA1, ",
" DIFFIE-HELLMAN-GROUP-EXCHANGE-SHA256, ECDH-SHA2-NISTP256, ",
" ECDH-SHA2-NISTP384, ECDH-SHA2-NISTP521 }",
" Specifies an ordered list of Key Exchange Methods to be used to generate ",
" per-connection keys. The default list is:",
" ",
" curve25519-sha256 curve25519-sha256@libssh.org ecdh-sha2-nistp256 ",
" ecdh-sha2-nistp384 ecdh-sha2-nistp521 diffie-hellman-group18-sha512",
" diffie-hellman-group16-sha512 diffie-hellman-group-exchange-sha256",
" diffie-hellman-group14-sha256 diffie-hellman-group14-sha1 ",
" diffie-hellman-group1-sha1 ext-info-c",
" ",
"SET SSH V2 MACS { HMAC-MD5, HMAC-SHA1-ETM@OPENSSH.COM, HMAC-SHA2-256, ",
" HMAC-SHA2-256-ETM@OPENSSH.COM, HMAC-SHA2-512, ",
" HMAC-SHA2-512-ETM@OPENSSH.COM, NONE }",
" Specifies an ordered list of Message Authentication Code algorithms to",
" be used for integrity protection of the established connection. The",