OJ/metasploit-javapayload — pull request #1 by timwr (2014-09-15 16:43:42+00:00)
Title: PROCESS_HANDLE should be a Long

Hi @OJ
I gave https://github.com/rapid7/metasploit-javapayload/pull/17 a quick test on Android to see if it fixes https://dev.metasploit.com/redmine/issues/8824, but I kept running into this issue:

```
W/System.err(26909): Caused by: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Long
W/System.err(26909): at com.metasploit.meterpreter.TLVPacket.write(Unknown Source)
W/System.err(26909): at com.metasploit.meterpreter.TLVPacket.write(Unknown Source)
W/System.err(26909): at com.metasploit.meterpreter.TLVPacket.toByteArray(Unknown Source)
W/System.err(26909): at com.metasploit.meterpreter.Meterpreter.writeTLV(Unknown Source)
W/System.err(26909): at com.metasploit.meterpreter.Meterpreter.startExecuting(Unknown Source)
W/System.err(26909): at com.metasploit.meterpreter.AndroidMeterpreter.(AndroidMeterpreter.java:50)
W/System.err(26909): ... 10 more
```
I suspect this was caused by: https://github.com/rapid7/metasploit-javapayload/pull/17/files#diff-521fcf4b96303b404c5e0ba27a8b49cdL52. This change should fix the above exception. I also tested https://dev.metasploit.com/redmine/issues/8824 (by running:
shell
exit
ps
over and over on the java (and Android) meterpreter). It looks like that issue is fixed now too, great stuff!