Subversion Repositories Kolibri OS

Rev

Rev 7698 | Rev 9071 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7698 Rev 9070
Line 1... Line 1...
1
;    ssh.asm - SSH client for KolibriOS
1
;    ssh.asm - SSH client for KolibriOS
2
;
2
;
3
;    Copyright (C) 2015-2017 Jeffrey Amelynck
3
;    Copyright (C) 2015-2021 Jeffrey Amelynck
4
;
4
;
5
;    This program is free software: you can redistribute it and/or modify
5
;    This program is free software: you can redistribute it and/or modify
6
;    it under the terms of the GNU General Public License as published by
6
;    it under the terms of the GNU General Public License as published by
7
;    the Free Software Foundation, either version 3 of the License, or
7
;    the Free Software Foundation, either version 3 of the License, or
8
;    (at your option) any later version.
8
;    (at your option) any later version.
Line 16... Line 16...
16
;    along with this program.  If not, see .
16
;    along with this program.  If not, see .
Line 17... Line 17...
17
 
17
 
Line 18... Line 18...
18
format binary as ""
18
format binary as ""
19
 
19
 
Line 20... Line 20...
20
__DEBUG__       = 1
20
__DEBUG__       = 1
21
__DEBUG_LEVEL__ = 2             ; 1: Extreme debugging, 2: Debugging, 3: Errors only
21
__DEBUG_LEVEL__ = 3             ; 1: Everything, including sinsitive information, 2: Debugging, 3: Errors only
Line 22... Line 22...
22
 
22
 
Line 55... Line 55...
55
 
55
 
56
include 'aes256.inc'
56
include 'aes256.inc'
57
include 'aes256-ctr.inc'
57
include 'aes256-ctr.inc'
Line -... Line 58...
-
 
58
include 'aes256-cbc.inc'
-
 
59
 
-
 
60
include 'blowfish.inc'
-
 
61
include 'blowfish-ctr.inc'
58
include 'aes256-cbc.inc'
62
include 'blowfish-cbc.inc'
59
 
63
 
60
include 'hmac_sha256.inc'
64
include 'hmac_sha256.inc'
Line 61... Line 65...
61
include 'hmac_sha1.inc'
65
include 'hmac_sha1.inc'
Line 86... Line 90...
86
        DEBUGF  1,'%x',eax
90
        DEBUGF  1,'%x', eax
87
        loop    .next_dword
91
        loop    .next_dword
88
        DEBUGF  1,'\n'
92
        DEBUGF  1,'\n'
Line 89... Line 93...
89
 
93
 
90
        popad
-
 
91
        ret
94
        popad
-
 
95
end if
92
end if
96
        ret
Line 93... Line 97...
93
endp
97
endp
Line 94... Line 98...
94
 
98
 
Line 112... Line 116...
112
        rx_crypt_ctx_ptr        dd ?
116
        rx_crypt_ctx_ptr        dd ?
113
        tx_crypt_ctx_ptr        dd ?
117
        tx_crypt_ctx_ptr        dd ?
114
        rx_crypt_blocksize      dd ?
118
        rx_crypt_blocksize      dd ?
115
        tx_crypt_blocksize      dd ?
119
        tx_crypt_blocksize      dd ?
Line -... Line 120...
-
 
120
 
-
 
121
        rx_padsize              dd ?    ; = Max(8, rx_crypt_blocksize)
-
 
122
        tx_padsize              dd ?    ; = Max(8, tx_crypt_blocksize)
116
 
123
 
Line 117... Line 124...
117
; Message authentication
124
; Message authentication
118
 
125
 
119
        rx_mac_proc             dd ?
126
        rx_mac_proc             dd ?
Line 254... Line 261...
254
        pop     esi
261
        pop     esi
255
; test for error
262
; test for error
256
        test    eax, eax
263
        test    eax, eax
257
        jnz     dns_error
264
        jnz     dns_error
Line 258... Line -...
258
 
-
 
259
        invoke  con_cls
265
 
260
        invoke  con_write_asciiz, str3
266
        invoke  con_write_asciiz, str3
Line 261... Line 267...
261
        invoke  con_write_asciiz, con.hostname
267
        invoke  con_write_asciiz, con.hostname
262
 
268
 
Line 274... Line 280...
274
        invoke  freeaddrinfo, esi
280
        invoke  freeaddrinfo, esi
Line 275... Line 281...
275
 
281
 
Line 276... Line 282...
276
        invoke  con_write_asciiz, str9
282
        invoke  con_write_asciiz, str9
277
 
-
 
Line 278... Line 283...
278
        mcall   40, EVM_STACK + EVM_KEY
283
 
279
        invoke  con_cls
284
        mcall   40, EVM_STACK + EVM_KEY
280
 
285
 
281
; Create socket
286
; Create socket
Line 328... Line 333...
328
        mov     [con.tx_crypt_proc], 0
333
        mov     [con.tx_crypt_proc], 0
329
        mov     [con.rx_mac_proc], 0
334
        mov     [con.rx_mac_proc], 0
330
        mov     [con.tx_mac_proc], 0
335
        mov     [con.tx_mac_proc], 0
331
        mov     [con.rx_mac_length], 0
336
        mov     [con.rx_mac_length], 0
332
        mov     [con.tx_mac_length], 0
337
        mov     [con.tx_mac_length], 0
-
 
338
        mov     [con.rx_padsize], 8                     ; minimum padsize
-
 
339
        mov     [con.tx_padsize], 8
Line 333... Line 340...
333
 
340
 
334
        DEBUGF  2, "Sending KEX init\n"
341
        DEBUGF  2, "Sending KEX init\n"
335
        mov     edi, ssh_kex.cookie
342
        mov     edi, ssh_kex.cookie
336
        call    MBRandom
343
        call    MBRandom
Line 421... Line 428...
421
        mov     dword[con.rx_buffer+sizeof.ssh_packet_header-5], eax
428
        mov     dword[con.rx_buffer+sizeof.ssh_packet_header-5], eax
422
        invoke  sha256_update, con.temp_ctx, con.rx_buffer+sizeof.ssh_packet_header-5, edx
429
        invoke  sha256_update, con.temp_ctx, con.rx_buffer+sizeof.ssh_packet_header-5, edx
Line 423... Line 430...
423
 
430
 
Line -... Line 431...
-
 
431
; Exchange keys with the server
-
 
432
 
424
; Exchange keys with the server
433
; TODO: host verification
425
 
434
 
426
        stdcall dh_gex
435
        stdcall dh_gex
Line 427... Line 436...
427
        test    eax, eax
436
        test    eax, eax
Line 428... Line 437...
428
        jnz     exit
437
        jnz     exit
Line 429... Line 438...
429
 
438
 
430
; Set keys
439
; Set keys
Line 431... Line 440...
431
 
440
 
432
        DEBUGF  2, "SSH: Setting encryption keys\n"
441
        DEBUGF  2, "SSH: Setting encryption keys\n"
433
 
442
 
-
 
443
        stdcall aes256_ctr_init, con.rx_iv
Line 434... Line 444...
434
        stdcall aes256_cbc_init, con.rx_iv
444
        mov     [con.rx_crypt_ctx_ptr], eax
435
        mov     [con.rx_crypt_ctx_ptr], eax
445
 
Line 436... Line 446...
436
 
446
        stdcall aes256_set_encrypt_key, eax, con.rx_enc_key
437
        stdcall aes256_set_decrypt_key, eax, con.rx_enc_key
447
        mov     [con.rx_crypt_proc], aes256_ctr_crypt
438
        mov     [con.rx_crypt_proc], aes256_cbc_decrypt
448
        mov     [con.rx_crypt_blocksize], AES256_BLOCKSIZE
-
 
449
        mov     [con.rx_padsize], AES256_BLOCKSIZE
Line 439... Line 450...
439
        mov     [con.rx_crypt_blocksize], AES256_BLOCKSIZE
450
 
440
 
451
        stdcall aes256_ctr_init, con.tx_iv
441
        stdcall aes256_cbc_init, con.tx_iv
452
        mov     [con.tx_crypt_ctx_ptr], eax
Line 463... Line 474...
463
        cmp     eax, -1
474
        cmp     eax, -1
464
        je      socket_err
475
        je      socket_err
Line 465... Line 476...
465
 
476
 
Line 466... Line 477...
466
; << Check for service acceptance
477
; << Check for service acceptance
467
 
478
 
468
        stdcall ssh_recv_packet, con, 0
479
        stdcall ssh_msg_handler, con, 0
Line 469... Line 480...
469
        cmp     eax, -1
480
        cmp     eax, -1
470
        je      socket_err
481
        je      socket_err
Line 471... Line 482...
471
 
482
 
Line 472... Line -...
472
        cmp     [con.rx_buffer.message_code], SSH_MSG_SERVICE_ACCEPT
-
 
473
        jne     proto_err
-
 
474
 
483
        cmp     [con.rx_buffer.message_code], SSH_MSG_SERVICE_ACCEPT
475
; >> Request user authentication
-
 
476
 
-
 
Line -... Line 484...
-
 
484
        jne     proto_err
-
 
485
 
-
 
486
; >> Request user authentication
-
 
487
 
-
 
488
        DEBUGF  2, "SSH: User authentication\n"
-
 
489
 
-
 
490
        mcall   68, 12, 1024    ; FIXME
-
 
491
        test    eax, eax
-
 
492
        jz      done            ; FIXME
-
 
493
        mov     edi, eax
477
; TODO: Request username from the user
494
        mov     ebx, eax
-
 
495
        mov     byte[edi], SSH_MSG_USERAUTH_REQUEST
-
 
496
        inc     edi
-
 
497
 
Line -... Line 498...
-
 
498
        ; Get username
-
 
499
        add     edi, 4
-
 
500
        invoke  con_write_asciiz, str12
-
 
501
        invoke  con_gets, edi, 256      ; FIXME
-
 
502
        test    eax, eax
-
 
503
        jz      done            ; FIXME
-
 
504
 
-
 
505
        mov     edx, eax
-
 
506
        mov     ecx, 256
-
 
507
        xor     al, al
-
 
508
        repne   scasb
-
 
509
 
-
 
510
        dec     edi             ; \0
-
 
511
        dec     edi             ; \n
-
 
512
        push    edi
478
;        invoke  con_write_asciiz, str12
513
        sub     edi, edx
-
 
514
        bswap   edi
-
 
515
        mov     [edx-4], edi
-
 
516
        pop     edi
-
 
517
 
-
 
518
        mov     dword[edi], 0x0e000000  ; 14 Bswapped
-
 
519
        mov     dword[edi+4], "ssh-"
-
 
520
        mov     dword[edi+8], "conn"
-
 
521
        mov     dword[edi+12], "ecti"
-
 
522
        mov     word[edi+16], "on"
-
 
523
        add     edi, 18
-
 
524
 
-
 
525
        mov     dword[edi], 0x08000000  ; 8 Bswapped
-
 
526
        mov     dword[edi+4], "pass"
-
 
527
        mov     dword[edi+8], "word"
-
 
528
 
-
 
529
        mov     byte[edi+12], 0         ; bool
-
 
530
        add     edi, 13
-
 
531
 
-
 
532
        ; Get password
-
 
533
        add     edi, 4
-
 
534
        invoke  con_write_asciiz, str13
-
 
535
        push    eax
-
 
536
        invoke  con_gets, edi, 256      ; FIXME
-
 
537
        test    eax, eax
-
 
538
        jz      done            ; FIXME
-
 
539
 
-
 
540
        mov     edx, eax
-
 
541
        mov     ecx, 256
-
 
542
        xor     al, al
-
 
543
        repne scasb
-
 
544
 
-
 
545
        dec     edi             ; \0
-
 
546
        dec     edi             ; \n
-
 
547
        push    edi
-
 
548
        sub     edi, edx
-
 
549
        bswap   edi
-
 
550
        mov     [edx-4], edi
-
 
551
        pop     edi
-
 
552
        sub     edi, ebx
-
 
553
 
-
 
554
        push    ebx
-
 
555
        stdcall ssh_send_packet, con, ebx, edi, 0
-
 
556
 
-
 
557
        ; Clear used buffer and free
-
 
558
        pop     edx
Line 479... Line -...
479
;        invoke  con_gets, username, 256
-
 
480
;        test    eax, eax
559
        mov     edi, edx
481
;        jz      done
560
        push    eax
Line -... Line 561...
-
 
561
        mov     ecx, 1024/4     ; FIXME
-
 
562
        xor     eax, eax
482
 
563
        rep stosd
Line 483... Line 564...
483
; TODO: implement password authentication
564
        mcall   68, 13, edx
484
 
565
        pop     eax
485
        DEBUGF  2, "SSH: User authentication\n"
566
 
Line 486... Line 567...
486
 
567
        cmp     eax, -1
487
        stdcall ssh_send_packet, con, ssh_request_userauth, ssh_request_userauth.length, 0
568
        je      socket_err
Line 505... Line 586...
505
        cmp     eax, -1
586
        cmp     eax, -1
506
        je      socket_err
587
        je      socket_err
Line 507... Line 588...
507
 
588
 
Line 508... Line 589...
508
; << Check for channel open confirmation
589
; << Check for channel open confirmation
509
 
590
 
510
        stdcall ssh_recv_packet, con, 0
591
        stdcall ssh_msg_handler, con, 0
Line 511... Line 592...
511
        cmp     eax, -1
592
        cmp     eax, -1
512
        je      socket_err
593
        je      socket_err
Line 522... Line 603...
522
        cmp     eax, -1
603
        cmp     eax, -1
523
        je      socket_err
604
        je      socket_err
Line 524... Line 605...
524
 
605
 
Line 525... Line 606...
525
; << Check for channel request confirmation
606
; << Check for channel request confirmation
526
 
607
 
527
        stdcall ssh_recv_packet, con, 0
608
        stdcall ssh_msg_handler, con, 0
Line 528... Line 609...
528
        cmp     eax, -1
609
        cmp     eax, -1
529
        je      socket_err
610
        je      socket_err
Line 539... Line 620...
539
        cmp     eax, -1
620
        cmp     eax, -1
540
        je      socket_err
621
        je      socket_err
Line 541... Line 622...
541
 
622
 
Line -... Line 623...
-
 
623
; << Check for channel request confirmation (FIXME: this may not be first packet!)
-
 
624
 
542
; << Check for channel request confirmation (FIXME: this may not be first packet!)
625
; TODO
543
 
626
;
544
;        stdcall ssh_recv_packet, con, 0
627
;        stdcall ssh_msg_handler, con, 0
Line 545... Line 628...
545
;        cmp     eax, -1
628
;        cmp     eax, -1
546
;        je      socket_err
629
;        je      socket_err
Line 558... Line 641...
558
mainloop:
641
mainloop:
559
        call    [con_get_flags]
642
        call    [con_get_flags]
560
        test    eax, 0x200                      ; con window closed?
643
        test    eax, 0x200                      ; con window closed?
561
        jnz     exit
644
        jnz     exit
Line 562... Line 645...
562
 
645
 
563
        stdcall ssh_recv_packet, con, 0
646
        stdcall ssh_msg_handler, con, 0
564
        cmp     eax, 0
647
        cmp     eax, 0
Line 565... Line 648...
565
        jbe     closed
648
        jbe     closed
566
 
649
 
Line 591... Line 674...
591
        DEBUGF  1, "\n"
674
        DEBUGF  1, "\n"
592
        jmp     mainloop
675
        jmp     mainloop
Line 593... Line 676...
593
 
676
 
-
 
677
 
-
 
678
proto_err:
-
 
679
        mov     eax, con.rx_buffer
594
 
680
        int3
595
proto_err:
681
 
596
        DEBUGF  3, "SSH: protocol error\n"
682
        DEBUGF  3, "SSH: protocol error\n"
Line 597... Line 683...
597
        invoke  con_write_asciiz, str7
683
        invoke  con_write_asciiz, str7
Line 626... Line 712...
626
thread:
712
thread:
627
        mcall   40, 0
713
        mcall   40, 0
628
  .loop:
714
  .loop:
629
        invoke  con_getch2
715
        invoke  con_getch2
630
        mov     [ssh_channel_data+9], al
716
        mov     [ssh_channel_data+9], al
631
        stdcall ssh_send_packet, con, ssh_channel_data, ssh_channel_data.length, 0
717
        stdcall ssh_send_packet, con, ssh_channel_data, ssh_channel_data.length, MSG_DONTWAIT
Line 632... Line 718...
632
 
718
 
633
        invoke  con_get_flags
719
        invoke  con_get_flags
634
        test    eax, 0x200                      ; con window closed?
720
        test    eax, 0x200                      ; con window closed?
635
        jz      .loop
721
        jz      .loop
Line -... Line 722...
-
 
722
        mcall   -1
-
 
723
 
-
 
724
 
-
 
725
; Handle common messages and return from specific ones
-
 
726
proc ssh_msg_handler, con, flags
-
 
727
 
-
 
728
  .recv:
-
 
729
        stdcall ssh_recv_packet, [con], [flags]
-
 
730
        cmp     eax, -1
-
 
731
        je      .ret
-
 
732
 
-
 
733
        cmp     [con.rx_buffer.message_code], SSH_MSG_DISCONNECT
-
 
734
        je      .disc
-
 
735
        cmp     [con.rx_buffer.message_code], SSH_MSG_IGNORE
-
 
736
        je      .ign
-
 
737
        cmp     [con.rx_buffer.message_code], SSH_MSG_DEBUG
-
 
738
        je      .dbg
-
 
739
        cmp     [con.rx_buffer.message_code], SSH_MSG_GLOBAL_REQUEST
-
 
740
        je      .glob
-
 
741
 
-
 
742
  .ret:
-
 
743
        ret
-
 
744
 
-
 
745
  .disc:
-
 
746
        mov     eax, -1
-
 
747
        ret
-
 
748
 
-
 
749
  .ign:
-
 
750
        jmp     .recv
-
 
751
 
-
 
752
  .dbg:
-
 
753
  .glob:
-
 
754
        ; TODO
-
 
755
 
-
 
756
        jmp     .recv
-
 
757
 
636
        mcall   -1
758
endp
637
 
759
 
638
; data
760
; data
639
title   db      'Secure Shell',0
761
title   db      'Secure Shell',0
640
str1    db      'SSH client for KolibriOS',10,10,\
762
str1    db      'SSH client for KolibriOS',10,10,\
641
                'Please enter URL of SSH server (host:port)',10,10,0
763
                'Please enter URL of SSH server (hostname:port)',10,10,0
642
str2    db      '> ',0
764
str2    db      '> ',0
643
str3    db      'Connecting to ',0
765
str3    db      'Connecting to ',0
644
str4    db      10,0
766
str4    db      10,0
645
str5    db      'Name resolution failed.',10,10,0
767
str5    db      'Name resolution failed.',10,10,0
646
str6    db      'A socket error occured.',10,10,0
768
str6    db      'A socket error occured.',10,10,0
647
str7    db      'A protocol error occured.',10,10,0
769
str7    db      'A protocol error occured.',10,10,0
648
str8    db      ' (',0
770
str8    db      ' (',0
649
str9    db      ')',10,0
771
str9    db      ')',10,0
650
str10   db      'Invalid hostname.',10,10,0
772
str10   db      'Invalid hostname.',10,10,0
-
 
773
str11   db      10,'Remote host closed the connection.',10,10,0
-
 
774
str12   db      'Login as: ',0
Line 651... Line 775...
651
str11   db      10,'Remote host closed the connection.',10,10,0
775
str13   db      'Password: ', 27, '[?25l', 27, '[30;40m', 0
652
str12   db      'Enter username: ',0
776
str14   db      10, 27, '[?25h', 27, '[0m', 0
653
 
777
 
654
ssh_ident_ha:
778
ssh_ident_ha:
655
        dd_n (ssh_ident.length-2)
779
        dd_n (ssh_ident.length-2)
Line 656... Line 780...
656
ssh_ident:
780
ssh_ident:
657
        db "SSH-2.0-KolibriOS_SSH_0.02",13,10
781
        db "SSH-2.0-KolibriOS_SSH_0.03",13,10
658
  .length = $ - ssh_ident
782
  .length = $ - ssh_ident
Line 667... Line 791...
667
  .server_host_key_algorithms:
791
  .server_host_key_algorithms:
668
        dd_n .encryption_algorithms_client_to_server - .server_host_key_algorithms - 4
792
        dd_n .encryption_algorithms_client_to_server - .server_host_key_algorithms - 4
669
        db "ssh-rsa"                    ;,ssh-dss
793
        db "ssh-rsa"                    ;,ssh-dss
670
  .encryption_algorithms_client_to_server:
794
  .encryption_algorithms_client_to_server:
671
        dd_n .encryption_algorithms_server_to_client - .encryption_algorithms_client_to_server - 4
795
        dd_n .encryption_algorithms_server_to_client - .encryption_algorithms_client_to_server - 4
672
        db "aes256-cbc"                 ;,aes256-ctr,aes256-cbc,rijndael-cbc@lysator.liu.se,aes192-ctr,aes192-cbc,aes128-ctr,aes128-cbc,blowfish-ctr,blowfish-cbc,3des-ctr,3des-cbc,arcfour256,arcfour128"
796
        db "aes256-ctr"                 ;,aes256-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes192-ctr,aes192-cbc,aes128-ctr,aes128-cbc,blowfish-ctr,blowfish-cbc,3des-ctr,3des-cbc,arcfour256,arcfour128"
673
  .encryption_algorithms_server_to_client:
797
  .encryption_algorithms_server_to_client:
674
        dd_n .mac_algorithms_client_to_server - .encryption_algorithms_server_to_client - 4
798
        dd_n .mac_algorithms_client_to_server - .encryption_algorithms_server_to_client - 4
675
        db "aes256-cbc"                 ;,aes256-ctr,aes256-cbc,rijndael-cbc@lysator.liu.se,aes192-ctr,aes192-cbc,aes128-ctr,aes128-cbc,blowfish-ctr,blowfish-cbc,3des-ctr,3des-cbc,arcfour256,arcfour128"
799
        db "aes256-ctr"                 ;,aes256-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes192-ctr,aes192-cbc,aes128-ctr,aes128-cbc,blowfish-ctr,blowfish-cbc,3des-ctr,3des-cbc,arcfour256,arcfour128"
676
  .mac_algorithms_client_to_server:
800
  .mac_algorithms_client_to_server:
677
        dd_n .mac_algorithms_server_to_client - .mac_algorithms_client_to_server - 4
801
        dd_n .mac_algorithms_server_to_client - .mac_algorithms_client_to_server - 4
678
        db "hmac-sha2-256"              ;,hmac-sha1,hmac-sha1-96,hmac-md5"
802
        db "hmac-sha2-256"              ;,hmac-sha1,hmac-sha1-96,hmac-md5"
679
  .mac_algorithms_server_to_client:
803
  .mac_algorithms_server_to_client:
680
        dd_n .compression_algorithms_client_to_server - .mac_algorithms_server_to_client - 4
804
        dd_n .compression_algorithms_client_to_server - .mac_algorithms_server_to_client - 4
Line 698... Line 822...
698
  .length = $ - ssh_kex
822
  .length = $ - ssh_kex
Line 699... Line 823...
699
 
823
 
700
 
824
 
701
ssh_gex_req:
825
ssh_gex_req:
702
        db SSH_MSG_KEX_DH_GEX_REQUEST
826
        db SSH_MSG_KEX_DH_GEX_REQUEST
703
        dd_n 8192/4                      ; DH GEX min
827
        dd_n 4096/4                      ; DH GEX min
704
        dd_n 8192/2                      ; DH GEX number of bits
828
        dd_n 4096/2                      ; DH GEX number of bits
Line 705... Line 829...
705
        dd_n 8192                        ; DH GEX Max
829
        dd_n 4096                        ; DH GEX Max
706
  .length = $ - ssh_gex_req
830
  .length = $ - ssh_gex_req
Line 718... Line 842...
718
  .length = $ - ssh_request_service
842
  .length = $ - ssh_request_service
Line 719... Line 843...
719
 
843
 
720
 
844
 
721
ssh_request_userauth:
-
 
722
        db SSH_MSG_USERAUTH_REQUEST
845
ssh_request_userauth:
723
        dd_n 12
846
        db SSH_MSG_USERAUTH_REQUEST
724
        dd_n 8
847
        dd_n 9
725
        db "username"                   ; user name in ISO-10646 UTF-8 encoding [RFC3629]
848
        db "user123"                    ; user name in ISO-10646 UTF-8 encoding [RFC3629]
726
        dd_n 14
849
        dd_n 14
727
        db "ssh-connection"             ; service name in US-ASCII
850
        db "ssh-connection"             ; service name in US-ASCII
728
        dd_n 4
851
        dd_n 8
-
 
852
        db "password"                   ; method name in US-ASCII: none, publickey, password, hostbased
-
 
853
        db 0                            ; bool: false
729
        db "none"                       ; method name in US-ASCII
854
        dd_n 14
Line 730... Line 855...
730
; Other options: publickey, password, hostbased
855
        db "pass123"
731
  .length = $ - ssh_request_userauth
856
  .length = $ - ssh_request_userauth
Line 794... Line 919...
794
        con_gets, 'con_gets', \
919
        con_gets, 'con_gets', \
795
        con_cls, 'con_cls', \
920
        con_cls, 'con_cls', \
796
        con_getch2, 'con_getch2', \
921
        con_getch2, 'con_getch2', \
797
        con_set_cursor_pos, 'con_set_cursor_pos', \
922
        con_set_cursor_pos, 'con_set_cursor_pos', \
798
        con_write_string, 'con_write_string', \
923
        con_write_string, 'con_write_string', \
-
 
924
        con_get_flags,  'con_get_flags', \
799
        con_get_flags,  'con_get_flags'
925
        con_set_flags,  'con_set_flags'
Line 800... Line 926...
800
 
926
 
801
import  libcrash, \
927
import  libcrash, \
802
        sha256_init, 'sha256_init', \
928
        sha256_init, 'sha256_init', \
803
        sha256_update, 'sha256_update', \
929
        sha256_update, 'sha256_update', \