1 2 package ch.ethz.ssh2.packets; 3 4 10 public class PacketSessionStartShell 11 { 12 byte[] payload; 13 14 public int recipientChannelID; 15 public boolean wantReply; 16 17 public PacketSessionStartShell(int recipientChannelID, boolean wantReply) 18 { 19 this.recipientChannelID = recipientChannelID; 20 this.wantReply = wantReply; 21 } 22 23 public byte[] getPayload() 24 { 25 if (payload == null) 26 { 27 TypesWriter tw = new TypesWriter(); 28 tw.writeByte(Packets.SSH_MSG_CHANNEL_REQUEST); 29 tw.writeUINT32(recipientChannelID); 30 tw.writeString("shell"); 31 tw.writeBoolean(wantReply); 32 payload = tw.getBytes(); 33 } 34 return payload; 35 } 36 } 37 | Popular Tags |