fix: NEWKEYS 后重置序列号为 0(加密上下文切换)
This commit is contained in:
1 parent
8c5f0fa6ed
commit
d355e2c10c
2 files changed
+6
No files matched your search
@@ -79,6 +79,10 @@ export class SSHPacketParser {
|
||||
return this.seqNum;
|
||||
}
|
||||
|
||||
resetSeqNum(): void {
|
||||
this.seqNum = 0;
|
||||
}
|
||||
|
||||
getBufferLength(): number {
|
||||
return this.buffer.length;
|
||||
}
|
||||
|
||||
@@ -220,6 +220,8 @@ export class SSHSession {
|
||||
await this.writeSocket(packet);
|
||||
console.log('[KEX] NEWKEYS sent');
|
||||
|
||||
this.seqNumSend = 0;
|
||||
this.packetParser.resetSeqNum();
|
||||
await this.enableEncryption();
|
||||
console.log('[KEX] Encryption enabled');
|
||||
|
||||
|
||||
Reference in new issue
Block a user