/**
  * Send a request packet over this meterpreter.
  *
  * @param packet Packet parameters
  * @param method Method to invoke
  */
 public void writeRequestPacket(String method, TLVPacket tlv) throws IOException {
   tlv.add(TLVType.TLV_TYPE_METHOD, method);
   char[] requestID = new char[32];
   for (int i = 0; i < requestID.length; i++) {
     requestID[i] = (char) ('A' + rnd.nextInt(26));
   }
   tlv.add(TLVType.TLV_TYPE_REQUEST_ID, new String(requestID));
   this.transports.current().writePacket(tlv, TLVPacket.PACKET_TYPE_REQUEST);
 }
Esempio n. 2
0
 @Override
 public void writeToParcel(Parcel dest, int flags) {
   super.writeToParcel(dest, flags);
   dest.writeInt(this.shotType);
 }