721
722
723
724
725
726
727
728
729
730
731
732
733
734
|
strcpy(buf, "Remote sent disconnect: ");
nowlen = strlen(buf);
if (msglen > sizeof(buf) - nowlen - 1)
msglen = sizeof(buf) - nowlen - 1;
memcpy(buf + nowlen, pktin.body + 4, msglen);
buf[nowlen + msglen] = '\0';
logevent(buf);
}
crFinish(0);
}
static int ssh2_rdpkt(unsigned char **data, int *datalen)
{
|
>
|
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
|
strcpy(buf, "Remote sent disconnect: ");
nowlen = strlen(buf);
if (msglen > sizeof(buf) - nowlen - 1)
msglen = sizeof(buf) - nowlen - 1;
memcpy(buf + nowlen, pktin.body + 4, msglen);
buf[nowlen + msglen] = '\0';
logevent(buf);
bombout(("Server sent disconnect message:\n\"%s\"", buf+nowlen));
}
crFinish(0);
}
static int ssh2_rdpkt(unsigned char **data, int *datalen)
{
|
894
895
896
897
898
899
900
901
902
903
904
905
906
907
|
strcpy(buf, "Disconnection message text: ");
nowlen = strlen(buf);
if (msglen > sizeof(buf) - nowlen - 1)
msglen = sizeof(buf) - nowlen - 1;
memcpy(buf + nowlen, pktin.data + 14, msglen);
buf[nowlen + msglen] = '\0';
logevent(buf);
}
crFinish(0);
}
static void ssh1_pktout_size(int len)
{
|
>
>
>
>
>
|
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
|
strcpy(buf, "Disconnection message text: ");
nowlen = strlen(buf);
if (msglen > sizeof(buf) - nowlen - 1)
msglen = sizeof(buf) - nowlen - 1;
memcpy(buf + nowlen, pktin.data + 14, msglen);
buf[nowlen + msglen] = '\0';
logevent(buf);
bombout(("Server sent disconnect message\ntype %d (%s):\n\"%s\"",
reason,
(reason > 0 && reason < lenof(ssh2_disconnect_reasons)) ?
ssh2_disconnect_reasons[reason] : "unknown",
buf+nowlen));
}
crFinish(0);
}
static void ssh1_pktout_size(int len)
{
|