public byte[] getPayload() {
    if (payload == null) {
      TypesWriter tw = new TypesWriter();
      tw.writeByte(Packets.SSH_MSG_GLOBAL_REQUEST);

      tw.writeString("tcpip-forward");
      tw.writeBoolean(wantReply);
      tw.writeString(bindAddress);
      tw.writeUINT32(bindPort);

      payload = tw.getBytes();
    }
    return payload;
  }
コード例 #2
0
  public byte[] getPayload() {
    if (payload == null) {
      TypesWriter tw = new TypesWriter();
      tw.writeByte(Packets.SSH_MSG_CHANNEL_REQUEST);
      tw.writeUINT32(recipientChannelID);
      tw.writeString("pty-req");
      tw.writeBoolean(wantReply);
      tw.writeString(term);
      tw.writeUINT32(character_width);
      tw.writeUINT32(character_height);
      tw.writeUINT32(pixel_width);
      tw.writeUINT32(pixel_height);
      tw.writeString(terminal_modes, 0, terminal_modes.length);

      payload = tw.getBytes();
    }
    return payload;
  }
コード例 #3
0
 public byte[] getPayload() {
   if (payload == null) {
     TypesWriter tw = new TypesWriter();
     tw.writeByte(Packets.SSH_MSG_CHANNEL_REQUEST);
     tw.writeUINT32(recipientChannelID);
     tw.writeString("trilead-ping");
     tw.writeBoolean(true);
     payload = tw.getBytes();
   }
   return payload;
 }