浏览代码

SSH finally fixed

Wulf Pfeiffer 10 年之前
父节点
当前提交
a35544628a
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/de/tudarmstadt/informatik/hostage/protocol/SSH.java

+ 2 - 2
src/de/tudarmstadt/informatik/hostage/protocol/SSH.java

@@ -123,7 +123,7 @@ public class SSH implements Protocol {
 
 	@Override
 	public TALK_FIRST whoTalksFirst() {
-		return TALK_FIRST.SERVER;
+		return TALK_FIRST.CLIENT;
 	}
 
 	@Override
@@ -138,12 +138,12 @@ public class SSH implements Protocol {
 		}
 		switch (state) {
 		case NONE:
+			extractType(request);
 			responsePackets.add(new Packet(serverVersion + serverType + "\r\n",
 					toString()));
 			state = STATE.SERVER_VERSION;
 			break;
 		case SERVER_VERSION:
-			extractType(request);
 			extractPayload(request);
 			responsePackets.add(kexInit());
 			state = STATE.CLIENT_VERSION;