private String preprocessToJs(byte[] loader) throws Exception {
  Pair<ArrayList<Integer>,List<Byte>> data=preprocessRop(loader);
  List<Long> longList=new ArrayList<>();
  for (  Integer i : data.first) {
    longList.add(i & 0xFFFFFFFFL);
  }
  String payload=TextUtils.join(",",longList);
  String relocations=TextUtils.join(",",data.second);
  return String.format("\npayload = [%1$s];\nrelocs = [%2$s];\n",payload,relocations);
}

private String preprocessToJs ( byte [ ] loader ) throws Exception { Pair < ArrayList < Integer > , List < Byte > > data = preprocessRop ( loader ) ; List < Long > longList = new ArrayList < > ( ) ; for ( Integer i : data . first ) { longList . add ( i & 0xFFFFFFFFL ) ; } String payload = TextUtils . join ( "," , longList ) ; String relocations = TextUtils . join ( "," , data . second ) ; return String . format ( "\npayload = [%1$s];\nrelocs = [%2$s];\n" , payload , relocations ) ; }
convert the loader code to shellcode embedded in js
