File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -1002,6 +1002,30 @@ def nop_generator
1002
1002
}
1003
1003
end
1004
1004
1005
+
1006
+ #
1007
+ # Generates a NOP sled using the #make_nops method.
1008
+ # The difference between this and #make_nops is this method is much faster, good for exploit
1009
+ # developers that actually want huge chunks of NOPs. The downside of using this is the NOP sled
1010
+ # is less randomized.
1011
+ #
1012
+ # @param count [String] Number of NOPs to return.
1013
+ # @return [String] NOPs
1014
+ #
1015
+ def make_fast_nops ( count )
1016
+ max_nop_chunk_size = 100
1017
+
1018
+ if count < max_nop_chunk_size
1019
+ return make_nops ( count )
1020
+ end
1021
+
1022
+ nops = make_nops ( max_nop_chunk_size )
1023
+ nops += nops while nops . length < count
1024
+
1025
+ nops [ 0 , count ]
1026
+ end
1027
+
1028
+
1005
1029
#
1006
1030
# Generates a nop sled of a supplied length and returns it to the caller.
1007
1031
#
You can’t perform that action at this time.
0 commit comments